Unit ID
QXckUiiC9c4XRnTlsbTzH1EwCmQCzRkuWJB6UUMKVvs=
Received
19.11.2023 22:23:44
Confirmation delay (full node)
1 minute 44 seconds
Confirmation delay (light node)
3 minutes 47 seconds
Messages
Definition
Definition: [ "autonomous agent", { "bounce_fees": { "base": 10000 }, "getters": "{ $get_pubkey = ($address) => { $unit = var['pubkey_unit']; unit[$unit].messages[[.app='data']].payload.pubkey }; }", "init": "{ $vrf = 'IFCSZYF6SLPC7IYNEIDEHMI6SEVDJOFM'; $vrf_registry = 'F3QL3P6N4V7JGQB33ZVHFWMPPV2W2LPZ'; $pubkey_unit = var['pubkey_unit']; if (!trigger.data.type) { bounce('set type in data'); } }", "messages": { "cases": [ { "if": "{trigger.data.type == 'set_pubkey'}", "messages": [ { "app": "state", "state": "{ $pk_unit = var[$vrf_registry]['pk_' || $vrf]; var['pubkey_unit'] = $pk_unit; }" } ] }, { "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,679 bytes
(452 headers, 2227 payload)
Level:3273645
Witnessed level:3273629
Main chain index:3247857
Latest included mc index:3247856
Status:stable/confirmed/final