@tcg-game/contracts
Advanced tools
Comparing version 0.0.4 to 0.0.5
{ | ||
"address": "0x880d55e348d476Dd10a639BDd9E4F85caA36cDe5", | ||
"address": "0x1B37B7bb5Bd6225146F182657D679a36A2AFA25c", | ||
"abi": [ | ||
@@ -8,2 +8,21 @@ { | ||
{ | ||
"indexed": true, | ||
"internalType": "address", | ||
"name": "player", | ||
"type": "address" | ||
}, | ||
{ | ||
"indexed": true, | ||
"internalType": "uint256", | ||
"name": "gameId", | ||
"type": "uint256" | ||
} | ||
], | ||
"name": "Created", | ||
"type": "event" | ||
}, | ||
{ | ||
"anonymous": false, | ||
"inputs": [ | ||
{ | ||
"indexed": false, | ||
@@ -24,2 +43,21 @@ "internalType": "uint8", | ||
"internalType": "address", | ||
"name": "player", | ||
"type": "address" | ||
}, | ||
{ | ||
"indexed": true, | ||
"internalType": "uint256", | ||
"name": "gameId", | ||
"type": "uint256" | ||
} | ||
], | ||
"name": "Joined", | ||
"type": "event" | ||
}, | ||
{ | ||
"anonymous": false, | ||
"inputs": [ | ||
{ | ||
"indexed": true, | ||
"internalType": "address", | ||
"name": "previousOwner", | ||
@@ -77,2 +115,9 @@ "type": "address" | ||
{ | ||
"inputs": [], | ||
"name": "create", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
@@ -116,2 +161,31 @@ { | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "address", | ||
"name": "player", | ||
"type": "address" | ||
} | ||
], | ||
"name": "getCurGameInfo", | ||
"outputs": [ | ||
{ | ||
"internalType": "uint256", | ||
"name": "gameId", | ||
"type": "uint256" | ||
}, | ||
{ | ||
"internalType": "address", | ||
"name": "creator", | ||
"type": "address" | ||
}, | ||
{ | ||
"internalType": "address", | ||
"name": "joiner", | ||
"type": "address" | ||
} | ||
], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [], | ||
@@ -126,7 +200,2 @@ "name": "initialize", | ||
{ | ||
"internalType": "address", | ||
"name": "player", | ||
"type": "address" | ||
}, | ||
{ | ||
"internalType": "uint256", | ||
@@ -144,2 +213,15 @@ "name": "gameId", | ||
"inputs": [], | ||
"name": "largestGameId", | ||
"outputs": [ | ||
{ | ||
"internalType": "uint256", | ||
"name": "", | ||
"type": "uint256" | ||
} | ||
], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "owner", | ||
@@ -199,2 +281,26 @@ "outputs": [ | ||
"internalType": "uint256", | ||
"name": "", | ||
"type": "uint256" | ||
}, | ||
{ | ||
"internalType": "uint256", | ||
"name": "", | ||
"type": "uint256" | ||
} | ||
], | ||
"name": "rooms", | ||
"outputs": [ | ||
{ | ||
"internalType": "address", | ||
"name": "", | ||
"type": "address" | ||
} | ||
], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "uint256", | ||
"name": "gameId", | ||
@@ -204,2 +310,20 @@ "type": "uint256" | ||
{ | ||
"internalType": "address[]", | ||
"name": "players", | ||
"type": "address[]" | ||
} | ||
], | ||
"name": "settlePlayers", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "uint256", | ||
"name": "gameId", | ||
"type": "uint256" | ||
}, | ||
{ | ||
"internalType": "address", | ||
@@ -242,15 +366,15 @@ "name": "player", | ||
], | ||
"transactionHash": "0x16521e4a7864d5bae48316ab15fe74862454a4fbf45e8af0dc2a7db142e446af", | ||
"transactionHash": "0x5384c54691736cf6ec72f3a0dc5e7c0c843df17a348412696b1c808b73854740", | ||
"receipt": { | ||
"to": null, | ||
"from": "0xAf5B6AE540fCf3BD76f1b4C83fC87143932AAd09", | ||
"contractAddress": "0x880d55e348d476Dd10a639BDd9E4F85caA36cDe5", | ||
"transactionIndex": 1, | ||
"gasUsed": "584100", | ||
"contractAddress": "0x1B37B7bb5Bd6225146F182657D679a36A2AFA25c", | ||
"transactionIndex": 2, | ||
"gasUsed": "814129", | ||
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", | ||
"blockHash": "0x432d7d4aedb7354507c0239df50dd12490a30fe8c1c170ab5404e82bc6666460", | ||
"transactionHash": "0x16521e4a7864d5bae48316ab15fe74862454a4fbf45e8af0dc2a7db142e446af", | ||
"blockHash": "0xb5bc297f38587bba28ccb1b00910de5a4c79eadd20bef3cf7296295d584d5b79", | ||
"transactionHash": "0x5384c54691736cf6ec72f3a0dc5e7c0c843df17a348412696b1c808b73854740", | ||
"logs": [], | ||
"blockNumber": 572530, | ||
"cumulativeGasUsed": "636565", | ||
"blockNumber": 611970, | ||
"cumulativeGasUsed": "893828", | ||
"status": 1, | ||
@@ -260,7 +384,7 @@ "byzantium": true | ||
"args": [], | ||
"numDeployments": 2, | ||
"solcInputHash": "3803c1a33bec1bee52d9f5f0f04599e8", | ||
"metadata": "{\"compiler\":{\"version\":\"0.8.17+commit.8df45f5f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"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\":true,\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"}],\"name\":\"Settled\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"accounts\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"player\",\"type\":\"address\"}],\"name\":\"getCurGameId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"players\",\"type\":\"address[]\"}],\"name\":\"getCurGameIds\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"gameIds\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"player\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"}],\"name\":\"join\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"registerContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"registeredContracts\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"player\",\"type\":\"address\"}],\"name\":\"settleSinglePlayer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"unregisterContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/account/AccountManager.sol\":\"AccountManager\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n function __Ownable_init() internal onlyInitializing {\\n __Ownable_init_unchained();\\n }\\n\\n function __Ownable_init_unchained() internal onlyInitializing {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x4075622496acc77fd6d4de4cc30a8577a744d5c75afad33fdeacf1704d6eda98\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized != type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n function __Context_init() internal onlyInitializing {\\n }\\n\\n function __Context_init_unchained() internal onlyInitializing {\\n }\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149\",\"license\":\"MIT\"},\"contracts/account/AccountManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\nimport \\\"./IAccountManager.sol\\\";\\n\\ncontract AccountManager is OwnableUpgradeable, IAccountManager {\\n mapping(address => Account) public accounts;\\n\\n mapping(address => bool) public registeredContracts;\\n\\n modifier onlyRegisteredContracts() {\\n require(registeredContracts[msg.sender], \\\"Not registered contract\\\");\\n _;\\n }\\n\\n function initialize() public initializer {\\n __Ownable_init();\\n }\\n\\n function getCurGameId(\\n address player\\n ) external view override returns (uint256) {\\n return accounts[player].gameId;\\n }\\n\\n function getCurGameIds(\\n address[] calldata players\\n ) external view returns (uint256[] memory gameIds) {\\n gameIds = new uint256[](players.length);\\n for (uint256 i = 0; i < players.length; i++) {\\n gameIds[i] = accounts[players[i]].gameId;\\n }\\n }\\n\\n function join(\\n address player,\\n uint256 gameId\\n ) external {\\n require(\\n accounts[player].gameId == 0,\\n \\\"Already joined a game\\\"\\n );\\n\\n accounts[player].gameId = gameId;\\n }\\n\\n function settleSinglePlayer(\\n uint256 gameId,\\n address player\\n ) public onlyRegisteredContracts {\\n require(\\n accounts[player].gameId == gameId,\\n \\\"Player not in the game specified by gameId\\\"\\n );\\n accounts[player].gameId = 0;\\n emit Settled(player, gameId);\\n }\\n\\n function registerContract(address addr) external onlyOwner {\\n if (!registeredContracts[addr]) {\\n registeredContracts[addr] = true;\\n }\\n }\\n\\n function unregisterContract(address addr) external onlyOwner {\\n if (registeredContracts[addr]) {\\n registeredContracts[addr] = false;\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf574b375f1fb97e48a0f9e7698bc8767ffec588731857bba2553363ed016130c\",\"license\":\"MIT\"},\"contracts/account/IAccountManager.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\nstruct Account {\\n uint256 gameId;\\n}\\n\\ninterface IAccountManager {\\n event Settled(address indexed player, uint256 indexed gameId);\\n\\n function join(address player, uint256 gameId) external;\\n\\n function getCurGameId(address player) external view returns (uint256);\\n\\n function settleSinglePlayer(\\n uint256 gameId,\\n address player\\n ) external;\\n\\n function getCurGameIds(\\n address[] calldata players\\n ) external view returns (uint256[] memory gameIds);\\n}\\n\",\"keccak256\":\"0x831c5d8aa32216c7d859e69a1587a7062faa24fdf65ef72df6cc7d3af1a943f8\",\"license\":\"MIT\"}},\"version\":1}", | ||
"bytecode": "0x608060405234801561001057600080fd5b5061099b806100206000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c8063a06617cd11610071578063a06617cd1461013f578063ad6f6e8914610172578063cc6fcf721461019b578063ce8af54b146101bb578063f2fde38b146101ce578063fac2c621146101e157600080fd5b806322a5dde4146100b95780633b4da69f146100ce5780635e5c06e2146100e1578063715018a6146101145780638129fc1c1461011c5780638da5cb5b14610124575b600080fd5b6100cc6100c73660046107bf565b6101f4565b005b6100cc6100dc3660046107e1565b610243565b6101016100ef3660046107bf565b60656020526000908152604090205481565b6040519081526020015b60405180910390f35b6100cc6102c2565b6100cc6102d6565b6033546040516001600160a01b03909116815260200161010b565b61016261014d3660046107bf565b60666020526000908152604090205460ff1681565b604051901515815260200161010b565b6101016101803660046107bf565b6001600160a01b031660009081526065602052604090205490565b6101ae6101a936600461080b565b6103e6565b60405161010b9190610880565b6100cc6101c93660046108c4565b6104bd565b6100cc6101dc3660046107bf565b6105dd565b6100cc6101ef3660046107bf565b610653565b6101fc61069d565b6001600160a01b03811660009081526066602052604090205460ff16610240576001600160a01b0381166000908152606660205260409020805460ff191660011790555b50565b6001600160a01b038216600090815260656020526040902054156102a65760405162461bcd60e51b8152602060048201526015602482015274416c7265616479206a6f696e656420612067616d6560581b60448201526064015b60405180910390fd5b6001600160a01b03909116600090815260656020526040902055565b6102ca61069d565b6102d460006106f7565b565b600054610100900460ff16158080156102f65750600054600160ff909116105b806103105750303b158015610310575060005460ff166001145b6103735760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161029d565b6000805460ff191660011790558015610396576000805461ff0019166101001790555b61039e610749565b8015610240576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b60608167ffffffffffffffff811115610401576104016108f0565b60405190808252806020026020018201604052801561042a578160200160208202803683370190505b50905060005b828110156104b6576065600085858481811061044e5761044e610906565b905060200201602081019061046391906107bf565b6001600160a01b03166001600160a01b031681526020019081526020016000206000015482828151811061049957610499610906565b6020908102919091010152806104ae8161091c565b915050610430565b5092915050565b3360009081526066602052604090205460ff1661051c5760405162461bcd60e51b815260206004820152601760248201527f4e6f74207265676973746572656420636f6e7472616374000000000000000000604482015260640161029d565b6001600160a01b03811660009081526065602052604090205482146105965760405162461bcd60e51b815260206004820152602a60248201527f506c61796572206e6f7420696e207468652067616d652073706563696669656460448201526908189e4819d85b59525960b21b606482015260840161029d565b6001600160a01b038116600081815260656020526040808220829055518492917f7823e479a1a4ebe2418874847436f8a1680c5ee5b17f38bb59dbff28e1b4555291a35050565b6105e561069d565b6001600160a01b03811661064a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161029d565b610240816106f7565b61065b61069d565b6001600160a01b03811660009081526066602052604090205460ff1615610240576001600160a01b03166000908152606660205260409020805460ff19169055565b6033546001600160a01b031633146102d45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161029d565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166107705760405162461bcd60e51b815260040161029d90610943565b6102d4600054610100900460ff1661079a5760405162461bcd60e51b815260040161029d90610943565b6102d4336106f7565b80356001600160a01b03811681146107ba57600080fd5b919050565b6000602082840312156107d157600080fd5b6107da826107a3565b9392505050565b600080604083850312156107f457600080fd5b6107fd836107a3565b946020939093013593505050565b6000806020838503121561081e57600080fd5b823567ffffffffffffffff8082111561083657600080fd5b818501915085601f83011261084a57600080fd5b81358181111561085957600080fd5b8660208260051b850101111561086e57600080fd5b60209290920196919550909350505050565b6020808252825182820181905260009190848201906040850190845b818110156108b85783518352928401929184019160010161089c565b50909695505050505050565b600080604083850312156108d757600080fd5b823591506108e7602084016107a3565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60006001820161093c57634e487b7160e01b600052601160045260246000fd5b5060010190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea164736f6c6343000811000a", | ||
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100b45760003560e01c8063a06617cd11610071578063a06617cd1461013f578063ad6f6e8914610172578063cc6fcf721461019b578063ce8af54b146101bb578063f2fde38b146101ce578063fac2c621146101e157600080fd5b806322a5dde4146100b95780633b4da69f146100ce5780635e5c06e2146100e1578063715018a6146101145780638129fc1c1461011c5780638da5cb5b14610124575b600080fd5b6100cc6100c73660046107bf565b6101f4565b005b6100cc6100dc3660046107e1565b610243565b6101016100ef3660046107bf565b60656020526000908152604090205481565b6040519081526020015b60405180910390f35b6100cc6102c2565b6100cc6102d6565b6033546040516001600160a01b03909116815260200161010b565b61016261014d3660046107bf565b60666020526000908152604090205460ff1681565b604051901515815260200161010b565b6101016101803660046107bf565b6001600160a01b031660009081526065602052604090205490565b6101ae6101a936600461080b565b6103e6565b60405161010b9190610880565b6100cc6101c93660046108c4565b6104bd565b6100cc6101dc3660046107bf565b6105dd565b6100cc6101ef3660046107bf565b610653565b6101fc61069d565b6001600160a01b03811660009081526066602052604090205460ff16610240576001600160a01b0381166000908152606660205260409020805460ff191660011790555b50565b6001600160a01b038216600090815260656020526040902054156102a65760405162461bcd60e51b8152602060048201526015602482015274416c7265616479206a6f696e656420612067616d6560581b60448201526064015b60405180910390fd5b6001600160a01b03909116600090815260656020526040902055565b6102ca61069d565b6102d460006106f7565b565b600054610100900460ff16158080156102f65750600054600160ff909116105b806103105750303b158015610310575060005460ff166001145b6103735760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161029d565b6000805460ff191660011790558015610396576000805461ff0019166101001790555b61039e610749565b8015610240576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b60608167ffffffffffffffff811115610401576104016108f0565b60405190808252806020026020018201604052801561042a578160200160208202803683370190505b50905060005b828110156104b6576065600085858481811061044e5761044e610906565b905060200201602081019061046391906107bf565b6001600160a01b03166001600160a01b031681526020019081526020016000206000015482828151811061049957610499610906565b6020908102919091010152806104ae8161091c565b915050610430565b5092915050565b3360009081526066602052604090205460ff1661051c5760405162461bcd60e51b815260206004820152601760248201527f4e6f74207265676973746572656420636f6e7472616374000000000000000000604482015260640161029d565b6001600160a01b03811660009081526065602052604090205482146105965760405162461bcd60e51b815260206004820152602a60248201527f506c61796572206e6f7420696e207468652067616d652073706563696669656460448201526908189e4819d85b59525960b21b606482015260840161029d565b6001600160a01b038116600081815260656020526040808220829055518492917f7823e479a1a4ebe2418874847436f8a1680c5ee5b17f38bb59dbff28e1b4555291a35050565b6105e561069d565b6001600160a01b03811661064a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161029d565b610240816106f7565b61065b61069d565b6001600160a01b03811660009081526066602052604090205460ff1615610240576001600160a01b03166000908152606660205260409020805460ff19169055565b6033546001600160a01b031633146102d45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161029d565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166107705760405162461bcd60e51b815260040161029d90610943565b6102d4600054610100900460ff1661079a5760405162461bcd60e51b815260040161029d90610943565b6102d4336106f7565b80356001600160a01b03811681146107ba57600080fd5b919050565b6000602082840312156107d157600080fd5b6107da826107a3565b9392505050565b600080604083850312156107f457600080fd5b6107fd836107a3565b946020939093013593505050565b6000806020838503121561081e57600080fd5b823567ffffffffffffffff8082111561083657600080fd5b818501915085601f83011261084a57600080fd5b81358181111561085957600080fd5b8660208260051b850101111561086e57600080fd5b60209290920196919550909350505050565b6020808252825182820181905260009190848201906040850190845b818110156108b85783518352928401929184019160010161089c565b50909695505050505050565b600080604083850312156108d757600080fd5b823591506108e7602084016107a3565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60006001820161093c57634e487b7160e01b600052601160045260246000fd5b5060010190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea164736f6c6343000811000a", | ||
"numDeployments": 1, | ||
"solcInputHash": "30ca033a8f05ee2d560c883fb22b5653", | ||
"metadata": "{\"compiler\":{\"version\":\"0.8.17+commit.8df45f5f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"player\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"}],\"name\":\"Created\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"player\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"}],\"name\":\"Joined\",\"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\":true,\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"}],\"name\":\"Settled\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"accounts\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"create\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"player\",\"type\":\"address\"}],\"name\":\"getCurGameId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"players\",\"type\":\"address[]\"}],\"name\":\"getCurGameIds\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"gameIds\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"player\",\"type\":\"address\"}],\"name\":\"getCurGameInfo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"creator\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"joiner\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"}],\"name\":\"join\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"largestGameId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"registerContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"registeredContracts\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"rooms\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"players\",\"type\":\"address[]\"}],\"name\":\"settlePlayers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gameId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"player\",\"type\":\"address\"}],\"name\":\"settleSinglePlayer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"unregisterContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/account/AccountManager.sol\":\"AccountManager\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"none\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/ContextUpgradeable.sol\\\";\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n function __Ownable_init() internal onlyInitializing {\\n __Ownable_init_unchained();\\n }\\n\\n function __Ownable_init_unchained() internal onlyInitializing {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[49] private __gap;\\n}\\n\",\"keccak256\":\"0x4075622496acc77fd6d4de4cc30a8577a744d5c75afad33fdeacf1704d6eda98\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol)\\n\\npragma solidity ^0.8.2;\\n\\nimport \\\"../../utils/AddressUpgradeable.sol\\\";\\n\\n/**\\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\\n *\\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\\n * reused. This mechanism prevents re-execution of each \\\"step\\\" but allows the creation of new initialization steps in\\n * case an upgrade adds a module that needs to be initialized.\\n *\\n * For example:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```solidity\\n * contract MyToken is ERC20Upgradeable {\\n * function initialize() initializer public {\\n * __ERC20_init(\\\"MyToken\\\", \\\"MTK\\\");\\n * }\\n * }\\n *\\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\\n * function initializeV2() reinitializer(2) public {\\n * __ERC20Permit_init(\\\"MyToken\\\");\\n * }\\n * }\\n * ```\\n *\\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\\n *\\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\\n *\\n * [CAUTION]\\n * ====\\n * Avoid leaving a contract uninitialized.\\n *\\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\\n *\\n * [.hljs-theme-light.nopadding]\\n * ```\\n * /// @custom:oz-upgrades-unsafe-allow constructor\\n * constructor() {\\n * _disableInitializers();\\n * }\\n * ```\\n * ====\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n * @custom:oz-retyped-from bool\\n */\\n uint8 private _initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private _initializing;\\n\\n /**\\n * @dev Triggered when the contract has been initialized or reinitialized.\\n */\\n event Initialized(uint8 version);\\n\\n /**\\n * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\\n * `onlyInitializing` functions can be used to initialize parent contracts.\\n *\\n * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\\n * constructor.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier initializer() {\\n bool isTopLevelCall = !_initializing;\\n require(\\n (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n _initialized = 1;\\n if (isTopLevelCall) {\\n _initializing = true;\\n }\\n _;\\n if (isTopLevelCall) {\\n _initializing = false;\\n emit Initialized(1);\\n }\\n }\\n\\n /**\\n * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\\n * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\\n * used to initialize parent contracts.\\n *\\n * A reinitializer may be used after the original initialization step. This is essential to configure modules that\\n * are added through upgrades and that require initialization.\\n *\\n * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\\n * cannot be nested. If one is invoked in the context of another, execution will revert.\\n *\\n * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\\n * a contract, executing them in the right order is up to the developer or operator.\\n *\\n * WARNING: setting the version to 255 will prevent any future reinitialization.\\n *\\n * Emits an {Initialized} event.\\n */\\n modifier reinitializer(uint8 version) {\\n require(!_initializing && _initialized < version, \\\"Initializable: contract is already initialized\\\");\\n _initialized = version;\\n _initializing = true;\\n _;\\n _initializing = false;\\n emit Initialized(version);\\n }\\n\\n /**\\n * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\\n * {initializer} and {reinitializer} modifiers, directly or indirectly.\\n */\\n modifier onlyInitializing() {\\n require(_initializing, \\\"Initializable: contract is not initializing\\\");\\n _;\\n }\\n\\n /**\\n * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\\n * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\\n * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\\n * through proxies.\\n *\\n * Emits an {Initialized} event the first time it is successfully executed.\\n */\\n function _disableInitializers() internal virtual {\\n require(!_initializing, \\\"Initializable: contract is initializing\\\");\\n if (_initialized != type(uint8).max) {\\n _initialized = type(uint8).max;\\n emit Initialized(type(uint8).max);\\n }\\n }\\n\\n /**\\n * @dev Returns the highest version that has been initialized. See {reinitializer}.\\n */\\n function _getInitializedVersion() internal view returns (uint8) {\\n return _initialized;\\n }\\n\\n /**\\n * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\\n */\\n function _isInitializing() internal view returns (bool) {\\n return _initializing;\\n }\\n}\\n\",\"keccak256\":\"0x89be10e757d242e9b18d5a32c9fbe2019f6d63052bbe46397a430a1d60d7f794\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary AddressUpgradeable {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n *\\n * Furthermore, `isContract` will also return true if the target contract within\\n * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n * which only has an effect at the end of a transaction.\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9c80f545915582e63fe206c6ce27cbe85a86fc10b9cd2a0e8c9488fb7c2ee422\",\"license\":\"MIT\"},\"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\nimport \\\"../proxy/utils/Initializable.sol\\\";\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract ContextUpgradeable is Initializable {\\n function __Context_init() internal onlyInitializing {\\n }\\n\\n function __Context_init_unchained() internal onlyInitializing {\\n }\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n /**\\n * @dev This empty reserved space is put in place to allow future versions to add new\\n * variables without shifting down storage in the inheritance chain.\\n * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\\n */\\n uint256[50] private __gap;\\n}\\n\",\"keccak256\":\"0x963ea7f0b48b032eef72fe3a7582edf78408d6f834115b9feadd673a4d5bd149\",\"license\":\"MIT\"},\"contracts/account/AccountManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\nimport \\\"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\\\";\\n\\nstruct Account {\\n uint256 gameId;\\n}\\n\\ncontract AccountManager is OwnableUpgradeable {\\n mapping(address => Account) public accounts;\\n mapping(uint256 => address[]) public rooms;\\n\\n mapping(address => bool) public registeredContracts;\\n\\n uint256 public largestGameId;\\n\\n event Created(address indexed player, uint256 indexed gameId);\\n event Joined(address indexed player, uint256 indexed gameId);\\n event Settled(address indexed player, uint256 indexed gameId);\\n\\n modifier onlyRegisteredContracts() {\\n require(registeredContracts[msg.sender], \\\"Not registered contract\\\");\\n _;\\n }\\n\\n function initialize() public initializer {\\n __Ownable_init();\\n }\\n\\n function getCurGameInfo(\\n address player\\n ) external view returns (uint256 gameId, address creator, address joiner) {\\n gameId = accounts[player].gameId;\\n creator = rooms[gameId][0];\\n joiner = rooms[gameId][1];\\n }\\n\\n function getCurGameId(\\n address player\\n ) external view returns (uint256) {\\n return accounts[player].gameId;\\n }\\n\\n function getCurGameIds(\\n address[] calldata players\\n ) external view returns (uint256[] memory gameIds) {\\n gameIds = new uint256[](players.length);\\n for (uint256 i = 0; i < players.length; i++) {\\n gameIds[i] = accounts[players[i]].gameId;\\n }\\n }\\n\\n function create() external {\\n ++largestGameId;\\n require(\\n accounts[msg.sender].gameId == 0,\\n \\\"Already joined a game\\\"\\n );\\n accounts[msg.sender].gameId = largestGameId;\\n rooms[largestGameId].push(msg.sender);\\n\\n emit Created(msg.sender, largestGameId);\\n }\\n\\n function join(\\n uint256 gameId\\n ) external {\\n require(\\n accounts[msg.sender].gameId == 0,\\n \\\"Already joined a game\\\"\\n );\\n require(\\n rooms[gameId].length == 1,\\n \\\"Invalid players\\\"\\n );\\n\\n accounts[msg.sender].gameId = gameId;\\n rooms[gameId].push(msg.sender);\\n\\n emit Joined(msg.sender, gameId);\\n }\\n\\n function settlePlayers(\\n uint256 gameId,\\n address[] calldata players\\n ) external onlyRegisteredContracts {\\n for (uint256 i = 0; i < players.length; i++) {\\n settleSinglePlayer(gameId, players[i]);\\n }\\n }\\n\\n function settleSinglePlayer(\\n uint256 gameId,\\n address player\\n ) public onlyRegisteredContracts {\\n require(\\n accounts[player].gameId == gameId,\\n \\\"Player not in the game specified by gameId\\\"\\n );\\n accounts[player].gameId = 0;\\n emit Settled(player, gameId);\\n }\\n\\n function registerContract(address addr) external onlyOwner {\\n if (!registeredContracts[addr]) {\\n registeredContracts[addr] = true;\\n }\\n }\\n\\n function unregisterContract(address addr) external onlyOwner {\\n if (registeredContracts[addr]) {\\n registeredContracts[addr] = false;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x0c1b35b7d6630173a68abca95b15fff40d17ff7e98d9a877109ce8b49a0c5333\",\"license\":\"MIT\"}},\"version\":1}", | ||
"bytecode": "0x608060405234801561001057600080fd5b50610dc3806100206000396000f3fe608060405234801561001057600080fd5b506004361061010b5760003560e01c8063a06617cd116100a2578063e489a3a811610071578063e489a3a814610259578063efc81a8c14610262578063f2fde38b1461026a578063f4e591231461027d578063fac2c621146102b557600080fd5b8063a06617cd146101ca578063ad6f6e89146101fd578063cc6fcf7214610226578063ce8af54b1461024657600080fd5b80637f3c4519116100de5780637f3c4519146101735780638129fc1c1461019e5780638da5cb5b146101a65780638f779735146101b757600080fd5b8063049878f31461011057806322a5dde4146101255780635e5c06e214610138578063715018a61461016b575b600080fd5b61012361011e366004610b55565b6102c8565b005b610123610133366004610b8a565b6103dc565b610158610146366004610b8a565b60656020526000908152604090205481565b6040519081526020015b60405180910390f35b61012361042b565b610186610181366004610bac565b61043f565b6040516001600160a01b039091168152602001610162565b610123610477565b6033546001600160a01b0316610186565b6101236101c5366004610c1a565b610587565b6101ed6101d8366004610b8a565b60676020526000908152604090205460ff1681565b6040519015158152602001610162565b61015861020b366004610b8a565b6001600160a01b031660009081526065602052604090205490565b610239610234366004610c66565b61062e565b6040516101629190610ca8565b610123610254366004610cec565b610705565b61015860685481565b61012361081f565b610123610278366004610b8a565b6108f7565b61029061028b366004610b8a565b61096d565b604080519384526001600160a01b039283166020850152911690820152606001610162565b6101236102c3366004610b8a565b610a05565b33600090815260656020526040902054156103225760405162461bcd60e51b8152602060048201526015602482015274416c7265616479206a6f696e656420612067616d6560581b60448201526064015b60405180910390fd5b6000818152606660205260409020546001146103725760405162461bcd60e51b815260206004820152600f60248201526e496e76616c696420706c617965727360881b6044820152606401610319565b33600081815260656020908152604080832085905584835260668252808320805460018101825590845291832090910180546001600160a01b03191684179055518392917f49f8fa5eee2e3f21251c2e968640dcaef35cb9332429eb059bb3cd56ddc2533d91a350565b6103e4610a4f565b6001600160a01b03811660009081526067602052604090205460ff16610428576001600160a01b0381166000908152606760205260409020805460ff191660011790555b50565b610433610a4f565b61043d6000610aa9565b565b6066602052816000526040600020818154811061045b57600080fd5b6000918252602090912001546001600160a01b03169150829050565b600054610100900460ff16158080156104975750600054600160ff909116105b806104b15750303b1580156104b1575060005460ff166001145b6105145760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610319565b6000805460ff191660011790558015610537576000805461ff0019166101001790555b61053f610afb565b8015610428576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b3360009081526067602052604090205460ff166105e05760405162461bcd60e51b8152602060048201526017602482015276139bdd081c9959da5cdd195c99590818dbdb9d1c9858dd604a1b6044820152606401610319565b60005b81811015610628576106168484848481811061060157610601610d18565b90506020020160208101906102549190610b8a565b8061062081610d2e565b9150506105e3565b50505050565b60608167ffffffffffffffff81111561064957610649610d55565b604051908082528060200260200182016040528015610672578160200160208202803683370190505b50905060005b828110156106fe576065600085858481811061069657610696610d18565b90506020020160208101906106ab9190610b8a565b6001600160a01b03166001600160a01b03168152602001908152602001600020600001548282815181106106e1576106e1610d18565b6020908102919091010152806106f681610d2e565b915050610678565b5092915050565b3360009081526067602052604090205460ff1661075e5760405162461bcd60e51b8152602060048201526017602482015276139bdd081c9959da5cdd195c99590818dbdb9d1c9858dd604a1b6044820152606401610319565b6001600160a01b03811660009081526065602052604090205482146107d85760405162461bcd60e51b815260206004820152602a60248201527f506c61796572206e6f7420696e207468652067616d652073706563696669656460448201526908189e4819d85b59525960b21b6064820152608401610319565b6001600160a01b038116600081815260656020526040808220829055518492917f7823e479a1a4ebe2418874847436f8a1680c5ee5b17f38bb59dbff28e1b4555291a35050565b60686000815461082e90610d2e565b9091555033600090815260656020526040902054156108875760405162461bcd60e51b8152602060048201526015602482015274416c7265616479206a6f696e656420612067616d6560581b6044820152606401610319565b606880543360008181526065602090815260408083208590559382526066815283822080546001810182559083529082200180546001600160a01b0319168317905592549151919290917f0ce3610e89a4bb9ec9359763f99110ed52a4abaea0b62028a1637e242ca2768b9190a3565b6108ff610a4f565b6001600160a01b0381166109645760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610319565b61042881610aa9565b6001600160a01b03811660009081526065602090815260408083205480845260669092528220805491929182919082906109a9576109a9610d18565b60009182526020808320909101548583526066909152604090912080546001600160a01b0390921693509060019081106109e5576109e5610d18565b6000918252602090912001549294919350506001600160a01b0390911690565b610a0d610a4f565b6001600160a01b03811660009081526067602052604090205460ff1615610428576001600160a01b03166000908152606760205260409020805460ff19169055565b6033546001600160a01b0316331461043d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610319565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16610b225760405162461bcd60e51b815260040161031990610d6b565b61043d600054610100900460ff16610b4c5760405162461bcd60e51b815260040161031990610d6b565b61043d33610aa9565b600060208284031215610b6757600080fd5b5035919050565b80356001600160a01b0381168114610b8557600080fd5b919050565b600060208284031215610b9c57600080fd5b610ba582610b6e565b9392505050565b60008060408385031215610bbf57600080fd5b50508035926020909101359150565b60008083601f840112610be057600080fd5b50813567ffffffffffffffff811115610bf857600080fd5b6020830191508360208260051b8501011115610c1357600080fd5b9250929050565b600080600060408486031215610c2f57600080fd5b83359250602084013567ffffffffffffffff811115610c4d57600080fd5b610c5986828701610bce565b9497909650939450505050565b60008060208385031215610c7957600080fd5b823567ffffffffffffffff811115610c9057600080fd5b610c9c85828601610bce565b90969095509350505050565b6020808252825182820181905260009190848201906040850190845b81811015610ce057835183529284019291840191600101610cc4565b50909695505050505050565b60008060408385031215610cff57600080fd5b82359150610d0f60208401610b6e565b90509250929050565b634e487b7160e01b600052603260045260246000fd5b600060018201610d4e57634e487b7160e01b600052601160045260246000fd5b5060010190565b634e487b7160e01b600052604160045260246000fd5b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea164736f6c6343000811000a", | ||
"deployedBytecode": "0x608060405234801561001057600080fd5b506004361061010b5760003560e01c8063a06617cd116100a2578063e489a3a811610071578063e489a3a814610259578063efc81a8c14610262578063f2fde38b1461026a578063f4e591231461027d578063fac2c621146102b557600080fd5b8063a06617cd146101ca578063ad6f6e89146101fd578063cc6fcf7214610226578063ce8af54b1461024657600080fd5b80637f3c4519116100de5780637f3c4519146101735780638129fc1c1461019e5780638da5cb5b146101a65780638f779735146101b757600080fd5b8063049878f31461011057806322a5dde4146101255780635e5c06e214610138578063715018a61461016b575b600080fd5b61012361011e366004610b55565b6102c8565b005b610123610133366004610b8a565b6103dc565b610158610146366004610b8a565b60656020526000908152604090205481565b6040519081526020015b60405180910390f35b61012361042b565b610186610181366004610bac565b61043f565b6040516001600160a01b039091168152602001610162565b610123610477565b6033546001600160a01b0316610186565b6101236101c5366004610c1a565b610587565b6101ed6101d8366004610b8a565b60676020526000908152604090205460ff1681565b6040519015158152602001610162565b61015861020b366004610b8a565b6001600160a01b031660009081526065602052604090205490565b610239610234366004610c66565b61062e565b6040516101629190610ca8565b610123610254366004610cec565b610705565b61015860685481565b61012361081f565b610123610278366004610b8a565b6108f7565b61029061028b366004610b8a565b61096d565b604080519384526001600160a01b039283166020850152911690820152606001610162565b6101236102c3366004610b8a565b610a05565b33600090815260656020526040902054156103225760405162461bcd60e51b8152602060048201526015602482015274416c7265616479206a6f696e656420612067616d6560581b60448201526064015b60405180910390fd5b6000818152606660205260409020546001146103725760405162461bcd60e51b815260206004820152600f60248201526e496e76616c696420706c617965727360881b6044820152606401610319565b33600081815260656020908152604080832085905584835260668252808320805460018101825590845291832090910180546001600160a01b03191684179055518392917f49f8fa5eee2e3f21251c2e968640dcaef35cb9332429eb059bb3cd56ddc2533d91a350565b6103e4610a4f565b6001600160a01b03811660009081526067602052604090205460ff16610428576001600160a01b0381166000908152606760205260409020805460ff191660011790555b50565b610433610a4f565b61043d6000610aa9565b565b6066602052816000526040600020818154811061045b57600080fd5b6000918252602090912001546001600160a01b03169150829050565b600054610100900460ff16158080156104975750600054600160ff909116105b806104b15750303b1580156104b1575060005460ff166001145b6105145760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610319565b6000805460ff191660011790558015610537576000805461ff0019166101001790555b61053f610afb565b8015610428576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b3360009081526067602052604090205460ff166105e05760405162461bcd60e51b8152602060048201526017602482015276139bdd081c9959da5cdd195c99590818dbdb9d1c9858dd604a1b6044820152606401610319565b60005b81811015610628576106168484848481811061060157610601610d18565b90506020020160208101906102549190610b8a565b8061062081610d2e565b9150506105e3565b50505050565b60608167ffffffffffffffff81111561064957610649610d55565b604051908082528060200260200182016040528015610672578160200160208202803683370190505b50905060005b828110156106fe576065600085858481811061069657610696610d18565b90506020020160208101906106ab9190610b8a565b6001600160a01b03166001600160a01b03168152602001908152602001600020600001548282815181106106e1576106e1610d18565b6020908102919091010152806106f681610d2e565b915050610678565b5092915050565b3360009081526067602052604090205460ff1661075e5760405162461bcd60e51b8152602060048201526017602482015276139bdd081c9959da5cdd195c99590818dbdb9d1c9858dd604a1b6044820152606401610319565b6001600160a01b03811660009081526065602052604090205482146107d85760405162461bcd60e51b815260206004820152602a60248201527f506c61796572206e6f7420696e207468652067616d652073706563696669656460448201526908189e4819d85b59525960b21b6064820152608401610319565b6001600160a01b038116600081815260656020526040808220829055518492917f7823e479a1a4ebe2418874847436f8a1680c5ee5b17f38bb59dbff28e1b4555291a35050565b60686000815461082e90610d2e565b9091555033600090815260656020526040902054156108875760405162461bcd60e51b8152602060048201526015602482015274416c7265616479206a6f696e656420612067616d6560581b6044820152606401610319565b606880543360008181526065602090815260408083208590559382526066815283822080546001810182559083529082200180546001600160a01b0319168317905592549151919290917f0ce3610e89a4bb9ec9359763f99110ed52a4abaea0b62028a1637e242ca2768b9190a3565b6108ff610a4f565b6001600160a01b0381166109645760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610319565b61042881610aa9565b6001600160a01b03811660009081526065602090815260408083205480845260669092528220805491929182919082906109a9576109a9610d18565b60009182526020808320909101548583526066909152604090912080546001600160a01b0390921693509060019081106109e5576109e5610d18565b6000918252602090912001549294919350506001600160a01b0390911690565b610a0d610a4f565b6001600160a01b03811660009081526067602052604090205460ff1615610428576001600160a01b03166000908152606760205260409020805460ff19169055565b6033546001600160a01b0316331461043d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610319565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16610b225760405162461bcd60e51b815260040161031990610d6b565b61043d600054610100900460ff16610b4c5760405162461bcd60e51b815260040161031990610d6b565b61043d33610aa9565b600060208284031215610b6757600080fd5b5035919050565b80356001600160a01b0381168114610b8557600080fd5b919050565b600060208284031215610b9c57600080fd5b610ba582610b6e565b9392505050565b60008060408385031215610bbf57600080fd5b50508035926020909101359150565b60008083601f840112610be057600080fd5b50813567ffffffffffffffff811115610bf857600080fd5b6020830191508360208260051b8501011115610c1357600080fd5b9250929050565b600080600060408486031215610c2f57600080fd5b83359250602084013567ffffffffffffffff811115610c4d57600080fd5b610c5986828701610bce565b9497909650939450505050565b60008060208385031215610c7957600080fd5b823567ffffffffffffffff811115610c9057600080fd5b610c9c85828601610bce565b90969095509350505050565b6020808252825182820181905260009190848201906040850190845b81811015610ce057835183529284019291840191600101610cc4565b50909695505050505050565b60008060408385031215610cff57600080fd5b82359150610d0f60208401610b6e565b90509250929050565b634e487b7160e01b600052603260045260246000fd5b600060018201610d4e57634e487b7160e01b600052601160045260246000fd5b5060010190565b634e487b7160e01b600052604160045260246000fd5b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea164736f6c6343000811000a", | ||
"devdoc": { | ||
@@ -334,11 +458,27 @@ "kind": "dev", | ||
"slot": "101", | ||
"type": "t_mapping(t_address,t_struct(Account)869_storage)" | ||
"type": "t_mapping(t_address,t_struct(Account)678_storage)" | ||
}, | ||
{ | ||
"astId": 689, | ||
"astId": 690, | ||
"contract": "contracts/account/AccountManager.sol:AccountManager", | ||
"label": "rooms", | ||
"offset": 0, | ||
"slot": "102", | ||
"type": "t_mapping(t_uint256,t_array(t_address)dyn_storage)" | ||
}, | ||
{ | ||
"astId": 694, | ||
"contract": "contracts/account/AccountManager.sol:AccountManager", | ||
"label": "registeredContracts", | ||
"offset": 0, | ||
"slot": "102", | ||
"slot": "103", | ||
"type": "t_mapping(t_address,t_bool)" | ||
}, | ||
{ | ||
"astId": 696, | ||
"contract": "contracts/account/AccountManager.sol:AccountManager", | ||
"label": "largestGameId", | ||
"offset": 0, | ||
"slot": "104", | ||
"type": "t_uint256" | ||
} | ||
@@ -352,2 +492,8 @@ ], | ||
}, | ||
"t_array(t_address)dyn_storage": { | ||
"base": "t_address", | ||
"encoding": "dynamic_array", | ||
"label": "address[]", | ||
"numberOfBytes": "32" | ||
}, | ||
"t_array(t_uint256)49_storage": { | ||
@@ -377,3 +523,3 @@ "base": "t_uint256", | ||
}, | ||
"t_mapping(t_address,t_struct(Account)869_storage)": { | ||
"t_mapping(t_address,t_struct(Account)678_storage)": { | ||
"encoding": "mapping", | ||
@@ -383,5 +529,12 @@ "key": "t_address", | ||
"numberOfBytes": "32", | ||
"value": "t_struct(Account)869_storage" | ||
"value": "t_struct(Account)678_storage" | ||
}, | ||
"t_struct(Account)869_storage": { | ||
"t_mapping(t_uint256,t_array(t_address)dyn_storage)": { | ||
"encoding": "mapping", | ||
"key": "t_uint256", | ||
"label": "mapping(uint256 => address[])", | ||
"numberOfBytes": "32", | ||
"value": "t_array(t_address)dyn_storage" | ||
}, | ||
"t_struct(Account)678_storage": { | ||
"encoding": "inplace", | ||
@@ -391,3 +544,3 @@ "label": "struct Account", | ||
{ | ||
"astId": 868, | ||
"astId": 677, | ||
"contract": "contracts/account/AccountManager.sol:AccountManager", | ||
@@ -394,0 +547,0 @@ "label": "gameId", |
{ | ||
"address": "0x04f435Fe891dB408Bbb47bfaEfe8163556B72ECB", | ||
"address": "0x357C3407a034C59e33F51E77f3c72014E94c3C84", | ||
"abi": [ | ||
@@ -136,31 +136,31 @@ { | ||
], | ||
"transactionHash": "0x2879800b53fc262824424fa8e2991eef22cb28ee70873ae8357f3d01c2ca25cb", | ||
"transactionHash": "0xa43fa9f0b9bcda4b231823170bdf90595b94f4898f019776b7efdb61fa386509", | ||
"receipt": { | ||
"to": null, | ||
"from": "0xAf5B6AE540fCf3BD76f1b4C83fC87143932AAd09", | ||
"contractAddress": "0x04f435Fe891dB408Bbb47bfaEfe8163556B72ECB", | ||
"contractAddress": "0x357C3407a034C59e33F51E77f3c72014E94c3C84", | ||
"transactionIndex": 2, | ||
"gasUsed": "671334", | ||
"logsBloom": "0x00000000000000000000000000010000400000000000000000800000000800000000000000000000000000000000000000000000000000000000000000000000000080000000000000000200000002000001000000000000000000000000000000000000020000000002000000000800000000800000000000000000000000400000000000000000000000000000000000000000000080000000000040800000000000000000000000000040000600000000000000000000000000000000000000000020000000000000000000040400000000000400000000000000000020000000000000000000000000000000000000000000000000000000000000000000", | ||
"blockHash": "0xfe8e45b03577ed9c3311a4788fa0ea0ec25c63900d90aca0558726769d433ad8", | ||
"transactionHash": "0x2879800b53fc262824424fa8e2991eef22cb28ee70873ae8357f3d01c2ca25cb", | ||
"gasUsed": "671290", | ||
"logsBloom": "0x00000000000000000001000000010000400000000000000000800000000800000000100000000000000000000000000000000000000000000000000000000000000088000000000000000000000002000001000000000000000000000000000000000100020000000000000000000800000000800000000000000000000000400000000000000000000000000000000000000000000080000000000000800000000040000000000000000000000400000000000000000000000000000000000000000020000000000000000000040000000000000400000001000000000020000000000000000000000000000000000000000000000000000000000000000000", | ||
"blockHash": "0xd4ed83b576f0039b7e26a505c8df1ca588b25a24154764485579247ac0a7ed50", | ||
"transactionHash": "0xa43fa9f0b9bcda4b231823170bdf90595b94f4898f019776b7efdb61fa386509", | ||
"logs": [ | ||
{ | ||
"transactionIndex": 2, | ||
"blockNumber": 528882, | ||
"transactionHash": "0x2879800b53fc262824424fa8e2991eef22cb28ee70873ae8357f3d01c2ca25cb", | ||
"address": "0x04f435Fe891dB408Bbb47bfaEfe8163556B72ECB", | ||
"blockNumber": 611972, | ||
"transactionHash": "0xa43fa9f0b9bcda4b231823170bdf90595b94f4898f019776b7efdb61fa386509", | ||
"address": "0x357C3407a034C59e33F51E77f3c72014E94c3C84", | ||
"topics": [ | ||
"0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b", | ||
"0x000000000000000000000000a40d355e856d600bf139439bd025577d82864639" | ||
"0x0000000000000000000000001b37b7bb5bd6225146f182657d679a36a2afa25c" | ||
], | ||
"data": "0x", | ||
"logIndex": 1, | ||
"blockHash": "0xfe8e45b03577ed9c3311a4788fa0ea0ec25c63900d90aca0558726769d433ad8" | ||
"logIndex": 6, | ||
"blockHash": "0xd4ed83b576f0039b7e26a505c8df1ca588b25a24154764485579247ac0a7ed50" | ||
}, | ||
{ | ||
"transactionIndex": 2, | ||
"blockNumber": 528882, | ||
"transactionHash": "0x2879800b53fc262824424fa8e2991eef22cb28ee70873ae8357f3d01c2ca25cb", | ||
"address": "0x04f435Fe891dB408Bbb47bfaEfe8163556B72ECB", | ||
"blockNumber": 611972, | ||
"transactionHash": "0xa43fa9f0b9bcda4b231823170bdf90595b94f4898f019776b7efdb61fa386509", | ||
"address": "0x357C3407a034C59e33F51E77f3c72014E94c3C84", | ||
"topics": [ | ||
@@ -172,10 +172,10 @@ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", | ||
"data": "0x", | ||
"logIndex": 2, | ||
"blockHash": "0xfe8e45b03577ed9c3311a4788fa0ea0ec25c63900d90aca0558726769d433ad8" | ||
"logIndex": 7, | ||
"blockHash": "0xd4ed83b576f0039b7e26a505c8df1ca588b25a24154764485579247ac0a7ed50" | ||
}, | ||
{ | ||
"transactionIndex": 2, | ||
"blockNumber": 528882, | ||
"transactionHash": "0x2879800b53fc262824424fa8e2991eef22cb28ee70873ae8357f3d01c2ca25cb", | ||
"address": "0x04f435Fe891dB408Bbb47bfaEfe8163556B72ECB", | ||
"blockNumber": 611972, | ||
"transactionHash": "0xa43fa9f0b9bcda4b231823170bdf90595b94f4898f019776b7efdb61fa386509", | ||
"address": "0x357C3407a034C59e33F51E77f3c72014E94c3C84", | ||
"topics": [ | ||
@@ -185,10 +185,10 @@ "0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498" | ||
"data": "0x0000000000000000000000000000000000000000000000000000000000000001", | ||
"logIndex": 3, | ||
"blockHash": "0xfe8e45b03577ed9c3311a4788fa0ea0ec25c63900d90aca0558726769d433ad8" | ||
"logIndex": 8, | ||
"blockHash": "0xd4ed83b576f0039b7e26a505c8df1ca588b25a24154764485579247ac0a7ed50" | ||
}, | ||
{ | ||
"transactionIndex": 2, | ||
"blockNumber": 528882, | ||
"transactionHash": "0x2879800b53fc262824424fa8e2991eef22cb28ee70873ae8357f3d01c2ca25cb", | ||
"address": "0x04f435Fe891dB408Bbb47bfaEfe8163556B72ECB", | ||
"blockNumber": 611972, | ||
"transactionHash": "0xa43fa9f0b9bcda4b231823170bdf90595b94f4898f019776b7efdb61fa386509", | ||
"address": "0x357C3407a034C59e33F51E77f3c72014E94c3C84", | ||
"topics": [ | ||
@@ -198,8 +198,8 @@ "0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f" | ||
"data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000848fd1389a5d58e97a75566f847c0a7620e224e9", | ||
"logIndex": 4, | ||
"blockHash": "0xfe8e45b03577ed9c3311a4788fa0ea0ec25c63900d90aca0558726769d433ad8" | ||
"logIndex": 9, | ||
"blockHash": "0xd4ed83b576f0039b7e26a505c8df1ca588b25a24154764485579247ac0a7ed50" | ||
} | ||
], | ||
"blockNumber": 528882, | ||
"cumulativeGasUsed": "1334022", | ||
"blockNumber": 611972, | ||
"cumulativeGasUsed": "845317", | ||
"status": 1, | ||
@@ -209,3 +209,3 @@ "byzantium": true | ||
"args": [ | ||
"0xA40d355e856D600bf139439BD025577d82864639", | ||
"0x1B37B7bb5Bd6225146F182657D679a36A2AFA25c", | ||
"0x848FD1389a5d58e97a75566f847C0a7620E224e9", | ||
@@ -212,0 +212,0 @@ "0x8129fc1c" |
{ | ||
"name": "@tcg-game/contracts", | ||
"description": "TCG game contracts", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"author": { | ||
@@ -87,3 +87,3 @@ "name": "jump" | ||
"test": "hardhat test", | ||
"test:simple": "hardhat test test/deck.ts", | ||
"test:simple": "hardhat test test/deck.ts test/accountManager.ts", | ||
"typechain": "cross-env TS_NODE_TRANSPILE_ONLY=true hardhat typechain", | ||
@@ -90,0 +90,0 @@ "coverage": "hardhat coverage --solcoverjs ./.solcover.js --temp artifacts --testfiles \"test/**/*.ts\" && npm run typechain" |
@@ -33,6 +33,9 @@ /* Autogenerated file. Do not edit manually. */ | ||
"accounts(address)": FunctionFragment; | ||
"create()": FunctionFragment; | ||
"getCurGameId(address)": FunctionFragment; | ||
"getCurGameIds(address[])": FunctionFragment; | ||
"getCurGameInfo(address)": FunctionFragment; | ||
"initialize()": FunctionFragment; | ||
"join(address,uint256)": FunctionFragment; | ||
"join(uint256)": FunctionFragment; | ||
"largestGameId()": FunctionFragment; | ||
"owner()": FunctionFragment; | ||
@@ -42,2 +45,4 @@ "registerContract(address)": FunctionFragment; | ||
"renounceOwnership()": FunctionFragment; | ||
"rooms(uint256,uint256)": FunctionFragment; | ||
"settlePlayers(uint256,address[])": FunctionFragment; | ||
"settleSinglePlayer(uint256,address)": FunctionFragment; | ||
@@ -51,6 +56,9 @@ "transferOwnership(address)": FunctionFragment; | ||
| "accounts" | ||
| "create" | ||
| "getCurGameId" | ||
| "getCurGameIds" | ||
| "getCurGameInfo" | ||
| "initialize" | ||
| "join" | ||
| "largestGameId" | ||
| "owner" | ||
@@ -60,2 +68,4 @@ | "registerContract" | ||
| "renounceOwnership" | ||
| "rooms" | ||
| "settlePlayers" | ||
| "settleSinglePlayer" | ||
@@ -70,2 +80,3 @@ | "transferOwnership" | ||
): string; | ||
encodeFunctionData(functionFragment: "create", values?: undefined): string; | ||
encodeFunctionData( | ||
@@ -80,2 +91,6 @@ functionFragment: "getCurGameId", | ||
encodeFunctionData( | ||
functionFragment: "getCurGameInfo", | ||
values: [PromiseOrValue<string>] | ||
): string; | ||
encodeFunctionData( | ||
functionFragment: "initialize", | ||
@@ -86,4 +101,8 @@ values?: undefined | ||
functionFragment: "join", | ||
values: [PromiseOrValue<string>, PromiseOrValue<BigNumberish>] | ||
values: [PromiseOrValue<BigNumberish>] | ||
): string; | ||
encodeFunctionData( | ||
functionFragment: "largestGameId", | ||
values?: undefined | ||
): string; | ||
encodeFunctionData(functionFragment: "owner", values?: undefined): string; | ||
@@ -103,2 +122,10 @@ encodeFunctionData( | ||
encodeFunctionData( | ||
functionFragment: "rooms", | ||
values: [PromiseOrValue<BigNumberish>, PromiseOrValue<BigNumberish>] | ||
): string; | ||
encodeFunctionData( | ||
functionFragment: "settlePlayers", | ||
values: [PromiseOrValue<BigNumberish>, PromiseOrValue<string>[]] | ||
): string; | ||
encodeFunctionData( | ||
functionFragment: "settleSinglePlayer", | ||
@@ -117,2 +144,3 @@ values: [PromiseOrValue<BigNumberish>, PromiseOrValue<string>] | ||
decodeFunctionResult(functionFragment: "accounts", data: BytesLike): Result; | ||
decodeFunctionResult(functionFragment: "create", data: BytesLike): Result; | ||
decodeFunctionResult( | ||
@@ -126,4 +154,12 @@ functionFragment: "getCurGameId", | ||
): Result; | ||
decodeFunctionResult( | ||
functionFragment: "getCurGameInfo", | ||
data: BytesLike | ||
): Result; | ||
decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; | ||
decodeFunctionResult(functionFragment: "join", data: BytesLike): Result; | ||
decodeFunctionResult( | ||
functionFragment: "largestGameId", | ||
data: BytesLike | ||
): Result; | ||
decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; | ||
@@ -142,3 +178,8 @@ decodeFunctionResult( | ||
): Result; | ||
decodeFunctionResult(functionFragment: "rooms", data: BytesLike): Result; | ||
decodeFunctionResult( | ||
functionFragment: "settlePlayers", | ||
data: BytesLike | ||
): Result; | ||
decodeFunctionResult( | ||
functionFragment: "settleSinglePlayer", | ||
@@ -157,3 +198,5 @@ data: BytesLike | ||
events: { | ||
"Created(address,uint256)": EventFragment; | ||
"Initialized(uint8)": EventFragment; | ||
"Joined(address,uint256)": EventFragment; | ||
"OwnershipTransferred(address,address)": EventFragment; | ||
@@ -163,3 +206,5 @@ "Settled(address,uint256)": EventFragment; | ||
getEvent(nameOrSignatureOrTopic: "Created"): EventFragment; | ||
getEvent(nameOrSignatureOrTopic: "Initialized"): EventFragment; | ||
getEvent(nameOrSignatureOrTopic: "Joined"): EventFragment; | ||
getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment; | ||
@@ -169,2 +214,10 @@ getEvent(nameOrSignatureOrTopic: "Settled"): EventFragment; | ||
export interface CreatedEventObject { | ||
player: string; | ||
gameId: BigNumber; | ||
} | ||
export type CreatedEvent = TypedEvent<[string, BigNumber], CreatedEventObject>; | ||
export type CreatedEventFilter = TypedEventFilter<CreatedEvent>; | ||
export interface InitializedEventObject { | ||
@@ -177,2 +230,10 @@ version: number; | ||
export interface JoinedEventObject { | ||
player: string; | ||
gameId: BigNumber; | ||
} | ||
export type JoinedEvent = TypedEvent<[string, BigNumber], JoinedEventObject>; | ||
export type JoinedEventFilter = TypedEventFilter<JoinedEvent>; | ||
export interface OwnershipTransferredEventObject { | ||
@@ -230,2 +291,6 @@ previousOwner: string; | ||
create( | ||
overrides?: Overrides & { from?: PromiseOrValue<string> } | ||
): Promise<ContractTransaction>; | ||
getCurGameId( | ||
@@ -241,2 +306,13 @@ player: PromiseOrValue<string>, | ||
getCurGameInfo( | ||
player: PromiseOrValue<string>, | ||
overrides?: CallOverrides | ||
): Promise< | ||
[BigNumber, string, string] & { | ||
gameId: BigNumber; | ||
creator: string; | ||
joiner: string; | ||
} | ||
>; | ||
initialize( | ||
@@ -247,3 +323,2 @@ overrides?: Overrides & { from?: PromiseOrValue<string> } | ||
join( | ||
player: PromiseOrValue<string>, | ||
gameId: PromiseOrValue<BigNumberish>, | ||
@@ -253,2 +328,4 @@ overrides?: Overrides & { from?: PromiseOrValue<string> } | ||
largestGameId(overrides?: CallOverrides): Promise<[BigNumber]>; | ||
owner(overrides?: CallOverrides): Promise<[string]>; | ||
@@ -270,2 +347,14 @@ | ||
rooms( | ||
arg0: PromiseOrValue<BigNumberish>, | ||
arg1: PromiseOrValue<BigNumberish>, | ||
overrides?: CallOverrides | ||
): Promise<[string]>; | ||
settlePlayers( | ||
gameId: PromiseOrValue<BigNumberish>, | ||
players: PromiseOrValue<string>[], | ||
overrides?: Overrides & { from?: PromiseOrValue<string> } | ||
): Promise<ContractTransaction>; | ||
settleSinglePlayer( | ||
@@ -293,2 +382,6 @@ gameId: PromiseOrValue<BigNumberish>, | ||
create( | ||
overrides?: Overrides & { from?: PromiseOrValue<string> } | ||
): Promise<ContractTransaction>; | ||
getCurGameId( | ||
@@ -304,2 +397,13 @@ player: PromiseOrValue<string>, | ||
getCurGameInfo( | ||
player: PromiseOrValue<string>, | ||
overrides?: CallOverrides | ||
): Promise< | ||
[BigNumber, string, string] & { | ||
gameId: BigNumber; | ||
creator: string; | ||
joiner: string; | ||
} | ||
>; | ||
initialize( | ||
@@ -310,3 +414,2 @@ overrides?: Overrides & { from?: PromiseOrValue<string> } | ||
join( | ||
player: PromiseOrValue<string>, | ||
gameId: PromiseOrValue<BigNumberish>, | ||
@@ -316,2 +419,4 @@ overrides?: Overrides & { from?: PromiseOrValue<string> } | ||
largestGameId(overrides?: CallOverrides): Promise<BigNumber>; | ||
owner(overrides?: CallOverrides): Promise<string>; | ||
@@ -333,2 +438,14 @@ | ||
rooms( | ||
arg0: PromiseOrValue<BigNumberish>, | ||
arg1: PromiseOrValue<BigNumberish>, | ||
overrides?: CallOverrides | ||
): Promise<string>; | ||
settlePlayers( | ||
gameId: PromiseOrValue<BigNumberish>, | ||
players: PromiseOrValue<string>[], | ||
overrides?: Overrides & { from?: PromiseOrValue<string> } | ||
): Promise<ContractTransaction>; | ||
settleSinglePlayer( | ||
@@ -356,2 +473,4 @@ gameId: PromiseOrValue<BigNumberish>, | ||
create(overrides?: CallOverrides): Promise<void>; | ||
getCurGameId( | ||
@@ -367,6 +486,16 @@ player: PromiseOrValue<string>, | ||
getCurGameInfo( | ||
player: PromiseOrValue<string>, | ||
overrides?: CallOverrides | ||
): Promise< | ||
[BigNumber, string, string] & { | ||
gameId: BigNumber; | ||
creator: string; | ||
joiner: string; | ||
} | ||
>; | ||
initialize(overrides?: CallOverrides): Promise<void>; | ||
join( | ||
player: PromiseOrValue<string>, | ||
gameId: PromiseOrValue<BigNumberish>, | ||
@@ -376,2 +505,4 @@ overrides?: CallOverrides | ||
largestGameId(overrides?: CallOverrides): Promise<BigNumber>; | ||
owner(overrides?: CallOverrides): Promise<string>; | ||
@@ -391,2 +522,14 @@ | ||
rooms( | ||
arg0: PromiseOrValue<BigNumberish>, | ||
arg1: PromiseOrValue<BigNumberish>, | ||
overrides?: CallOverrides | ||
): Promise<string>; | ||
settlePlayers( | ||
gameId: PromiseOrValue<BigNumberish>, | ||
players: PromiseOrValue<string>[], | ||
overrides?: CallOverrides | ||
): Promise<void>; | ||
settleSinglePlayer( | ||
@@ -410,5 +553,23 @@ gameId: PromiseOrValue<BigNumberish>, | ||
filters: { | ||
"Created(address,uint256)"( | ||
player?: PromiseOrValue<string> | null, | ||
gameId?: PromiseOrValue<BigNumberish> | null | ||
): CreatedEventFilter; | ||
Created( | ||
player?: PromiseOrValue<string> | null, | ||
gameId?: PromiseOrValue<BigNumberish> | null | ||
): CreatedEventFilter; | ||
"Initialized(uint8)"(version?: null): InitializedEventFilter; | ||
Initialized(version?: null): InitializedEventFilter; | ||
"Joined(address,uint256)"( | ||
player?: PromiseOrValue<string> | null, | ||
gameId?: PromiseOrValue<BigNumberish> | null | ||
): JoinedEventFilter; | ||
Joined( | ||
player?: PromiseOrValue<string> | null, | ||
gameId?: PromiseOrValue<BigNumberish> | null | ||
): JoinedEventFilter; | ||
"OwnershipTransferred(address,address)"( | ||
@@ -439,2 +600,6 @@ previousOwner?: PromiseOrValue<string> | null, | ||
create( | ||
overrides?: Overrides & { from?: PromiseOrValue<string> } | ||
): Promise<BigNumber>; | ||
getCurGameId( | ||
@@ -450,2 +615,7 @@ player: PromiseOrValue<string>, | ||
getCurGameInfo( | ||
player: PromiseOrValue<string>, | ||
overrides?: CallOverrides | ||
): Promise<BigNumber>; | ||
initialize( | ||
@@ -456,3 +626,2 @@ overrides?: Overrides & { from?: PromiseOrValue<string> } | ||
join( | ||
player: PromiseOrValue<string>, | ||
gameId: PromiseOrValue<BigNumberish>, | ||
@@ -462,2 +631,4 @@ overrides?: Overrides & { from?: PromiseOrValue<string> } | ||
largestGameId(overrides?: CallOverrides): Promise<BigNumber>; | ||
owner(overrides?: CallOverrides): Promise<BigNumber>; | ||
@@ -479,2 +650,14 @@ | ||
rooms( | ||
arg0: PromiseOrValue<BigNumberish>, | ||
arg1: PromiseOrValue<BigNumberish>, | ||
overrides?: CallOverrides | ||
): Promise<BigNumber>; | ||
settlePlayers( | ||
gameId: PromiseOrValue<BigNumberish>, | ||
players: PromiseOrValue<string>[], | ||
overrides?: Overrides & { from?: PromiseOrValue<string> } | ||
): Promise<BigNumber>; | ||
settleSinglePlayer( | ||
@@ -503,2 +686,6 @@ gameId: PromiseOrValue<BigNumberish>, | ||
create( | ||
overrides?: Overrides & { from?: PromiseOrValue<string> } | ||
): Promise<PopulatedTransaction>; | ||
getCurGameId( | ||
@@ -514,2 +701,7 @@ player: PromiseOrValue<string>, | ||
getCurGameInfo( | ||
player: PromiseOrValue<string>, | ||
overrides?: CallOverrides | ||
): Promise<PopulatedTransaction>; | ||
initialize( | ||
@@ -520,3 +712,2 @@ overrides?: Overrides & { from?: PromiseOrValue<string> } | ||
join( | ||
player: PromiseOrValue<string>, | ||
gameId: PromiseOrValue<BigNumberish>, | ||
@@ -526,2 +717,4 @@ overrides?: Overrides & { from?: PromiseOrValue<string> } | ||
largestGameId(overrides?: CallOverrides): Promise<PopulatedTransaction>; | ||
owner(overrides?: CallOverrides): Promise<PopulatedTransaction>; | ||
@@ -543,2 +736,14 @@ | ||
rooms( | ||
arg0: PromiseOrValue<BigNumberish>, | ||
arg1: PromiseOrValue<BigNumberish>, | ||
overrides?: CallOverrides | ||
): Promise<PopulatedTransaction>; | ||
settlePlayers( | ||
gameId: PromiseOrValue<BigNumberish>, | ||
players: PromiseOrValue<string>[], | ||
overrides?: Overrides & { from?: PromiseOrValue<string> } | ||
): Promise<PopulatedTransaction>; | ||
settleSinglePlayer( | ||
@@ -545,0 +750,0 @@ gameId: PromiseOrValue<BigNumberish>, |
@@ -5,2 +5,1 @@ /* Autogenerated file. Do not edit manually. */ | ||
export type { AccountManager } from "./AccountManager"; | ||
export type { IAccountManager } from "./IAccountManager"; |
@@ -17,2 +17,21 @@ /* Autogenerated file. Do not edit manually. */ | ||
{ | ||
indexed: true, | ||
internalType: "address", | ||
name: "player", | ||
type: "address", | ||
}, | ||
{ | ||
indexed: true, | ||
internalType: "uint256", | ||
name: "gameId", | ||
type: "uint256", | ||
}, | ||
], | ||
name: "Created", | ||
type: "event", | ||
}, | ||
{ | ||
anonymous: false, | ||
inputs: [ | ||
{ | ||
indexed: false, | ||
@@ -33,2 +52,21 @@ internalType: "uint8", | ||
internalType: "address", | ||
name: "player", | ||
type: "address", | ||
}, | ||
{ | ||
indexed: true, | ||
internalType: "uint256", | ||
name: "gameId", | ||
type: "uint256", | ||
}, | ||
], | ||
name: "Joined", | ||
type: "event", | ||
}, | ||
{ | ||
anonymous: false, | ||
inputs: [ | ||
{ | ||
indexed: true, | ||
internalType: "address", | ||
name: "previousOwner", | ||
@@ -86,2 +124,9 @@ type: "address", | ||
{ | ||
inputs: [], | ||
name: "create", | ||
outputs: [], | ||
stateMutability: "nonpayable", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [ | ||
@@ -125,2 +170,31 @@ { | ||
{ | ||
inputs: [ | ||
{ | ||
internalType: "address", | ||
name: "player", | ||
type: "address", | ||
}, | ||
], | ||
name: "getCurGameInfo", | ||
outputs: [ | ||
{ | ||
internalType: "uint256", | ||
name: "gameId", | ||
type: "uint256", | ||
}, | ||
{ | ||
internalType: "address", | ||
name: "creator", | ||
type: "address", | ||
}, | ||
{ | ||
internalType: "address", | ||
name: "joiner", | ||
type: "address", | ||
}, | ||
], | ||
stateMutability: "view", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [], | ||
@@ -135,7 +209,2 @@ name: "initialize", | ||
{ | ||
internalType: "address", | ||
name: "player", | ||
type: "address", | ||
}, | ||
{ | ||
internalType: "uint256", | ||
@@ -153,2 +222,15 @@ name: "gameId", | ||
inputs: [], | ||
name: "largestGameId", | ||
outputs: [ | ||
{ | ||
internalType: "uint256", | ||
name: "", | ||
type: "uint256", | ||
}, | ||
], | ||
stateMutability: "view", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [], | ||
name: "owner", | ||
@@ -208,2 +290,26 @@ outputs: [ | ||
internalType: "uint256", | ||
name: "", | ||
type: "uint256", | ||
}, | ||
{ | ||
internalType: "uint256", | ||
name: "", | ||
type: "uint256", | ||
}, | ||
], | ||
name: "rooms", | ||
outputs: [ | ||
{ | ||
internalType: "address", | ||
name: "", | ||
type: "address", | ||
}, | ||
], | ||
stateMutability: "view", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [ | ||
{ | ||
internalType: "uint256", | ||
name: "gameId", | ||
@@ -213,2 +319,20 @@ type: "uint256", | ||
{ | ||
internalType: "address[]", | ||
name: "players", | ||
type: "address[]", | ||
}, | ||
], | ||
name: "settlePlayers", | ||
outputs: [], | ||
stateMutability: "nonpayable", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [ | ||
{ | ||
internalType: "uint256", | ||
name: "gameId", | ||
type: "uint256", | ||
}, | ||
{ | ||
internalType: "address", | ||
@@ -253,3 +377,3 @@ name: "player", | ||
const _bytecode = | ||
"0x608060405234801561001057600080fd5b5061099b806100206000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c8063a06617cd11610071578063a06617cd1461013f578063ad6f6e8914610172578063cc6fcf721461019b578063ce8af54b146101bb578063f2fde38b146101ce578063fac2c621146101e157600080fd5b806322a5dde4146100b95780633b4da69f146100ce5780635e5c06e2146100e1578063715018a6146101145780638129fc1c1461011c5780638da5cb5b14610124575b600080fd5b6100cc6100c73660046107bf565b6101f4565b005b6100cc6100dc3660046107e1565b610243565b6101016100ef3660046107bf565b60656020526000908152604090205481565b6040519081526020015b60405180910390f35b6100cc6102c2565b6100cc6102d6565b6033546040516001600160a01b03909116815260200161010b565b61016261014d3660046107bf565b60666020526000908152604090205460ff1681565b604051901515815260200161010b565b6101016101803660046107bf565b6001600160a01b031660009081526065602052604090205490565b6101ae6101a936600461080b565b6103e6565b60405161010b9190610880565b6100cc6101c93660046108c4565b6104bd565b6100cc6101dc3660046107bf565b6105dd565b6100cc6101ef3660046107bf565b610653565b6101fc61069d565b6001600160a01b03811660009081526066602052604090205460ff16610240576001600160a01b0381166000908152606660205260409020805460ff191660011790555b50565b6001600160a01b038216600090815260656020526040902054156102a65760405162461bcd60e51b8152602060048201526015602482015274416c7265616479206a6f696e656420612067616d6560581b60448201526064015b60405180910390fd5b6001600160a01b03909116600090815260656020526040902055565b6102ca61069d565b6102d460006106f7565b565b600054610100900460ff16158080156102f65750600054600160ff909116105b806103105750303b158015610310575060005460ff166001145b6103735760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161029d565b6000805460ff191660011790558015610396576000805461ff0019166101001790555b61039e610749565b8015610240576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b60608167ffffffffffffffff811115610401576104016108f0565b60405190808252806020026020018201604052801561042a578160200160208202803683370190505b50905060005b828110156104b6576065600085858481811061044e5761044e610906565b905060200201602081019061046391906107bf565b6001600160a01b03166001600160a01b031681526020019081526020016000206000015482828151811061049957610499610906565b6020908102919091010152806104ae8161091c565b915050610430565b5092915050565b3360009081526066602052604090205460ff1661051c5760405162461bcd60e51b815260206004820152601760248201527f4e6f74207265676973746572656420636f6e7472616374000000000000000000604482015260640161029d565b6001600160a01b03811660009081526065602052604090205482146105965760405162461bcd60e51b815260206004820152602a60248201527f506c61796572206e6f7420696e207468652067616d652073706563696669656460448201526908189e4819d85b59525960b21b606482015260840161029d565b6001600160a01b038116600081815260656020526040808220829055518492917f7823e479a1a4ebe2418874847436f8a1680c5ee5b17f38bb59dbff28e1b4555291a35050565b6105e561069d565b6001600160a01b03811661064a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161029d565b610240816106f7565b61065b61069d565b6001600160a01b03811660009081526066602052604090205460ff1615610240576001600160a01b03166000908152606660205260409020805460ff19169055565b6033546001600160a01b031633146102d45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161029d565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166107705760405162461bcd60e51b815260040161029d90610943565b6102d4600054610100900460ff1661079a5760405162461bcd60e51b815260040161029d90610943565b6102d4336106f7565b80356001600160a01b03811681146107ba57600080fd5b919050565b6000602082840312156107d157600080fd5b6107da826107a3565b9392505050565b600080604083850312156107f457600080fd5b6107fd836107a3565b946020939093013593505050565b6000806020838503121561081e57600080fd5b823567ffffffffffffffff8082111561083657600080fd5b818501915085601f83011261084a57600080fd5b81358181111561085957600080fd5b8660208260051b850101111561086e57600080fd5b60209290920196919550909350505050565b6020808252825182820181905260009190848201906040850190845b818110156108b85783518352928401929184019160010161089c565b50909695505050505050565b600080604083850312156108d757600080fd5b823591506108e7602084016107a3565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60006001820161093c57634e487b7160e01b600052601160045260246000fd5b5060010190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea164736f6c6343000811000a"; | ||
"0x608060405234801561001057600080fd5b50610dc3806100206000396000f3fe608060405234801561001057600080fd5b506004361061010b5760003560e01c8063a06617cd116100a2578063e489a3a811610071578063e489a3a814610259578063efc81a8c14610262578063f2fde38b1461026a578063f4e591231461027d578063fac2c621146102b557600080fd5b8063a06617cd146101ca578063ad6f6e89146101fd578063cc6fcf7214610226578063ce8af54b1461024657600080fd5b80637f3c4519116100de5780637f3c4519146101735780638129fc1c1461019e5780638da5cb5b146101a65780638f779735146101b757600080fd5b8063049878f31461011057806322a5dde4146101255780635e5c06e214610138578063715018a61461016b575b600080fd5b61012361011e366004610b55565b6102c8565b005b610123610133366004610b8a565b6103dc565b610158610146366004610b8a565b60656020526000908152604090205481565b6040519081526020015b60405180910390f35b61012361042b565b610186610181366004610bac565b61043f565b6040516001600160a01b039091168152602001610162565b610123610477565b6033546001600160a01b0316610186565b6101236101c5366004610c1a565b610587565b6101ed6101d8366004610b8a565b60676020526000908152604090205460ff1681565b6040519015158152602001610162565b61015861020b366004610b8a565b6001600160a01b031660009081526065602052604090205490565b610239610234366004610c66565b61062e565b6040516101629190610ca8565b610123610254366004610cec565b610705565b61015860685481565b61012361081f565b610123610278366004610b8a565b6108f7565b61029061028b366004610b8a565b61096d565b604080519384526001600160a01b039283166020850152911690820152606001610162565b6101236102c3366004610b8a565b610a05565b33600090815260656020526040902054156103225760405162461bcd60e51b8152602060048201526015602482015274416c7265616479206a6f696e656420612067616d6560581b60448201526064015b60405180910390fd5b6000818152606660205260409020546001146103725760405162461bcd60e51b815260206004820152600f60248201526e496e76616c696420706c617965727360881b6044820152606401610319565b33600081815260656020908152604080832085905584835260668252808320805460018101825590845291832090910180546001600160a01b03191684179055518392917f49f8fa5eee2e3f21251c2e968640dcaef35cb9332429eb059bb3cd56ddc2533d91a350565b6103e4610a4f565b6001600160a01b03811660009081526067602052604090205460ff16610428576001600160a01b0381166000908152606760205260409020805460ff191660011790555b50565b610433610a4f565b61043d6000610aa9565b565b6066602052816000526040600020818154811061045b57600080fd5b6000918252602090912001546001600160a01b03169150829050565b600054610100900460ff16158080156104975750600054600160ff909116105b806104b15750303b1580156104b1575060005460ff166001145b6105145760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610319565b6000805460ff191660011790558015610537576000805461ff0019166101001790555b61053f610afb565b8015610428576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b3360009081526067602052604090205460ff166105e05760405162461bcd60e51b8152602060048201526017602482015276139bdd081c9959da5cdd195c99590818dbdb9d1c9858dd604a1b6044820152606401610319565b60005b81811015610628576106168484848481811061060157610601610d18565b90506020020160208101906102549190610b8a565b8061062081610d2e565b9150506105e3565b50505050565b60608167ffffffffffffffff81111561064957610649610d55565b604051908082528060200260200182016040528015610672578160200160208202803683370190505b50905060005b828110156106fe576065600085858481811061069657610696610d18565b90506020020160208101906106ab9190610b8a565b6001600160a01b03166001600160a01b03168152602001908152602001600020600001548282815181106106e1576106e1610d18565b6020908102919091010152806106f681610d2e565b915050610678565b5092915050565b3360009081526067602052604090205460ff1661075e5760405162461bcd60e51b8152602060048201526017602482015276139bdd081c9959da5cdd195c99590818dbdb9d1c9858dd604a1b6044820152606401610319565b6001600160a01b03811660009081526065602052604090205482146107d85760405162461bcd60e51b815260206004820152602a60248201527f506c61796572206e6f7420696e207468652067616d652073706563696669656460448201526908189e4819d85b59525960b21b6064820152608401610319565b6001600160a01b038116600081815260656020526040808220829055518492917f7823e479a1a4ebe2418874847436f8a1680c5ee5b17f38bb59dbff28e1b4555291a35050565b60686000815461082e90610d2e565b9091555033600090815260656020526040902054156108875760405162461bcd60e51b8152602060048201526015602482015274416c7265616479206a6f696e656420612067616d6560581b6044820152606401610319565b606880543360008181526065602090815260408083208590559382526066815283822080546001810182559083529082200180546001600160a01b0319168317905592549151919290917f0ce3610e89a4bb9ec9359763f99110ed52a4abaea0b62028a1637e242ca2768b9190a3565b6108ff610a4f565b6001600160a01b0381166109645760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610319565b61042881610aa9565b6001600160a01b03811660009081526065602090815260408083205480845260669092528220805491929182919082906109a9576109a9610d18565b60009182526020808320909101548583526066909152604090912080546001600160a01b0390921693509060019081106109e5576109e5610d18565b6000918252602090912001549294919350506001600160a01b0390911690565b610a0d610a4f565b6001600160a01b03811660009081526067602052604090205460ff1615610428576001600160a01b03166000908152606760205260409020805460ff19169055565b6033546001600160a01b0316331461043d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610319565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff16610b225760405162461bcd60e51b815260040161031990610d6b565b61043d600054610100900460ff16610b4c5760405162461bcd60e51b815260040161031990610d6b565b61043d33610aa9565b600060208284031215610b6757600080fd5b5035919050565b80356001600160a01b0381168114610b8557600080fd5b919050565b600060208284031215610b9c57600080fd5b610ba582610b6e565b9392505050565b60008060408385031215610bbf57600080fd5b50508035926020909101359150565b60008083601f840112610be057600080fd5b50813567ffffffffffffffff811115610bf857600080fd5b6020830191508360208260051b8501011115610c1357600080fd5b9250929050565b600080600060408486031215610c2f57600080fd5b83359250602084013567ffffffffffffffff811115610c4d57600080fd5b610c5986828701610bce565b9497909650939450505050565b60008060208385031215610c7957600080fd5b823567ffffffffffffffff811115610c9057600080fd5b610c9c85828601610bce565b90969095509350505050565b6020808252825182820181905260009190848201906040850190845b81811015610ce057835183529284019291840191600101610cc4565b50909695505050505050565b60008060408385031215610cff57600080fd5b82359150610d0f60208401610b6e565b90509250929050565b634e487b7160e01b600052603260045260246000fd5b600060018201610d4e57634e487b7160e01b600052601160045260246000fd5b5060010190565b634e487b7160e01b600052604160045260246000fd5b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea164736f6c6343000811000a"; | ||
@@ -256,0 +380,0 @@ type AccountManagerConstructorParams = |
@@ -5,2 +5,1 @@ /* Autogenerated file. Do not edit manually. */ | ||
export { AccountManager__factory } from "./AccountManager__factory"; | ||
export { IAccountManager__factory } from "./IAccountManager__factory"; |
@@ -17,4 +17,2 @@ /* Autogenerated file. Do not edit manually. */ | ||
export { AccountManager__factory } from "./factories/contracts/account/AccountManager__factory"; | ||
export type { IAccountManager } from "./contracts/account/IAccountManager"; | ||
export { IAccountManager__factory } from "./factories/contracts/account/IAccountManager__factory"; | ||
export type { ITCGConfigManager } from "./contracts/config/ITCGConfigManager"; | ||
@@ -21,0 +19,0 @@ export { ITCGConfigManager__factory } from "./factories/contracts/config/ITCGConfigManager__factory"; |
Sorry, the diff of this file is too big to display
1119000
19921
54