From 5990d93c599517d4b3e0201e86890bdcd8d32421 Mon Sep 17 00:00:00 2001 From: technimite Date: Fri, 5 Jun 2026 22:31:25 +0100 Subject: [PATCH 01/16] Update aviator ABI --- backend/src/abi/aviator.json | 1550 +++++++++++++++++++--------------- 1 file changed, 865 insertions(+), 685 deletions(-) diff --git a/backend/src/abi/aviator.json b/backend/src/abi/aviator.json index ab06b01..e3b7532 100644 --- a/backend/src/abi/aviator.json +++ b/backend/src/abi/aviator.json @@ -1,688 +1,868 @@ [ - { - "type": "constructor", - "inputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "receive", - "stateMutability": "payable" - }, - { - "type": "function", - "name": "MAX_BET", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "MIN_BET", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "UPGRADE_INTERFACE_VERSION", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "cashOutFor", - "inputs": [ - { - "name": "roundId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "player", - "type": "address", - "internalType": "address" - }, - { - "name": "payout", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "multiplier", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "fundHouse", - "inputs": [ - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "initialize", - "inputs": [ - { - "name": "_usdcToken", - "type": "address", - "internalType": "address" - }, - { - "name": "initialOwner", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", + { + "type": "constructor", + "inputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "receive", + "stateMutability": "payable" + }, + { + "type": "function", + "name": "MAX_BET", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "MAX_PAYOUT", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "MIN_BET", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "UPGRADE_INTERFACE_VERSION", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "cashOutFor", + "inputs": [ + { + "name": "roundId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "player", + "type": "address", + "internalType": "address" + }, + { + "name": "payout", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "multiplier", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "deposit", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "depositWithPermit", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "v", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "r", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "s", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "fundHouse", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "initialize", + "inputs": [ + { + "name": "_usdcToken", + "type": "address", + "internalType": "address" + }, + { + "name": "initialOwner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "owner", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "pause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "paused", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "placeBetFor", + "inputs": [ + { + "name": "roundId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "player", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "playerBalances", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "proxiableUUID", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "renounceOwnership", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "roundSnapshots", + "inputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "snapshotHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "playersMerkleRoot", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "totalBets", + "type": "uint96", + "internalType": "uint96" + }, + { + "name": "totalPayouts", + "type": "uint96", + "internalType": "uint96" + }, + { + "name": "numPlayers", + "type": "uint32", + "internalType": "uint32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "serverOperator", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "setServerOperator", + "inputs": [ + { + "name": "newOperator", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "snapshotRound", + "inputs": [ + { + "name": "roundId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "snapshotHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "playersMerkleRoot", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "totalBets", + "type": "uint96", + "internalType": "uint96" + }, + { + "name": "totalPayouts", + "type": "uint96", + "internalType": "uint96" + }, + { + "name": "numPlayers", + "type": "uint32", + "internalType": "uint32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "totalPlayerBalances", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "transferOwnership", + "inputs": [ + { + "name": "newOwner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "unpause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "upgradeToAndCall", + "inputs": [ + { + "name": "newImplementation", + "type": "address", + "internalType": "address" + }, + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "usdcToken", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract IERC20" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "withdraw", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawEth", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address payable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawHouseProfits", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "BetPlaced", + "inputs": [ + { + "name": "roundId", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "player", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "CashOut", + "inputs": [ + { + "name": "roundId", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "player", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "payout", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "multiplier", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Deposit", + "inputs": [ + { + "name": "player", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "HouseFunded", + "inputs": [ + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "HouseWithdrawn", + "inputs": [ + { + "name": "recipient", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Initialized", + "inputs": [ + { + "name": "version", + "type": "uint64", + "indexed": false, + "internalType": "uint64" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "OwnershipTransferred", + "inputs": [ + { + "name": "previousOwner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "newOwner", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Paused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoundSnapshot", + "inputs": [ + { + "name": "roundId", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "snapshotHash", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + }, + { + "name": "playersMerkleRoot", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + }, + { + "name": "totalBets", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "totalPayouts", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "numPlayers", + "type": "uint32", + "indexed": false, + "internalType": "uint32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ServerOperatorUpdated", + "inputs": [ + { + "name": "newOperator", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Unpaused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Upgraded", + "inputs": [ + { + "name": "implementation", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Withdrawal", + "inputs": [ + { + "name": "player", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "error", + "name": "AddressEmptyCode", + "inputs": [ + { + "name": "target", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ERC1967InvalidImplementation", + "inputs": [ + { + "name": "implementation", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ERC1967NonPayable", + "inputs": [] + }, + { + "type": "error", + "name": "ETHTransferFailed", + "inputs": [] + }, + { + "type": "error", + "name": "EnforcedPause", + "inputs": [] + }, + { + "type": "error", + "name": "ExpectedPause", + "inputs": [] + }, + { + "type": "error", + "name": "FailedCall", + "inputs": [] + }, + { + "type": "error", + "name": "InsufficientBalance", + "inputs": [] + }, + { + "type": "error", + "name": "InsufficientHouseBalance", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidAddress", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidBetAmount", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidInitialization", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidTokenAddress", + "inputs": [] + }, + { + "type": "error", + "name": "NotInitializing", + "inputs": [] + }, + { + "type": "error", + "name": "OwnableInvalidOwner", + "inputs": [ + { "name": "owner", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "pause", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "paused", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "placeBetFor", - "inputs": [ - { - "name": "roundId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "player", - "type": "address", - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "proxiableUUID", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "renounceOwnership", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "roundSnapshots", - "inputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "snapshotHash", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "playersMerkleRoot", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "totalBets", - "type": "uint96", - "internalType": "uint96" - }, - { - "name": "totalPayouts", - "type": "uint96", - "internalType": "uint96" - }, - { - "name": "numPlayers", - "type": "uint32", - "internalType": "uint32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "serverOperator", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "setServerOperator", - "inputs": [ - { - "name": "newOperator", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "snapshotRound", - "inputs": [ - { - "name": "roundId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "snapshotHash", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "playersMerkleRoot", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "totalBets", - "type": "uint96", - "internalType": "uint96" - }, - { - "name": "totalPayouts", - "type": "uint96", - "internalType": "uint96" - }, - { - "name": "numPlayers", - "type": "uint32", - "internalType": "uint32" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "transferOwnership", - "inputs": [ - { - "name": "newOwner", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "unpause", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "upgradeToAndCall", - "inputs": [ - { - "name": "newImplementation", - "type": "address", - "internalType": "address" - }, - { - "name": "data", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "usdcToken", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IERC20" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "withdrawETH", - "inputs": [ - { - "name": "to", - "type": "address", - "internalType": "address payable" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "withdrawHouseProfits", - "inputs": [ - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "event", - "name": "BetPlaced", - "inputs": [ - { - "name": "roundId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "player", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "CashOut", - "inputs": [ - { - "name": "roundId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "player", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "payout", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "multiplier", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Initialized", - "inputs": [ - { - "name": "version", - "type": "uint64", - "indexed": false, - "internalType": "uint64" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "OwnershipTransferred", - "inputs": [ - { - "name": "previousOwner", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "newOwner", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Paused", - "inputs": [ - { - "name": "account", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "RoundSnapshot", - "inputs": [ - { - "name": "roundId", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "snapshotHash", - "type": "bytes32", - "indexed": false, - "internalType": "bytes32" - }, - { - "name": "playersMerkleRoot", - "type": "bytes32", - "indexed": false, - "internalType": "bytes32" - }, - { - "name": "totalBets", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "totalPayouts", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "numPlayers", - "type": "uint32", - "indexed": false, - "internalType": "uint32" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ServerOperatorUpdated", - "inputs": [ - { - "name": "newOperator", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Unpaused", - "inputs": [ - { - "name": "account", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Upgraded", - "inputs": [ - { - "name": "implementation", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "error", - "name": "AddressEmptyCode", - "inputs": [ - { - "name": "target", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "ERC1967InvalidImplementation", - "inputs": [ - { - "name": "implementation", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "ERC1967NonPayable", - "inputs": [] - }, - { - "type": "error", - "name": "ETHTransferFailed", - "inputs": [] - }, - { - "type": "error", - "name": "EnforcedPause", - "inputs": [] - }, - { - "type": "error", - "name": "ExpectedPause", - "inputs": [] - }, - { - "type": "error", - "name": "FailedCall", - "inputs": [] - }, - { - "type": "error", - "name": "InsufficientBalance", - "inputs": [] - }, - { - "type": "error", - "name": "InsufficientHouseBalance", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidAddress", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidBetAmount", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidInitialization", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidTokenAddress", - "inputs": [] - }, - { - "type": "error", - "name": "NotInitializing", - "inputs": [] - }, - { - "type": "error", - "name": "OwnableInvalidOwner", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "OwnableUnauthorizedAccount", - "inputs": [ - { - "name": "account", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "ReentrancyGuardReentrantCall", - "inputs": [] - }, - { - "type": "error", - "name": "TransferFailed", - "inputs": [] - }, - { - "type": "error", - "name": "UUPSUnauthorizedCallContext", - "inputs": [] - }, - { - "type": "error", - "name": "UUPSUnsupportedProxiableUUID", - "inputs": [ - { - "name": "slot", - "type": "bytes32", - "internalType": "bytes32" - } - ] - }, - { - "type": "error", - "name": "Unauthorized", - "inputs": [] - } + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "OwnableUnauthorizedAccount", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ReentrancyGuardReentrantCall", + "inputs": [] + }, + { + "type": "error", + "name": "TransferFailed", + "inputs": [] + }, + { + "type": "error", + "name": "UUPSUnauthorizedCallContext", + "inputs": [] + }, + { + "type": "error", + "name": "UUPSUnsupportedProxiableUUID", + "inputs": [ + { + "name": "slot", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "Unauthorized", + "inputs": [] + } ] From b288343cbcad71a37055869bd59dd99779861342 Mon Sep 17 00:00:00 2001 From: technimite Date: Fri, 5 Jun 2026 22:31:31 +0100 Subject: [PATCH 02/16] Update chain service --- backend/src/services/chain.service.ts | 29 +++------------------------ 1 file changed, 3 insertions(+), 26 deletions(-) diff --git a/backend/src/services/chain.service.ts b/backend/src/services/chain.service.ts index 2b5707a..b3b4a46 100644 --- a/backend/src/services/chain.service.ts +++ b/backend/src/services/chain.service.ts @@ -125,42 +125,19 @@ export class ChainService { async validatePlayerFunds(player: string, amount: number) { try { await this.ensureProviderReady(2); - const chainConfig = getChainConfig(this.chainId); - const usdcToken = chainConfig.usdcAddress; - if (!usdcToken) { - throw new Error(`USDC address not configured for chain ${this.chainId}`); - } - - const usdcContract = new ethers.Contract( - usdcToken, - [ - 'function balanceOf(address) view returns (uint256)', - 'function allowance(address owner, address spender) view returns (uint256)' - ], - this.provider - ); - - const contractAddress = await this.contract.getAddress(); const betAmountUint = BigInt(Math.round(amount * 1e6)); // USDC 6 decimals - const [balance, allowance] = await Promise.all([ - usdcContract.balanceOf(player), - usdcContract.allowance(player, contractAddress) - ]); + const balance = await this.contract.playerBalances(player); if (BigInt(balance) < betAmountUint) { - return { ok: false, reason: `Insufficient USDC balance. Have ${Number(balance) / 1e6}, need ${amount}` }; - } - - if (BigInt(allowance) < betAmountUint) { - return { ok: false, reason: `Insufficient allowance. Contract not approved to spend your USDC.` }; + return { ok: false, reason: `Insufficient game balance. Have ${Number(balance) / 1e6}, need ${amount}. Please deposit funds.` }; } return { ok: true }; } catch (err) { logger.error('Failed to validate player funds', { error: (err as Error).message, player, amount }); - return { ok: false, reason: 'Failed to verify balance/allowance: ' + (err as Error).message }; + return { ok: false, reason: 'Failed to verify game balance: ' + (err as Error).message }; } } From 1afff91df5cd4a53a370e98c808d27790dfa9c17 Mon Sep 17 00:00:00 2001 From: technimite Date: Fri, 5 Jun 2026 22:31:32 +0100 Subject: [PATCH 03/16] Update contracts .gitignore --- contracts/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/contracts/.gitignore b/contracts/.gitignore index 85198aa..89815be 100644 --- a/contracts/.gitignore +++ b/contracts/.gitignore @@ -1,6 +1,7 @@ # Compiler files cache/ out/ +lib/ # Ignores development broadcast logs !/broadcast From 5e5a2091a70d59a1671cd10efeade823ce37c882 Mon Sep 17 00:00:00 2001 From: technimite Date: Fri, 5 Jun 2026 22:31:38 +0100 Subject: [PATCH 04/16] Update AviatorGame contract --- contracts/src/AviatorGame.sol | 99 +++++++++++++++++++++++++++++++---- 1 file changed, 89 insertions(+), 10 deletions(-) diff --git a/contracts/src/AviatorGame.sol b/contracts/src/AviatorGame.sol index 2dfab36..4e0c595 100644 --- a/contracts/src/AviatorGame.sol +++ b/contracts/src/AviatorGame.sol @@ -11,6 +11,7 @@ import { PausableUpgradeable } from "@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol"; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import {IERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol"; import { Initializable } from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; @@ -36,6 +37,10 @@ contract AviatorGame is // Server operator (trusted for game operations) address public serverOperator; + // Player balances for deposit/withdrawal flow + mapping(address => uint256) public playerBalances; + uint256 public totalPlayerBalances; + // Snapshot storage struct RoundSnapshotData { bytes32 snapshotHash; @@ -62,6 +67,10 @@ contract AviatorGame is event ServerOperatorUpdated(address indexed newOperator); + // Player funds events + event Deposit(address indexed player, uint256 amount); + event Withdrawal(address indexed player, uint256 amount); + // Snapshot event event RoundSnapshot( uint256 indexed roundId, @@ -133,6 +142,74 @@ contract AviatorGame is if (!success) revert ETHTransferFailed(); } + // ============ Player Deposit / Withdraw Functions ============ + + /** + * @notice Deposit USDC into the game contract. + * @param amount Amount of USDC to deposit. + */ + function deposit(uint256 amount) external whenNotPaused nonReentrant { + if (amount == 0) revert InvalidBetAmount(); + + bool success = usdcToken.transferFrom(msg.sender, address(this), amount); + if (!success) revert TransferFailed(); + + playerBalances[msg.sender] += amount; + totalPlayerBalances += amount; + + emit Deposit(msg.sender, amount); + } + + /** + * @notice Deposit USDC using ERC-2612 Permit for a single-transaction flow. + * @param amount Amount of USDC to deposit. + */ + function depositWithPermit( + uint256 amount, + uint256 deadline, + uint8 v, + bytes32 r, + bytes32 s + ) external whenNotPaused nonReentrant { + if (amount == 0) revert InvalidBetAmount(); + + // Call permit on the USDC token + IERC20Permit(address(usdcToken)).permit( + msg.sender, + address(this), + amount, + deadline, + v, + r, + s + ); + + bool success = usdcToken.transferFrom(msg.sender, address(this), amount); + if (!success) revert TransferFailed(); + + playerBalances[msg.sender] += amount; + totalPlayerBalances += amount; + + emit Deposit(msg.sender, amount); + } + + /** + * @notice Withdraw deposited USDC and winnings from the game contract. + * @param amount Amount of USDC to withdraw. + */ + function withdraw(uint256 amount) external nonReentrant { + if (amount == 0) revert InvalidBetAmount(); + if (playerBalances[msg.sender] < amount) revert InsufficientBalance(); + + playerBalances[msg.sender] -= amount; + totalPlayerBalances -= amount; + + bool success = usdcToken.transfer(msg.sender, amount); + if (!success) revert TransferFailed(); + + emit Withdrawal(msg.sender, amount); + } + // ============ Core Game Functions ============ /** @@ -145,11 +222,11 @@ contract AviatorGame is uint256 amount ) external nonReentrant whenNotPaused onlyServerOperator { if (amount < MIN_BET || amount > MAX_BET) revert InvalidBetAmount(); + if (playerBalances[player] < amount) revert InsufficientBalance(); - // Transfer USDC from player to contract - // Note: The player must have approved the contract to spend this amount - bool success = usdcToken.transferFrom(player, address(this), amount); - if (!success) revert TransferFailed(); + // Deduct from player's deposited balance + playerBalances[player] -= amount; + totalPlayerBalances -= amount; emit BetPlaced(roundId, player, amount); } @@ -165,11 +242,13 @@ contract AviatorGame is uint256 multiplier ) external nonReentrant whenNotPaused onlyServerOperator { if (payout > MAX_PAYOUT) revert InsufficientHouseBalance(); - if (usdcToken.balanceOf(address(this)) < payout) revert InsufficientHouseBalance(); + + uint256 houseBalance = usdcToken.balanceOf(address(this)) - totalPlayerBalances; + if (houseBalance < payout) revert InsufficientHouseBalance(); - // Transfer winnings in USDC to the player - bool success = usdcToken.transfer(player, payout); - if (!success) revert TransferFailed(); + // Credit the payout to the player's balance + playerBalances[player] += payout; + totalPlayerBalances += payout; emit CashOut(roundId, player, payout, multiplier); } @@ -200,8 +279,8 @@ contract AviatorGame is } function withdrawHouseProfits(uint256 amount) external onlyOwner { - if (amount > usdcToken.balanceOf(address(this))) - revert InsufficientBalance(); + uint256 houseBalance = usdcToken.balanceOf(address(this)) - totalPlayerBalances; + if (amount > houseBalance) revert InsufficientHouseBalance(); bool success = usdcToken.transfer(owner(), amount); if (!success) revert TransferFailed(); From 5d0d29313aca455d1d337a860c2032cb4f078656 Mon Sep 17 00:00:00 2001 From: technimite Date: Fri, 5 Jun 2026 22:31:39 +0100 Subject: [PATCH 05/16] Update AviatorGame tests --- contracts/test/AviatorGame.t.sol | 68 +++++++++++++++++++++++++++----- 1 file changed, 58 insertions(+), 10 deletions(-) diff --git a/contracts/test/AviatorGame.t.sol b/contracts/test/AviatorGame.t.sol index e4f1b1b..01989ac 100644 --- a/contracts/test/AviatorGame.t.sol +++ b/contracts/test/AviatorGame.t.sol @@ -104,19 +104,29 @@ contract AviatorGameTest is Test { // We act as server operator (this contract is owner and initial operator) uint256 roundId = 123; + // Player must deposit first + vm.prank(PLAYER); + aviator.deposit(BET_AMOUNT); + assertEq(aviator.playerBalances(PLAYER), BET_AMOUNT); + assertEq(aviator.totalPlayerBalances(), BET_AMOUNT); + vm.expectEmit(true, true, false, true); emit BetPlaced(roundId, PLAYER, BET_AMOUNT); aviator.placeBetFor(roundId, PLAYER, BET_AMOUNT); - assertEq(usdc.balanceOf(address(aviator)), BET_AMOUNT); + assertEq(aviator.playerBalances(PLAYER), 0); + assertEq(aviator.totalPlayerBalances(), 0); + assertEq(usdc.balanceOf(address(aviator)), BET_AMOUNT); // House keeps the bet assertEq(usdc.balanceOf(PLAYER), 1000e6 - BET_AMOUNT); - assertEq(usdc.balanceOf(address(aviator)), BET_AMOUNT); } function test_CannotPlaceLowOrHighBet() public { uint256 roundId = 1; + vm.prank(PLAYER); + aviator.deposit(1000e6); // Deposit the player's full balance + vm.expectRevert( abi.encodeWithSelector(AviatorGame.InvalidBetAmount.selector) ); @@ -143,7 +153,11 @@ contract AviatorGameTest is Test { function test_CashOutSuccessFlow() public { uint256 roundId = 123; - // 1. Place bet to fund house + // Player must deposit first + vm.prank(PLAYER); + aviator.deposit(BET_AMOUNT); + + // 1. Place bet to fund house (bet becomes house funds) aviator.placeBetFor(roundId, PLAYER, BET_AMOUNT); assertEq(usdc.balanceOf(address(aviator)), BET_AMOUNT); @@ -159,8 +173,16 @@ contract AviatorGameTest is Test { aviator.cashOutFor(roundId, PLAYER, payout, 200); // House balance should decrease - assertEq(usdc.balanceOf(address(aviator)), 0); - // Player should have original balance + winnings (net +1 bet amount) + uint256 houseBal = usdc.balanceOf(address(aviator)) - aviator.totalPlayerBalances(); + assertEq(houseBal, 0); + + // Player's game balance should have original + winnings + assertEq(aviator.playerBalances(PLAYER), payout); + + // Player withdraws + vm.prank(PLAYER); + aviator.withdraw(payout); + assertEq(aviator.playerBalances(PLAYER), 0); assertEq(usdc.balanceOf(PLAYER), 1000e6 + BET_AMOUNT); } @@ -188,6 +210,9 @@ contract AviatorGameTest is Test { } function test_PausePreventsActions() public { + vm.prank(PLAYER); + aviator.deposit(BET_AMOUNT * 2); + aviator.pause(); vm.expectRevert(); @@ -209,13 +234,13 @@ contract AviatorGameTest is Test { ERC1967Proxy badProxy = new ERC1967Proxy(address(badImpl), badInit); AviatorGame bad = AviatorGame(payable(address(badProxy))); - // Attempt to place bet should revert because transferFrom returns false - // Need to be owner/operator to call placeBetFor, which we are (this contract) + // Attempt to deposit should revert because transferFrom returns false + vm.prank(PLAYER); vm.expectRevert( abi.encodeWithSelector(AviatorGame.TransferFailed.selector) ); - bad.placeBetFor(1, PLAYER, BET_AMOUNT); + bad.deposit(BET_AMOUNT); } function test_SnapshotOnlyServerOperator() public { @@ -316,20 +341,43 @@ contract AviatorGameTest is Test { uint256 bet1 = 100e6; uint256 bet2 = 200e6; + vm.prank(PLAYER); + aviator.deposit(bet1); + + vm.prank(PLAYER2); + aviator.deposit(bet2); + // Player 1 places bet aviator.placeBetFor(roundId, PLAYER, bet1); // Player 2 places bet aviator.placeBetFor(roundId, PLAYER2, bet2); - // House balance should reflect both + // House balance should reflect both (since balances are now 0) assertEq(usdc.balanceOf(address(aviator)), bet1 + bet2); + assertEq(aviator.totalPlayerBalances(), 0); - // Balances updated + // Wallet Balances updated assertEq(usdc.balanceOf(PLAYER), 1000e6 - bet1); assertEq(usdc.balanceOf(PLAYER2), 1000e6 - bet2); } + function test_DepositAndWithdraw() public { + uint256 amount = 50e6; + + vm.prank(PLAYER); + aviator.deposit(amount); + assertEq(aviator.playerBalances(PLAYER), amount); + assertEq(aviator.totalPlayerBalances(), amount); + assertEq(usdc.balanceOf(PLAYER), 1000e6 - amount); + + vm.prank(PLAYER); + aviator.withdraw(amount); + assertEq(aviator.playerBalances(PLAYER), 0); + assertEq(aviator.totalPlayerBalances(), 0); + assertEq(usdc.balanceOf(PLAYER), 1000e6); + } + function test_InitializationProtection() public { vm.expectRevert(); // Initializable: contract is already initialized aviator.initialize(address(usdc), PLAYER); From cd30dd29c214a3642a419208227fd4caf6008c9e Mon Sep 17 00:00:00 2001 From: technimite Date: Fri, 5 Jun 2026 22:31:39 +0100 Subject: [PATCH 06/16] Add deployment broadcast files --- .../42220/run-1780615853582.json | 131 ++++++++++++++++++ .../42220/run-latest.json | 131 ++++++++++++++++++ 2 files changed, 262 insertions(+) create mode 100644 contracts/broadcast/UpgradeAviatorGame.s.sol/42220/run-1780615853582.json create mode 100644 contracts/broadcast/UpgradeAviatorGame.s.sol/42220/run-latest.json diff --git a/contracts/broadcast/UpgradeAviatorGame.s.sol/42220/run-1780615853582.json b/contracts/broadcast/UpgradeAviatorGame.s.sol/42220/run-1780615853582.json new file mode 100644 index 0000000..974e8b2 --- /dev/null +++ b/contracts/broadcast/UpgradeAviatorGame.s.sol/42220/run-1780615853582.json @@ -0,0 +1,131 @@ +{ + "transactions": [ + { + "hash": "0x4c0f8e61736a2cc6ea949802e29ef1998b2f69f2002170381255b49ad7ea7c06", + "transactionType": "CREATE", + "contractName": "AviatorGame", + "contractAddress": "0xef5ee2537056bef8bd284003c671a425e6d51916", + "function": null, + "arguments": null, + "transaction": { + "from": "0x3e192d109d1dd323375ac1ed040f817918e82d63", + "gas": "0x39ad5f", + "value": "0x0", + "input": "0x60a06040523073ffffffffffffffffffffffffffffffffffffffff1660809073ffffffffffffffffffffffffffffffffffffffff16815250348015610042575f5ffd5b50600161006161005661007a60201b60201c565b6100a360201b60201c565b5f01819055506100756100ac60201b60201c565b610227565b5f7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f005f1b905090565b5f819050919050565b5f6100bb6101aa60201b60201c565b9050805f0160089054906101000a900460ff1615610105576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff8016815f015f9054906101000a900467ffffffffffffffff1667ffffffffffffffff16146101a75767ffffffffffffffff815f015f6101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055507fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d267ffffffffffffffff60405161019e919061020e565b60405180910390a15b50565b5f5f6101ba6101c360201b60201c565b90508091505090565b5f7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005f1b905090565b5f67ffffffffffffffff82169050919050565b610208816101ec565b82525050565b5f6020820190506102215f8301846101ff565b92915050565b6080516132d461024d5f395f8181611d9a01528181611def0152611fa901526132d45ff3fe6080604052600436106101ba575f3560e01c80637b38314c116100eb578063ad3cb1cc11610089578063c140fb9011610063578063c140fb9014610583578063d148fcfb146105ab578063f2fde38b146105d3578063fc300c11146105fb576101c1565b8063ad3cb1cc146104f1578063b6b55f251461051b578063c0447be714610543576101c1565b80638456cb59116100c55780638456cb591461045f5780638746cf98146104755780638d1e75c71461049d5780638da5cb5b146104c7576101c1565b80637b38314c146103cf5780637d6bf6181461040b5780637e95b52314610435576101c1565b80634b9ddafe116101585780635c975abb116101325780635c975abb1461033d5780636540742f14610367578063715018a6146103915780637896f891146103a7576101c1565b80634b9ddafe146102cd5780634f1ef286146102f757806352d1902d14610313576101c1565b80632e1a7d4d116101945780632e1a7d4d1461023f5780633f4ba83a14610267578063485cc9551461027d5780634a970be7146102a5576101c1565b806311eac855146101c55780631b9a91a4146101ef5780632020cc1414610217576101c1565b366101c157005b5f5ffd5b3480156101d0575f5ffd5b506101d9610623565b6040516101e691906127a6565b60405180910390f35b3480156101fa575f5ffd5b506102156004803603810190610210919061283e565b610647565b005b348015610222575f5ffd5b5061023d600480360381019061023891906128b7565b61072d565b005b34801561024a575f5ffd5b50610265600480360381019061026091906128e2565b610820565b005b348015610272575f5ffd5b5061027b610a72565b005b348015610288575f5ffd5b506102a3600480360381019061029e919061290d565b610a84565b005b3480156102b0575f5ffd5b506102cb60048036038101906102c691906129b4565b610cf2565b005b3480156102d8575f5ffd5b506102e1610f6d565b6040516102ee9190612a3a565b60405180910390f35b610311600480360381019061030c9190612b8f565b610f76565b005b34801561031e575f5ffd5b50610327610f95565b6040516103349190612bf8565b60405180910390f35b348015610348575f5ffd5b50610351610fc6565b60405161035e9190612c2b565b60405180910390f35b348015610372575f5ffd5b5061037b610fe8565b6040516103889190612a3a565b60405180910390f35b34801561039c575f5ffd5b506103a5610fef565b005b3480156103b2575f5ffd5b506103cd60048036038101906103c89190612c44565b611002565b005b3480156103da575f5ffd5b506103f560048036038101906103f091906128b7565b6111a3565b6040516104029190612a3a565b60405180910390f35b348015610416575f5ffd5b5061041f6111b8565b60405161042c9190612a3a565b60405180910390f35b348015610440575f5ffd5b506104496111be565b6040516104569190612a3a565b60405180910390f35b34801561046a575f5ffd5b506104736111c6565b005b348015610480575f5ffd5b5061049b600480360381019061049691906128e2565b6111d8565b005b3480156104a8575f5ffd5b506104b1611309565b6040516104be9190612ca3565b60405180910390f35b3480156104d2575f5ffd5b506104db61132e565b6040516104e89190612ca3565b60405180910390f35b3480156104fc575f5ffd5b50610505611363565b6040516105129190612d1c565b60405180910390f35b348015610526575f5ffd5b50610541600480360381019061053c91906128e2565b61139c565b005b34801561054e575f5ffd5b50610569600480360381019061056491906128e2565b611581565b60405161057a959493929190612d80565b60405180910390f35b34801561058e575f5ffd5b506105a960048036038101906105a49190612dd1565b6115f2565b005b3480156105b6575f5ffd5b506105d160048036038101906105cc91906128e2565b6117f6565b005b3480156105de575f5ffd5b506105f960048036038101906105f491906128b7565b611a16565b005b348015610606575f5ffd5b50610621600480360381019061061c9190612e89565b611a9a565b005b5f5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61064f611bf5565b80471015610689576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f8273ffffffffffffffffffffffffffffffffffffffff16826040516106ae90612f3f565b5f6040518083038185875af1925050503d805f81146106e8576040519150601f19603f3d011682016040523d82523d5f602084013e6106ed565b606091505b5050905080610728576040517fb12d13eb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050565b610735611bf5565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361079a576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167fc594cfe0873fd5e2546fbb89e6c25d43cfef8ba65bee8f7b586b3970e82d02bb60405160405180910390a250565b610828611c7c565b5f8103610861576040517f9de3d44100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060025f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205410156108d8576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060025f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546109249190612f80565b925050819055508060035f82825461093c9190612f80565b925050819055505f5f5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33846040518363ffffffff1660e01b815260040161099f929190612fb3565b6020604051808303815f875af11580156109bb573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109df9190613004565b905080610a18576040517f90b8ec1800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff167f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b6583604051610a5e9190612a3a565b60405180910390a250610a6f611c9e565b50565b610a7a611bf5565b610a82611cb8565b565b5f610a8d611d26565b90505f815f0160089054906101000a900460ff161590505f825f015f9054906101000a900467ffffffffffffffff1690505f5f8267ffffffffffffffff16148015610ad55750825b90505f60018367ffffffffffffffff16148015610b0857505f3073ffffffffffffffffffffffffffffffffffffffff163b145b905081158015610b16575080155b15610b4d576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001855f015f6101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055508315610b9a576001855f0160086101000a81548160ff0219169083151502179055505b610ba386611d39565b610bab611d4d565b5f73ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1603610c10576040517f1eb00b0600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b865f5f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508560015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508315610ce9575f855f0160086101000a81548160ff0219169083151502179055507fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d26001604051610ce0919061307b565b60405180910390a15b50505050505050565b610cfa611d57565b610d02611c7c565b5f8503610d3b576040517f9de3d44100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d505accf333088888888886040518863ffffffff1660e01b8152600401610da097969594939291906130a3565b5f604051808303815f87803b158015610db7575f5ffd5b505af1158015610dc9573d5f5f3e3d5ffd5b505050505f5f5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330896040518463ffffffff1660e01b8152600401610e2b93929190613110565b6020604051808303815f875af1158015610e47573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e6b9190613004565b905080610ea4576040517f90b8ec1800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8560025f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f828254610ef09190613145565b925050819055508560035f828254610f089190613145565b925050819055503373ffffffffffffffffffffffffffffffffffffffff167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c87604051610f559190612a3a565b60405180910390a250610f66611c9e565b5050505050565b64012a05f20081565b610f7e611d98565b610f8782611e7e565b610f918282611e89565b5050565b5f610f9e611fa7565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5f1b905090565b5f5f610fd061202e565b9050805f015f9054906101000a900460ff1691505090565b620186a081565b610ff7611bf5565b6110005f612055565b565b61100a611c7c565b611012611d57565b61101a612126565b620186a081108061102e5750633b9aca0081115b15611065576040517f9de3d44100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060025f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205410156110dc576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060025f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546111289190612f80565b925050819055508060035f8282546111409190612f80565b925050819055508173ffffffffffffffffffffffffffffffffffffffff16837f87b9df6fa7123c2e6044c3a3a37b4b0662c188d7a58ef86ee55067c46e4613ad8360405161118e9190612a3a565b60405180910390a361119e611c9e565b505050565b6002602052805f5260405f205f915090505481565b60035481565b633b9aca0081565b6111ce611bf5565b6111d66121ae565b565b6111e0611bf5565b5f5f5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330856040518463ffffffff1660e01b815260040161123e93929190613110565b6020604051808303815f875af115801561125a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061127e9190613004565b9050806112b7576040517f90b8ec1800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff167f68b5652e3b29601ecd57e94e383b10ba5e2f2726963da06839bb31da7e5dd0d9836040516112fd9190612a3a565b60405180910390a25050565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f5f61133861221d565b9050805f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1691505090565b6040518060400160405280600581526020017f352e302e3000000000000000000000000000000000000000000000000000000081525081565b6113a4611d57565b6113ac611c7c565b5f81036113e5576040517f9de3d44100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330856040518463ffffffff1660e01b815260040161144393929190613110565b6020604051808303815f875af115801561145f573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906114839190613004565b9050806114bc576040517f90b8ec1800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8160025f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546115089190613145565b925050819055508160035f8282546115209190613145565b925050819055503373ffffffffffffffffffffffffffffffffffffffff167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c8360405161156d9190612a3a565b60405180910390a25061157e611c9e565b50565b6004602052805f5260405f205f91509050805f015490806001015490806002015f9054906101000a90046bffffffffffffffffffffffff169080600201600c9054906101000a90046bffffffffffffffffffffffff16908060020160189054906101000a900463ffffffff16905085565b6115fa611c7c565b611602611d57565b61160a612126565b64012a05f200821115611649576040517f9c220f0300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f6003545f5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016116a69190612ca3565b602060405180830381865afa1580156116c1573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116e5919061318c565b6116ef9190612f80565b90508281101561172b576040517f9c220f0300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8260025f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546117779190613145565b925050819055508260035f82825461178f9190613145565b925050819055508373ffffffffffffffffffffffffffffffffffffffff16857f52f249faa2f53f574e5317b715d98d43b58e9c8800cbc86741e359b932a7409f85856040516117df9291906131b7565b60405180910390a3506117f0611c9e565b50505050565b6117fe611bf5565b5f6003545f5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161185b9190612ca3565b602060405180830381865afa158015611876573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061189a919061318c565b6118a49190612f80565b9050808211156118e0576040517f9c220f0300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb61192561132e565b856040518363ffffffff1660e01b8152600401611943929190612fb3565b6020604051808303815f875af115801561195f573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906119839190613004565b9050806119bc576040517f90b8ec1800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6119c461132e565b73ffffffffffffffffffffffffffffffffffffffff167fd7d7cc9b93e284aa94ef15ab7a70191483528f4e45d0bd07818aef974077ba7884604051611a099190612a3a565b60405180910390a2505050565b611a1e611bf5565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611a8e575f6040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401611a859190612ca3565b60405180910390fd5b611a9781612055565b50565b611aa2612126565b611aaa611d57565b6040518060a00160405280868152602001858152602001846bffffffffffffffffffffffff168152602001836bffffffffffffffffffffffff1681526020018263ffffffff1681525060045f8881526020019081526020015f205f820151815f0155602082015181600101556040820151816002015f6101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550606082015181600201600c6101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555060808201518160020160186101000a81548163ffffffff021916908363ffffffff160217905550905050857f783fd685b10c6d1d28d9ff910d441c5f46dbff2239a5ab73e30591bfdb1b40d18686868686604051611be595949392919061320e565b60405180910390a2505050505050565b611bfd612244565b73ffffffffffffffffffffffffffffffffffffffff16611c1b61132e565b73ffffffffffffffffffffffffffffffffffffffff1614611c7a57611c3e612244565b6040517f118cdaa7000000000000000000000000000000000000000000000000000000008152600401611c719190612ca3565b60405180910390fd5b565b611c8461224b565b6002611c96611c9161228c565b6122b5565b5f0181905550565b6001611cb0611cab61228c565b6122b5565b5f0181905550565b611cc06122be565b5f611cc961202e565b90505f815f015f6101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa611d0e612244565b604051611d1b9190612ca3565b60405180910390a150565b5f5f611d306122fe565b90508091505090565b611d41612327565b611d4a81612367565b50565b611d55612327565b565b611d5f610fc6565b15611d96576040517fd93c066500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff161480611e4557507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16611e2c6123eb565b73ffffffffffffffffffffffffffffffffffffffff1614155b15611e7c576040517fe07c8dba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b611e86611bf5565b50565b8173ffffffffffffffffffffffffffffffffffffffff166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611ef157506040513d601f19601f82011682018060405250810190611eee9190613273565b60015b611f3257816040517f4c9c8ce3000000000000000000000000000000000000000000000000000000008152600401611f299190612ca3565b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5f1b8114611f9857806040517faa1d49a4000000000000000000000000000000000000000000000000000000008152600401611f8f9190612bf8565b60405180910390fd5b611fa2838361243e565b505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff161461202c576040517fe07c8dba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b5f7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300905090565b5f61205e61221d565b90505f815f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905082825f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3505050565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146121ac576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b6121b6611d57565b5f6121bf61202e565b90506001815f015f6101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612205612244565b6040516122129190612ca3565b60405180910390a150565b5f7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300905090565b5f33905090565b6122536124b0565b1561228a576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b5f7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f005f1b905090565b5f819050919050565b6122c6610fc6565b6122fc576040517f8dfc202b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b5f7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005f1b905090565b61232f6124cc565b612365576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b61236f612327565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036123df575f6040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081526004016123d69190612ca3565b60405180910390fd5b6123e881612055565b50565b5f6124177f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5f1b6124ea565b5f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b612447826124f3565b8173ffffffffffffffffffffffffffffffffffffffff167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b60405160405180910390a25f815111156124a35761249d82826125bc565b506124ac565b6124ab6126ad565b5b5050565b5f60026124c36124be61228c565b6122b5565b5f015414905090565b5f6124d5611d26565b5f0160089054906101000a900460ff16905090565b5f819050919050565b5f8173ffffffffffffffffffffffffffffffffffffffff163b0361254e57806040517f4c9c8ce30000000000000000000000000000000000000000000000000000000081526004016125459190612ca3565b60405180910390fd5b8061257a7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5f1b6124ea565b5f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60605f6125c984846126e9565b90508080156125ff57505f6125dc6126fd565b11806125fe57505f8473ffffffffffffffffffffffffffffffffffffffff163b115b5b156126145761260c612704565b9150506126a7565b801561265757836040517f9996b31500000000000000000000000000000000000000000000000000000000815260040161264e9190612ca3565b60405180910390fd5b5f6126606126fd565b11156126735761266e612721565b6126a5565b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505b92915050565b5f3411156126e7576040517fb398979f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b5f5f5f835160208501865af4905092915050565b5f3d905090565b606060405190503d81523d5f602083013e3d602001810160405290565b6040513d5f823e3d81fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f61276e6127696127648461272c565b61274b565b61272c565b9050919050565b5f61277f82612754565b9050919050565b5f61279082612775565b9050919050565b6127a081612786565b82525050565b5f6020820190506127b95f830184612797565b92915050565b5f604051905090565b5f5ffd5b5f5ffd5b5f6127da8261272c565b9050919050565b6127ea816127d0565b81146127f4575f5ffd5b50565b5f81359050612805816127e1565b92915050565b5f819050919050565b61281d8161280b565b8114612827575f5ffd5b50565b5f8135905061283881612814565b92915050565b5f5f60408385031215612854576128536127c8565b5b5f612861858286016127f7565b92505060206128728582860161282a565b9150509250929050565b5f6128868261272c565b9050919050565b6128968161287c565b81146128a0575f5ffd5b50565b5f813590506128b18161288d565b92915050565b5f602082840312156128cc576128cb6127c8565b5b5f6128d9848285016128a3565b91505092915050565b5f602082840312156128f7576128f66127c8565b5b5f6129048482850161282a565b91505092915050565b5f5f60408385031215612923576129226127c8565b5b5f612930858286016128a3565b9250506020612941858286016128a3565b9150509250929050565b5f60ff82169050919050565b6129608161294b565b811461296a575f5ffd5b50565b5f8135905061297b81612957565b92915050565b5f819050919050565b61299381612981565b811461299d575f5ffd5b50565b5f813590506129ae8161298a565b92915050565b5f5f5f5f5f60a086880312156129cd576129cc6127c8565b5b5f6129da8882890161282a565b95505060206129eb8882890161282a565b94505060406129fc8882890161296d565b9350506060612a0d888289016129a0565b9250506080612a1e888289016129a0565b9150509295509295909350565b612a348161280b565b82525050565b5f602082019050612a4d5f830184612a2b565b92915050565b5f5ffd5b5f5ffd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b612aa182612a5b565b810181811067ffffffffffffffff82111715612ac057612abf612a6b565b5b80604052505050565b5f612ad26127bf565b9050612ade8282612a98565b919050565b5f67ffffffffffffffff821115612afd57612afc612a6b565b5b612b0682612a5b565b9050602081019050919050565b828183375f83830152505050565b5f612b33612b2e84612ae3565b612ac9565b905082815260208101848484011115612b4f57612b4e612a57565b5b612b5a848285612b13565b509392505050565b5f82601f830112612b7657612b75612a53565b5b8135612b86848260208601612b21565b91505092915050565b5f5f60408385031215612ba557612ba46127c8565b5b5f612bb2858286016128a3565b925050602083013567ffffffffffffffff811115612bd357612bd26127cc565b5b612bdf85828601612b62565b9150509250929050565b612bf281612981565b82525050565b5f602082019050612c0b5f830184612be9565b92915050565b5f8115159050919050565b612c2581612c11565b82525050565b5f602082019050612c3e5f830184612c1c565b92915050565b5f5f5f60608486031215612c5b57612c5a6127c8565b5b5f612c688682870161282a565b9350506020612c79868287016128a3565b9250506040612c8a8682870161282a565b9150509250925092565b612c9d8161287c565b82525050565b5f602082019050612cb65f830184612c94565b92915050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f612cee82612cbc565b612cf88185612cc6565b9350612d08818560208601612cd6565b612d1181612a5b565b840191505092915050565b5f6020820190508181035f830152612d348184612ce4565b905092915050565b5f6bffffffffffffffffffffffff82169050919050565b612d5c81612d3c565b82525050565b5f63ffffffff82169050919050565b612d7a81612d62565b82525050565b5f60a082019050612d935f830188612be9565b612da06020830187612be9565b612dad6040830186612d53565b612dba6060830185612d53565b612dc76080830184612d71565b9695505050505050565b5f5f5f5f60808587031215612de957612de86127c8565b5b5f612df68782880161282a565b9450506020612e07878288016128a3565b9350506040612e188782880161282a565b9250506060612e298782880161282a565b91505092959194509250565b612e3e81612d3c565b8114612e48575f5ffd5b50565b5f81359050612e5981612e35565b92915050565b612e6881612d62565b8114612e72575f5ffd5b50565b5f81359050612e8381612e5f565b92915050565b5f5f5f5f5f5f60c08789031215612ea357612ea26127c8565b5b5f612eb089828a0161282a565b9650506020612ec189828a016129a0565b9550506040612ed289828a016129a0565b9450506060612ee389828a01612e4b565b9350506080612ef489828a01612e4b565b92505060a0612f0589828a01612e75565b9150509295509295509295565b5f81905092915050565b50565b5f612f2a5f83612f12565b9150612f3582612f1c565b5f82019050919050565b5f612f4982612f1f565b9150819050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f612f8a8261280b565b9150612f958361280b565b9250828203905081811115612fad57612fac612f53565b5b92915050565b5f604082019050612fc65f830185612c94565b612fd36020830184612a2b565b9392505050565b612fe381612c11565b8114612fed575f5ffd5b50565b5f81519050612ffe81612fda565b92915050565b5f60208284031215613019576130186127c8565b5b5f61302684828501612ff0565b91505092915050565b5f819050919050565b5f67ffffffffffffffff82169050919050565b5f61306561306061305b8461302f565b61274b565b613038565b9050919050565b6130758161304b565b82525050565b5f60208201905061308e5f83018461306c565b92915050565b61309d8161294b565b82525050565b5f60e0820190506130b65f83018a612c94565b6130c36020830189612c94565b6130d06040830188612a2b565b6130dd6060830187612a2b565b6130ea6080830186613094565b6130f760a0830185612be9565b61310460c0830184612be9565b98975050505050505050565b5f6060820190506131235f830186612c94565b6131306020830185612c94565b61313d6040830184612a2b565b949350505050565b5f61314f8261280b565b915061315a8361280b565b925082820190508082111561317257613171612f53565b5b92915050565b5f8151905061318681612814565b92915050565b5f602082840312156131a1576131a06127c8565b5b5f6131ae84828501613178565b91505092915050565b5f6040820190506131ca5f830185612a2b565b6131d76020830184612a2b565b9392505050565b5f6131f86131f36131ee84612d3c565b61274b565b61280b565b9050919050565b613208816131de565b82525050565b5f60a0820190506132215f830188612be9565b61322e6020830187612be9565b61323b60408301866131ff565b61324860608301856131ff565b6132556080830184612d71565b9695505050505050565b5f8151905061326d8161298a565b92915050565b5f60208284031215613288576132876127c8565b5b5f6132958482850161325f565b9150509291505056fea2646970667358221220736396b86193bee160d62317b74efece5a190f719c320e21f529545a76dc1fba64736f6c634300081c0033", + "nonce": "0x150a", + "chainId": "0xa4ec" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x5f3c1856aacd5a5ad09d02a7d35bf074834edf91ce401462f1076f862df4e83c", + "transactionType": "CALL", + "contractName": null, + "contractAddress": "0xf457fe10f74cbd8f02aa62953bb7f7d0d0bdd12a", + "function": "upgradeToAndCall(address,bytes)", + "arguments": [ + "0xEF5Ee2537056BEF8bd284003c671A425e6D51916", + "0x" + ], + "transaction": { + "from": "0x3e192d109d1dd323375ac1ed040f817918e82d63", + "to": "0xf457fe10f74cbd8f02aa62953bb7f7d0d0bdd12a", + "gas": "0xdc7a", + "value": "0x0", + "input": "0x4f1ef286000000000000000000000000ef5ee2537056bef8bd284003c671a425e6d5191600000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000", + "nonce": "0x150b", + "chainId": "0xa4ec" + }, + "additionalContracts": [], + "isFixedGasLimit": false + } + ], + "receipts": [ + { + "status": "0x1", + "cumulativeGasUsed": "0x341782", + "logs": [ + { + "address": "0xef5ee2537056bef8bd284003c671a425e6d51916", + "topics": [ + "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" + ], + "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", + "blockHash": "0xd167fd1d0b50e1f3202e15f644e8f6c11ffd8b89a9c98ee302358577b1a933b0", + "blockNumber": "0x4188256", + "blockTimestamp": "0x6a220aac", + "transactionHash": "0x4c0f8e61736a2cc6ea949802e29ef1998b2f69f2002170381255b49ad7ea7c06", + "transactionIndex": "0x4", + "logIndex": "0x10", + "removed": false + } + ], + "logsBloom": "0x00000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "transactionHash": "0x4c0f8e61736a2cc6ea949802e29ef1998b2f69f2002170381255b49ad7ea7c06", + "transactionIndex": "0x4", + "blockHash": "0xd167fd1d0b50e1f3202e15f644e8f6c11ffd8b89a9c98ee302358577b1a933b0", + "blockNumber": "0x4188256", + "gasUsed": "0x2c5dfb", + "effectiveGasPrice": "0x2e90fe98d7", + "blobGasUsed": "0x1685", + "from": "0x3e192d109d1dd323375ac1ed040f817918e82d63", + "to": null, + "contractAddress": "0xef5ee2537056bef8bd284003c671a425e6d51916", + "daFootprintGasScalar": "0x1", + "l1BaseFeeScalar": "0x0", + "l1BlobBaseFee": "0x8ad88a", + "l1BlobBaseFeeScalar": "0x0", + "l1Fee": "0x0", + "l1GasPrice": "0x9b50332", + "l1GasUsed": "0x16853" + }, + { + "status": "0x1", + "cumulativeGasUsed": "0x34ae43", + "logs": [ + { + "address": "0xf457fe10f74cbd8f02aa62953bb7f7d0d0bdd12a", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000ef5ee2537056bef8bd284003c671a425e6d51916" + ], + "data": "0x", + "blockHash": "0xd167fd1d0b50e1f3202e15f644e8f6c11ffd8b89a9c98ee302358577b1a933b0", + "blockNumber": "0x4188256", + "blockTimestamp": "0x6a220aac", + "transactionHash": "0x5f3c1856aacd5a5ad09d02a7d35bf074834edf91ce401462f1076f862df4e83c", + "transactionIndex": "0x5", + "logIndex": "0x11", + "removed": false + } + ], + "logsBloom": "0x00000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000", + "type": "0x2", + "transactionHash": "0x5f3c1856aacd5a5ad09d02a7d35bf074834edf91ce401462f1076f862df4e83c", + "transactionIndex": "0x5", + "blockHash": "0xd167fd1d0b50e1f3202e15f644e8f6c11ffd8b89a9c98ee302358577b1a933b0", + "blockNumber": "0x4188256", + "gasUsed": "0x96c1", + "effectiveGasPrice": "0x2e90fe98d7", + "blobGasUsed": "0x64", + "from": "0x3e192d109d1dd323375ac1ed040f817918e82d63", + "to": "0xf457fe10f74cbd8f02aa62953bb7f7d0d0bdd12a", + "contractAddress": null, + "daFootprintGasScalar": "0x1", + "l1BaseFeeScalar": "0x0", + "l1BlobBaseFee": "0x8ad88a", + "l1BlobBaseFeeScalar": "0x0", + "l1Fee": "0x0", + "l1GasPrice": "0x9b50332", + "l1GasUsed": "0x640" + } + ], + "libraries": [], + "pending": [], + "returns": {}, + "timestamp": 1780615853582, + "chain": 42220, + "commit": "7a97cfa" +} \ No newline at end of file diff --git a/contracts/broadcast/UpgradeAviatorGame.s.sol/42220/run-latest.json b/contracts/broadcast/UpgradeAviatorGame.s.sol/42220/run-latest.json new file mode 100644 index 0000000..974e8b2 --- /dev/null +++ b/contracts/broadcast/UpgradeAviatorGame.s.sol/42220/run-latest.json @@ -0,0 +1,131 @@ +{ + "transactions": [ + { + "hash": "0x4c0f8e61736a2cc6ea949802e29ef1998b2f69f2002170381255b49ad7ea7c06", + "transactionType": "CREATE", + "contractName": "AviatorGame", + "contractAddress": "0xef5ee2537056bef8bd284003c671a425e6d51916", + "function": null, + "arguments": null, + "transaction": { + "from": "0x3e192d109d1dd323375ac1ed040f817918e82d63", + "gas": "0x39ad5f", + "value": "0x0", + "input": "0x60a06040523073ffffffffffffffffffffffffffffffffffffffff1660809073ffffffffffffffffffffffffffffffffffffffff16815250348015610042575f5ffd5b50600161006161005661007a60201b60201c565b6100a360201b60201c565b5f01819055506100756100ac60201b60201c565b610227565b5f7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f005f1b905090565b5f819050919050565b5f6100bb6101aa60201b60201c565b9050805f0160089054906101000a900460ff1615610105576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff8016815f015f9054906101000a900467ffffffffffffffff1667ffffffffffffffff16146101a75767ffffffffffffffff815f015f6101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055507fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d267ffffffffffffffff60405161019e919061020e565b60405180910390a15b50565b5f5f6101ba6101c360201b60201c565b90508091505090565b5f7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005f1b905090565b5f67ffffffffffffffff82169050919050565b610208816101ec565b82525050565b5f6020820190506102215f8301846101ff565b92915050565b6080516132d461024d5f395f8181611d9a01528181611def0152611fa901526132d45ff3fe6080604052600436106101ba575f3560e01c80637b38314c116100eb578063ad3cb1cc11610089578063c140fb9011610063578063c140fb9014610583578063d148fcfb146105ab578063f2fde38b146105d3578063fc300c11146105fb576101c1565b8063ad3cb1cc146104f1578063b6b55f251461051b578063c0447be714610543576101c1565b80638456cb59116100c55780638456cb591461045f5780638746cf98146104755780638d1e75c71461049d5780638da5cb5b146104c7576101c1565b80637b38314c146103cf5780637d6bf6181461040b5780637e95b52314610435576101c1565b80634b9ddafe116101585780635c975abb116101325780635c975abb1461033d5780636540742f14610367578063715018a6146103915780637896f891146103a7576101c1565b80634b9ddafe146102cd5780634f1ef286146102f757806352d1902d14610313576101c1565b80632e1a7d4d116101945780632e1a7d4d1461023f5780633f4ba83a14610267578063485cc9551461027d5780634a970be7146102a5576101c1565b806311eac855146101c55780631b9a91a4146101ef5780632020cc1414610217576101c1565b366101c157005b5f5ffd5b3480156101d0575f5ffd5b506101d9610623565b6040516101e691906127a6565b60405180910390f35b3480156101fa575f5ffd5b506102156004803603810190610210919061283e565b610647565b005b348015610222575f5ffd5b5061023d600480360381019061023891906128b7565b61072d565b005b34801561024a575f5ffd5b50610265600480360381019061026091906128e2565b610820565b005b348015610272575f5ffd5b5061027b610a72565b005b348015610288575f5ffd5b506102a3600480360381019061029e919061290d565b610a84565b005b3480156102b0575f5ffd5b506102cb60048036038101906102c691906129b4565b610cf2565b005b3480156102d8575f5ffd5b506102e1610f6d565b6040516102ee9190612a3a565b60405180910390f35b610311600480360381019061030c9190612b8f565b610f76565b005b34801561031e575f5ffd5b50610327610f95565b6040516103349190612bf8565b60405180910390f35b348015610348575f5ffd5b50610351610fc6565b60405161035e9190612c2b565b60405180910390f35b348015610372575f5ffd5b5061037b610fe8565b6040516103889190612a3a565b60405180910390f35b34801561039c575f5ffd5b506103a5610fef565b005b3480156103b2575f5ffd5b506103cd60048036038101906103c89190612c44565b611002565b005b3480156103da575f5ffd5b506103f560048036038101906103f091906128b7565b6111a3565b6040516104029190612a3a565b60405180910390f35b348015610416575f5ffd5b5061041f6111b8565b60405161042c9190612a3a565b60405180910390f35b348015610440575f5ffd5b506104496111be565b6040516104569190612a3a565b60405180910390f35b34801561046a575f5ffd5b506104736111c6565b005b348015610480575f5ffd5b5061049b600480360381019061049691906128e2565b6111d8565b005b3480156104a8575f5ffd5b506104b1611309565b6040516104be9190612ca3565b60405180910390f35b3480156104d2575f5ffd5b506104db61132e565b6040516104e89190612ca3565b60405180910390f35b3480156104fc575f5ffd5b50610505611363565b6040516105129190612d1c565b60405180910390f35b348015610526575f5ffd5b50610541600480360381019061053c91906128e2565b61139c565b005b34801561054e575f5ffd5b50610569600480360381019061056491906128e2565b611581565b60405161057a959493929190612d80565b60405180910390f35b34801561058e575f5ffd5b506105a960048036038101906105a49190612dd1565b6115f2565b005b3480156105b6575f5ffd5b506105d160048036038101906105cc91906128e2565b6117f6565b005b3480156105de575f5ffd5b506105f960048036038101906105f491906128b7565b611a16565b005b348015610606575f5ffd5b50610621600480360381019061061c9190612e89565b611a9a565b005b5f5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61064f611bf5565b80471015610689576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f8273ffffffffffffffffffffffffffffffffffffffff16826040516106ae90612f3f565b5f6040518083038185875af1925050503d805f81146106e8576040519150601f19603f3d011682016040523d82523d5f602084013e6106ed565b606091505b5050905080610728576040517fb12d13eb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050565b610735611bf5565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361079a576040517fe6c4247b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167fc594cfe0873fd5e2546fbb89e6c25d43cfef8ba65bee8f7b586b3970e82d02bb60405160405180910390a250565b610828611c7c565b5f8103610861576040517f9de3d44100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060025f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205410156108d8576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060025f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546109249190612f80565b925050819055508060035f82825461093c9190612f80565b925050819055505f5f5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33846040518363ffffffff1660e01b815260040161099f929190612fb3565b6020604051808303815f875af11580156109bb573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109df9190613004565b905080610a18576040517f90b8ec1800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff167f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b6583604051610a5e9190612a3a565b60405180910390a250610a6f611c9e565b50565b610a7a611bf5565b610a82611cb8565b565b5f610a8d611d26565b90505f815f0160089054906101000a900460ff161590505f825f015f9054906101000a900467ffffffffffffffff1690505f5f8267ffffffffffffffff16148015610ad55750825b90505f60018367ffffffffffffffff16148015610b0857505f3073ffffffffffffffffffffffffffffffffffffffff163b145b905081158015610b16575080155b15610b4d576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001855f015f6101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055508315610b9a576001855f0160086101000a81548160ff0219169083151502179055505b610ba386611d39565b610bab611d4d565b5f73ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1603610c10576040517f1eb00b0600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b865f5f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508560015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508315610ce9575f855f0160086101000a81548160ff0219169083151502179055507fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d26001604051610ce0919061307b565b60405180910390a15b50505050505050565b610cfa611d57565b610d02611c7c565b5f8503610d3b576040517f9de3d44100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d505accf333088888888886040518863ffffffff1660e01b8152600401610da097969594939291906130a3565b5f604051808303815f87803b158015610db7575f5ffd5b505af1158015610dc9573d5f5f3e3d5ffd5b505050505f5f5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330896040518463ffffffff1660e01b8152600401610e2b93929190613110565b6020604051808303815f875af1158015610e47573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e6b9190613004565b905080610ea4576040517f90b8ec1800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8560025f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f828254610ef09190613145565b925050819055508560035f828254610f089190613145565b925050819055503373ffffffffffffffffffffffffffffffffffffffff167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c87604051610f559190612a3a565b60405180910390a250610f66611c9e565b5050505050565b64012a05f20081565b610f7e611d98565b610f8782611e7e565b610f918282611e89565b5050565b5f610f9e611fa7565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5f1b905090565b5f5f610fd061202e565b9050805f015f9054906101000a900460ff1691505090565b620186a081565b610ff7611bf5565b6110005f612055565b565b61100a611c7c565b611012611d57565b61101a612126565b620186a081108061102e5750633b9aca0081115b15611065576040517f9de3d44100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060025f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205410156110dc576040517ff4d678b800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060025f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546111289190612f80565b925050819055508060035f8282546111409190612f80565b925050819055508173ffffffffffffffffffffffffffffffffffffffff16837f87b9df6fa7123c2e6044c3a3a37b4b0662c188d7a58ef86ee55067c46e4613ad8360405161118e9190612a3a565b60405180910390a361119e611c9e565b505050565b6002602052805f5260405f205f915090505481565b60035481565b633b9aca0081565b6111ce611bf5565b6111d66121ae565b565b6111e0611bf5565b5f5f5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330856040518463ffffffff1660e01b815260040161123e93929190613110565b6020604051808303815f875af115801561125a573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061127e9190613004565b9050806112b7576040517f90b8ec1800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff167f68b5652e3b29601ecd57e94e383b10ba5e2f2726963da06839bb31da7e5dd0d9836040516112fd9190612a3a565b60405180910390a25050565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b5f5f61133861221d565b9050805f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1691505090565b6040518060400160405280600581526020017f352e302e3000000000000000000000000000000000000000000000000000000081525081565b6113a4611d57565b6113ac611c7c565b5f81036113e5576040517f9de3d44100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330856040518463ffffffff1660e01b815260040161144393929190613110565b6020604051808303815f875af115801561145f573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906114839190613004565b9050806114bc576040517f90b8ec1800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8160025f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546115089190613145565b925050819055508160035f8282546115209190613145565b925050819055503373ffffffffffffffffffffffffffffffffffffffff167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c8360405161156d9190612a3a565b60405180910390a25061157e611c9e565b50565b6004602052805f5260405f205f91509050805f015490806001015490806002015f9054906101000a90046bffffffffffffffffffffffff169080600201600c9054906101000a90046bffffffffffffffffffffffff16908060020160189054906101000a900463ffffffff16905085565b6115fa611c7c565b611602611d57565b61160a612126565b64012a05f200821115611649576040517f9c220f0300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f6003545f5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016116a69190612ca3565b602060405180830381865afa1580156116c1573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116e5919061318c565b6116ef9190612f80565b90508281101561172b576040517f9c220f0300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8260025f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546117779190613145565b925050819055508260035f82825461178f9190613145565b925050819055508373ffffffffffffffffffffffffffffffffffffffff16857f52f249faa2f53f574e5317b715d98d43b58e9c8800cbc86741e359b932a7409f85856040516117df9291906131b7565b60405180910390a3506117f0611c9e565b50505050565b6117fe611bf5565b5f6003545f5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161185b9190612ca3565b602060405180830381865afa158015611876573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061189a919061318c565b6118a49190612f80565b9050808211156118e0576040517f9c220f0300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f5f5f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb61192561132e565b856040518363ffffffff1660e01b8152600401611943929190612fb3565b6020604051808303815f875af115801561195f573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906119839190613004565b9050806119bc576040517f90b8ec1800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6119c461132e565b73ffffffffffffffffffffffffffffffffffffffff167fd7d7cc9b93e284aa94ef15ab7a70191483528f4e45d0bd07818aef974077ba7884604051611a099190612a3a565b60405180910390a2505050565b611a1e611bf5565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611a8e575f6040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401611a859190612ca3565b60405180910390fd5b611a9781612055565b50565b611aa2612126565b611aaa611d57565b6040518060a00160405280868152602001858152602001846bffffffffffffffffffffffff168152602001836bffffffffffffffffffffffff1681526020018263ffffffff1681525060045f8881526020019081526020015f205f820151815f0155602082015181600101556040820151816002015f6101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550606082015181600201600c6101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555060808201518160020160186101000a81548163ffffffff021916908363ffffffff160217905550905050857f783fd685b10c6d1d28d9ff910d441c5f46dbff2239a5ab73e30591bfdb1b40d18686868686604051611be595949392919061320e565b60405180910390a2505050505050565b611bfd612244565b73ffffffffffffffffffffffffffffffffffffffff16611c1b61132e565b73ffffffffffffffffffffffffffffffffffffffff1614611c7a57611c3e612244565b6040517f118cdaa7000000000000000000000000000000000000000000000000000000008152600401611c719190612ca3565b60405180910390fd5b565b611c8461224b565b6002611c96611c9161228c565b6122b5565b5f0181905550565b6001611cb0611cab61228c565b6122b5565b5f0181905550565b611cc06122be565b5f611cc961202e565b90505f815f015f6101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa611d0e612244565b604051611d1b9190612ca3565b60405180910390a150565b5f5f611d306122fe565b90508091505090565b611d41612327565b611d4a81612367565b50565b611d55612327565b565b611d5f610fc6565b15611d96576040517fd93c066500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff161480611e4557507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16611e2c6123eb565b73ffffffffffffffffffffffffffffffffffffffff1614155b15611e7c576040517fe07c8dba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b611e86611bf5565b50565b8173ffffffffffffffffffffffffffffffffffffffff166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611ef157506040513d601f19601f82011682018060405250810190611eee9190613273565b60015b611f3257816040517f4c9c8ce3000000000000000000000000000000000000000000000000000000008152600401611f299190612ca3565b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5f1b8114611f9857806040517faa1d49a4000000000000000000000000000000000000000000000000000000008152600401611f8f9190612bf8565b60405180910390fd5b611fa2838361243e565b505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff161461202c576040517fe07c8dba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b5f7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300905090565b5f61205e61221d565b90505f815f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905082825f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3505050565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146121ac576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b6121b6611d57565b5f6121bf61202e565b90506001815f015f6101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612205612244565b6040516122129190612ca3565b60405180910390a150565b5f7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300905090565b5f33905090565b6122536124b0565b1561228a576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b5f7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f005f1b905090565b5f819050919050565b6122c6610fc6565b6122fc576040517f8dfc202b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b5f7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005f1b905090565b61232f6124cc565b612365576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b61236f612327565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036123df575f6040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081526004016123d69190612ca3565b60405180910390fd5b6123e881612055565b50565b5f6124177f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5f1b6124ea565b5f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b612447826124f3565b8173ffffffffffffffffffffffffffffffffffffffff167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b60405160405180910390a25f815111156124a35761249d82826125bc565b506124ac565b6124ab6126ad565b5b5050565b5f60026124c36124be61228c565b6122b5565b5f015414905090565b5f6124d5611d26565b5f0160089054906101000a900460ff16905090565b5f819050919050565b5f8173ffffffffffffffffffffffffffffffffffffffff163b0361254e57806040517f4c9c8ce30000000000000000000000000000000000000000000000000000000081526004016125459190612ca3565b60405180910390fd5b8061257a7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5f1b6124ea565b5f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60605f6125c984846126e9565b90508080156125ff57505f6125dc6126fd565b11806125fe57505f8473ffffffffffffffffffffffffffffffffffffffff163b115b5b156126145761260c612704565b9150506126a7565b801561265757836040517f9996b31500000000000000000000000000000000000000000000000000000000815260040161264e9190612ca3565b60405180910390fd5b5f6126606126fd565b11156126735761266e612721565b6126a5565b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505b92915050565b5f3411156126e7576040517fb398979f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b5f5f5f835160208501865af4905092915050565b5f3d905090565b606060405190503d81523d5f602083013e3d602001810160405290565b6040513d5f823e3d81fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f819050919050565b5f61276e6127696127648461272c565b61274b565b61272c565b9050919050565b5f61277f82612754565b9050919050565b5f61279082612775565b9050919050565b6127a081612786565b82525050565b5f6020820190506127b95f830184612797565b92915050565b5f604051905090565b5f5ffd5b5f5ffd5b5f6127da8261272c565b9050919050565b6127ea816127d0565b81146127f4575f5ffd5b50565b5f81359050612805816127e1565b92915050565b5f819050919050565b61281d8161280b565b8114612827575f5ffd5b50565b5f8135905061283881612814565b92915050565b5f5f60408385031215612854576128536127c8565b5b5f612861858286016127f7565b92505060206128728582860161282a565b9150509250929050565b5f6128868261272c565b9050919050565b6128968161287c565b81146128a0575f5ffd5b50565b5f813590506128b18161288d565b92915050565b5f602082840312156128cc576128cb6127c8565b5b5f6128d9848285016128a3565b91505092915050565b5f602082840312156128f7576128f66127c8565b5b5f6129048482850161282a565b91505092915050565b5f5f60408385031215612923576129226127c8565b5b5f612930858286016128a3565b9250506020612941858286016128a3565b9150509250929050565b5f60ff82169050919050565b6129608161294b565b811461296a575f5ffd5b50565b5f8135905061297b81612957565b92915050565b5f819050919050565b61299381612981565b811461299d575f5ffd5b50565b5f813590506129ae8161298a565b92915050565b5f5f5f5f5f60a086880312156129cd576129cc6127c8565b5b5f6129da8882890161282a565b95505060206129eb8882890161282a565b94505060406129fc8882890161296d565b9350506060612a0d888289016129a0565b9250506080612a1e888289016129a0565b9150509295509295909350565b612a348161280b565b82525050565b5f602082019050612a4d5f830184612a2b565b92915050565b5f5ffd5b5f5ffd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b612aa182612a5b565b810181811067ffffffffffffffff82111715612ac057612abf612a6b565b5b80604052505050565b5f612ad26127bf565b9050612ade8282612a98565b919050565b5f67ffffffffffffffff821115612afd57612afc612a6b565b5b612b0682612a5b565b9050602081019050919050565b828183375f83830152505050565b5f612b33612b2e84612ae3565b612ac9565b905082815260208101848484011115612b4f57612b4e612a57565b5b612b5a848285612b13565b509392505050565b5f82601f830112612b7657612b75612a53565b5b8135612b86848260208601612b21565b91505092915050565b5f5f60408385031215612ba557612ba46127c8565b5b5f612bb2858286016128a3565b925050602083013567ffffffffffffffff811115612bd357612bd26127cc565b5b612bdf85828601612b62565b9150509250929050565b612bf281612981565b82525050565b5f602082019050612c0b5f830184612be9565b92915050565b5f8115159050919050565b612c2581612c11565b82525050565b5f602082019050612c3e5f830184612c1c565b92915050565b5f5f5f60608486031215612c5b57612c5a6127c8565b5b5f612c688682870161282a565b9350506020612c79868287016128a3565b9250506040612c8a8682870161282a565b9150509250925092565b612c9d8161287c565b82525050565b5f602082019050612cb65f830184612c94565b92915050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f612cee82612cbc565b612cf88185612cc6565b9350612d08818560208601612cd6565b612d1181612a5b565b840191505092915050565b5f6020820190508181035f830152612d348184612ce4565b905092915050565b5f6bffffffffffffffffffffffff82169050919050565b612d5c81612d3c565b82525050565b5f63ffffffff82169050919050565b612d7a81612d62565b82525050565b5f60a082019050612d935f830188612be9565b612da06020830187612be9565b612dad6040830186612d53565b612dba6060830185612d53565b612dc76080830184612d71565b9695505050505050565b5f5f5f5f60808587031215612de957612de86127c8565b5b5f612df68782880161282a565b9450506020612e07878288016128a3565b9350506040612e188782880161282a565b9250506060612e298782880161282a565b91505092959194509250565b612e3e81612d3c565b8114612e48575f5ffd5b50565b5f81359050612e5981612e35565b92915050565b612e6881612d62565b8114612e72575f5ffd5b50565b5f81359050612e8381612e5f565b92915050565b5f5f5f5f5f5f60c08789031215612ea357612ea26127c8565b5b5f612eb089828a0161282a565b9650506020612ec189828a016129a0565b9550506040612ed289828a016129a0565b9450506060612ee389828a01612e4b565b9350506080612ef489828a01612e4b565b92505060a0612f0589828a01612e75565b9150509295509295509295565b5f81905092915050565b50565b5f612f2a5f83612f12565b9150612f3582612f1c565b5f82019050919050565b5f612f4982612f1f565b9150819050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f612f8a8261280b565b9150612f958361280b565b9250828203905081811115612fad57612fac612f53565b5b92915050565b5f604082019050612fc65f830185612c94565b612fd36020830184612a2b565b9392505050565b612fe381612c11565b8114612fed575f5ffd5b50565b5f81519050612ffe81612fda565b92915050565b5f60208284031215613019576130186127c8565b5b5f61302684828501612ff0565b91505092915050565b5f819050919050565b5f67ffffffffffffffff82169050919050565b5f61306561306061305b8461302f565b61274b565b613038565b9050919050565b6130758161304b565b82525050565b5f60208201905061308e5f83018461306c565b92915050565b61309d8161294b565b82525050565b5f60e0820190506130b65f83018a612c94565b6130c36020830189612c94565b6130d06040830188612a2b565b6130dd6060830187612a2b565b6130ea6080830186613094565b6130f760a0830185612be9565b61310460c0830184612be9565b98975050505050505050565b5f6060820190506131235f830186612c94565b6131306020830185612c94565b61313d6040830184612a2b565b949350505050565b5f61314f8261280b565b915061315a8361280b565b925082820190508082111561317257613171612f53565b5b92915050565b5f8151905061318681612814565b92915050565b5f602082840312156131a1576131a06127c8565b5b5f6131ae84828501613178565b91505092915050565b5f6040820190506131ca5f830185612a2b565b6131d76020830184612a2b565b9392505050565b5f6131f86131f36131ee84612d3c565b61274b565b61280b565b9050919050565b613208816131de565b82525050565b5f60a0820190506132215f830188612be9565b61322e6020830187612be9565b61323b60408301866131ff565b61324860608301856131ff565b6132556080830184612d71565b9695505050505050565b5f8151905061326d8161298a565b92915050565b5f60208284031215613288576132876127c8565b5b5f6132958482850161325f565b9150509291505056fea2646970667358221220736396b86193bee160d62317b74efece5a190f719c320e21f529545a76dc1fba64736f6c634300081c0033", + "nonce": "0x150a", + "chainId": "0xa4ec" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x5f3c1856aacd5a5ad09d02a7d35bf074834edf91ce401462f1076f862df4e83c", + "transactionType": "CALL", + "contractName": null, + "contractAddress": "0xf457fe10f74cbd8f02aa62953bb7f7d0d0bdd12a", + "function": "upgradeToAndCall(address,bytes)", + "arguments": [ + "0xEF5Ee2537056BEF8bd284003c671A425e6D51916", + "0x" + ], + "transaction": { + "from": "0x3e192d109d1dd323375ac1ed040f817918e82d63", + "to": "0xf457fe10f74cbd8f02aa62953bb7f7d0d0bdd12a", + "gas": "0xdc7a", + "value": "0x0", + "input": "0x4f1ef286000000000000000000000000ef5ee2537056bef8bd284003c671a425e6d5191600000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000", + "nonce": "0x150b", + "chainId": "0xa4ec" + }, + "additionalContracts": [], + "isFixedGasLimit": false + } + ], + "receipts": [ + { + "status": "0x1", + "cumulativeGasUsed": "0x341782", + "logs": [ + { + "address": "0xef5ee2537056bef8bd284003c671a425e6d51916", + "topics": [ + "0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2" + ], + "data": "0x000000000000000000000000000000000000000000000000ffffffffffffffff", + "blockHash": "0xd167fd1d0b50e1f3202e15f644e8f6c11ffd8b89a9c98ee302358577b1a933b0", + "blockNumber": "0x4188256", + "blockTimestamp": "0x6a220aac", + "transactionHash": "0x4c0f8e61736a2cc6ea949802e29ef1998b2f69f2002170381255b49ad7ea7c06", + "transactionIndex": "0x4", + "logIndex": "0x10", + "removed": false + } + ], + "logsBloom": "0x00000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000800000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "transactionHash": "0x4c0f8e61736a2cc6ea949802e29ef1998b2f69f2002170381255b49ad7ea7c06", + "transactionIndex": "0x4", + "blockHash": "0xd167fd1d0b50e1f3202e15f644e8f6c11ffd8b89a9c98ee302358577b1a933b0", + "blockNumber": "0x4188256", + "gasUsed": "0x2c5dfb", + "effectiveGasPrice": "0x2e90fe98d7", + "blobGasUsed": "0x1685", + "from": "0x3e192d109d1dd323375ac1ed040f817918e82d63", + "to": null, + "contractAddress": "0xef5ee2537056bef8bd284003c671a425e6d51916", + "daFootprintGasScalar": "0x1", + "l1BaseFeeScalar": "0x0", + "l1BlobBaseFee": "0x8ad88a", + "l1BlobBaseFeeScalar": "0x0", + "l1Fee": "0x0", + "l1GasPrice": "0x9b50332", + "l1GasUsed": "0x16853" + }, + { + "status": "0x1", + "cumulativeGasUsed": "0x34ae43", + "logs": [ + { + "address": "0xf457fe10f74cbd8f02aa62953bb7f7d0d0bdd12a", + "topics": [ + "0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", + "0x000000000000000000000000ef5ee2537056bef8bd284003c671a425e6d51916" + ], + "data": "0x", + "blockHash": "0xd167fd1d0b50e1f3202e15f644e8f6c11ffd8b89a9c98ee302358577b1a933b0", + "blockNumber": "0x4188256", + "blockTimestamp": "0x6a220aac", + "transactionHash": "0x5f3c1856aacd5a5ad09d02a7d35bf074834edf91ce401462f1076f862df4e83c", + "transactionIndex": "0x5", + "logIndex": "0x11", + "removed": false + } + ], + "logsBloom": "0x00000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000", + "type": "0x2", + "transactionHash": "0x5f3c1856aacd5a5ad09d02a7d35bf074834edf91ce401462f1076f862df4e83c", + "transactionIndex": "0x5", + "blockHash": "0xd167fd1d0b50e1f3202e15f644e8f6c11ffd8b89a9c98ee302358577b1a933b0", + "blockNumber": "0x4188256", + "gasUsed": "0x96c1", + "effectiveGasPrice": "0x2e90fe98d7", + "blobGasUsed": "0x64", + "from": "0x3e192d109d1dd323375ac1ed040f817918e82d63", + "to": "0xf457fe10f74cbd8f02aa62953bb7f7d0d0bdd12a", + "contractAddress": null, + "daFootprintGasScalar": "0x1", + "l1BaseFeeScalar": "0x0", + "l1BlobBaseFee": "0x8ad88a", + "l1BlobBaseFeeScalar": "0x0", + "l1Fee": "0x0", + "l1GasPrice": "0x9b50332", + "l1GasUsed": "0x640" + } + ], + "libraries": [], + "pending": [], + "returns": {}, + "timestamp": 1780615853582, + "chain": 42220, + "commit": "7a97cfa" +} \ No newline at end of file From 8c7b68c06713dae6b7b881b8bf2e2439aaa5c32f Mon Sep 17 00:00:00 2001 From: technimite Date: Fri, 5 Jun 2026 22:31:45 +0100 Subject: [PATCH 07/16] Update frontend aviator ABI --- frontend/abis/aviator.json | 1892 +++++++++++++++++------------------- 1 file changed, 866 insertions(+), 1026 deletions(-) diff --git a/frontend/abis/aviator.json b/frontend/abis/aviator.json index 2b1ffa0..e3b7532 100644 --- a/frontend/abis/aviator.json +++ b/frontend/abis/aviator.json @@ -1,1028 +1,868 @@ [ - { - "inputs": [ - { - "internalType": "address", - "name": "_usdcToken", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AlreadyCashedOut", - "type": "error" - }, - { - "inputs": [], - "name": "BetAlreadyPlaced", - "type": "error" - }, - { - "inputs": [], - "name": "EnforcedPause", - "type": "error" - }, - { - "inputs": [], - "name": "ExpectedPause", - "type": "error" - }, - { - "inputs": [], - "name": "InsufficientHouseBalance", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidBetAmount", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidCrashMultiplier", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidMultiplier", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidServerSeed", - "type": "error" - }, - { - "inputs": [], - "name": "NoBetPlaced", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - } - ], - "name": "OwnableInvalidOwner", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "OwnableUnauthorizedAccount", - "type": "error" - }, - { - "inputs": [], - "name": "ReentrancyGuardReentrantCall", - "type": "error" - }, - { - "inputs": [], - "name": "RoundNotSettled", - "type": "error" - }, - { - "inputs": [], - "name": "TransferFailed", - "type": "error" - }, - { - "inputs": [], - "name": "Unauthorized", - "type": "error" - }, - { - "inputs": [], - "name": "WrongGamePhase", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "roundId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "player", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "BetPlaced", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "roundId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "player", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "multiplier", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "payout", - "type": "uint256" - } - ], - "name": "CashOut", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "newBalance", - "type": "uint256" - } - ], - "name": "HouseBalanceUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "previousOwner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "roundId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "crashMultiplier", - "type": "uint256" - } - ], - "name": "RoundCrashed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "roundId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "flyStartTime", - "type": "uint256" - } - ], - "name": "RoundFlying", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "roundId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBets", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalPayouts", - "type": "uint256" - } - ], - "name": "RoundSettled", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "roundId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "snapshotHash", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "playersMerkleRoot", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalBets", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalPayouts", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint32", - "name": "numPlayers", - "type": "uint32" - } - ], - "name": "RoundSnapshot", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "uint256", - "name": "roundId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "startTime", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bytes32", - "name": "serverSeedHash", - "type": "bytes32" - } - ], - "name": "RoundStarted", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "newOperator", - "type": "address" - } - ], - "name": "ServerOperatorUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "inputs": [], - "name": "BETTING_DURATION", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MAX_BET", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MAX_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MIN_BET", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MIN_MULTIPLIER", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "multiplier", - "type": "uint256" - } - ], - "name": "cashOut", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "crashMultiplier", - "type": "uint256" - }, - { - "internalType": "string", - "name": "serverSeed", - "type": "string" - } - ], - "name": "crashRound", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "currentRound", - "outputs": [ - { - "internalType": "uint256", - "name": "roundId", - "type": "uint256" - }, - { - "internalType": "enum AviatorGame.GamePhase", - "name": "phase", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "startTime", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "flyStartTime", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "crashMultiplier", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "serverSeedHash", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "totalBets", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalPayouts", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "settled", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "currentRoundId", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "fundHouse", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "roundId", - "type": "uint256" - }, - { - "internalType": "address", - "name": "player", - "type": "address" - } - ], - "name": "getPlayerBet", - "outputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "cashoutMultiplier", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "settled", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "roundId", - "type": "uint256" - } - ], - "name": "getRoundHistory", - "outputs": [ - { - "internalType": "uint256", - "name": "id", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "crashMultiplier", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "serverSeedHash", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "totalBets", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalPayouts", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "settled", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getRoundPlayers", - "outputs": [ - { - "internalType": "address[]", - "name": "", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "houseBalance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], + { + "type": "constructor", + "inputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "receive", + "stateMutability": "payable" + }, + { + "type": "function", + "name": "MAX_BET", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "MAX_PAYOUT", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "MIN_BET", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "UPGRADE_INTERFACE_VERSION", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "cashOutFor", + "inputs": [ + { + "name": "roundId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "player", + "type": "address", + "internalType": "address" + }, + { + "name": "payout", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "multiplier", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "deposit", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "depositWithPermit", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "v", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "r", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "s", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "fundHouse", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "initialize", + "inputs": [ + { + "name": "_usdcToken", + "type": "address", + "internalType": "address" + }, + { + "name": "initialOwner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "owner", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "pause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "paused", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "placeBetFor", + "inputs": [ + { + "name": "roundId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "player", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "playerBalances", + "inputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "proxiableUUID", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "renounceOwnership", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "roundSnapshots", + "inputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "snapshotHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "playersMerkleRoot", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "totalBets", + "type": "uint96", + "internalType": "uint96" + }, + { + "name": "totalPayouts", + "type": "uint96", + "internalType": "uint96" + }, + { + "name": "numPlayers", + "type": "uint32", + "internalType": "uint32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "serverOperator", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "setServerOperator", + "inputs": [ + { + "name": "newOperator", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "snapshotRound", + "inputs": [ + { + "name": "roundId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "snapshotHash", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "playersMerkleRoot", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "totalBets", + "type": "uint96", + "internalType": "uint96" + }, + { + "name": "totalPayouts", + "type": "uint96", + "internalType": "uint96" + }, + { + "name": "numPlayers", + "type": "uint32", + "internalType": "uint32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "totalPlayerBalances", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "transferOwnership", + "inputs": [ + { + "name": "newOwner", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "unpause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "upgradeToAndCall", + "inputs": [ + { + "name": "newImplementation", + "type": "address", + "internalType": "address" + }, + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "usdcToken", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract IERC20" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "withdraw", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawEth", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address payable" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawHouseProfits", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "BetPlaced", + "inputs": [ + { + "name": "roundId", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "player", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "CashOut", + "inputs": [ + { + "name": "roundId", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "player", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "payout", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "multiplier", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Deposit", + "inputs": [ + { + "name": "player", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "HouseFunded", + "inputs": [ + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "HouseWithdrawn", + "inputs": [ + { + "name": "recipient", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Initialized", + "inputs": [ + { + "name": "version", + "type": "uint64", + "indexed": false, + "internalType": "uint64" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "OwnershipTransferred", + "inputs": [ + { + "name": "previousOwner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "newOwner", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Paused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoundSnapshot", + "inputs": [ + { + "name": "roundId", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "snapshotHash", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + }, + { + "name": "playersMerkleRoot", + "type": "bytes32", + "indexed": false, + "internalType": "bytes32" + }, + { + "name": "totalBets", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "totalPayouts", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "numPlayers", + "type": "uint32", + "indexed": false, + "internalType": "uint32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ServerOperatorUpdated", + "inputs": [ + { + "name": "newOperator", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Unpaused", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Upgraded", + "inputs": [ + { + "name": "implementation", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Withdrawal", + "inputs": [ + { + "name": "player", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "error", + "name": "AddressEmptyCode", + "inputs": [ + { + "name": "target", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ERC1967InvalidImplementation", + "inputs": [ + { + "name": "implementation", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ERC1967NonPayable", + "inputs": [] + }, + { + "type": "error", + "name": "ETHTransferFailed", + "inputs": [] + }, + { + "type": "error", + "name": "EnforcedPause", + "inputs": [] + }, + { + "type": "error", + "name": "ExpectedPause", + "inputs": [] + }, + { + "type": "error", + "name": "FailedCall", + "inputs": [] + }, + { + "type": "error", + "name": "InsufficientBalance", + "inputs": [] + }, + { + "type": "error", + "name": "InsufficientHouseBalance", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidAddress", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidBetAmount", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidInitialization", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidTokenAddress", + "inputs": [] + }, + { + "type": "error", + "name": "NotInitializing", + "inputs": [] + }, + { + "type": "error", + "name": "OwnableInvalidOwner", + "inputs": [ + { "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "betAmount", - "type": "uint256" - } - ], - "name": "placeBet", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "roundBets", - "outputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "cashoutMultiplier", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "settled", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "roundPlayers", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "roundSnapshots", - "outputs": [ - { - "internalType": "bytes32", - "name": "snapshotHash", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "playersMerkleRoot", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "totalBets", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalPayouts", - "type": "uint256" - }, - { - "internalType": "uint32", - "name": "numPlayers", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "rounds", - "outputs": [ - { - "internalType": "uint256", - "name": "roundId", - "type": "uint256" - }, - { - "internalType": "enum AviatorGame.GamePhase", - "name": "phase", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "startTime", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "flyStartTime", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "crashMultiplier", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "serverSeedHash", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "totalBets", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalPayouts", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "settled", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "serverOperator", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOperator", - "type": "address" - } - ], - "name": "setServerOperator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "settleRound", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "roundId", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "snapshotHash", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "playersMerkleRoot", - "type": "bytes32" - }, - { - "internalType": "uint256", - "name": "totalBets", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "totalPayouts", - "type": "uint256" - }, - { - "internalType": "uint32", - "name": "numPlayers", - "type": "uint32" - } - ], - "name": "snapshotRound", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "serverSeedHash", - "type": "bytes32" - } - ], - "name": "startFlying", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "newOwner", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "usdcToken", - "outputs": [ - { - "internalType": "contract IERC20", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "withdrawHouseProfits", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "type": "function", - "name": "placeBetFor", - "inputs": [ - { - "name": "player", - "type": "address", - "internalType": "address" - }, - { - "name": "betAmount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "cashOutFor", - "inputs": [ - { - "name": "player", - "type": "address", - "internalType": "address" - }, - { - "name": "multiplier", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - } -] \ No newline at end of file + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "OwnableUnauthorizedAccount", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ReentrancyGuardReentrantCall", + "inputs": [] + }, + { + "type": "error", + "name": "TransferFailed", + "inputs": [] + }, + { + "type": "error", + "name": "UUPSUnauthorizedCallContext", + "inputs": [] + }, + { + "type": "error", + "name": "UUPSUnsupportedProxiableUUID", + "inputs": [ + { + "name": "slot", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "Unauthorized", + "inputs": [] + } +] From d578272800d9d7b6c7d85f95ff68e29f82e96f46 Mon Sep 17 00:00:00 2001 From: technimite Date: Fri, 5 Jun 2026 22:31:45 +0100 Subject: [PATCH 08/16] Update admin layout --- frontend/app/admin/layout.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/frontend/app/admin/layout.tsx b/frontend/app/admin/layout.tsx index 2c3a8fd..90c622c 100644 --- a/frontend/app/admin/layout.tsx +++ b/frontend/app/admin/layout.tsx @@ -188,6 +188,9 @@ function AdminLayoutContent({ children }: { children: React.ReactNode }) { > + @@ -290,6 +293,9 @@ function AdminLayoutContent({ children }: { children: React.ReactNode }) { > + From 92d2df3f988fa9d8dfce3134a253f7efa3e2d926 Mon Sep 17 00:00:00 2001 From: technimite Date: Fri, 5 Jun 2026 22:31:46 +0100 Subject: [PATCH 09/16] Update BetControls component --- frontend/components/game/BetControls.tsx | 129 +++++++++++++++++++---- 1 file changed, 107 insertions(+), 22 deletions(-) diff --git a/frontend/components/game/BetControls.tsx b/frontend/components/game/BetControls.tsx index df3f21d..b71c9b7 100644 --- a/frontend/components/game/BetControls.tsx +++ b/frontend/components/game/BetControls.tsx @@ -12,7 +12,7 @@ import * as api from "@/lib/api"; const BetControls: React.FC = () => { const { roundData, cashOut, placeBet, optimisticBets, displayMultiplier } = useGameContext(); - const { walletBalance, walletAddress, refreshBalance } = useUSDC(); + const { walletBalance, gameBalance, walletAddress, refreshBalance, depositUSDC, withdrawUSDC } = useUSDC(); const { chainLabel, explorerUrl } = useChainInfo(); const myBet = usePlayerBet(roundData, walletAddress || null, optimisticBets); @@ -34,9 +34,43 @@ const BetControls: React.FC = () => { const betValidation = useBetValidation( betAmount, - useFreeBet ? freeBetMaxAmount : walletBalance || 0, + useFreeBet ? freeBetMaxAmount : gameBalance || 0, ); + const [isManagingFunds, setIsManagingFunds] = useState(false); + const [fundAmount, setFundAmount] = useState(""); + const [isFunding, setIsFunding] = useState(false); + + const handleDeposit = async () => { + if (!fundAmount || isNaN(parseFloat(fundAmount))) return; + try { + setIsFunding(true); + setError(null); + await depositUSDC(parseFloat(fundAmount)); + setIsManagingFunds(false); + setFundAmount(""); + } catch (err) { + setError((err as Error).message); + } finally { + setIsFunding(false); + } + }; + + const handleWithdraw = async () => { + if (!fundAmount || isNaN(parseFloat(fundAmount))) return; + try { + setIsFunding(true); + setError(null); + await withdrawUSDC(parseFloat(fundAmount)); + setIsManagingFunds(false); + setFundAmount(""); + } catch (err) { + setError((err as Error).message); + } finally { + setIsFunding(false); + } + }; + // Fetch free bets info when wallet address changes useEffect(() => { if (walletAddress) { @@ -113,8 +147,8 @@ const BetControls: React.FC = () => { return; } } else { - if (!walletBalance || walletBalance <= 0) { - setError("Insufficient USDC balance"); + if (!gameBalance || gameBalance <= 0) { + setError("Insufficient game balance (Deposit USDC first)"); return; } if (parseFloat(amountToBet) > maxBetAmount) { @@ -263,7 +297,7 @@ const BetControls: React.FC = () => { isBettingPhase && !myBet && ((useFreeBet && freeBetsRemaining > 0) || - (!useFreeBet && walletBalance && walletBalance > 0)); + (!useFreeBet && gameBalance !== null && gameBalance > 0)); const potentialPayout = myBet && roundData?.phase === "FLYING" @@ -284,18 +318,25 @@ const BetControls: React.FC = () => {
- - 💰 - - {mounted ? walletBalance?.toFixed(2) || "0.00" : "0.00"} - - - {mounted ? walletBalance?.toFixed(1) || "0" : "0"} - - - USDC - - + {freeBetsRemaining > 0 && ( @@ -310,6 +351,50 @@ const BetControls: React.FC = () => {
+ {/* Funds Manager Dropdown */} + {isManagingFunds && ( +
+
+

+ âš¡ MANAGE FUNDS +

+ +
+
+
+ + +
+
+ setFundAmount(e.target.value)} + placeholder="0.00" + className="w-full bg-slate-900 border border-slate-700 rounded-lg px-3 py-2 text-white font-orbitron focus:outline-none focus:border-emerald-500 focus:ring-1 focus:ring-emerald-500 transition-all" + /> + USDC +
+
+ + +
+
+
+ )} + {myBet && (
@@ -444,7 +529,7 @@ const BetControls: React.FC = () => { max={ useFreeBet ? freeBetMaxAmount.toString() - : Math.min(walletBalance || 0, maxBetAmount).toString() + : Math.min(gameBalance || 0, maxBetAmount).toString() } className="w-full bg-transparent text-white text-lg sm:text-2xl font-bold font-orbitron focus:outline-none placeholder-slate-600" placeholder="0.00" @@ -553,10 +638,10 @@ const BetControls: React.FC = () => { {isConnected && !canPlaceBet && roundData?.phase === "BETTING" && (
- {walletBalance === 0 && freeBetsRemaining === 0 - ? "INSUFFICIENT BALANCE" - : walletBalance === 0 - ? "INSUFFICIENT BALANCE" + {gameBalance === 0 && freeBetsRemaining === 0 + ? "INSUFFICIENT GAME BALANCE" + : gameBalance === 0 + ? "INSUFFICIENT GAME BALANCE" : myBet ? "BET REGISTERED" : "BETTING CLOSED"} From 711d01d0949e57fe6dca2ffcc334d02ba7970e5d Mon Sep 17 00:00:00 2001 From: technimite Date: Fri, 5 Jun 2026 22:31:53 +0100 Subject: [PATCH 10/16] Update useGame hook --- frontend/hooks/useGame.ts | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/frontend/hooks/useGame.ts b/frontend/hooks/useGame.ts index 698c804..b82e3bf 100644 --- a/frontend/hooks/useGame.ts +++ b/frontend/hooks/useGame.ts @@ -105,18 +105,8 @@ export function useGame(options: { wsUrl?: string } = {}) { } try { - if (!useFreeBet && houseAddress) { - const allowance = await checkAllowance(address, houseAddress); - if (allowance < amount) { - const approvalTxHash = await approveUSDC( - houseAddress, - maxUint256, - ); - await publicClient!.waitForTransactionReceipt({ - hash: approvalTxHash as `0x${string}`, - }); - } - } + // No wallet approval needed here anymore! + // Betting utilizes the user's game balance which they manage via Deposit/Withdraw. const res = await gameApi.placeBet(currentRoundId, { address, From 10a04355795e3ad3e4469d5f4f0c777af5dc9eab Mon Sep 17 00:00:00 2001 From: technimite Date: Fri, 5 Jun 2026 22:31:53 +0100 Subject: [PATCH 11/16] Update useUSDC hook --- frontend/hooks/useUSDC.ts | 104 ++++++++++++++++++++++++++++++++------ 1 file changed, 89 insertions(+), 15 deletions(-) diff --git a/frontend/hooks/useUSDC.ts b/frontend/hooks/useUSDC.ts index f736517..c66fca5 100644 --- a/frontend/hooks/useUSDC.ts +++ b/frontend/hooks/useUSDC.ts @@ -4,6 +4,7 @@ import { parseUnits } from "viem"; import { useAccount } from "wagmi"; import { getChainConfig } from "@/lib/chains"; import ERC20_ABI from "@/abis/usdc.json"; +import AVIATOR_ABI from "@/abis/aviator.json"; export default function useUSDC() { const { data: walletClient } = useWalletClient(); @@ -12,6 +13,7 @@ export default function useUSDC() { const chainId = useChainId(); const [balance, setBalance] = useState(null); + const [gameBalance, setGameBalance] = useState(null); const chainConfig = getChainConfig(chainId); const usdcAddress = chainConfig.usdcAddress; @@ -64,18 +66,28 @@ export default function useUSDC() { const fetchBalance = useCallback(async () => { if (!address || !publicClient) return null; try { - const raw = await publicClient.readContract({ - address: usdcAddress, - abi: ERC20_ABI, - functionName: "balanceOf", - args: [address], - }); - return Number(raw) / 10 ** decimals; + const [rawWallet, rawGame] = await Promise.all([ + publicClient.readContract({ + address: usdcAddress, + abi: ERC20_ABI, + functionName: "balanceOf", + args: [address], + }), + publicClient.readContract({ + address: houseAddress, + abi: AVIATOR_ABI, + functionName: "playerBalances", + args: [address], + }) + ]); + const wb = Number(rawWallet) / 10 ** decimals; + const gb = Number(rawGame) / 10 ** decimals; + return { walletBalance: wb, gameBalance: gb }; } catch (err) { console.error("Error fetching balance:", err); return null; } - }, [address, publicClient, usdcAddress, decimals]); + }, [address, publicClient, usdcAddress, houseAddress, decimals]); useEffect(() => { if (!address || !publicClient) { @@ -87,19 +99,29 @@ export default function useUSDC() { const updateBalance = async () => { try { - const raw = await publicClient.readContract({ - address: usdcAddress, - abi: ERC20_ABI, - functionName: "balanceOf", - args: [address], - }); + const [rawWallet, rawGame] = await Promise.all([ + publicClient.readContract({ + address: usdcAddress, + abi: ERC20_ABI, + functionName: "balanceOf", + args: [address], + }), + publicClient.readContract({ + address: houseAddress, + abi: AVIATOR_ABI, + functionName: "playerBalances", + args: [address], + }) + ]); if (isMounted) { - setBalance(Number(raw) / 10 ** decimals); + setBalance(Number(rawWallet) / 10 ** decimals); + setGameBalance(Number(rawGame) / 10 ** decimals); } } catch (err) { console.error("Error in balance update loop:", err); if (isMounted) { setBalance(null); + setGameBalance(null); } } }; @@ -133,12 +155,64 @@ export default function useUSDC() { [walletClient, publicClient, usdcAddress, decimals, fetchBalance] ); + const depositUSDC = useCallback(async (amount: number) => { + if (!walletClient || !address) throw new Error("Wallet not connected"); + const amountInWei = parseUnits(amount.toString(), decimals); + + const allowance = await checkAllowance(address, houseAddress); + if (allowance < amount) { + await approveUSDC(houseAddress, amountInWei); + } + + const hash = await walletClient.writeContract({ + address: houseAddress, + abi: AVIATOR_ABI as any, + functionName: "deposit", + args: [amountInWei], + }); + + if (publicClient) { + await publicClient.waitForTransactionReceipt({ hash }); + const res = await fetchBalance(); + if (res) { + setBalance(res.walletBalance); + setGameBalance(res.gameBalance); + } + } + return hash; + }, [walletClient, address, houseAddress, decimals, checkAllowance, approveUSDC, publicClient, fetchBalance]); + + const withdrawUSDC = useCallback(async (amount: number) => { + if (!walletClient) throw new Error("Wallet not connected"); + const amountInWei = parseUnits(amount.toString(), decimals); + + const hash = await walletClient.writeContract({ + address: houseAddress, + abi: AVIATOR_ABI as any, + functionName: "withdraw", + args: [amountInWei], + }); + + if (publicClient) { + await publicClient.waitForTransactionReceipt({ hash }); + const res = await fetchBalance(); + if (res) { + setBalance(res.walletBalance); + setGameBalance(res.gameBalance); + } + } + return hash; + }, [walletClient, publicClient, houseAddress, decimals, fetchBalance]); + return { walletBalance: balance, + gameBalance, walletAddress: address, refreshBalance: fetchBalance, approveUSDC, checkAllowance, + depositUSDC, + withdrawUSDC, usdcAddress, houseAddress, transferUSDC, From 3d1012b0dfa3526a6151eccb403a26052faba89c Mon Sep 17 00:00:00 2001 From: technimite Date: Sun, 7 Jun 2026 17:43:44 +0100 Subject: [PATCH 12/16] Update README.md --- frontend/README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/frontend/README.md b/frontend/README.md index 19b559a..46f386f 100644 --- a/frontend/README.md +++ b/frontend/README.md @@ -1,11 +1,17 @@ This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-onchain`](https://www.npmjs.com/package/create-onchain). +## Supported Chains + +The Aviator game is currently available on: + +- **Base** - Fully supported +- **Celo** - Fully supported +- **Stella** - Coming Soon ## Getting Started First, install dependencies: - ```bash npm install # or @@ -32,7 +38,6 @@ Open [http://localhost:3000](http://localhost:3000) with your browser to see the You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. - ## Learn More To learn more about OnchainKit, see our [documentation](https://docs.base.org/onchainkit). From a44280c5aec33b90360a575b4e0c339e1ee61b01 Mon Sep 17 00:00:00 2001 From: technimite Date: Sun, 7 Jun 2026 17:43:49 +0100 Subject: [PATCH 13/16] Update ChainSwitcher component --- frontend/components/common/ChainSwitcher.tsx | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/frontend/components/common/ChainSwitcher.tsx b/frontend/components/common/ChainSwitcher.tsx index 61ae717..7efb540 100644 --- a/frontend/components/common/ChainSwitcher.tsx +++ b/frontend/components/common/ChainSwitcher.tsx @@ -19,6 +19,7 @@ const ChainSwitcher: React.FC = () => { const currentChain = CHAIN_CONFIGS[chainId]; const availableChains = Object.values(CHAIN_CONFIGS); + const comingSoonChains = [{ label: "Stella", status: "coming soon" }]; const handleChainSwitch = (newChainId: number) => { switchChain({ chainId: newChainId }); @@ -60,6 +61,24 @@ const ChainSwitcher: React.FC = () => { {chain.label} ))} + + {comingSoonChains.length > 0 && ( + <> +
+ {comingSoonChains.map((chain) => ( + + ))} + + )}
)}
From 65b9970921a58aaa1cf9752c322f3911ef8fea33 Mon Sep 17 00:00:00 2001 From: technimite Date: Sun, 7 Jun 2026 17:47:51 +0100 Subject: [PATCH 14/16] Fix manage funds dropdown to open upward --- frontend/components/game/BetControls.tsx | 54 +++++++++++++++++++----- 1 file changed, 43 insertions(+), 11 deletions(-) diff --git a/frontend/components/game/BetControls.tsx b/frontend/components/game/BetControls.tsx index b71c9b7..568a57b 100644 --- a/frontend/components/game/BetControls.tsx +++ b/frontend/components/game/BetControls.tsx @@ -12,7 +12,14 @@ import * as api from "@/lib/api"; const BetControls: React.FC = () => { const { roundData, cashOut, placeBet, optimisticBets, displayMultiplier } = useGameContext(); - const { walletBalance, gameBalance, walletAddress, refreshBalance, depositUSDC, withdrawUSDC } = useUSDC(); + const { + walletBalance, + gameBalance, + walletAddress, + refreshBalance, + depositUSDC, + withdrawUSDC, + } = useUSDC(); const { chainLabel, explorerUrl } = useChainInfo(); const myBet = usePlayerBet(roundData, walletAddress || null, optimisticBets); @@ -318,19 +325,23 @@ const BetControls: React.FC = () => {
- +
- - + +
{ placeholder="0.00" className="w-full bg-slate-900 border border-slate-700 rounded-lg px-3 py-2 text-white font-orbitron focus:outline-none focus:border-emerald-500 focus:ring-1 focus:ring-emerald-500 transition-all" /> - USDC + + USDC +