Unit ID
EgIy32rTpPTPA2ydUsJgdBqLtMjJvyRjnxy8QspvTlU=
Received
08.10.2024 09:41:17
Confirmation delay (full node)
17 minutes 2 seconds
Confirmation delay (light node)
22 minutes 59 seconds
Messages
Definition
Definition: [ "autonomous agent", { "messages": { "cases": [ { "if": "{ $key = 'balance'||trigger.address||' '||trigger.data.asset; $base_key = 'balance'||trigger.address||' '||'asset'; $fee = 1000; $required_amount = trigger.data.amount + ((trigger.data.asset == 'asset') ? $fee : 0); trigger.data.withdraw AND trigger.data.asset AND trigger.data.amount AND $required_amount <= var[$key] AND $fee <= var[$base_key] }", "messages": [ { "app": "payment", "payload": { "asset": "{trigger.data.asset}", "outputs": [ { "address": "{trigger.address}", "amount": "{trigger.data.amount}" } ] } }, { "app": "state", "state": "{ var[$key] = var[$key] - trigger.data.amount; var[$base_key] = var[$base_key] - $fee; }" } ] }, { "if": "{!trigger.data.withdraw}", "messages": [ { "app": "state", "state": "{ $asset = trigger.output[[asset!=base]].asset; if ($asset == 'ambiguous') bounce('ambiguous asset'); if (trigger.output[[asset=base]] > 10000){ $base_key = 'balance'||trigger.address||' '||'asset'; var[$base_key] = var[$base_key] + trigger.output[[asset=base]]; $response_base = trigger.output[[asset=base]] || 'byte\ '; } if ($asset != 'none'){ $asset_key = 'balance'||trigger.address||' '||$asset; var[$asset_key] = var[$asset_key] + trigger.output[[asset=$asset]]; $response_asset = trigger.output[[asset=$asset]] || ' of ' || $asset || '\ '; } response['message'] = 'accepted coins:\ ' || ($response_base otherwise '') || ($response_asset otherwise ''); }" } ] } ] } } ]
Technical information
Fees:
2,295 bytes
(451 headers, 1844 payload)
Level:11290643
Witnessed level:11290629
Main chain index:10901777
Latest included mc index:10901776
Status:stable/confirmed/final