Overview
APE Balance
APE Value
$0.71 (@ $0.71/APE)More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Deposit | 9633050 | 10 days ago | IN | 1 APE | 0.00115394 |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
Game
Compiler Version
v0.8.28+commit.7893614a
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity ^0.8.0;import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";/*** @title Game* @dev Contract that manages player deposits and withdrawals with signature verification.*/contract Game is Initializable, OwnableUpgradeable {using ECDSA for bytes32;address public contractSigner;uint256 public initialBlock;mapping(address => uint256) private totalDeposits;mapping(address => uint256) private totalWithdrawals;event Deposit(address indexed player, uint256 amount, uint256 totalDeposit);event Withdrawal(address indexed player,uint256 amount,uint256 totalWithdrawal);
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)pragma solidity ^0.8.20;import {ContextUpgradeable} from "../utils/ContextUpgradeable.sol";import {Initializable} from "../proxy/utils/Initializable.sol";/*** @dev Contract module which provides a basic access control mechanism, where* there is an account (an owner) that can be granted exclusive access to* specific functions.** The initial owner is set to the address provided by the deployer. This can* later be changed with {transferOwnership}.** This module is used through inheritance. It will make available the modifier* `onlyOwner`, which can be applied to your functions to restrict their use to* the owner.*/abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {/// @custom:storage-location erc7201:openzeppelin.storage.Ownablestruct OwnableStorage {address _owner;}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.sol)pragma solidity ^0.8.20;/*** @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed* behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an* external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer* function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.** The initialization functions use a version number. Once a version number is used, it is consumed and cannot be* reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in* case an upgrade adds a module that needs to be initialized.** For example:** [.hljs-theme-light.nopadding]* ```solidity* contract MyToken is ERC20Upgradeable {* function initialize() initializer public {* __ERC20_init("MyToken", "MTK");* }* }** contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)pragma solidity ^0.8.20;import {Initializable} from "../proxy/utils/Initializable.sol";/*** @dev Provides information about the current execution context, including the* sender of the transaction and its data. While these are generally available* via msg.sender and msg.data, they should not be accessed in such a direct* manner, since when dealing with meta-transactions the account sending and* paying for execution may not be the actual sender (as far as an application* is concerned).** This contract is only required for intermediate, library-like contracts.*/abstract contract ContextUpgradeable is Initializable {function __Context_init() internal onlyInitializing {}function __Context_init_unchained() internal onlyInitializing {}function _msgSender() internal view virtual returns (address) {return msg.sender;}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v5.1.0) (utils/cryptography/ECDSA.sol)pragma solidity ^0.8.20;/*** @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.** These functions can be used to verify that a message was signed by the holder* of the private keys of a given address.*/library ECDSA {enum RecoverError {NoError,InvalidSignature,InvalidSignatureLength,InvalidSignatureS}/*** @dev The signature derives the `address(0)`.*/error ECDSAInvalidSignature();/*** @dev The signature has an invalid length.
1234567891011121314151617181920{"optimizer": {"enabled": true,"runs": 200},"evmVersion": "paris","outputSelection": {"*": {"*": ["evm.bytecode","evm.deployedBytecode","devdoc","userdoc","metadata","abi"]}},"libraries": {}}
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"name":"ECDSAInvalidSignature","type":"error"},{"inputs":[{"internalType":"uint256","name":"length","type":"uint256"}],"name":"ECDSAInvalidSignatureLength","type":"error"},{"inputs":[{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"ECDSAInvalidSignatureS","type":"error"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"player","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalDeposit","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","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":true,"internalType":"address","name":"player","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalWithdrawal","type":"uint256"}],"name":"Withdrawal","type":"event"},{"inputs":[],"name":"contractSigner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"deposit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_player","type":"address"}],"name":"getTotalDeposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_player","type":"address"}],"name":"getTotalWithdrawal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initialBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_contractSigner","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_contractSigner","type":"address"}],"name":"setContractSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"_signature","type":"bytes"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
6080604052348015600f57600080fd5b50610c5b8061001f6000396000f3fe6080604052600436106100ab5760003560e01c8063c7eaea8a11610064578063c7eaea8a146101fb578063d0e30db01461021b578063d7b159ed14610223578063db2e21bc14610243578063dff431b914610258578063f2fde38b1461027857600080fd5b80632cb1586414610102578063485cc9551461012b5780634c14470d1461014d578063715018a614610183578063857184d1146101985780638da5cb5b146101ce57600080fd5b366100fd5760405162461bcd60e51b815260206004820152601c60248201527f446972656374207472616e7366657273206e6f7420616c6c6f7765640000000060448201526064015b60405180910390fd5b600080fd5b34801561010e57600080fd5b5061011860015481565b6040519081526020015b60405180910390f35b34801561013757600080fd5b5061014b610146366004610ac8565b610298565b005b34801561015957600080fd5b50610118610168366004610afb565b6001600160a01b031660009081526003602052604090205490565b34801561018f57600080fd5b5061014b6103c8565b3480156101a457600080fd5b506101186101b3366004610afb565b6001600160a01b031660009081526002602052604090205490565b3480156101da57600080fd5b506101e36103dc565b6040516001600160a01b039091168152602001610122565b34801561020757600080fd5b5061014b610216366004610b33565b61040a565b61014b61056f565b34801561022f57600080fd5b5061014b61023e366004610afb565b61062d565b34801561024f57600080fd5b5061014b610657565b34801561026457600080fd5b506000546101e3906001600160a01b031681565b34801561028457600080fd5b5061014b610293366004610afb565b6106a2565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff16159067ffffffffffffffff166000811580156102de5750825b905060008267ffffffffffffffff1660011480156102fb5750303b155b905081158015610309575080155b156103275760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561035157845460ff60401b1916600160401b1785555b61035a876106dd565b600080546001600160a01b0319166001600160a01b0388161790554360015583156103bf57845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50505050505050565b6103d06106ee565b6103da6000610720565b565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6000811161045a5760405162461bcd60e51b815260206004820152601f60248201527f416d6f756e742073686f756c642062652067726561746572207468616e20300060448201526064016100f4565b600080543380835260036020526040909220546001600160a01b0390911691610487918591908590610791565b6001600160a01b0316146104d15760405162461bcd60e51b8152602060048201526011602482015270496e76616c6964207369676e617475726560781b60448201526064016100f4565b33600090815260036020526040812080548392906104f0908490610bee565b9091555050604051339082156108fc029083906000818181858888f19350505050158015610522573d6000803e3d6000fd5b5033600081815260036020908152604091829020548251858152918201527fdf273cb619d95419a9cd0ec88123a0538c85064229baa6363788f743fff90deb910160405180910390a25050565b600034116105bf5760405162461bcd60e51b815260206004820152601f60248201527f416d6f756e742073686f756c642062652067726561746572207468616e20300060448201526064016100f4565b33600090815260026020526040812080543492906105de908490610bee565b909155505033600081815260026020908152604091829020548251348152918201527f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a15910160405180910390a2565b6106356106ee565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b61065f6106ee565b6106676103dc565b6001600160a01b03166108fc479081150290604051600060405180830381858888f1935050505015801561069f573d6000803e3d6000fd5b50565b6106aa6106ee565b6001600160a01b0381166106d457604051631e4fbdf760e01b8152600060048201526024016100f4565b61069f81610720565b6106e5610856565b61069f8161089f565b336106f76103dc565b6001600160a01b0316146103da5760405163118cdaa760e01b81523360048201526024016100f4565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b6040516bffffffffffffffffffffffff1930606090811b8216602084015285901b16603482015260488101839052606881018290526000908190608801604051602081830303815290604052805190602001209050600061083f826040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b905061084b81886108a7565b979650505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff166103da57604051631afcd79f60e31b815260040160405180910390fd5b6106aa610856565b6000806000806108b786866108d3565b9250925092506108c78282610920565b50909150505b92915050565b6000806000835160410361090d5760208401516040850151606086015160001a6108ff888285856109dd565b955095509550505050610919565b50508151600091506002905b9250925092565b600082600381111561093457610934610c0f565b0361093d575050565b600182600381111561095157610951610c0f565b0361096f5760405163f645eedf60e01b815260040160405180910390fd5b600282600381111561098357610983610c0f565b036109a45760405163fce698f760e01b8152600481018290526024016100f4565b60038260038111156109b8576109b8610c0f565b036109d9576040516335e2f38360e21b8152600481018290526024016100f4565b5050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610a185750600091506003905082610aa2565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610a6c573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610a9857506000925060019150829050610aa2565b9250600091508190505b9450945094915050565b80356001600160a01b0381168114610ac357600080fd5b919050565b60008060408385031215610adb57600080fd5b610ae483610aac565b9150610af260208401610aac565b90509250929050565b600060208284031215610b0d57600080fd5b610b1682610aac565b9392505050565b634e487b7160e01b600052604160045260246000fd5b60008060408385031215610b4657600080fd5b823567ffffffffffffffff811115610b5d57600080fd5b8301601f81018513610b6e57600080fd5b803567ffffffffffffffff811115610b8857610b88610b1d565b604051601f8201601f19908116603f0116810167ffffffffffffffff81118282101715610bb757610bb7610b1d565b604052818152828201602001871015610bcf57600080fd5b8160208401602083013760006020928201830152969401359450505050565b808201808211156108cd57634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052602160045260246000fdfea2646970667358221220cc63dbf66109c2e9868248abe59cb56e8d3175463887d5dfae562b9944c365e064736f6c634300081c0033
Deployed Bytecode
0x6080604052600436106100ab5760003560e01c8063c7eaea8a11610064578063c7eaea8a146101fb578063d0e30db01461021b578063d7b159ed14610223578063db2e21bc14610243578063dff431b914610258578063f2fde38b1461027857600080fd5b80632cb1586414610102578063485cc9551461012b5780634c14470d1461014d578063715018a614610183578063857184d1146101985780638da5cb5b146101ce57600080fd5b366100fd5760405162461bcd60e51b815260206004820152601c60248201527f446972656374207472616e7366657273206e6f7420616c6c6f7765640000000060448201526064015b60405180910390fd5b600080fd5b34801561010e57600080fd5b5061011860015481565b6040519081526020015b60405180910390f35b34801561013757600080fd5b5061014b610146366004610ac8565b610298565b005b34801561015957600080fd5b50610118610168366004610afb565b6001600160a01b031660009081526003602052604090205490565b34801561018f57600080fd5b5061014b6103c8565b3480156101a457600080fd5b506101186101b3366004610afb565b6001600160a01b031660009081526002602052604090205490565b3480156101da57600080fd5b506101e36103dc565b6040516001600160a01b039091168152602001610122565b34801561020757600080fd5b5061014b610216366004610b33565b61040a565b61014b61056f565b34801561022f57600080fd5b5061014b61023e366004610afb565b61062d565b34801561024f57600080fd5b5061014b610657565b34801561026457600080fd5b506000546101e3906001600160a01b031681565b34801561028457600080fd5b5061014b610293366004610afb565b6106a2565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a008054600160401b810460ff16159067ffffffffffffffff166000811580156102de5750825b905060008267ffffffffffffffff1660011480156102fb5750303b155b905081158015610309575080155b156103275760405163f92ee8a960e01b815260040160405180910390fd5b845467ffffffffffffffff19166001178555831561035157845460ff60401b1916600160401b1785555b61035a876106dd565b600080546001600160a01b0319166001600160a01b0388161790554360015583156103bf57845460ff60401b19168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50505050505050565b6103d06106ee565b6103da6000610720565b565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300546001600160a01b031690565b6000811161045a5760405162461bcd60e51b815260206004820152601f60248201527f416d6f756e742073686f756c642062652067726561746572207468616e20300060448201526064016100f4565b600080543380835260036020526040909220546001600160a01b0390911691610487918591908590610791565b6001600160a01b0316146104d15760405162461bcd60e51b8152602060048201526011602482015270496e76616c6964207369676e617475726560781b60448201526064016100f4565b33600090815260036020526040812080548392906104f0908490610bee565b9091555050604051339082156108fc029083906000818181858888f19350505050158015610522573d6000803e3d6000fd5b5033600081815260036020908152604091829020548251858152918201527fdf273cb619d95419a9cd0ec88123a0538c85064229baa6363788f743fff90deb910160405180910390a25050565b600034116105bf5760405162461bcd60e51b815260206004820152601f60248201527f416d6f756e742073686f756c642062652067726561746572207468616e20300060448201526064016100f4565b33600090815260026020526040812080543492906105de908490610bee565b909155505033600081815260026020908152604091829020548251348152918201527f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a15910160405180910390a2565b6106356106ee565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b61065f6106ee565b6106676103dc565b6001600160a01b03166108fc479081150290604051600060405180830381858888f1935050505015801561069f573d6000803e3d6000fd5b50565b6106aa6106ee565b6001600160a01b0381166106d457604051631e4fbdf760e01b8152600060048201526024016100f4565b61069f81610720565b6106e5610856565b61069f8161089f565b336106f76103dc565b6001600160a01b0316146103da5760405163118cdaa760e01b81523360048201526024016100f4565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080546001600160a01b031981166001600160a01b03848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3505050565b6040516bffffffffffffffffffffffff1930606090811b8216602084015285901b16603482015260488101839052606881018290526000908190608801604051602081830303815290604052805190602001209050600061083f826040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b905061084b81886108a7565b979650505050505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054600160401b900460ff166103da57604051631afcd79f60e31b815260040160405180910390fd5b6106aa610856565b6000806000806108b786866108d3565b9250925092506108c78282610920565b50909150505b92915050565b6000806000835160410361090d5760208401516040850151606086015160001a6108ff888285856109dd565b955095509550505050610919565b50508151600091506002905b9250925092565b600082600381111561093457610934610c0f565b0361093d575050565b600182600381111561095157610951610c0f565b0361096f5760405163f645eedf60e01b815260040160405180910390fd5b600282600381111561098357610983610c0f565b036109a45760405163fce698f760e01b8152600481018290526024016100f4565b60038260038111156109b8576109b8610c0f565b036109d9576040516335e2f38360e21b8152600481018290526024016100f4565b5050565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610a185750600091506003905082610aa2565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610a6c573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610a9857506000925060019150829050610aa2565b9250600091508190505b9450945094915050565b80356001600160a01b0381168114610ac357600080fd5b919050565b60008060408385031215610adb57600080fd5b610ae483610aac565b9150610af260208401610aac565b90509250929050565b600060208284031215610b0d57600080fd5b610b1682610aac565b9392505050565b634e487b7160e01b600052604160045260246000fd5b60008060408385031215610b4657600080fd5b823567ffffffffffffffff811115610b5d57600080fd5b8301601f81018513610b6e57600080fd5b803567ffffffffffffffff811115610b8857610b88610b1d565b604051601f8201601f19908116603f0116810167ffffffffffffffff81118282101715610bb757610bb7610b1d565b604052818152828201602001871015610bcf57600080fd5b8160208401602083013760006020928201830152969401359450505050565b808201808211156108cd57634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052602160045260246000fdfea2646970667358221220cc63dbf66109c2e9868248abe59cb56e8d3175463887d5dfae562b9944c365e064736f6c634300081c0033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
APE | 100.00% | $0.709997 | 1 | $0.709997 |
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.