The explorer is out of sync. The last synced block is 168 hours ago. Current block height: explorer: 2206528 / node: 2315636 / ref: 2315636

Program football_game_v015b.aleo

Program ID
football_game_v015b.aleo
Owner signature
sign16m2neec4mj33pstrc709z689sy2dnfwsmfw3hfvrdmspn7m0kvqsmf30qnvw0xaqtzv0k43fzsp4jsdnk6nwz0rzc8ekkufnw2n7yqc6t4ta270vkd8sjaqr9ru9ycrdcca9l8rlad44d6855720ej55qj56tcupqtrrn069wzqtvjeqsrdjx7tmlzp56dkw7ee2h96ww75q5tacuyc
Times called
158
Similar programs
Mappings
game_outcomes (address -> GameOutcome)
players (field -> Player)
Structs
GameOutcome
Player
Records
Game
GameReqNotification
WaitingAcceptanceNotification
StakeRenegedNotification
ChallengerWagerNotification
OpponentWagerNotification
WaitingRevealNotification
RevealAnswerNotification
WaitingCalculationNotification
CalculatedOutcomeNotification
GameFinishReqNotification
GameFinishedNotification
Functions
-
Transitions
add_player(Player) -> () finalize(Player)
propose_game(football_coins_v001.aleo/Piece, u64, address, address, address, field, field, field, field, field, signature, field, [field; 11u32], field) -> (football_coins_v001.aleo/PieceClaim, football_coins_v001.aleo/PieceStake, football_coins_v001.aleo/ClaimSignature, football_coins_v001.aleo/Piece, football_coins_v001.aleo/AuditStakeIn, football_pvp_utils_v001.aleo/Answer, football_pvp_utils_v001.aleo/AuditMintAnswer, football_pvp_utils_v001.aleo/Key, football_pvp_utils_v001.aleo/AuditKey, Game, GameReqNotification, WaitingAcceptanceNotification)
submit_wager(football_coins_v001.aleo/Piece, football_pvp_utils_v001.aleo/Key, GameReqNotification, field, field, field, field, field, signature) -> (football_coins_v001.aleo/PieceClaim, football_coins_v001.aleo/PieceStake, football_coins_v001.aleo/ClaimSignature, football_coins_v001.aleo/Piece, football_coins_v001.aleo/AuditStakeIn, ChallengerWagerNotification, OpponentWagerNotification)
accept_game(Game, [field; 11u32], football_coins_v001.aleo/PieceStake, football_coins_v001.aleo/PieceClaim, football_coins_v001.aleo/PieceStake, football_coins_v001.aleo/PieceClaim, u32) -> (football_coins_v001.aleo/PieceJointStake, football_coins_v001.aleo/JointPieceTimeClaim, football_coins_v001.aleo/JointPieceState, football_coins_v001.aleo/AuditJointStake, WaitingRevealNotification, RevealAnswerNotification, Game) finalize(u32, [field; 11u32])
calculate_outcome(RevealAnswerNotification, football_pvp_utils_v001.aleo/Answer) -> (football_pvp_utils_v001.aleo/Answer, WaitingCalculationNotification, CalculatedOutcomeNotification) finalize(address, address, address, [field; 11u32], [field; 11u32])
reveal_answer_game(football_coins_v001.aleo/ClaimSignature, CalculatedOutcomeNotification, football_coins_v001.aleo/JointPieceState, football_pvp_utils_v001.aleo/Answer, GameOutcome) -> (football_pvp_utils_v001.aleo/RevealAnswer, football_pvp_utils_v001.aleo/AuditRevealAnswer, football_coins_v001.aleo/JointPieceWinner, football_coins_v001.aleo/AuditJointPieceWinner, GameFinishReqNotification, GameFinishReqNotification) finalize(address, GameOutcome)
finish_game(Game, football_coins_v001.aleo/JointPieceWinner, football_coins_v001.aleo/PieceJointStake, football_coins_v001.aleo/JointPieceTimeClaim) -> (football_coins_v001.aleo/Piece, football_coins_v001.aleo/AuditTransferToWinner, football_coins_v001.aleo/AuditPieceOwner, Game, GameFinishedNotification, GameFinishedNotification)
finish_game_draw(Game, football_coins_v001.aleo/JointPieceWinner, football_coins_v001.aleo/PieceJointStake, football_coins_v001.aleo/JointPieceTimeClaim) -> (football_coins_v001.aleo/Piece, football_coins_v001.aleo/AuditTransferToWinner, football_coins_v001.aleo/AuditPieceOwner, football_coins_v001.aleo/Piece, football_coins_v001.aleo/AuditTransferToWinner, football_coins_v001.aleo/AuditPieceOwner, Game, GameFinishedNotification, GameFinishedNotification)
finish_game_by_timeout(Game, football_coins_v001.aleo/PieceJointStake, football_coins_v001.aleo/JointPieceTimeClaim, signature) -> (football_coins_v001.aleo/Piece, football_coins_v001.aleo/AuditTransferToWinner, Game, GameFinishedNotification, GameFinishedNotification) finalize(u32)
Program Source Code (Aleo Instruction) Upload Leo source

import football_coins_v001.aleo;
import football_pvp_utils_v001.aleo;

program football_game_v015b.aleo;

struct GameOutcome:
    address_home as address;
    address_away as address;
    team_id_home as field;
    team_id_away as field;
    goals_home as u64;
    goals_away as u64;

struct Player:
    player_id as field;
    team_id as field;
    position as field;
    attack as u128;
    defense as u128;
    speed as u128;
    power as u128;
    stamina as u128;
    technique as u128;
    goalkeeping as u128;

record Game:
    owner as address.private;
    challenger_commit as field.private;
    opponent_answer as [field; 11u32].private;
    total_pot as u64.private;
    challenger_address as address.private;
    opponent_address as address.private;
    game_multisig as address.private;
    game_state as field.private;
    ix as u32.private;

record GameReqNotification:
    owner as address.private;
    game_multisig as address.private;
    game_state as field.private;
    your_turn as boolean.private;
    total_pot as u64.private;
    challenger_address as address.private;
    opponent_address as address.private;
    ix as u32.private;

record WaitingAcceptanceNotification:
    owner as address.private;
    game_multisig as address.private;
    game_state as field.private;
    your_turn as boolean.private;
    total_pot as u64.private;
    challenger_address as address.private;
    opponent_address as address.private;
    ix as u32.private;

record StakeRenegedNotification:
    owner as address.private;
    game_multisig as address.private;
    game_state as field.private;
    your_turn as boolean.private;
    total_pot as u64.private;
    challenger_address as address.private;
    opponent_address as address.private;
    renege_address as address.private;
    ix as u32.private;

record ChallengerWagerNotification:
    owner as address.private;
    game_multisig as address.private;
    game_state as field.private;
    your_turn as boolean.private;
    total_pot as u64.private;
    challenger_address as address.private;
    opponent_address as address.private;
    ix as u32.private;

record OpponentWagerNotification:
    owner as address.private;
    game_multisig as address.private;
    game_state as field.private;
    your_turn as boolean.private;
    total_pot as u64.private;
    challenger_address as address.private;
    opponent_address as address.private;
    ix as u32.private;

record WaitingRevealNotification:
    owner as address.private;
    game_multisig as address.private;
    game_state as field.private;
    your_turn as boolean.private;
    total_pot as u64.private;
    challenger_address as address.private;
    opponent_address as address.private;
    ix as u32.private;

record RevealAnswerNotification:
    owner as address.private;
    game_multisig as address.private;
    game_state as field.private;
    your_turn as boolean.private;
    total_pot as u64.private;
    challenger_address as address.private;
    opponent_address as address.private;
    opponent_answer as [field; 11u32].private;
    ix as u32.private;

