Unit ID
GbRbFk0l0r+F2I2CGi3o2GIZ4qfRVVZdr6/v4BqHnSc=
Received
15.08.2019 21:08:24
Confirmation delay (full node)
8 minutes 25 seconds
Confirmation delay (light node)
10 minutes 42 seconds
Messages
Definition
Definition: [ "autonomous agent", { "init": "{ $f = 1000; if(!trigger.data.scope) bounce ('please specifcy a scope'); $balance = 'balance_' || trigger.data.scope; $secret_hashed = 'secret_' || trigger.data.scope; $input = trigger.output[[asset=base]]; }", "messages": { "cases": [ { "if": "{trigger.data.set_proof}", "init": "{ if (var[$secret_hashed]) bounce ("Safe already exists"); }", "messages": [ { "app": "state", "state": "{ var[$secret_hashed] = trigger.data.set_proof; response['sec'] = 'Secret set for account' || trigger.data.scope; var[$balance] = var[$balance] + $input; response['message'] = 'accepted on account ' || trigger.data.scope || ': ' || $input || ' bytes'; }" } ] }, { "if": "{trigger.data.secret}", "init": "{ if (!var[$secret_hashed]) bounce ("scope doesn't exists"); if (sha256(trigger.data.secret) != var[$secret_hashed]) bounce ("Wrong secret!"); }", "messages": [ { "init": "{ $total = var[$balance] + $input - $f; }", "app": "payment", "payload": { "asset": "base", "outputs": [ { "address": "{trigger.address}", "amount": "{$total}" } ] } }, { "app": "state", "state": "{ var[$balance] = 0; var[$secret_hashed] = false; response['message'] = 'withdrawn from account ' || trigger.data.scope || '. '; }" } ] } ] } } ]
Technical information
Fees:
1,667 bytes
(353 headers, 1314 payload)
Level:1002050
Witnessed level:1002041
Main chain index:1000868
Latest included mc index:1000867
Status:stable/confirmed/final