The explorer is out of sync. The last synced block is 511 hours ago. Current block height: explorer: 2206528 / node: Too Many Requests! Wait for 0s / ref: 2492275

Program a64b9f8a87.aleo

Program ID
a64b9f8a87.aleo
Owner signature
sign1snynwuxnyjxqzv5ul3xr903r5vr8sjrfvyftuvmza0ufgh3z9gqfhmw58w349xwut6d90r7vt38ddfkh2qhdszfdgy0ur42xztxd5qafvgzh22rt0yd5z8aq7fjauukdr23lufp98fvw5t7v7dwqh6vzpc74h03deccdhkgwlldfzuakvn30hx3ys2zrvlrstkstyq05qeys2lgam5l
Times called
2
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 a64b9f8a87.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 aleo155qrzd9d89xfdng6pfth79nkp48ejqq5wffkz0euq0kl60gvagqs8m7tca self.caller into r0 as Request.record;
    async request self.caller into r1;
    output r0 as Request.record;
    output r1 as a64b9f8a87.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 a64b9f8a87.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 a64b9f8a87.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,4632023-10-28 00:35:49au1twth2gfgur82tgc6xqrll9mgwg6cg647qpv0xwtwnwxh6ut20ugqjll6xmissueAccepted
92,4132023-10-28 00:31:47au13qpehlkstfultxth8t3ungmv85x08k8kdjgyzrmxh5uz7rm6guqqt4pu2srequestAccepted




Not implemented