record WaitingCalculationNotification:
    owner as address.private;
    game_multisig as address.private;
    game_state as field.private;
    your_turn as boolean.private;
    total_pot as u64.private;
    challenger_address as address.private;
    opponent_address as address.private;
    ix as u32.private;

record CalculatedOutcomeNotification:
    owner as address.private;
    game_multisig as address.private;
    game_state as field.private;
    your_turn as boolean.private;
    total_pot as u64.private;
    challenger_address as address.private;
    opponent_address as address.private;
    opponent_answer as [field; 11u32].private;
    ix as u32.private;

record GameFinishReqNotification:
    owner as address.private;
    game_multisig as address.private;
    game_state as field.private;
    your_turn as boolean.private;
    total_pot as u64.private;
    challenger_address as address.private;
    opponent_address as address.private;
    challenger_answer as [field; 11u32].private;
    opponent_answer as [field; 11u32].private;
    game_outcome as GameOutcome.private;
    ix as u32.private;

record GameFinishedNotification:
    owner as address.private;
    game_multisig as address.private;
    game_state as field.private;
    your_turn as boolean.private;
    total_pot as u64.private;
    challenger_address as address.private;
    opponent_address as address.private;
    winner as address.private;
    loser as address.private;
    ix as u32.private;

mapping game_outcomes:
    key as address.public;
    value as GameOutcome.public;

mapping players:
    key as field.public;
    value as Player.public;

function add_player:
    input r0 as Player.private;
    assert.eq self.caller aleo10rdcc92pecx8en6k44zxufvgyy0f98w6c5n7ql6f2er7mehjfyrs3p76nk;
    async add_player r0 into r1;
    output r1 as football_game_v015b.aleo/add_player.future;
finalize add_player:
    input r0 as Player.public;
    set r0 into players[r0.player_id];

function propose_game:
    input r0 as football_coins_v001.aleo/Piece.record;
    input r1 as u64.private;
    input r2 as address.private;
    input r3 as address.private;
    input r4 as address.private;
    input r5 as field.private;
    input r6 as field.private;
    input r7 as field.private;
    input r8 as field.private;
    input r9 as field.private;
    input r10 as signature.private;
    input r11 as field.private;
    input r12 as [field; 11u32].private;
    input r13 as field.private;
    assert.eq self.caller self.signer;
    cast r11 into r14 as scalar;
    commit.bhp256 r12 r14 into r15 as field;
    gt r1 0u64 into r16;
    assert.eq r16 true;
    gte r0.amount r1 into r17;
    assert.eq r17 true;
    call football_coins_v001.aleo/stake_transfer_in r0 r2 r2 r3 r4 r1 r5 r6 r7 r8 r9 r10 into r18 r19 r20 r21 r22;
    call football_pvp_utils_v001.aleo/mint_multisig_key r13 r1 r2 r3 r4 into r23 r24;
    add r1 r1 into r25;
    cast r3 r4 1field true r25 r2 r3 2u32 into r26 as GameReqNotification.record;
    add r1 r1 into r27;
    cast r2 r4 1field false r27 r2 r3 3u32 into r28 as WaitingAcceptanceNotification.record;
    cast 0field 0field 0field 0field 0field 0field 0field 0field 0field 0field 0field into r29 as [field; 11u32];
    add r1 r1 into r30;
    cast r4 r15 r29 r30 r2 r3 r4 1field 1u32 into r31 as Game.record;
    call football_pvp_utils_v001.aleo/mint_answer r2 r3 r4 r1 r11 r12 r5 r6 r7 r8 r9 r10 into r32 r33;
    output r18 as football_coins_v001.aleo/PieceClaim.record;
    output r19 as football_coins_v001.aleo/PieceStake.record;
    output r20 as football_coins_v001.aleo/ClaimSignature.record;
    output r21 as football_coins_v001.aleo/Piece.record;
    output r22 as football_coins_v001.aleo/AuditStakeIn.record;
    output r32 as football_pvp_utils_v001.aleo/Answer.record;
    output r33 as football_pvp_utils_v001.aleo/AuditMintAnswer.record;
    output r23 as football_pvp_utils_v001.aleo/Key.record;
    output r24 as football_pvp_utils_v001.aleo/AuditKey.record;
    output r31 as Game.record;
    output r26 as GameReqNotification.record;
    output r28 as WaitingAcceptanceNotification.record;

function submit_wager:
    input r0 as football_coins_v001.aleo/Piece.record;
    input r1 as football_pvp_utils_v001.aleo/Key.record;
    input r2 as GameReqNotification.record;
    input r3 as field.private;
    input r4 as field.private;
    input r5 as field.private;
    input r6 as field.private;
    input r7 as field.private;
    input r8 as signature.private;
    assert.eq self.caller self.signer;
    gt r0.amount 0u64 into r9;
    assert.eq r9 true;
    div r2.total_pot 2u64 into r10;
    gte r0.amount r10 into r11;
    assert.eq r11 true;
    div r2.total_pot 2u64 into r12;
    call football_coins_v001.aleo/stake_transfer_in r0 r2.opponent_address r2.challenger_address r2.opponent_address r2.game_multisig r12 r3 r4 r5 r6 r7 r8 into r13 r14 r15 r16 r17;
    cast r2.challenger_address r2.game_multisig 2field false r2.total_pot r2.challenger_address r2.opponent_address 5u32 into r18 as ChallengerWagerNotification.record;
    cast r2.opponent_address r2.game_multisig 2field true r2.total_pot r2.challenger_address r2.opponent_address 6u32 into r19 as OpponentWagerNotification.record;
    output r13 as football_coins_v001.aleo/PieceClaim.record;
    output r14 as football_coins_v001.aleo/PieceStake.record;
    output r15 as football_coins_v001.aleo/ClaimSignature.record;
    output r16 as football_coins_v001.aleo/Piece.record;
    output r17 as football_coins_v001.aleo/AuditStakeIn.record;
    output r18 as ChallengerWagerNotification.record;
    output r19 as OpponentWagerNotification.record;

function accept_game:
    input r0 as Game.record;
    input r1 as [field; 11u32].private;
    input r2 as football_coins_v001.aleo/PieceStake.record;
    input r3 as football_coins_v001.aleo/PieceClaim.record;
    input r4 as football_coins_v001.aleo/PieceStake.record;
    input r5 as football_coins_v001.aleo/PieceClaim.record;
    input r6 as u32.private;
    assert.eq r0.owner self.signer;
    assert.eq self.caller self.signer;
    call football_coins_v001.aleo/transfer_stakes_to_joint r2 r3 r4 r5 r6 into r7 r8 r9 r10;
    cast r0.opponent_address r0.owner 3field false r0.total_pot r0.challenger_address r0.opponent_address 7u32 into r11 as WaitingRevealNotification.record;
    cast r0.challenger_address r0.owner 3field true r0.total_pot r0.challenger_address r0.opponent_address r1 8u32 into r12 as RevealAnswerNotification.record;
    cast r0.owner r0.challenger_commit r1 r0.total_pot r0.challenger_address r0.opponent_address r0.game_multisig 3field 1u32 into r13 as Game.record;
    async accept_game r6 r1 into r14;
    output r7 as football_coins_v001.aleo/PieceJointStake.record;
    output r8 as football_coins_v001.aleo/JointPieceTimeClaim.record;
    output r9 as football_coins_v001.aleo/JointPieceState.record;
    output r10 as football_coins_v001.aleo/AuditJointStake.record;
    output r11 as WaitingRevealNotification.record;
    output r12 as RevealAnswerNotification.record;
    output r13 as Game.record;
    output r14 as football_game_v015b.aleo/accept_game.future;
finalize accept_game:
    input r0 as u32.public;
    input r1 as [field; 11u32].public;
    sub block.height 1000u32 into r2;
    gte r0 r2 into r3;
    assert.eq r3 true;
    add block.height 1000u32 into r4;
    lte r0 r4 into r5;
    assert.eq r5 true;

