Unit ID
gbIxf7NprQ/0/JMHj3lMwdTi17GSjkILhIw2/4QXD/s=
Received
18.01.2024 00:58:19
Confirmation delay (full node)
4 minutes 22 seconds
Confirmation delay (light node)
8 minutes 43 seconds
Messages
Definition
Definition: [ "autonomous agent", { "bounce_fees": { "base": 10000 }, "getters": "{ $get_pubkey = () => { $unit = var['pubkey_unit']; unit[$unit].messages[[.app='data']][0].payload.pubkey }; }", "init": "{ $vrf = 'IFCSZYF6SLPC7IYNEIDEHMI6SEVDJOFM'; $vrf_registry = 'F3QL3P6N4V7JGQB33ZVHFWMPPV2W2LPZ'; $pubkey_unit = var['pubkey_unit']; }", "messages": { "cases": [ { "if": "{trigger.data.set_pubkey_unit}", "messages": [ { "app": "state", "state": "{ $pk_unit = var[$vrf_registry]['pk_' || $vrf]; var['pubkey_unit'] = $pk_unit; response['result'] = 'pubkey unit added'; }" } ] }, { "if": "{trigger.data.walk}", "messages": [ { "app": "payment", "payload": { "asset": "base", "outputs": [ { "address": "{$vrf}", "amount": "{1000000}" }, { "address": "{trigger.address}", "amount": "{trigger.output[[asset=base]] - 1010000}" } ] } }, { "app": "state", "state": "{ if (trigger.output[[asset=base]] < 1010000) { bounce('Min amount: ' || 1010000 || 'bytes'); } var['rid_' || response_unit] = trigger.address; response['result'] = 'Random requested'; }" } ] }, { "if": "{trigger.data.id AND trigger.data.proof}", "messages": [ { "app": "state", "state": "{ $id = trigger.data.id; $proof = trigger.data.proof; $address = var['rid_' || $id]; if (!exists($address)) { bounce('Random request not found'); } if (!vrf_verify($id, $proof, $get_pubkey())) { bounce('Not valid vrf'); } $steps = number_from_seed($proof, 0, 20); var['user_' || $address] += $steps; response['result'] = 'User ' || $address || ' walked ' || $steps || ' steps'; }" } ] } ] } } ]
Technical information
Fees:
2,859 bytes
(452 headers, 2407 payload)
Level:3371432
Witnessed level:3371425
Main chain index:3345140
Latest included mc index:3345139
Status:stable/confirmed/final