Unit ID
Q/ZMm8fRCkpk6XYMa2Et7BNGhVp71t0BLcbPvYPcwhg=
Received
29.08.2019 10:14:57
Confirmation delay (full node)
2 minutes 38 seconds
Confirmation delay (light node)
4 minutes 59 seconds
Messages
Definition
Definition: [ "autonomous agent", { "init": "{ $status_index = var['status.index']; $address = trigger.address; $data = trigger.data; $unit = trigger.unit; }", "messages": { "cases": [ { "if": "{$data.status}", "messages": [ { "app": "state", "state": "{ $next_index = $status_index + 1; var['status.index'] = $next_index; var['status.' || $next_index || '.unit'] = $unit; var['status.' || $next_index || '.author'] = $address; response['message'] = 'created status ' || $next_index; response['status_id'] = $next_index; }" } ] }, { "if": "{$data.like AND var['status.' || $data.like || '.unit']}", "init": "{ $rewards = (trigger.output[[asset=base]] - 10000); }", "messages": [ { "app": "payment", "if": "{$rewards > 0}", "payload": { "asset": "base", "outputs": [ { "address": "{var['status.' || $data.like || '.author']}", "amount": "{$rewards}" } ] } }, { "app": "state", "state": "{ if (!var['status.' || $data.like || '.like.' || $address || '.rewards']) var['status.' || $data.like || '.likes'] += 1; var['status.' || $data.like || '.rewards'] += $rewards; var['status.' || $data.like || '.like.' || $address || '.rewards'] += $rewards; response['message'] = 'liked status ' || $data.like; response['status_id'] = $data.like; response['rewards'] = $rewards; }" } ] }, { "if": "{$data.profile AND ($data.name OR $data.about OR $data.location OR $data.website)}", "messages": [ { "app": "state", "state": "{ if ($data.name) var['user.' || $address || '.name'] = $data.name; if ($data.about) var['user.' || $address || '.about'] = $data.about; if ($data.location) var['user.' || $address || '.location'] = $data.location; if ($data.website) var['user.' || $address || '.website'] = $data.website; response['message'] = 'updated profile for ' || $address; response['user_address'] = $address; }" } ] }, { "if": "{$data._exit}", "messages": [ { "app": "payment", "if": "{balance[base] > 10000}", "payload": { "asset": "base", "outputs": [ { "address": "TTERXIO5HNT7T6XQQLCVI4MCP2ZVXLHE", "amount": "{balance[base] - 10000}" } ] } } ] } ] } } ]
Technical information
Fees:
2,315 bytes
(353 headers, 1962 payload)
Level:1031783
Witnessed level:1031775
Main chain index:1030596
Latest included mc index:1030595
Status:stable/confirmed/final