function calculate_outcome:
    input r0 as RevealAnswerNotification.record;
    input r1 as football_pvp_utils_v001.aleo/Answer.record;
    assert.eq r0.challenger_address self.signer;
    assert.eq self.caller self.signer;
    cast r0.opponent_address r0.game_multisig 4field true r0.total_pot r0.challenger_address r0.opponent_address 9u32 into r2 as WaitingCalculationNotification.record;
    cast r0.challenger_address r0.game_multisig 4field true r0.total_pot r0.challenger_address r0.opponent_address r0.opponent_answer 10u32 into r3 as CalculatedOutcomeNotification.record;
    async calculate_outcome r0.game_multisig r0.challenger_address r0.opponent_address r1.answer r0.opponent_answer into r4;
    output r1 as football_pvp_utils_v001.aleo/Answer.record;
    output r2 as WaitingCalculationNotification.record;
    output r3 as CalculatedOutcomeNotification.record;
    output r4 as football_game_v015b.aleo/calculate_outcome.future;
finalize calculate_outcome:
    input r0 as address.public;
    input r1 as address.public;
    input r2 as address.public;
    input r3 as [field; 11u32].public;
    input r4 as [field; 11u32].public;
    get players[r3[0]] into r5;
    get players[r4[0]] into r6;
    get players[r3[1]] into r7;
    get players[r4[1]] into r8;
    rand.chacha into r9 as u128;
    add r7.speed r8.speed into r10;
    is.eq r10 0u128 into r11;
    add r7.speed r8.speed into r12;
    mod r9 r12 into r13;
    lt r13 r7.speed into r14;
    ternary r11 r14 true into r15;
    mod r9 234272u128 into r16;
    mod r16 300u128 into r17;
    mod r9 2341272u128 into r18;
    mod r18 100u128 into r19;
    mod r9 234234272u128 into r20;
    mod r20 100u128 into r21;
    ternary r15 r7.player_id r8.player_id into r22;
    ternary r15 r7.team_id r8.team_id into r23;
    ternary r15 r7.position r8.position into r24;
    ternary r15 r7.attack r8.attack into r25;
    ternary r15 r7.defense r8.defense into r26;
    ternary r15 r7.speed r8.speed into r27;
    ternary r15 r7.power r8.power into r28;
    ternary r15 r7.stamina r8.stamina into r29;
    ternary r15 r7.technique r8.technique into r30;
    ternary r15 r7.goalkeeping r8.goalkeeping into r31;
    cast r22 r23 r24 r25 r26 r27 r28 r29 r30 r31 into r32 as Player;
    ternary r15 r8.player_id r7.player_id into r33;
    ternary r15 r8.team_id r7.team_id into r34;
    ternary r15 r8.position r7.position into r35;
    ternary r15 r8.attack r7.attack into r36;
    ternary r15 r8.defense r7.defense into r37;
    ternary r15 r8.speed r7.speed into r38;
    ternary r15 r8.power r7.power into r39;
    ternary r15 r8.stamina r7.stamina into r40;
    ternary r15 r8.technique r7.technique into r41;
    ternary r15 r8.goalkeeping r7.goalkeeping into r42;
    cast r33 r34 r35 r36 r37 r38 r39 r40 r41 r42 into r43 as Player;
    ternary r15 r6.player_id r5.player_id into r44;
    ternary r15 r6.team_id r5.team_id into r45;
    ternary r15 r6.position r5.position into r46;
    ternary r15 r6.attack r5.attack into r47;
    ternary r15 r6.defense r5.defense into r48;
    ternary r15 r6.speed r5.speed into r49;
    ternary r15 r6.power r5.power into r50;
    ternary r15 r6.stamina r5.stamina into r51;
    ternary r15 r6.technique r5.technique into r52;
    ternary r15 r6.goalkeeping r5.goalkeeping into r53;
    cast r44 r45 r46 r47 r48 r49 r50 r51 r52 r53 into r54 as Player;
    add r32.attack r32.power into r55;
    add r55 r43.technique into r56;
    gt r56 r17 into r57;
    lt r43.defense r19 into r58;
    lt r54.goalkeeping r21 into r59;
    add 0u64 1u64 into r60;
    add 0u64 1u64 into r61;
    ternary r15 r60 0u64 into r62;
    ternary r15 0u64 r61 into r63;
    ternary r59 r62 0u64 into r64;
    ternary r59 r63 0u64 into r65;
    ternary r58 r64 0u64 into r66;
    ternary r58 r65 0u64 into r67;
    ternary r57 r66 0u64 into r68;
    ternary r57 r67 0u64 into r69;
    get players[r3[2]] into r70;
    get players[r4[2]] into r71;
    rand.chacha into r72 as u128;
    add r70.speed r71.speed into r73;
    is.eq r73 0u128 into r74;
    add r70.speed r71.speed into r75;
    mod r72 r75 into r76;
    lt r76 r70.speed into r77;
    ternary r74 r77 true into r78;
    mod r72 234272u128 into r79;
    mod r79 300u128 into r80;
    mod r72 2341272u128 into r81;
    mod r81 100u128 into r82;
    mod r72 234234272u128 into r83;
    mod r83 100u128 into r84;
    ternary r78 r70.player_id r71.player_id into r85;
    ternary r78 r70.team_id r71.team_id into r86;
    ternary r78 r70.position r71.position into r87;
    ternary r78 r70.attack r71.attack into r88;
    ternary r78 r70.defense r71.defense into r89;
    ternary r78 r70.speed r71.speed into r90;
    ternary r78 r70.power r71.power into r91;
    ternary r78 r70.stamina r71.stamina into r92;
    ternary r78 r70.technique r71.technique into r93;
    ternary r78 r70.goalkeeping r71.goalkeeping into r94;
    cast r85 r86 r87 r88 r89 r90 r91 r92 r93 r94 into r95 as Player;
    ternary r78 r71.player_id r70.player_id into r96;
    ternary r78 r71.team_id r70.team_id into r97;
    ternary r78 r71.position r70.position into r98;
    ternary r78 r71.attack r70.attack into r99;
    ternary r78 r71.defense r70.defense into r100;
    ternary r78 r71.speed r70.speed into r101;
    ternary r78 r71.power r70.power into r102;
    ternary r78 r71.stamina r70.stamina into r103;
    ternary r78 r71.technique r70.technique into r104;
    ternary r78 r71.goalkeeping r70.goalkeeping into r105;
    cast r96 r97 r98 r99 r100 r101 r102 r103 r104 r105 into r106 as Player;
    ternary r78 r6.player_id r5.player_id into r107;
    ternary r78 r6.team_id r5.team_id into r108;
    ternary r78 r6.position r5.position into r109;
    ternary r78 r6.attack r5.attack into r110;
    ternary r78 r6.defense r5.defense into r111;
    ternary r78 r6.speed r5.speed into r112;
    ternary r78 r6.power r5.power into r113;
    ternary r78 r6.stamina r5.stamina into r114;
    ternary r78 r6.technique r5.technique into r115;
    ternary r78 r6.goalkeeping r5.goalkeeping into r116;
    cast r107 r108 r109 r110 r111 r112 r113 r114 r115 r116 into r117 as Player;
    add r95.attack r95.power into r118;
    add r118 r106.technique into r119;
    gt r119 r80 into r120;
    lt r106.defense r82 into r121;
    lt r117.goalkeeping r84 into r122;
    add r68 1u64 into r123;
    add r69 1u64 into r124;
    ternary r78 r123 r68 into r125;
    ternary r78 r69 r124 into r126;
    ternary r122 r125 r68 into r127;
    ternary r122 r126 r69 into r128;
    ternary r121 r127 r68 into r129;
    ternary r121 r128 r69 into r130;
    ternary r120 r129 r68 into r131;
    ternary r120 r130 r69 into r132;
    get players[r3[3]] into r133;
    get players[r4[3]] into r134;
    rand.chacha into r135 as u128;
    add r133.speed r134.speed into r136;
    is.eq r136 0u128 into r137;
    add r133.speed r134.speed into r138;
    mod r135 r138 into r139;
    lt r139 r133.speed into r140;
    ternary r137 r140 true into r141;
    mod r135 234272u128 into r142;
    mod r142 300u128 into r143;
    mod r135 2341272u128 into r144;
    mod r144 100u128 into r145;
    mod r135 234234272u128 into r146;
    mod r146 100u128 into r147;
    ternary r141 r133.player_id r134.player_id into r148;
    ternary r141 r133.team_id r134.team_id into r149;
    ternary r141 r133.position r134.position into r150;
    ternary r141 r133.attack r134.attack into r151;
    ternary r141 r133.defense r134.defense into r152;
    ternary r141 r133.speed r134.speed into r153;
    ternary r141 r133.power r134.power into r154;
    ternary r141 r133.stamina r134.stamina into r155;
    ternary r141 r133.technique r134.technique into r156;
    ternary r141 r133.goalkeeping r134.goalkeeping into r157;
    cast r148 r149 r150 r151 r152 r153 r154 r155 r156 r157 into r158 as Player;
    ternary r141 r134.player_id r133.player_id into r159;
    ternary r141 r134.team_id r133.team_id into r160;
    ternary r141 r134.position r133.position into r161;
    ternary r141 r134.attack r133.attack into r162;
    ternary r141 r134.defense r133.defense into r163;
    ternary r141 r134.speed r133.speed into r164;
    ternary r141 r134.power r133.power into r165;
    ternary r141 r134.stamina r133.stamina into r166;
    ternary r141 r134.technique r133.technique into r167;
    ternary r141 r134.goalkeeping r133.goalkeeping into r168;
    cast r159 r160 r161 r162 r163 r164 r165 r166 r167 r168 into r169 as Player;
    ternary r141 r6.player_id r5.player_id into r170;
    ternary r141 r6.team_id r5.team_id into r171;
    ternary r141 r6.position r5.position into r172;
    ternary r141 r6.attack r5.attack into r173;
    ternary r141 r6.defense r5.defense into r174;
    ternary r141 r6.speed r5.speed into r175;
    ternary r141 r6.power r5.power into r176;
    ternary r141 r6.stamina r5.stamina into r177;
    ternary r141 r6.technique r5.technique into r178;
    ternary r141 r6.goalkeeping r5.goalkeeping into r179;
    cast r170 r171 r172 r173 r174 r175 r176 r177 r178 r179 into r180 as Player;
    add r158.attack r158.power into r181;
    add r181 r169.technique into r182;
    gt r182 r143 into r183;
    lt r169.defense r145 into r184;
    lt r180.goalkeeping r147 into r185;
    add r131 1u64 into r186;
    add r132 1u64 into r187;
    ternary r141 r186 r131 into r188;
    ternary r141 r132 r187 into r189;
    ternary r185 r188 r131 into r190;
    ternary r185 r189 r132 into r191;
    ternary r184 r190 r131 into r192;
    ternary r184 r191 r132 into r193;
    ternary r183 r192 r131 into r194;
    ternary r183 r193 r132 into r195;
    get players[r3[4]] into r196;
    get players[r4[4]] into r197;
    rand.chacha into r198 as u128;
    add r196.speed r197.speed into r199;
    is.eq r199 0u128 into r200;
    add r196.speed r197.speed into r201;
    mod r198 r201 into r202;
    lt r202 r196.speed into r203;
    ternary r200 r203 true into r204;
    mod r198 234272u128 into r205;
    mod r205 300u128 into r206;
    mod r198 2341272u128 into r207;
    mod r207 100u128 into r208;
    mod r198 234234272u128 into r209;
    mod r209 100u128 into r210;
    ternary r204 r196.player_id r197.player_id into r211;
    ternary r204 r196.team_id r197.team_id into r212;
    ternary r204 r196.position r197.position into r213;
    ternary r204 r196.attack r197.attack into r214;
    ternary r204 r196.defense r197.defense into r215;
    ternary r204 r196.speed r197.speed into r216;
    ternary r204 r196.power r197.power into r217;
    ternary r204 r196.stamina r197.stamina into r218;
    ternary r204 r196.technique r197.technique into r219;
    ternary r204 r196.goalkeeping r197.goalkeeping into r220;
    cast r211 r212 r213 r214 r215 r216 r217 r218 r219 r220 into r221 as Player;
    ternary r204 r197.player_id r196.player_id into r222;
    ternary r204 r197.team_id r196.team_id into r223;
    ternary r204 r197.position r196.position into r224;
    ternary r204 r197.attack r196.attack into r225;
    ternary r204 r197.defense r196.defense into r226;
    ternary r204 r197.speed r196.speed into r227;
    ternary r204 r197.power r196.power into r228;
    ternary r204 r197.stamina r196.stamina into r229;
    ternary r204 r197.technique r196.technique into r230;
    ternary r204 r197.goalkeeping r196.goalkeeping into r231;
    cast r222 r223 r224 r225 r226 r227 r228 r229 r230 r231 into r232 as Player;
    ternary r204 r6.player_id r5.player_id into r233;
    ternary r204 r6.team_id r5.team_id into r234;
    ternary r204 r6.position r5.position into r235;
    ternary r204 r6.attack r5.attack into r236;
    ternary r204 r6.defense r5.defense into r237;
    ternary r204 r6.speed r5.speed into r238;
    ternary r204 r6.power r5.power into r239;
    ternary r204 r6.stamina r5.stamina into r240;
    ternary r204 r6.technique r5.technique into r241;
    ternary r204 r6.goalkeeping r5.goalkeeping into r242;
    cast r233 r234 r235 r236 r237 r238 r239 r240 r241 r242 into r243 as Player;
    add r221.attack r221.power into r244;
    add r244 r232.technique into r245;
    gt r245 r206 into r246;
    lt r232.defense r208 into r247;
    lt r243.goalkeeping r210 into r248;
    add r194 1u64 into r249;
    add r195 1u64 into r250;
    ternary r204 r249 r194 into r251;
    ternary r204 r195 r250 into r252;
    ternary r248 r251 r194 into r253;
    ternary r248 r252 r195 into r254;
    ternary r247 r253 r194 into r255;
    ternary r247 r254 r195 into r256;
    ternary r246 r255 r194 into r257;
    ternary r246 r256 r195 into r258;
    get players[r3[5]] into r259;
    get players[r4[5]] into r260;
    rand.chacha into r261 as u128;
    add r259.speed r260.speed into r262;
    is.eq r262 0u128 into r263;
    add r259.speed r260.speed into r264;
    mod r261 r264 into r265;
    lt r265 r259.speed into r266;
    ternary r263 r266 true into r267;
    mod r261 234272u128 into r268;
    mod r268 300u128 into r269;
    mod r261 2341272u128 into r270;
    mod r270 100u128 into r271;
    mod r261 234234272u128 into r272;
    mod r272 100u128 into r273;
    ternary r267 r259.player_id r260.player_id into r274;
    ternary r267 r259.team_id r260.team_id into r275;
    ternary r267 r259.position r260.position into r276;
    ternary r267 r259.attack r260.attack into r277;
    ternary r267 r259.defense r260.defense into r278;
    ternary r267 r259.speed r260.speed into r279;
    ternary r267 r259.power r260.power into r280;
    ternary r267 r259.stamina r260.stamina into r281;
    ternary r267 r259.technique r260.technique into r282;
    ternary r267 r259.goalkeeping r260.goalkeeping into r283;
    cast r274 r275 r276 r277 r278 r279 r280 r281 r282 r283 into r284 as Player;
    ternary r267 r260.player_id r259.player_id into r285;
    ternary r267 r260.team_id r259.team_id into r286;
    ternary r267 r260.position r259.position into r287;
    ternary r267 r260.attack r259.attack into r288;
    ternary r267 r260.defense r259.defense into r289;
    ternary r267 r260.speed r259.speed into r290;
    ternary r267 r260.power r259.power into r291;
    ternary r267 r260.stamina r259.stamina into r292;
    ternary r267 r260.technique r259.technique into r293;
    ternary r267 r260.goalkeeping r259.goalkeeping into r294;
    cast r285 r286 r287 r288 r289 r290 r291 r292 r293 r294 into r295 as Player;
    ternary r267 r6.player_id r5.player_id into r296;
    ternary r267 r6.team_id r5.team_id into r297;
    ternary r267 r6.position r5.position into r298;
    ternary r267 r6.attack r5.attack into r299;
    ternary r267 r6.defense r5.defense into r300;
    ternary r267 r6.speed r5.speed into r301;
    ternary r267 r6.power r5.power into r302;
    ternary r267 r6.stamina r5.stamina into r303;
    ternary r267 r6.technique r5.technique into r304;
    ternary r267 r6.goalkeeping r5.goalkeeping into r305;
    cast r296 r297 r298 r299 r300 r301 r302 r303 r304 r305 into r306 as Player;
    add r284.attack r284.power into r307;
    add r307 r295.technique into r308;
    gt r308 r269 into r309;
    lt r295.defense r271 into r310;
    lt r306.goalkeeping r273 into r311;
    add r257 1u64 into r312;
    add r258 1u64 into r313;
    ternary r267 r312 r257 into r314;
    ternary r267 r258 r313 into r315;
    ternary r311 r314 r257 into r316;
    ternary r311 r315 r258 into r317;
    ternary r310 r316 r257 into r318;
    ternary r310 r317 r258 into r319;
    ternary r309 r318 r257 into r320;
    ternary r309 r319 r258 into r321;
    get players[r3[6]] into r322;
    get players[r4[6]] into r323;
    rand.chacha into r324 as u128;
    add r322.speed r323.speed into r325;
    is.eq r325 0u128 into r326;
    add r322.speed r323.speed into r327;
    mod r324 r327 into r328;
    lt r328 r322.speed into r329;
    ternary r326 r329 true into r330;
    mod r324 234272u128 into r331;
    mod r331 300u128 into r332;
    mod r324 2341272u128 into r333;
    mod r333 100u128 into r334;
    mod r324 234234272u128 into r335;
    mod r335 100u128 into r336;
    ternary r330 r322.player_id r323.player_id into r337;
    ternary r330 r322.team_id r323.team_id into r338;
    ternary r330 r322.position r323.position into r339;
    ternary r330 r322.attack r323.attack into r340;
    ternary r330 r322.defense r323.defense into r341;
    ternary r330 r322.speed r323.speed into r342;
    ternary r330 r322.power r323.power into r343;
    ternary r330 r322.stamina r323.stamina into r344;
    ternary r330 r322.technique r323.technique into r345;
    ternary r330 r322.goalkeeping r323.goalkeeping into r346;
    cast r337 r338 r339 r340 r341 r342 r343 r344 r345 r346 into r347 as Player;
    ternary r330 r323.player_id r322.player_id into r348;
    ternary r330 r323.team_id r322.team_id into r349;
    ternary r330 r323.position r322.position into r350;
    ternary r330 r323.attack r322.attack into r351;
    ternary r330 r323.defense r322.defense into r352;
    ternary r330 r323.speed r322.speed into r353;
    ternary r330 r323.power r322.power into r354;
    ternary r330 r323.stamina r322.stamina into r355;
    ternary r330 r323.technique r322.technique into r356;
    ternary r330 r323.goalkeeping r322.goalkeeping into r357;
    cast r348 r349 r350 r351 r352 r353 r354 r355 r356 r357 into r358 as Player;
    ternary r330 r6.player_id r5.player_id into r359;
    ternary r330 r6.team_id r5.team_id into r360;
    ternary r330 r6.position r5.position into r361;
    ternary r330 r6.attack r5.attack into r362;
    ternary r330 r6.defense r5.defense into r363;
    ternary r330 r6.speed r5.speed into r364;
    ternary r330 r6.power r5.power into r365;
    ternary r330 r6.stamina r5.stamina into r366;
    ternary r330 r6.technique r5.technique into r367;
    ternary r330 r6.goalkeeping r5.goalkeeping into r368;
    cast r359 r360 r361 r362 r363 r364 r365 r366 r367 r368 into r369 as Player;
    add r347.attack r347.power into r370;
    add r370 r358.technique into r371;
    gt r371 r332 into r372;
    lt r358.defense r334 into r373;
    lt r369.goalkeeping r336 into r374;
    add r320 1u64 into r375;
    add r321 1u64 into r376;
    ternary r330 r375 r320 into r377;
    ternary r330 r321 r376 into r378;
    ternary r374 r377 r320 into r379;
    ternary r374 r378 r321 into r380;
    ternary r373 r379 r320 into r381;
    ternary r373 r380 r321 into r382;
    ternary r372 r381 r320 into r383;
    ternary r372 r382 r321 into r384;
    get players[r3[7]] into r385;
    get players[r4[7]] into r386;
    rand.chacha into r387 as u128;
    add r385.speed r386.speed into r388;
    is.eq r388 0u128 into r389;
    add r385.speed r386.speed into r390;
    mod r387 r390 into r391;
    lt r391 r385.speed into r392;
    ternary r389 r392 true into r393;
    mod r387 234272u128 into r394;
    mod r394 300u128 into r395;
    mod r387 2341272u128 into r396;
    mod r396 100u128 into r397;
    mod r387 234234272u128 into r398;
    mod r398 100u128 into r399;
    ternary r393 r385.player_id r386.player_id into r400;
    ternary r393 r385.team_id r386.team_id into r401;
    ternary r393 r385.position r386.position into r402;
    ternary r393 r385.attack r386.attack into r403;
    ternary r393 r385.defense r386.defense into r404;
    ternary r393 r385.speed r386.speed into r405;
    ternary r393 r385.power r386.power into r406;
    ternary r393 r385.stamina r386.stamina into r407;
    ternary r393 r385.technique r386.technique into r408;
    ternary r393 r385.goalkeeping r386.goalkeeping into r409;
    cast r400 r401 r402 r403 r404 r405 r406 r407 r408 r409 into r410 as Player;
    ternary r393 r386.player_id r385.player_id into r411;
    ternary r393 r386.team_id r385.team_id into r412;
    ternary r393 r386.position r385.position into r413;
    ternary r393 r386.attack r385.attack into r414;
    ternary r393 r386.defense r385.defense into r415;
    ternary r393 r386.speed r385.speed into r416;
    ternary r393 r386.power r385.power into r417;
    ternary r393 r386.stamina r385.stamina into r418;
    ternary r393 r386.technique r385.technique into r419;
    ternary r393 r386.goalkeeping r385.goalkeeping into r420;
    cast r411 r412 r413 r414 r415 r416 r417 r418 r419 r420 into r421 as Player;
    ternary r393 r6.player_id r5.player_id into r422;
    ternary r393 r6.team_id r5.team_id into r423;
    ternary r393 r6.position r5.position into r424;
    ternary r393 r6.attack r5.attack into r425;
    ternary r393 r6.defense r5.defense into r426;
    ternary r393 r6.speed r5.speed into r427;
    ternary r393 r6.power r5.power into r428;
    ternary r393 r6.stamina r5.stamina into r429;
    ternary r393 r6.technique r5.technique into r430;
    ternary r393 r6.goalkeeping r5.goalkeeping into r431;
    cast r422 r423 r424 r425 r426 r427 r428 r429 r430 r431 into r432 as Player;
    add r410.attack r410.power into r433;
    add r433 r421.technique into r434;
    gt r434 r395 into r435;
    lt r421.defense r397 into r436;
    lt r432.goalkeeping r399 into r437;
    add r383 1u64 into r438;
    add r384 1u64 into r439;
    ternary r393 r438 r383 into r440;
    ternary r393 r384 r439 into r441;
    ternary r437 r440 r383 into r442;
    ternary r437 r441 r384 into r443;
    ternary r436 r442 r383 into r444;
    ternary r436 r443 r384 into r445;
    ternary r435 r444 r383 into r446;
    ternary r435 r445 r384 into r447;
    get players[r3[8]] into r448;
    get players[r4[8]] into r449;
    rand.chacha into r450 as u128;
    add r448.speed r449.speed into r451;
    is.eq r451 0u128 into r452;
    add r448.speed r449.speed into r453;
    mod r450 r453 into r454;
    lt r454 r448.speed into r455;
    ternary r452 r455 true into r456;
    mod r450 234272u128 into r457;
    mod r457 300u128 into r458;
    mod r450 2341272u128 into r459;
    mod r459 100u128 into r460;
    mod r450 234234272u128 into r461;
    mod r461 100u128 into r462;
    ternary r456 r448.player_id r449.player_id into r463;
    ternary r456 r448.team_id r449.team_id into r464;
    ternary r456 r448.position r449.position into r465;
    ternary r456 r448.attack r449.attack into r466;
    ternary r456 r448.defense r449.defense into r467;
    ternary r456 r448.speed r449.speed into r468;
    ternary r456 r448.power r449.power into r469;
    ternary r456 r448.stamina r449.stamina into r470;
    ternary r456 r448.technique r449.technique into r471;
    ternary r456 r448.goalkeeping r449.goalkeeping into r472;
    cast r463 r464 r465 r466 r467 r468 r469 r470 r471 r472 into r473 as Player;
    ternary r456 r449.player_id r448.player_id into r474;
    ternary r456 r449.team_id r448.team_id into r475;
    ternary r456 r449.position r448.position into r476;
    ternary r456 r449.attack r448.attack into r477;
    ternary r456 r449.defense r448.defense into r478;
    ternary r456 r449.speed r448.speed into r479;
    ternary r456 r449.power r448.power into r480;
    ternary r456 r449.stamina r448.stamina into r481;
    ternary r456 r449.technique r448.technique into r482;
    ternary r456 r449.goalkeeping r448.goalkeeping into r483;
    cast r474 r475 r476 r477 r478 r479 r480 r481 r482 r483 into r484 as Player;
    ternary r456 r6.player_id r5.player_id into r485;
    ternary r456 r6.team_id r5.team_id into r486;
    ternary r456 r6.position r5.position into r487;
    ternary r456 r6.attack r5.attack into r488;
    ternary r456 r6.defense r5.defense into r489;
    ternary r456 r6.speed r5.speed into r490;
    ternary r456 r6.power r5.power into r491;
    ternary r456 r6.stamina r5.stamina into r492;
    ternary r456 r6.technique r5.technique into r493;
    ternary r456 r6.goalkeeping r5.goalkeeping into r494;
    cast r485 r486 r487 r488 r489 r490 r491 r492 r493 r494 into r495 as Player;
    add r473.attack r473.power into r496;
    add r496 r484.technique into r497;
    gt r497 r458 into r498;
    lt r484.defense r460 into r499;
    lt r495.goalkeeping r462 into r500;
    add r446 1u64 into r501;
    add r447 1u64 into r502;
    ternary r456 r501 r446 into r503;
    ternary r456 r447 r502 into r504;
    ternary r500 r503 r446 into r505;
    ternary r500 r504 r447 into r506;
    ternary r499 r505 r446 into r507;
    ternary r499 r506 r447 into r508;
    ternary r498 r507 r446 into r509;
    ternary r498 r508 r447 into r510;
    get players[r3[9]] into r511;
    get players[r4[9]] into r512;
    rand.chacha into r513 as u128;
    add r511.speed r512.speed into r514;
    is.eq r514 0u128 into r515;
    add r511.speed r512.speed into r516;
    mod r513 r516 into r517;
    lt r517 r511.speed into r518;
    ternary r515 r518 true into r519;
    mod r513 234272u128 into r520;
    mod r520 300u128 into r521;
    mod r513 2341272u128 into r522;
    mod r522 100u128 into r523;
    mod r513 234234272u128 into r524;
    mod r524 100u128 into r525;
    ternary r519 r511.player_id r512.player_id into r526;
    ternary r519 r511.team_id r512.team_id into r527;
    ternary r519 r511.position r512.position into r528;
    ternary r519 r511.attack r512.attack into r529;
    ternary r519 r511.defense r512.defense into r530;
    ternary r519 r511.speed r512.speed into r531;
    ternary r519 r511.power r512.power into r532;
    ternary r519 r511.stamina r512.stamina into r533;
    ternary r519 r511.technique r512.technique into r534;
    ternary r519 r511.goalkeeping r512.goalkeeping into r535;
    cast r526 r527 r528 r529 r530 r531 r532 r533 r534 r535 into r536 as Player;
    ternary r519 r512.player_id r511.player_id into r537;
    ternary r519 r512.team_id r511.team_id into r538;
    ternary r519 r512.position r511.position into r539;
    ternary r519 r512.attack r511.attack into r540;
    ternary r519 r512.defense r511.defense into r541;
    ternary r519 r512.speed r511.speed into r542;
    ternary r519 r512.power r511.power into r543;
    ternary r519 r512.stamina r511.stamina into r544;
    ternary r519 r512.technique r511.technique into r545;
    ternary r519 r512.goalkeeping r511.goalkeeping into r546;
    cast r537 r538 r539 r540 r541 r542 r543 r544 r545 r546 into r547 as Player;
    ternary r519 r6.player_id r5.player_id into r548;
    ternary r519 r6.team_id r5.team_id into r549;
    ternary r519 r6.position r5.position into r550;
    ternary r519 r6.attack r5.attack into r551;
    ternary r519 r6.defense r5.defense into r552;
    ternary r519 r6.speed r5.speed into r553;
    ternary r519 r6.power r5.power into r554;
    ternary r519 r6.stamina r5.stamina into r555;
    ternary r519 r6.technique r5.technique into r556;
    ternary r519 r6.goalkeeping r5.goalkeeping into r557;
    cast r548 r549 r550 r551 r552 r553 r554 r555 r556 r557 into r558 as Player;
    add r536.attack r536.power into r559;
    add r559 r547.technique into r560;
    gt r560 r521 into r561;
    lt r547.defense r523 into r562;
    lt r558.goalkeeping r525 into r563;
    add r509 1u64 into r564;
    add r510 1u64 into r565;
    ternary r519 r564 r509 into r566;
    ternary r519 r510 r565 into r567;
    ternary r563 r566 r509 into r568;
    ternary r563 r567 r510 into r569;
    ternary r562 r568 r509 into r570;
    ternary r562 r569 r510 into r571;
    ternary r561 r570 r509 into r572;
    ternary r561 r571 r510 into r573;
    get players[r3[10]] into r574;
    get players[r4[10]] into r575;
    rand.chacha into r576 as u128;
    add r574.speed r575.speed into r577;
    is.eq r577 0u128 into r578;
    add r574.speed r575.speed into r579;
    mod r576 r579 into r580;
    lt r580 r574.speed into r581;
    ternary r578 r581 true into r582;
    mod r576 234272u128 into r583;
    mod r583 300u128 into r584;
    mod r576 2341272u128 into r585;
    mod r585 100u128 into r586;
    mod r576 234234272u128 into r587;
    mod r587 100u128 into r588;
    ternary r582 r574.player_id r575.player_id into r589;
    ternary r582 r574.team_id r575.team_id into r590;
    ternary r582 r574.position r575.position into r591;
    ternary r582 r574.attack r575.attack into r592;
    ternary r582 r574.defense r575.defense into r593;
    ternary r582 r574.speed r575.speed into r594;
    ternary r582 r574.power r575.power into r595;
    ternary r582 r574.stamina r575.stamina into r596;
    ternary r582 r574.technique r575.technique into r597;
    ternary r582 r574.goalkeeping r575.goalkeeping into r598;
    cast r589 r590 r591 r592 r593 r594 r595 r596 r597 r598 into r599 as Player;
    ternary r582 r575.player_id r574.player_id into r600;
    ternary r582 r575.team_id r574.team_id into r601;
    ternary r582 r575.position r574.position into r602;
    ternary r582 r575.attack r574.attack into r603;
    ternary r582 r575.defense r574.defense into r604;
    ternary r582 r575.speed r574.speed into r605;
    ternary r582 r575.power r574.power into r606;
    ternary r582 r575.stamina r574.stamina into r607;
    ternary r582 r575.technique r574.technique into r608;
    ternary r582 r575.goalkeeping r574.goalkeeping into r609;
    cast r600 r601 r602 r603 r604 r605 r606 r607 r608 r609 into r610 as Player;
    ternary r582 r6.player_id r5.player_id into r611;
    ternary r582 r6.team_id r5.team_id into r612;
    ternary r582 r6.position r5.position into r613;
    ternary r582 r6.attack r5.attack into r614;
    ternary r582 r6.defense r5.defense into r615;
    ternary r582 r6.speed r5.speed into r616;
    ternary r582 r6.power r5.power into r617;
    ternary r582 r6.stamina r5.stamina into r618;
    ternary r582 r6.technique r5.technique into r619;
    ternary r582 r6.goalkeeping r5.goalkeeping into r620;
    cast r611 r612 r613 r614 r615 r616 r617 r618 r619 r620 into r621 as Player;
    add r599.attack r599.power into r622;
    add r622 r610.technique into r623;
    gt r623 r584 into r624;
    lt r610.defense r586 into r625;
    lt r621.goalkeeping r588 into r626;
    add r572 1u64 into r627;
    add r573 1u64 into r628;
    ternary r582 r627 r572 into r629;
    ternary r582 r573 r628 into r630;
    ternary r626 r629 r572 into r631;
    ternary r626 r630 r573 into r632;
    ternary r625 r631 r572 into r633;
    ternary r625 r632 r573 into r634;
    ternary r624 r633 r572 into r635;
    ternary r624 r634 r573 into r636;
    cast r1 r2 r574.team_id r575.team_id r635 r636 into r637 as GameOutcome;
    set r637 into game_outcomes[r0];

