Unit ID
qP49GPXuq35UrHhsmq10jAFRyI/8tm8+70Sr0N9VZnI=
Received
19.11.2023 22:14:10
Confirmation delay (full node)
1 minute 42 seconds
Confirmation delay (light node)
2 minutes 42 seconds
Messages
Definition
Definition: [ "autonomous agent", { "bounce_fees": { "base": 10000 }, "getters": "{ $get_pubkey = ($address) => { $unit = var['pk_' || $address]; unit[$unit].messages[[.app='data']][0].payload.pubkey }; }", "init": "{ $vrf = 'IFCSZYF6SLPC7IYNEIDEHMI6SEVDJOFM'; $vrf_registry = 'F3QL3P6N4V7JGQB33ZVHFWMPPV2W2LPZ'; $pubkey_unit = var['pubkey_unit']; }", "messages": { "cases": [ { "if": "{trigger.data.type == 'set_pubkey'}", "messages": [ { "app": "state", "state": "{ $pk_unit = var[$vrf_registry]['pk_' || $vrf]; var['pubkey_unit'] = trigger.data.pubkey; }" } ] }, { "if": "{ trigger.data.type == '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; }" } ] }, { "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,612 bytes
(452 headers, 2160 payload)
Level:3273422
Witnessed level:3273409
Main chain index:3247635
Latest included mc index:3247634
Status:stable/confirmed/final