The explorer is out of sync. The last synced block is 526 hours ago. Current block height: explorer: 2206528 / node: 2542456 / ref: 2492275

Program lottery_afb1c4a9.aleo

Program ID
lottery_afb1c4a9.aleo
Owner signature
sign1lvqlwz4hutahdxw02kd4m8da2mmllw50yw547zheq7a9eagaysq0sgpjk263kd97kdxy9rcslee8zy3ya0lq0ucpgjn9qjpmy8n97qq32v75vccfdluwzulwl6p3h9254xvwn0unk8rj97pg26sy763cp7hlx2fvrlm38032pywgm9tdc969sn7nv3md34e9z9qergtruxmsjqmt0c0
Times called
0
Similar programs
Imports
-
Mappings
num_winners (u8 -> u8)
Structs
-
Records
Ticket
Functions
-
Transitions
play() -> Ticket
Program Source Code (Aleo Instruction) Upload Leo source

program lottery_afb1c4a9.aleo;

record Ticket:
    owner as address.private;

mapping num_winners:
    key as u8.public;
    value as u8.public;

function play:
    cast self.caller into r0 as Ticket.record;
    async play  into r1;
    output r0 as Ticket.record;
    output r1 as lottery_afb1c4a9.aleo/play.future;
finalize play:
    lte block.height 1000u32 into r0;
    assert.eq r0 true;
    rand.chacha into r1 as boolean;
    assert.eq r1 true;
    get.or_use num_winners[0u8] 0u8 into r2;
    lt r2 5u8 into r3;
    assert.eq r3 true;
    add r2 1u8 into r4;
    set r4 into num_winners[0u8];

Block heightTimestampTransition IDFunction callState


Not implemented