function reveal_answer_game:
    input r0 as football_coins_v001.aleo/ClaimSignature.record;
    input r1 as CalculatedOutcomeNotification.record;
    input r2 as football_coins_v001.aleo/JointPieceState.record;
    input r3 as football_pvp_utils_v001.aleo/Answer.record;
    input r4 as GameOutcome.private;
    assert.eq r2.state_updater_address self.signer;
    assert.eq self.caller self.signer;
    gt r4.goals_home r4.goals_away into r5;
    ternary r5 r3.opponent_address r3.challenger_address into r6;
    lt r4.goals_home r4.goals_away into r7;
    ternary r7 r3.opponent_address r3.challenger_address into r8;
    call football_pvp_utils_v001.aleo/reveal_answer r3 r0.sig into r9 r10;
    call football_coins_v001.aleo/joint_stake_state_update r2 r0 r6 into r11 r12;
    cast r3.opponent_address r3.game_multisig 5field true r2.amount r3.challenger_address r3.opponent_address r3.answer r1.opponent_answer r4 11u32 into r13 as GameFinishReqNotification.record;
    cast r3.challenger_address r3.game_multisig 5field true r2.amount r3.challenger_address r3.opponent_address r3.answer r1.opponent_answer r4 11u32 into r14 as GameFinishReqNotification.record;
    async reveal_answer_game r1.game_multisig r4 into r15;
    output r9 as football_pvp_utils_v001.aleo/RevealAnswer.record;
    output r10 as football_pvp_utils_v001.aleo/AuditRevealAnswer.record;
    output r11 as football_coins_v001.aleo/JointPieceWinner.record;
    output r12 as football_coins_v001.aleo/AuditJointPieceWinner.record;
    output r13 as GameFinishReqNotification.record;
    output r14 as GameFinishReqNotification.record;
    output r15 as football_game_v015b.aleo/reveal_answer_game.future;
