Unit ID
0yZVrEL9PCSC3yH9FBKOfzwS/HsG3ZTA62cnayu5IFU=
Received
11.09.2019 13:04:22
Confirmation delay (full node)
1 minute 12 seconds
Confirmation delay (light node)
5 minutes 19 seconds
Messages
Definition
Definition: [ "autonomous agent", { "init": "{ $release_fee = 1000; $balance_key = 'balance_'||trigger.address; response['info'] ="Welcome user! This AA allows to keep your bytes. Please add 'keep' data field with any value if you want to store bytes or 'release' data field if you want to withdraw previously deposited bytes. "; }", "messages": { "cases": [ { "if": "{trigger.data.keep}", "messages": [ { "app": "state", "state": "{ var[$balance_key] = var[$balance_key] + trigger.output[[asset=base]]; response['message'] = trigger.output[[asset=base]] || ' bytes will be keeped.'; }" } ] }, { "if": "{trigger.data.release AND var[$balance_key] >= $release_fee}", "messages": [ { "app": "payment", "payload": { "asset": "base", "outputs": [ { "address": "{trigger.address}", "amount": "{ var[$balance_key] - $release_fee}" } ] } }, { "app": "state", "state": "{ response['message'] = var[$balance_key] - $release_fee|| ' bytes will be released. Transaction fee is'|| $release_fee || ' bytes'; var[$balance_key] = 0; }" } ] }, { "if": "{trigger.data.release}", "messages": [ { "app": "state", "state": "{ bounce('The payment will be bounced. No bytes to release for this address or their amount is less than' || $release_fee || ' bytes fee.'); }" } ] }, { "messages": [ { "app": "state", "state": "{ bounce("The payment will be bounced. Please add 'keep' or 'release' data field with any value."); }" } ] } ] } } ]
Technical information
Fees:
1,728 bytes
(353 headers, 1375 payload)
Level:1055309
Witnessed level:1055300
Main chain index:1054082
Latest included mc index:1054081
Status:stable/confirmed/final