Unit ID
ANyB2Hk7ILmkwLxCWf1CFJnogtklW9CprVQWOIpr5E0=
Received
19.11.2023 21:59:02
Confirmation delay (full node)
1 minute 17 seconds
Messages
Definition
Definition: [ "autonomous agent", { "bounce_fees": { "base": 10000 }, "getters": "{ $get_pubkey = ($address) => { $unit = var['pk_' || $address]; unit[$unit].messages[[.app='data']].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,609 bytes
(452 headers, 2157 payload)
Level:3273029
Witnessed level:3273008
Main chain index:3247246
Latest included mc index:3247245
Status:stable/confirmed/final