finalize reveal_answer_game:
    input r0 as address.public;
    input r1 as GameOutcome.public;
    get game_outcomes[r0] into r2;
    assert.eq r1.goals_home r2.goals_home;
    assert.eq r1.goals_away r2.goals_away;

function finish_game:
    input r0 as Game.record;
    input r1 as football_coins_v001.aleo/JointPieceWinner.record;
    input r2 as football_coins_v001.aleo/PieceJointStake.record;
    input r3 as football_coins_v001.aleo/JointPieceTimeClaim.record;
    assert.eq r0.owner self.signer;
    assert.eq self.caller self.signer;
    is.eq r0.challenger_address r1.winner into r4;
    ternary r4 r0.opponent_address r0.challenger_address into r5;
    call football_coins_v001.aleo/joint_stake_transfer_to_winner r1 r2 r3 into r6 r7 r8;
    cast r0.owner r0.challenger_commit r0.opponent_answer r0.total_pot r0.challenger_address r0.opponent_address r0.game_multisig 6field 0u32 into r9 as Game.record;
    cast r0.challenger_address r0.game_multisig 6field false r0.total_pot r0.challenger_address r0.opponent_address r1.winner r5 12u32 into r10 as GameFinishedNotification.record;
    cast r0.opponent_address r0.game_multisig 6field false r0.total_pot r0.challenger_address r0.opponent_address r1.winner r5 12u32 into r11 as GameFinishedNotification.record;
    output r6 as football_coins_v001.aleo/Piece.record;
    output r7 as football_coins_v001.aleo/AuditTransferToWinner.record;
    output r8 as football_coins_v001.aleo/AuditPieceOwner.record;
    output r9 as Game.record;
    output r10 as GameFinishedNotification.record;
    output r11 as GameFinishedNotification.record;

