Unit ID
3Lc2hDuAb4TVqSUg/mM7RYGhUnHrMxqL7HA4HLsH45g=
Received
02.09.2024 15:25:05
Confirmation delay (full node)
20 minutes 51 seconds
Confirmation delay (light node)
37 minutes 53 seconds
Messages
Definition
Definition: [ "autonomous agent", { "init": "{ $my_address = 'N6XYEP3R26Y3R25AT4NAJCEF4RT7DZCH'; }", "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']||' assets/byte'; }" } ] }, { "if": "{trigger.output[[asset=base]] > 1000}", "init": "{ $bytes_amount = trigger.output[[asset=base]]; $asset_amount = round($bytes_amount * var['rate']); response['message'] = 'exchanged '||$bytes_amount||' bytes for bits'||$asset_amount||' asset.'; }", "messages": [ { "app": "payment", "payload": { "asset": "k9rkI09k2GZE53L18u8ZCZwIPvj7D+Zc+ydmbRltqR4=", "outputs": [ { "address": "{trigger.address}", "amount": "{ $asset_amount }" } ] } } ] }, { "messages": [ { "app": "state", "state": "{ response['message'] = 'accepted coins: '||trigger.output[[asset=base]]||' bytes and bits'||trigger.output[[asset='k9rkI09k2GZE53L18u8ZCZwIPvj7D+Zc+ydmbRltqR4=']]||' tokens.'; }" } ] } ] } } ]
Technical information
Fees:
1,934 bytes
(451 headers, 1483 payload)
Level:11221696
Witnessed level:11221684
Main chain index:10834404
Latest included mc index:10834403
Status:stable/confirmed/final