Unit ID
UtR9v2f6I9ubmhVYnmIsPhzb+OKThsW5ags/e8UuzH4=
Received
19.11.2023 19:02:13
Confirmation delay (full node)
2 minutes 47 seconds
Confirmation delay (light node)
3 minutes 16 seconds
Messages
Definition
Definition: [ "autonomous agent", { "bounce_fees": { "base": 10000 }, "init": "{ $vrf = 'IFCSZYF6SLPC7IYNEIDEHMI6SEVDJOFM'; $pubkey = var['pubkey']; }", "messages": { "cases": [ { "if": "{trigger.data.type == 'set_pubkey' AND trigger.data.pubkey}", "messages": [ { "app": "state", "state": "{ if (exists($pubkey)) { bounce('already init'); } var['pubkey'] = 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, $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,445 bytes
(452 headers, 1993 payload)
Level:3271267
Witnessed level:3271260
Main chain index:3245497
Latest included mc index:3245496
Status:stable/confirmed/final