function finish_game_draw:
    input r0 as Game.record;
    input r1 as football_coins_v001.aleo/JointPieceWinner.record;
    input r2 as football_coins_v001.aleo/PieceJointStake.record;
    input r3 as football_coins_v001.aleo/JointPieceTimeClaim.record;
    assert.eq r0.owner self.signer;
    assert.eq self.caller self.signer;
    is.eq r0.challenger_address r1.winner into r4;
    ternary r4 r0.opponent_address r0.challenger_address into r5;
    call football_coins_v001.aleo/joint_stake_transfer_draw r1 r2 r3 into r6 r7 r8 r9 r10 r11;
    cast r0.owner r0.challenger_commit r0.opponent_answer r0.total_pot r0.challenger_address r0.opponent_address r0.game_multisig 6field 0u32 into r12 as Game.record;
    cast r0.challenger_address r0.game_multisig 6field false r0.total_pot r0.challenger_address r0.opponent_address r1.winner r5 12u32 into r13 as GameFinishedNotification.record;
    cast r0.opponent_address r0.game_multisig 6field false r0.total_pot r0.challenger_address r0.opponent_address r1.winner r5 12u32 into r14 as GameFinishedNotification.record;
    output r6 as football_coins_v001.aleo/Piece.record;
    output r7 as football_coins_v001.aleo/AuditTransferToWinner.record;
    output r8 as football_coins_v001.aleo/AuditPieceOwner.record;
    output r9 as football_coins_v001.aleo/Piece.record;
    output r10 as football_coins_v001.aleo/AuditTransferToWinner.record;
    output r11 as football_coins_v001.aleo/AuditPieceOwner.record;
    output r12 as Game.record;
    output r13 as GameFinishedNotification.record;
    output r14 as GameFinishedNotification.record;

