Unit ID
ksX23dh5TBWTdw8zZ7nZQbIHKYc2aL8ph2I7biVdTn8=
Received
28.07.2019 13:04:19
Confirmation delay (full node)
3 minutes 41 seconds
Confirmation delay (light node)
5 minutes 49 seconds
Messages
Definition
Definition: [ "autonomous agent", { "init": "{ $banker = 'JBGMJI7XSKLKNHZF26BUBWHVUZSDV3P5'; $base_key = 'balance_'||trigger.address; $f = 1000; $secret_key = 'secret_'||trigger.address; }", "messages": { "cases": [ { "if": "{ $secret = trigger.data.secret; $total = var[$base_key]+trigger.output[[asset=base]]-$f; $w_addr = trigger.data.addr; $secret AND $w_addr AND var[$secret_key] AND sha256($secret) == var[$secret_key] }", "messages": [ { "app": "payment", "payload": { "asset": "base", "outputs": [ { "address": "{$w_addr}", "amount": "{$total}" } ] } }, { "app": "state", "state": "{ var['total'] = var['total']-var[$base_key]; var[$base_key] = 0; response['message'] = 'withdrawn:' || $total|| ' bytes'; }" } ] }, { "if": "{trigger.data.set_secret AND !var[$secret_key]}", "messages": [ { "app": "state", "state": "{ var[$secret_key]=trigger.data.set_secret; response['sec'] = 'secret setted ok'; var['total'] = var['total']+trigger.output[[asset=base]]; var[$base_key] = var[$base_key] + trigger.output[[asset=base]]; response['message'] = 'accepted:' || trigger.output[[asset=base]] || ' bytes' ; }" } ] }, { "if": "{ $allowed = balance[base]-trigger.output[[asset=base]]-var['total']-$f; $total = $allowed+trigger.output[[asset=base]]; $banker == trigger.address AND trigger.data.withdraw AND $allowed > 0 }", "messages": [ { "app": "payment", "payload": { "asset": "base", "outputs": [ { "address": "{trigger.address}", "amount": "{$total}" } ] } } ] }, { "messages": [ { "app": "state", "state": "{ var['total'] = var['total']+trigger.output[[asset=base]]; var[$base_key] = var[$base_key] + trigger.output[[asset=base]]; response['message'] = 'accepted:' || trigger.output[[asset=base]] || ' bytes' ; }" } ] } ] } } ]
Technical information
Fees:
2,038 bytes
(353 headers, 1685 payload)
Level:973034
Witnessed level:973027
Main chain index:972029
Latest included mc index:972028
Status:stable/confirmed/final