Transfers view
UTXO view
Obyte.org
Unit Legend
- not on main chain, not stable
- main chain, not stable
- bad unit
- not on main chain, stable/confirmed/final
- main chain, stable/confirmed/final
- not on main chain, selected
- main chain, selected
Close
Close
Unit ID
m+L72+thoZa4aOyWYsJ3Ih2U/CKsG5123NAm+6fD2sM=
Received
19.08.2019 19:56:32
Confirmation delay (full node)
1 minute 39 seconds
Confirmation delay (light node)
3 minutes 12 seconds
Authors
DPYEPM34AUBLZFLCJKKGSJ3R34373IUA
Children
a41vFzy+/Jkml3hPUHBAzzebbC1RT7he5JfcrI60nfo=
Parents
p4gOte5HSKa1Mzz3hIAfA4bJXeHvp6c3oS5IDZD5iS8=
Messages
Definition
Address:
2JNQ3EX2G7NGHVAU6CMGDCZLJWGAIJ7B
Definition:
[ "autonomous agent", { "init": "{ // JAAAWS, Joint Account Agent $owner = "O7NYCFUL5XIJTYE3O4MKGMGMTN6ATQAJ"; //office_testnet_wallet $input_pid = trigger.data.pay_id otherwise trigger.data.pi otherwise ""; if ($input_pid != "") // for validation steps and payment step { $account = var[$input_pid||"_account"]; $amount_to_pay = var[$input_pid||"_amount"]; $address_to_pay = var[$input_pid||"_address"]; $pay_id = $input_pid; $pay_initiator = var[$input_pid||"_initiator"]; } else // for account creation and init { $account = trigger.data.account otherwise trigger.data.ac otherwise ""; $amount_to_pay = trigger.data.amount_to_pay otherwise trigger.data.am otherwise 0; $address_to_pay = trigger.data.address_to_pay otherwise trigger.data.ad otherwise ""; $pay_id = sha256($account||'>'||$pay_address||':'||$pay_amount); $pay_initiator = trigger.address; } if ($account=="") bounce ("need account name"); $party1 = trigger.data.address1 otherwise trigger.data.a1 otherwise var[$account||"_1"] otherwise ""; $party2 = trigger.data.address2 otherwise trigger.data.a2 otherwise var[$account||"_2"] otherwise ""; $party3 = trigger.data.address3 otherwise trigger.data.a3 otherwise var[$account||"_3"] otherwise ""; $trg = trigger.address; $b_is_a_party = ($trg == $party1) or ($trg == $party2) or ($trg == $party3) or ($trg == $address_to_pay); // if (trigger.address == $party1) $i_party_num = 1; // if (trigger.address == $party2) $i_party_num = 2; // if (trigger.address == $party3) $i_party_num = 3; if ($input_pid != "") // for validation steps and payment step { $b_pay_needed_v_from_1 = var[$input_pid||"_need_1"]; $b_pay_needed_v_from_2 = var[$input_pid||"_need_2"]; $b_pay_needed_v_from_3 = var[$input_pid||"_need_3"]; } else // for account creation and init { $b_pay_needed_v_from_1 = (trigger.address == $party1); $b_pay_needed_v_from_2 = (trigger.address == $party2); $b_pay_needed_v_from_3 = (trigger.address == $party3); } $b_initizalization = trigger.data.address_to_pay or trigger.data.ad or trigger.data.amount_to_pay or trigger.data.am; }", "messages": { "cases": [ { "if": "{(trigger.data.address_to_pay1 or trigger.data.a1) and (trigger.data.address_to_pay2 or trigger.data.a2)}", "init": "{ if (var[$account]) bounce ("Account "||$account||" already exist!"); }", "messages": [ { "app": "state", "state": "{ var[$account] = trigger.output[[asset=base]]; if ($party1 != "") var[$account||"_1"] = $party1; if ($party2 != "") var[$account||"_2"] = $party2; if ($party3 != "") var[$account||"_3"] = $party3; response['message'] = "Joint Account set for "||$account||", balance = "||var[$account]; }" } ] }, { "if": "{($input_pid!= "") or $b_initizalization}", "init": "{ // global checks if (!var[$account]) bounce ("Account "||$account||" do not exist!"); if (!$b_is_a_party) bounce ("You are not a party in account "||$account); if (trigger.data.cancel==true) // cancel { $state_pay_need_v_from_1 = false; $state_pay_need_v_from_2 = false; $state_pay_need_v_from_3 = false; $address = var[$pay_id||"_initiator"]; $amount = 1000; $state_account = false; $state_amount = false; $state_address = false; $state_initiator = false; $message = "Payment of "||$amount||" to "||$address||" is cancelled by "||$trg; } else { if ($input_pid != "") // validation { $state_pay_need_v_from_1 = $b_pay_needed_v_from_1 and ($trg != $party1); $state_pay_need_v_from_2 = $b_pay_needed_v_from_2 and ($trg != $party2); $state_pay_need_v_from_3 = $b_pay_needed_v_from_3 and ($trg != $party3); } else // initialization { $state_pay_need_v_from_1 = !(($party1 == "") or ($trg != $party1)) ; $state_pay_need_v_from_2 = !(($party2 == "") or ($trg != $party2)) ; $state_pay_need_v_from_3 = !(($party3 == "") or ($trg != $party3)) ; } $b_all_valid = ($state_pay_need_v_from_1 or $state_pay_need_v_from_2 or $state_pay_need_v_from_2); if ($b_all_valid) // payment is final { $address = var[$pay_id||"_address"]; $amount = var[$pay_id||"_amount"]; $state_account = false; $state_amount = false; $state_address = false; $state_initiator = false; $message = "Payment of "||$amount||" to "||$address||" has been proceed"; } else // validation is partial { if ($dummy) $address = $dummy; else if ($state_pay_need_v_from_1) $address = $party1; else if ($state_pay_need_v_from_2) $address = $party2; else if ($state_pay_need_v_from_3) $address = $party3; $amount = 1000; $state_account = $account; $state_amount = $amount_to_pay; $state_address = $address_to_pay; $state_initiator = $pay_initiator; $message = "JAAAWS: Your approval is required for a payment from the account '"||$account||" to pay "||$pay_amount||" to "||$pay_address||", please send me back the pay_id linked to validate the transaction. And add a cancel = true field to refuse it."; } } }", "messages": [ { "app": "data", "payload": { "message": "{$message}", "pay_id": "{$pay_id}" } }, { "app": "payment", "payload": { "asset": "base", "outputs": [ { "address": "{$address}", "amount": "{$amount}" } ] } }, { "app": "state", "state": "{ var[$pay_id||"_need_1"] = $state_pay_need_v_from_1; var[$pay_id||"_need_2"] = $state_pay_need_v_from_2; var[$pay_id||"_need_3"] = $state_pay_need_v_from_3; var[$pay_id||"_account"] = $state_account; var[$pay_id||"_amount"] = $state_amount; var[$pay_id||"_address"] = $state_address; var[$pay_id||"_initiator"] = $state_initiator; response['message'] = $message; }" } ] }, { "messages": [ { "init": "{ if ($account=="") bounce ("need account name"); $input = trigger.output[[asset=base]]; }", "app": "state", "state": "{ var[$account] += $input; response['message'] = $input||" added to the account "||$account; }" } ] } ] } } ]
Witnesses
2FF7PSL7FYXVU5UIQHCVDTTPUOOG75GX
2GPBEZTAXKWEXMWCTGZALIZDNWS5B3V7
4H2AMKF6YO2IWJ5MYWJS3N7Y2YU2T4Z5
DFVODTYGTS3ILVOQ5MFKJIERH6LGKELP
ERMF7V2RLCPABMX5AMNGUQBAH4CD5TK4
F4KHJUCLJKY4JV7M5F754LAJX4EB7M4N
IOF6PTBDTLSTBS5NWHUSD7I2NHK3BQ2T
O4K4QILG6VPGTYLRAI2RGYRFJZ7N2Q2O
OPNUXBRSSQQGHKQNEPD2GLWQYEUY5XLD
PA4QK46276MJJD5DBOLIBMYKNNXMUVDP
RJDYXC4YQ4AZKFYTJVCR5GQJF5J6KPRI
WELOXP3EOA75JWNO6S5ZJHOO3EYFKPIR
Technical information
Fees:
6,574
bytes
(353 headers, 6221 payload)
Level:
1011351
Witnessed level:
1011343
Last ball unit:
NiMJ3MSA/ENBZeB/lBZYksKrNtrvoDPQy+TDymJz8QM=
Main chain index:
1010169
Latest included mc index:
1010168
Status:
stable/confirmed/final