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