Unit ID
Xoi9/NJ8TK1g40WHZNoQxe52ftQvYtEelhUFKxoptOE=
Received
02.09.2024 14:37:32
Confirmation delay (full node)
25 minutes 29 seconds
Confirmation delay (light node)
33 minutes 5 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'] || ' tokens/byte'; }" } ] }, { "if": "{trigger.output[[asset=base]] > 100000}", "init": "{ $bit_amount = trigger.output[[asset=base]]; $asset_amount = round($bit_amount * var['rate']); response['message'] = 'exchanged ' || $bit_amount || ' bit for ' || $asset_amount || ' asset.'; }", "messages": [ { "app": "payment", "payload": { "asset": "5Ol63Q6fNyXd8PwdTHa64tN9y9DAsGHqR0XRtoFW7bs=", "outputs": [ { "address": "{trigger.address}", "amount": "{ $asset_amount }" } ] } } ] }, { "messages": [ { "app": "state", "state": "{ response['message'] = 'accepted coins: ' || trigger.output[[asset=base]] || ' bytes and ' || trigger.output[[asset='5Ol63Q6fNyXd8PwdTHa64tN9y9DAsGHqR0XRtoFW7bs=']] || ' tokens.'; }" } ] } ] } } ]
Technical information
Fees:
1,940 bytes
(451 headers, 1489 payload)
Level:11221640
Witnessed level:11221626
Main chain index:10834352
Latest included mc index:10834350
Status:stable/confirmed/final