Unit ID
lsyjYGvzmSqQcQaFKr9UQvdO9ImiCeh4HlN7a6J7BS0=
Received
01.08.2019 20:06:45
Confirmation delay (full node)
2 minutes 39 seconds
Confirmation delay (light node)
3 minutes 50 seconds
Messages
Definition
Definition: [ "autonomous agent", { "bounce_fees": { "base": 20000 }, "init": "{ $my_address = 'T77QBAHR4CN2G6KJ3BHMJLAAPU2WG2KG'; }", "messages": { "cases": [ { "if": "{trigger.data.define}", "messages": [ { "app": "asset", "payload": { "cap": "{trigger.data.cap otherwise ''}", "is_private": false, "is_transferrable": true, "auto_destroy": "{!!trigger.data.auto_destroy}", "fixed_denominations": false, "issued_by_definer_only": "{!!trigger.data.issued_by_definer_only}", "cosigned_by_definer": false, "spender_attested": "{!!trigger.data.attestor1}", "attestors": [ "{trigger.data.attestor1 otherwise ''}", "{trigger.data.attestor2 otherwise ''}", "{trigger.data.attestor3 otherwise ''}" ] } }, { "app": "state", "state": "{ var[response_unit] = trigger.address; var[response_unit || ':&!!asset_name'] = trigger.data.asset_name otherwise 'default'; response['asset_unit'] = response_unit; }" } ] }, { "if": "{trigger.data.withdraw AND trigger.data.asset AND trigger.data.amount AND var[trigger.data.asset] == trigger.address}", "messages": [ { "app": "payment", "payload": { "asset": "{trigger.data.asset}", "outputs": [ { "address": "{trigger.address}", "amount": "{trigger.data.amount}" } ] } } ] }, { "if": "{trigger.data.exchange_rate AND trigger.data.asset AND var[trigger.data.asset] == trigger.address}", "messages": [ { "app": "state", "state": "{ var[trigger.data.asset || ':&!!rate'] = trigger.data.exchange_rate; response['message'] = 'set exchange rate to '||var[trigger.data.asset || ':&!!rate']||' tokens/byte'; }" } ] }, { "if": "{trigger.output[[asset=base]] > 50000 AND trigger.data.asset }", "init": "{ $bytes_amount = trigger.output[[asset=base]]; $asset_amount = round($bytes_amount * var[trigger.data.asset || ':&!!rate']); response['message'] = 'exchanged '||$bytes_amount||' bytes for '||$asset_amount||' asset.'; }", "messages": [ { "app": "payment", "payload": { "asset": "{trigger.data.asset}", "outputs": [ { "address": "{trigger.address}", "amount": "{ $asset_amount }" } ] } }, { "app": "payment", "payload": { "asset": "base", "outputs": [ { "address": "{var[trigger.data.asset]}", "amount": "{trigger.output[[asset=base]]}" } ] } } ] }, { "if": "{trigger.address == $my_address AND trigger.data.withdraw_leftover}", "messages": [ { "app": "payment", "payload": { "asset": "base", "outputs": [ { "address": "{$my_address}", "amount": "{trigger.data.trigger.data.withdraw_leftover}" } ] } } ] }, { "messages": [ { "app": "state", "state": "{ response['message'] = 'accepted coins: '||trigger.output[[asset=base]]||' bytes and '||trigger.output[[asset=trigger.data.asset]]||' asset.'; }" } ] } ] } } ]
Technical information
Fees:
2,273 bytes
(353 headers, 1920 payload)
Level:979810
Witnessed level:979801
Main chain index:978630
Latest included mc index:978629
Status:stable/confirmed/final