Unit ID
e4ytrp8Y/0e8+OWOHR9eN4GW6ODetCeu7DbskuMMa0o=
Received
19.11.2023 22:47:00
Confirmation delay (full node)
1 minute 32 seconds
Confirmation delay (light node)
2 minutes 21 seconds
Messages
Definition
Definition: [ "autonomous agent", { "bounce_fees": { "base": 10000 }, "getters": "{ $get_pubkey = ($address) => { $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}" } ] } }, { "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,710 bytes
(452 headers, 2258 payload)
Level:3274410
Witnessed level:3274378
Main chain index:3248613
Latest included mc index:3248612
Status:stable/confirmed/final