function finish_game_by_timeout:
    input r0 as Game.record;
    input r1 as football_coins_v001.aleo/PieceJointStake.record;
    input r2 as football_coins_v001.aleo/JointPieceTimeClaim.record;
    input r3 as signature.private;
    assert.eq r0.owner self.signer;
    assert.eq self.caller self.signer;
    cast r0.owner r0.challenger_commit r0.opponent_answer r0.total_pot r0.challenger_address r0.opponent_address r0.game_multisig 9field 0u32 into r4 as Game.record;
    cast r0.challenger_address r0.opponent_address 0field 0field 0u64 3u64 into r5 as GameOutcome;
    cast r0.challenger_address r0.game_multisig 9field false r0.total_pot r0.challenger_address r0.opponent_address r0.opponent_address r0.challenger_address 12u32 into r6 as GameFinishedNotification.record;
    cast r0.opponent_address r0.game_multisig 9field false r0.total_pot r0.challenger_address r0.opponent_address r0.opponent_address r0.challenger_address 12u32 into r7 as GameFinishedNotification.record;
    call football_coins_v001.aleo/joint_timeout_to_opponent r1 r2 r3 into r8 r9;
    async finish_game_by_timeout r2.block_ht into r10;
    output r8 as football_coins_v001.aleo/Piece.record;
    output r9 as football_coins_v001.aleo/AuditTransferToWinner.record;
    output r4 as Game.record;
    output r6 as GameFinishedNotification.record;
    output r7 as GameFinishedNotification.record;
    output r10 as football_game_v015b.aleo/finish_game_by_timeout.future;
