The explorer is out of sync. The last synced block is 492 hours ago. Current block height: explorer: 2206528 / node: 2521098 / ref: ?

Program a64b9f8a86.aleo

Program ID
a64b9f8a86.aleo
Owner signature
sign1trkm2cyvhe4yl3sz9rapj5a0vyck9smv52j0683c07cl6jn34gqy442atly9jfrp93fhkmhzmq3pmtf3mp6le5ylmu9f4rndn37v6q9fvgzh22rt0yd5z8aq7fjauukdr23lufp98fvw5t7v7dwqh6vzpc74h03deccdhkgwlldfzuakvn30hx3ys2zrvlrstkstyq05qeys2jmra9v
Times called
1
Similar programs
Imports
-
Mappings
status (address -> u8)
hashes (address -> field)
Structs
-
Records
Request
Challenge
Accepted
Functions
-
Transitions
request() -> Request finalize(address)
issue(Request, [field; 16u32], [field; 16u32]) -> Challenge finalize(address, field)
submit([field; 16u32]) -> Accepted finalize(address, field)
Program Source Code (Aleo Instruction) Upload Leo source

program a64b9f8a86.aleo;

record Request:
    owner as address.private;
    player as address.private;

record Challenge:
    owner as address.private;
    message as [field; 16u32].private;

record Accepted:
    owner as address.private;
    message as [field; 16u32].private;

mapping status:
    key as address.public;
    value as u8.public;

mapping hashes:
    key as address.public;
    value as field.public;

function request:
    cast aleo1ycrcgnzqqyavey2hvldkw577x9uwhavfhmdc780jvw4k9e4gnqzqemmees self.caller into r0 as Request.record;
    async request self.caller into r1;
    output r0 as Request.record;
    output r1 as a64b9f8a86.aleo/request.future;
finalize request:
    input r0 as address.public;
    contains status[r0] into r1;
    not r1 into r2;
    assert.eq r2 true;
    set 0u8 into status[r0];

function issue:
    input r0 as Request.record;
    input r1 as [field; 16u32].private;
    input r2 as [field; 16u32].private;
    hash.bhp256 r1 into r3 as field;
    add r1[0] r2[0] into r4;
    add r1[1] r2[1] into r5;
    add r1[2] r2[2] into r6;
    add r1[3] r2[3] into r7;
    add r1[4] r2[4] into r8;
    add r1[5] r2[5] into r9;
    add r1[6] r2[6] into r10;
    add r1[7] r2[7] into r11;
    add r1[8] r2[8] into r12;
    add r1[9] r2[9] into r13;
    add r1[10] r2[10] into r14;
    add r1[11] r2[11] into r15;
    add r1[12] r2[12] into r16;
    add r1[13] r2[13] into r17;
    add r1[14] r2[14] into r18;
    add r1[15] r2[15] into r19;
    cast r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 r16 r17 r18 r19 into r20 as [field; 16u32];
    cast r0.player r20 into r21 as Challenge.record;
    async issue r0.player r3 into r22;
    output r21 as Challenge.record;
    output r22 as a64b9f8a86.aleo/issue.future;
finalize issue:
    input r0 as address.public;
    input r1 as field.public;
    get status[r0] into r2;
    assert.eq r2 0u8;
    set r1 into hashes[r0];
    set 1u8 into status[r0];

function submit:
    input r0 as [field; 16u32].private;
    hash.bhp256 r0 into r1 as field;
    cast self.caller r0 into r2 as Accepted.record;
    async submit self.caller r1 into r3;
    output r2 as Accepted.record;
    output r3 as a64b9f8a86.aleo/submit.future;
finalize submit:
    input r0 as address.public;
    input r1 as field.public;
    get status[r0] into r2;
    assert.eq r2 1u8;
    get hashes[r0] into r3;
    assert.eq r3 r1;
    set 2u8 into status[r0];

Block heightTimestampTransition IDFunction callState
92,3722023-10-28 00:28:30au1um00zm7fyqjteu0ydllay33rm9uekynq96t0576st9g4xrq46ypskq8wvzrequestAccepted




Not implemented