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
A+6gkwec2k9Lw5QdNgs3nL+920+a6FtNIcA5vPcVSqI=
Received
26.08.2019 23:10:45
Confirmation delay (full node)
9 minutes 28 seconds
Confirmation delay (light node)
13 minutes 29 seconds
Authors
DPYEPM34AUBLZFLCJKKGSJ3R34373IUA
Children
x3v6JTRwzZyPjWZ3C8jQurXRE2fNklEerofapyeJ4rY=
Parents
MHaGQg/qWxGG+F4r41H2N0v8+Hf9g8zc/W+2iqdPSp4=
Messages
Definition
Address:
IP6PFLEMMJUEJQANWVUSNGSSQSBHSXJU
Definition:
[ "autonomous agent", { "init": "{ // Owner of the AA can withdraw the dust if calculable $OWNER = "MYESSCFGDERS3YIEGNZDOG2BI5HKQHLU"; }", "messages": { "cases": [ { "if": "{ trigger.data.create }", "init": "{ $name = trigger.data.create; $other_party = trigger.data.other_party otherwise bounce ("need 'other_party' address!"); $guarantee = trigger.output[[asset=base]]; $total_guarantee_balance = var["total_guarantee_balance"] otherwise 0; }", "messages": [ { "app": "state", "state": "{ var[$name||"_party1"] = trigger.address; var[$name||"_party2"] = $other_party; var[$name||"_guarantee"] = $guarantee; var["total_guarantee_balance"] = $total_guarantee_balance + $guarantee; response['message'] = "Done! Later, the parties will have to agree on how to spread the guarantee ("||$guarantee||") by sending the 'amount' they allow the other party to receive, if the sum of the 2 amounts is equal to the guarantee then the payment will be executed."; }" } ] }, { "if": "{ trigger.data.name }", "init": "{ //Checks $name = trigger.data.name; $guarantee = var[$name||"_guarantee"] otherwise bounce ("Guarantee 'name' do not exist!"); $amount = trigger.data.amount otherwise bounce ("Need the 'amount' you allow the other party to receive!"); if ($amount > $guarantee) bounce ("The amount is bigger than the full guarantee!"); $p1 = var[$name||"_party1"] otherwise bounce ("No party1 !"); $p2 = var[$name||"_party2"] otherwise bounce ("No party2 !"); if (trigger.address != $p1 and trigger.address != $p2) bounce ("You are not part of the agreement!"); // get the propositions $released_by_1 = ( trigger.address == $p1 ) ? $amount : var[$name||"_released_by_1"] otherwise $guarantee; $released_by_2 = ( trigger.address == $p2 ) ? $amount : var[$name||"_released_by_2"] otherwise $guarantee; // Check if guarantee is found and define if amount must be paid $agreement_found = ( $released_by_1 + $released_by_2 ) == $guarantee; $amount_to_send_to_1 = $agreement_found ? $proposition2 : 0; $amount_to_send_to_2 = $agreement_found ? $proposition1 : 0; }", "messages": [ { "app": "payment", "payload": { "asset": "base", "outputs": [ { "address": "{var[$name||"_party1"]}", "amount": "{ $amount_to_send_to_1 }" }, { "address": "{var[$name||"_party2"]}", "amount": "{ $amount_to_send_to_2 }" }, { "address": "{trigger.address}", "amount": "{ trigger.output[[asset=base]]-2000 }" } ] } }, { "app": "state", "state": "{ if ($agreement_found) { // clear the full state var[$name||"_party1"] = false; var[$name||"_party2"] = false; var[$name||"_guarantee"] = false; var[$name||"_released_by_1"] = false; var[$name||"_released_by_2"] = false; var["total_guarantee_balance"] -= $guarantee; response['message'] = "Agreement found and funds sent back to parties ^^"; } else { // safe the proposition if (var[$name||"_party1"] == trigger.address) var[$name||"_released_by_1"] = $amount; else var[$name||"_released_by_2"] = $amount; response['message'] = "Proposition recorded ("||$amount||" bytes), the other party should set 'amount' to "|| ($guarantee - $amount)||" bytes to find agreement ^^"; } }" } ] }, { "init": "{ if (trigger.address != $owner) bounce ("you need to read the doc!"); }", "messages": [ { "app": "payment", "payload": { "asset": "base", "outputs": [ { "address": "{$owner}", "amount": "{ balance[base] - var["blocked_balance"] - 1000 }" } ] } }, { "app": "state", "state": "{ response['message'] = "Dust sent to owner"; }" } ] } ] } } ]
Witnesses
2FF7PSL7FYXVU5UIQHCVDTTPUOOG75GX
2GPBEZTAXKWEXMWCTGZALIZDNWS5B3V7
4H2AMKF6YO2IWJ5MYWJS3N7Y2YU2T4Z5
DFVODTYGTS3ILVOQ5MFKJIERH6LGKELP
ERMF7V2RLCPABMX5AMNGUQBAH4CD5TK4
F4KHJUCLJKY4JV7M5F754LAJX4EB7M4N
IOF6PTBDTLSTBS5NWHUSD7I2NHK3BQ2T
O4K4QILG6VPGTYLRAI2RGYRFJZ7N2Q2O
OPNUXBRSSQQGHKQNEPD2GLWQYEUY5XLD
PA4QK46276MJJD5DBOLIBMYKNNXMUVDP
RJDYXC4YQ4AZKFYTJVCR5GQJF5J6KPRI
WELOXP3EOA75JWNO6S5ZJHOO3EYFKPIR
Technical information
Fees:
3,950
bytes
(353 headers, 3597 payload)
Level:
1027369
Witnessed level:
1027362
Last ball unit:
OgnLYntzQb79NEVNxubB8R7sEiUIudoHAVlyFwBFvPI=
Main chain index:
1026182
Latest included mc index:
1026181
Status:
stable/confirmed/final