finalize finish_game_by_timeout:
    input r0 as u32.public;
    add r0 10000u32 into r1;
    gt block.height r1 into r2;
    assert.eq r2 true;

Block heightTimestampTransition IDFunction callState
2,158,6512024-04-23 10:52:12au1cp7l87eg6sqx2f0k232e4n8xwk2d0vw9uf6hfazttt7fzk8xksyqsuhj35reveal_answer_gameAccepted
2,158,5322024-04-23 10:40:40au1dwv4x0xx36w6l5u7e77muy2catfg3w4rqerm4ncef8h55avgk5qsz4vyl2calculate_outcomeAccepted
2,148,4922024-04-22 19:04:47au147mxdwmtajecxud38ltdjy292jtnezyyv943yctvnlhpkrkd8vzqvkncjjcalculate_outcomeAccepted
2,148,4812024-04-22 19:03:39au1jpp74nyxmfh9l0hl2grdce9u68lwnga275u4tnv4xp5l4jrjeqgqturdx9add_playerAccepted
2,148,4792024-04-22 19:03:30au1pmp0l0hx3lwpnk9e6zrqmtrn0xceh9farn73n4npvca3mfpf5y9qepn7qvadd_playerAccepted
2,148,4352024-04-22 18:59:09au1g0w4vde8fmjp9wfxwsg39v4amlh3wjryuwqm699zu47wqhvamqyqqh3wvdcalculate_outcomeRejected
2,148,4302024-04-22 18:58:38au12dfkm6dyu62dncdfqx98gytevdjq0g603rg5xrmgjs7ywyqxespq2sjmfwadd_playerAccepted
2,148,3712024-04-22 18:53:24au1s7zxr7essg4wxwl325djzrnwuuxqk3ky0ulcfhvvdnf782y6rvzqxks94qcalculate_outcomeRejected
2,148,3512024-04-22 18:51:30au16mnsc9m3hg8d7dw2jr647d2n4ua0wd8245xm9xf338qvhhfzt5yspjx5fdaccept_gameAccepted
2,148,2572024-04-22 18:42:47au1f0uhylsmng33h57exs2zrvpjy3axc83n0x49n4yunruszmmy9v8qace5d7submit_wagerAccepted
2,148,1932024-04-22 18:37:00au1hlplfprn0ju9gm0ts3rhaz2aza3vdlyjkncflrvxye83lyp6ec8skcju0lpropose_gameAccepted
2,148,1462024-04-22 18:32:31au1enmve6psr3axpcrj6ey95sdq8lyhga269qmexh2h6e56hd0khvxqk5pp89calculate_outcomeRejected
2,148,1082024-04-22 18:28:55au1sxqwhskr4yngas4v3d8mymkhrfu9sxuj9l3x52jkmlm3287nyuzs8vsrq5calculate_outcomeRejected
2,148,0702024-04-22 18:25:11au15lksnyqc4x99avhk7k2v5h8pc65kdkarjwwdmvcucvkvrl4uluzqyhdsfaadd_playerAccepted
2,147,9702024-04-22 18:15:53au107phx7p5ljry5man760yann445jn9t5e0wmpctqp9xf8h2v9l59qj27yrjcalculate_outcomeRejected
2,147,9002024-04-22 18:09:20au15jzfary0rttwswj5aljm6m3tv85m8r0npurxqpdfsvw8gv4e5q9s6d6pxhaccept_gameAccepted
2,147,8522024-04-22 18:04:52au1304a004vzxcx2aw40mya4jwsgkgvj72tykvum03q7kgg8jcetqyqarts8esubmit_wagerAccepted
2,147,7412024-04-22 17:54:09au109ndh3wzf828t7hlq3mc88csle0py4sj9pmsdeumpqcwmkkkzc8q5vd9wwpropose_gameAccepted
2,147,6402024-04-22 17:44:34au1y0yndlp3msckcde77klwcjn72alercv0v4qjx5lcyjldtxc6gs8qvnmej2add_playerAccepted
2,147,6392024-04-22 17:44:23au1nu3f99763x8uvhgaxs4ajp50k54rkx42ww3z8dj0wq35entdjcxsn8nwzgadd_playerAccepted
2,147,6372024-04-22 17:44:14au1a8fltxa5dgmj4rvjvk7uvpa8dp49vlmprtvxttq2n9rwmwvsu5xsx425dqadd_playerAccepted
2,147,6352024-04-22 17:44:04au1d2dcnvld92mcnx7u7n2ux8evqaxh6en0wly888pekrzqh08m4u9qcc23vnadd_playerAccepted
2,147,6332024-04-22 17:43:51au188tnlsqx0zx8w8mumhrpnh0fysrj4xmnf2vqgwwuwtp43gyqqs9saasnh0add_playerAccepted
2,147,6322024-04-22 17:43:45au1rt2u2rjxqt2ecjnyfs0ma9cfzh0tdd82ynmmsx43h2fencvzaqgs9cke3madd_playerAccepted
2,147,6312024-04-22 17:43:34au1hk7qay4rp4884m0udjck005qd395upe7u4v5j8ndzclerfax8gzqmvwhegadd_playerAccepted
2,147,6312024-04-22 17:43:34au174an9nhh707sh03huv8a4pdg4xqcuej5c9atynn2nsvant62ycqsz609ktadd_playerAccepted
2,147,6292024-04-22 17:43:21au1ktk5jhh320jedfejzf5wpltgeyn8qdlh6jpwrr8jwhwtzx6w9vqsk76cf8add_playerAccepted
2,147,6272024-04-22 17:43:12au120pg4c6h3yuuq9cdpnye0yfva4avvnxgtm88rnkjsjvpw8kg7g9sh0554yadd_playerAccepted
2,147,6252024-04-22 17:42:58au1y6t3e80cxtk2ez2kw7pvvq3hnf6yyu3s3v2ppdwwfxhyzz52rqqsrz8vzgadd_playerAccepted
2,147,6232024-04-22 17:42:49au1nn3ur0glmtznafp4llx69u0w2sq4q0valkqv0534cmqp9kanfsrsrk5hcradd_playerAccepted




Not implemented