Unit ID
Q1cQpyRzbqO7h8NYOOYQw0QBDFGxgk8EAkSIOgO3DEg=
Received
02.09.2024 15:07:04
Confirmation delay (full node)
21 minutes 23 seconds
Messages
Definition
Definition: [ "autonomous agent", { "init": "{ $my_address = '2QHG44PZLJWD2H7C5ZIWH4NZZVB6QCC7'; }", "messages": { "cases": [ { "if": "{trigger.data.withdraw AND trigger.data.asset AND trigger.data.amount AND trigger.address == $my_address}", "messages": [ { "app": "payment", "payload": { "asset": "{trigger.data.asset}", "outputs": [ { "address": "{trigger.address}", "amount": "{trigger.data.amount}" } ] } } ] }, { "if": "{trigger.data.exchange_rate AND trigger.address == $my_address}", "messages": [ { "app": "state", "state": "{ var['rate'] = trigger.data.exchange_rate; response['message'] = 'set exchange rate to '||var['rate']||' coins/bit'; }" } ] }, { "if": "{trigger.output[[asset=base]] > 1000}", "init": "{ $bit_amount = trigger.output[[asset=base]]; $asset_amount = round($bit_amount * var['rate']); response['message'] = 'exchanged '||$bit_amount||' 8 bits for 1 byte'||$asset_amount||' asset.'; }", "messages": [ { "app": "payment", "payload": { "asset": "n9y3VomFeWFeZZ2PcSEcmyBb/bI7kzZduBJigNetnkY=", "outputs": [ { "address": "{trigger.address}", "amount": "{ $asset_amount }" } ] } } ] }, { "messages": [ { "app": "state", "state": "{ response['message'] = 'accepted coins: '||trigger.output[[asset=base]]||' byte or bit'||trigger.output[[asset='n9y3VomFeWFeZZ2PcSEcmyBb/bI7kzZduBJigNetnkY=']]||' coin as asset'; }" } ] } ] } } ]
Technical information
Fees:
1,932 bytes
(451 headers, 1481 payload)
Level:11221672
Witnessed level:11221664
Main chain index:10834381
Latest included mc index:10834380
Status:stable/confirmed/final