Source Code
Overview
ETH Balance
0 ETH
More Info
ContractCreator
Multichain Info
N/A
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Initialize | 5600779 | 4 days ago | IN | 0 ETH | 0.00000194 |
Latest 25 internal transactions (View All)
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
5641882 | 3 days ago | 0 ETH | ||||
5641882 | 3 days ago | 0 ETH | ||||
5641882 | 3 days ago | 0 ETH | ||||
5641882 | 3 days ago | 0 ETH | ||||
5641882 | 3 days ago | 0 ETH | ||||
5641834 | 3 days ago | 0 ETH | ||||
5641834 | 3 days ago | 0 ETH | ||||
5641834 | 3 days ago | 0 ETH | ||||
5641834 | 3 days ago | 0 ETH | ||||
5641834 | 3 days ago | 0 ETH | ||||
5641834 | 3 days ago | 0 ETH | ||||
5641834 | 3 days ago | 0 ETH | ||||
5641834 | 3 days ago | 0 ETH | ||||
5641834 | 3 days ago | 0 ETH | ||||
5641834 | 3 days ago | 0 ETH | ||||
5640339 | 3 days ago | 0 ETH | ||||
5640339 | 3 days ago | 0 ETH | ||||
5640339 | 3 days ago | 0 ETH | ||||
5640339 | 3 days ago | 0 ETH | ||||
5640339 | 3 days ago | 0 ETH | ||||
5640135 | 3 days ago | 0 ETH | ||||
5640135 | 3 days ago | 0 ETH | ||||
5640135 | 3 days ago | 0 ETH | ||||
5640135 | 3 days ago | 0 ETH | ||||
5640135 | 3 days ago | 0 ETH |
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Source Code Verified (Exact Match)
Contract Name:
GigaRomNFTBeforeUpdateHandler
Compiler Version
v0.8.28+commit.7893614a
ZkSolc Version
v1.5.7
Optimization Enabled:
Yes with Mode 3
Other Settings:
cancun EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT LICENSE pragma solidity ^0.8.9; import {IERC721UpdateHandler} from "../IERC721UpdateHandler.sol"; import {GameRegistryConsumer} from "../../core/GameRegistryConsumer.sol"; import {IAccountSystem, ID as ACCOUNT_SYSTEM_ID} from "../../accountsystem/IAccountSystem.sol"; import {IGigaRomNFT, ID as GIGA_ROM_NFT_ID} from "./IGigaRomNFT.sol"; uint256 constant ID = uint256(keccak256("game.gigaverse.updateHandler.gigaromnft")); contract GigaRomNFTBeforeUpdateHandler is IERC721UpdateHandler, GameRegistryConsumer { constructor(address gameRegistryAddress) GameRegistryConsumer(gameRegistryAddress, ID) {} /** * Before transfer hook for NFTs. Performs any trait checks needed before transfer * * @param tokenContract Address of the token contract * @param to Address of the recipient * @param tokenId Token ID */ function update( address tokenContract, address to, uint256 tokenId, address //auth ) external override { require(msg.sender == tokenContract, "Unauthorized handler update"); address registeredSystem = _gameRegistry.getSystem(GIGA_ROM_NFT_ID); require(registeredSystem != address(0), "GigaRomNFT not registered"); require(registeredSystem == tokenContract, "Incorrect token contract"); IGigaRomNFT gigaRomNFT = IGigaRomNFT(tokenContract); if (gigaRomNFT.totalMinted() < gigaRomNFT.getMaxSupply() && gigaRomNFT.exists(tokenId) && gigaRomNFT.ownerOf(tokenId) != address(0)) { revert("Cannot transfer GigaRomNFT untill mint complete"); } } }
// SPDX-License-Identifier: MIT LICENSE pragma solidity ^0.8.9; interface IERC721UpdateHandler { /** * Before transfer hook for NFTs. Performs any trait checks needed before transfer * * @param tokenContract Address of the token contract * @param to Address of the recipient * @param tokenId Token ID * @param auth Auth address */ function update( address tokenContract, address to, uint256 tokenId, address auth ) external; }
// SPDX-License-Identifier: MIT LICENSE pragma solidity ^0.8.13; import {ReentrancyGuard} from "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; import {PAUSER_ROLE, MANAGER_ROLE} from "../constants/RoleConstants.sol"; import {ISystem} from "./ISystem.sol"; import {IGameRegistry, IERC165} from "./IGameRegistry.sol"; import {IDataStore, ID as DATA_STORE_ID} from "../db/IDataStore.sol"; import {DEPLOYER_ROLE} from "../constants/RoleConstants.sol"; /** @title Contract that lets a child contract access the GameRegistry contract */ abstract contract GameRegistryConsumer is ReentrancyGuard, ISystem { /// @notice Whether or not the contract is paused bool private _paused; /// @notice Reference to the game registry that this contract belongs to IGameRegistry internal _gameRegistry; /// @notice Id for the system/component uint256 private _id; /** EVENTS **/ /// @dev Emitted when the pause is triggered by `account`. event Paused(address account); /// @dev Emitted when the pause is lifted by `account`. event Unpaused(address account); /** ERRORS **/ /// @notice Not authorized to perform action error MissingRole(address account, bytes32 expectedRole); /** MODIFIERS **/ /// @notice Modifier to verify a user has the appropriate role to call a given function modifier onlyRole(bytes32 role) { _checkRole(role, msg.sender); _; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** ERRORS **/ /// @notice Error if the game registry specified is invalid error InvalidGameRegistry(); /** SETUP **/ /** @return ID for this system */ function getId() public view override returns (uint256) { return _id; } /** * Pause/Unpause the contract * * @param shouldPause Whether or pause or unpause */ function setPaused(bool shouldPause) external onlyRole(PAUSER_ROLE) { if (shouldPause) { _pause(); } else { _unpause(); } } /** * @dev Returns true if the contract OR the GameRegistry is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused || _gameRegistry.paused(); } /** * Sets the GameRegistry contract address for this contract * * @param gameRegistryAddress Address for the GameRegistry contract */ function setGameRegistry( address gameRegistryAddress ) external onlyRole(MANAGER_ROLE) { _gameRegistry = IGameRegistry(gameRegistryAddress); if (gameRegistryAddress == address(0)) { revert InvalidGameRegistry(); } } /** @return GameRegistry contract for this contract */ function getGameRegistry() external view returns (IGameRegistry) { return _gameRegistry; } /** INTERNAL **/ /** * @dev Returns `true` if `account` has been granted `role`. */ function _hasAccessRole( bytes32 role, address account ) internal view returns (bool) { return _gameRegistry.hasAccessRole(role, account); } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view virtual { if (!_gameRegistry.hasAccessRole(role, account)) { revert MissingRole(account, role); } } /** @return Returns the dataStore for this contract */ function _dataStore() internal view returns (IDataStore) { return IDataStore(_getSystem(DATA_STORE_ID)); } /** @return Address for a given system */ function _getSystem(uint256 systemId) internal view returns (address) { return _gameRegistry.getSystem(systemId); } /** PAUSABLE **/ /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { require(!paused(), "Pausable: paused"); } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { require(paused(), "Pausable: not paused"); } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual { require(_paused == false, "Pausable: not paused"); _paused = true; emit Paused(msg.sender); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual { require(_paused == true, "Pausable: not paused"); _paused = false; emit Unpaused(msg.sender); } function initialize() external virtual onlyRole(DEPLOYER_ROLE) { } /** * Constructor for this contract * * @param gameRegistryAddress Address of the GameRegistry contract * @param id Id of the system/component */ constructor( address gameRegistryAddress, uint256 id ) { _gameRegistry = IGameRegistry(gameRegistryAddress); if (gameRegistryAddress == address(0)) { revert InvalidGameRegistry(); } _paused = true; _id = id; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; uint256 constant ID = uint256(keccak256("game.gigaverse.system.account")); interface IAccountSystem is IERC165 { function setPrice(uint256 _price, uint256 _redeemableTokenId) external; function mintWithEth(string memory _username, bytes memory signature) external payable; function mintWithGameItem(string memory _username, bytes memory signature) external; function getPlayerUsernameId(address player) external view returns (uint256); function getPlayerNoobId(address player) external view returns (uint256); function mintPrice() external view returns (uint256); function setUsername(address to, uint256 tokenId) external; function setPlayerNoob(address to, uint256 tokenId) external; function removeUsername(address player) external; function changeUsername(uint256 tokenId) external; function setMintPrice(uint256 newPrice) external; function withdraw() external; }
// SPDX-License-Identifier: MIT LICENSE pragma solidity ^0.8.9; import {IGameNFT} from "../gamenft/IGameNFT.sol"; import {IMintableERC721} from "../../mint/interfaces/IMintableERC721.sol"; uint256 constant ID = uint256(keccak256("game.gigaverse.gigaromnft")); interface IGigaRomNFT is IGameNFT, IMintableERC721 { function totalMinted() external view returns (uint256); function getMaxSupply() external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuard.sol) pragma solidity ^0.8.20; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If EIP-1153 (transient storage) is available on the chain you're deploying at, * consider using {ReentrancyGuardTransient} instead. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant NOT_ENTERED = 1; uint256 private constant ENTERED = 2; uint256 private _status; /** * @dev Unauthorized reentrant call. */ error ReentrancyGuardReentrantCall(); constructor() { _status = NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be NOT_ENTERED if (_status == ENTERED) { revert ReentrancyGuardReentrantCall(); } // Any calls to nonReentrant after this point will fail _status = ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = NOT_ENTERED; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { return _status == ENTERED; } }
// SPDX-License-Identifier: MIT LICENSE pragma solidity ^0.8.9; // Pauser Role - Can pause the game bytes32 constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); // Minter Role - Can mint items, NFTs, and ERC20 currency bytes32 constant MINTER_ROLE = keccak256("MINTER_ROLE"); // Manager Role - Can manage the shop, loot tables, and other game data bytes32 constant MANAGER_ROLE = keccak256("MANAGER_ROLE"); // Depoloyer Role - Can Deploy new Systems bytes32 constant DEPLOYER_ROLE = keccak256("DEPLOYER_ROLE"); // Game Logic Contract - Contract that executes game logic and accesses other systems bytes32 constant GAME_LOGIC_CONTRACT_ROLE = keccak256("GAME_LOGIC_CONTRACT_ROLE"); // For functions callable from game server bytes32 constant SERVER_JUDGE_ROLE = keccak256("SERVER_JUDGE_ROLE");
// SPDX-License-Identifier: MIT LICENSE pragma solidity ^0.8.9; import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; /** * Defines a system the game engine */ interface ISystem { /** @return The ID for the system. Ex: a uint256 casted keccak256 hash */ function getId() external view returns (uint256); function initialize() external; }
// SPDX-License-Identifier: MIT LICENSE pragma solidity ^0.8.9; import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; // @title Interface the game's ACL / Management Layer interface IGameRegistry is IERC165 { /** * @dev Returns `true` if `account` has been granted `role`. * @param role The role to query * @param account The address to query */ function hasAccessRole( bytes32 role, address account ) external view returns (bool); /** * @return Whether or not the registry is paused */ function paused() external view returns (bool); /** * Registers a system by id * * @param systemId Id of the system * @param systemAddress Address of the system contract */ function registerSystem(uint256 systemId, address systemAddress, bool isGameLogicContract) external; /** * @param systemId Id of the system * @return System based on an id */ function getSystem(uint256 systemId) external view returns (address); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; uint256 constant ID = uint256(keccak256("game.gigaverse.datastore")); interface IDataStore { enum ColumnType { NONE, UINT256, INT256, BOOL, ADDRESS, BYTES32, STRING, UINT256_ARRAY } event ValueSet(uint256 indexed tableId, uint256 indexed docId, uint256 indexed colId, bytes32 value); event StringValueSet(uint256 indexed tableId, uint256 indexed docId, uint256 indexed colId, string value); event ArrayValueSet(uint256 indexed tableId, uint256 indexed docId, uint256 indexed colId, bytes32[] value); event ColumnTypeSet(uint256 indexed colId, ColumnType columnType); function setValue(uint256 tableId, uint256 docId, uint256 colId, bytes32 value) external; function getValue(uint256 tableId, uint256 docId, uint256 colId) external view returns (bytes32); function setColumnType(uint256 colId, ColumnType columnType) external; function getColumnType(uint256 colId) external view returns (ColumnType); // Type-specific setters function setUint256(uint256 tableId, uint256 docId, uint256 colId, uint256 value) external; function setInt256(uint256 tableId, uint256 docId, uint256 colId, int256 value) external; function setBool(uint256 tableId, uint256 docId, uint256 colId, bool value) external; function setAddress(uint256 tableId, uint256 docId, uint256 colId, address value) external; function setBytes32(uint256 tableId, uint256 docId, uint256 colId, bytes32 value) external; function setString(uint256 tableId, uint256 docId, uint256 colId, string memory value) external; // Type-specific getters function getUint256(uint256 tableId, uint256 docId, uint256 colId) external view returns (uint256); function getInt256(uint256 tableId, uint256 docId, uint256 colId) external view returns (int256); function getBool(uint256 tableId, uint256 docId, uint256 colId) external view returns (bool); function getAddress(uint256 tableId, uint256 docId, uint256 colId) external view returns (address); function getBytes32(uint256 tableId, uint256 docId, uint256 colId) external view returns (bytes32); function getString(uint256 tableId, uint256 docId, uint256 colId) external view returns (string memory); function deleteValue(uint256 tableId, uint256 docId, uint256 colId) external; function hasValue(uint256 tableId, uint256 docId, uint256 colId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC-165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[ERC]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT LICENSE pragma solidity ^0.8.13; import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol"; /** * @title Interface for game NFTs that have stats and other properties */ interface IGameNFT is IERC721 { /** * @param account Account to check hold time of * @param tokenId Id of the token * @return The time in seconds a given account has held a token */ function getTimeHeld( address account, uint256 tokenId ) external view returns (uint32); function getLastTransfer( uint256 tokenId ) external view returns (uint32); /** * Mints a batch of ERC721 token * * @param to Recipient of the token * @param amount Quantity of token to mint */ function mintBatch(address to, uint256 amount) external returns (uint256[] memory); function exists(uint256 tokenId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.23; import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol"; interface IMintableERC721 is IERC721 { function mint(address to, uint256 quantity) external returns (uint256[] memory tokenIds); function totalSupply() external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.20; import {IERC165} from "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC-721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon * a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC-721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or * {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon * a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC-721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 tokenId) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the address zero. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
{ "viaIR": false, "codegen": "yul", "remappings": [ "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/", "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/", "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/", "forge-std/=lib/forge-std/src/", "forge-zksync-std/=lib/forge-zksync-std/src/", "halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/", "openzeppelin-contracts/=lib/openzeppelin-contracts/" ], "evmVersion": "cancun", "outputSelection": { "*": { "*": [ "abi", "metadata" ], "": [ "ast" ] } }, "optimizer": { "enabled": true, "mode": "3", "fallback_to_optimizing_for_size": false, "disable_system_request_memoization": true }, "metadata": {}, "libraries": {}, "enableEraVMExtensions": false, "forceEVMLA": false }
[{"inputs":[{"internalType":"address","name":"gameRegistryAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InvalidGameRegistry","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"expectedRole","type":"bytes32"}],"name":"MissingRole","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"getGameRegistry","outputs":[{"internalType":"contract IGameRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"gameRegistryAddress","type":"address"}],"name":"setGameRegistry","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"shouldPause","type":"bool"}],"name":"setPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenContract","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"update","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
9c4d535b00000000000000000000000000000000000000000000000000000000000000000100014126c6f23d104fd07836dfbbdb2e44d03c05b7bb449de8e07a8f24c5e800000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000020000000000000000000000000b5f84708957e5628c363709ae1d4cb346081fbf6
Deployed Bytecode
0x0001000000000002000500000000000200000060031002700000010a0330019700000001002001900000003a0000c13d0000008002000039000000400020043f000000040030008c0000040b0000413d000000000201043b000000e002200270000001120020009c000000650000a13d000001130020009c000000730000213d000001160020009c000000810000613d000001170020009c0000040b0000c13d000000840030008c0000040b0000413d0000000002000416000000000002004b0000040b0000c13d0000000402100370000000000502043b0000010d0050009c0000040b0000213d0000002402100370000000000202043b0000010d0020009c0000040b0000213d0000004402100370000000000602043b0000006401100370000000000101043b0000010d0010009c0000040b0000213d0000000001000411000000000051004b0000022c0000c13d0000000101000039000000000201041a0000012701000041000000800010043f0000012801000041000000840010043f000000000100041400000008022002700000010d02200197000000040020008c000002520000c13d0000000003000031000000200030008c000000200400003900000000040340190000027a0000013d0000000002000416000000000002004b0000040b0000c13d0000001f023000390000010b022001970000008002200039000000400020043f0000001f0430018f0000010c0530019800000080025000390000004b0000613d0000008006000039000000000701034f000000007807043c0000000006860436000000000026004b000000470000c13d000000000004004b000000580000613d000000000151034f0000000304400210000000000502043300000000054501cf000000000545022f000000000101043b0000010004400089000000000141022f00000000014101cf000000000151019f0000000000120435000000200030008c0000040b0000413d000000800100043d0000010d0010009c0000040b0000213d0000000102000039000000000020041b000000000001004b000000960000c13d0000012001000041000000000010043f00000121010000410000042500010430000001180020009c000000a50000613d000001190020009c000000c30000613d0000011a0020009c0000040b0000c13d0000000001000416000000000001004b0000040b0000c13d0000000201000039000000000101041a000000800010043f0000011b01000041000004240001042e000001140020009c000000d60000613d000001150020009c0000040b0000c13d0000000001000416000000000001004b0000040b0000c13d0000000101000039000000000101041a00000008011002700000010d01100197000000800010043f0000011b01000041000004240001042e0000000001000416000000000001004b0000040b0000c13d0000000101000039000000000201041a0000011c01000041000000800010043f0000013501000041000000840010043f0000000005000411000000a40050043f000000000100041400000008022002700000010d02200197000000040020008c000000f10000c13d0000000003000031000000200030008c00000020040000390000000004034019000001160000013d000000000302041a0000010e0330019700000008011002100000010f01100197000000000131019f00000001011001bf000000000012041b00000110010000410000000202000039000000000012041b0000002001000039000001000010044300000120000004430000011101000041000004240001042e000000240030008c0000040b0000413d0000000002000416000000000002004b0000040b0000c13d0000000401100370000000000701043b000000000007004b0000000001000039000000010100c039000000000017004b0000040b0000c13d0000000103000039000000000203041a0000011c01000041000000800010043f0000013901000041000000840010043f0000000006000411000000a40060043f000000000100041400000008022002700000010d02200197000000040020008c000001310000c13d000000000b0000310000002000b0008c000000200400003900000000040b4019000001590000013d0000000001000416000000000001004b0000040b0000c13d0000000102000039000000000302041a000000ff003001900000012b0000c13d0000013601000041000000800010043f000000000100041400000008023002700000010d02200197000000040020008c0000016e0000c13d0000000003000031000000200030008c00000020040000390000000004034019000001920000013d000000240030008c0000040b0000413d0000000002000416000000000002004b0000040b0000c13d0000000401100370000000000501043b0000010d0050009c0000040b0000213d0000000106000039000000000206041a0000011c01000041000000800010043f0000011d01000041000000840010043f0000000007000411000000a40070043f000000000100041400000008022002700000010d02200197000000040020008c0000019f0000c13d0000000003000031000000200030008c00000020040000390000000004034019000001c70000013d0000010a0010009c0000010a01008041000000c0011002100000011e011001c70423041e0000040f00000060031002700000010a03300197000000200030008c000000200400003900000000040340190000001f0640018f000000200740019000000080057001bf000001050000613d0000008008000039000000000901034f000000009a09043c0000000008a80436000000000058004b000001010000c13d000000000006004b000001120000613d000000000771034f0000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f0000000100200190000001dc0000613d00000000050004110000001f01400039000000600110018f00000080011001bf000000400010043f000000200030008c0000040b0000413d000000800100043d000000000001004b0000000002000039000000010200c039000000000021004b0000040b0000c13d000000000001004b000002a20000c13d0000012201000041000000000010043f000000040050043f0000013501000041000000240010043f000001230100004100000425000104300000008001000039000000010220018f0000000000210435000000400110021000000138011001c7000004240001042e000500000007001d0000010a0010009c0000010a01008041000000c0011002100000011e011001c70423041e0000040f00000060031002700000010a0b3001970000002000b0008c000000200400003900000000040b40190000001f0640018f000000200740019000000080057001bf000001460000613d0000008008000039000000000901034f000000009a09043c0000000008a80436000000000058004b000001420000c13d000000000006004b000001530000613d000000000771034f0000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f000000000065043500000000000b001f0000000100200190000001e80000613d0000000103000039000000000600041100000005070000290000001f01400039000000600210018f00000080012001bf000000400010043f0000002000b0008c0000040b0000413d000000800500043d000000000005004b0000000004000039000000010400c039000000000045004b0000040b0000c13d000000000005004b000002360000c13d0000012201000041000000000010043f000000040060043f0000013901000041000000240010043f000001230100004100000425000104300000010a0010009c0000010a01008041000000c00110021000000137011001c70423041e0000040f00000060031002700000010a03300197000000200030008c000000200400003900000000040340190000001f0640018f000000200740019000000080057001bf000001820000613d0000008008000039000000000901034f000000009a09043c0000000008a80436000000000058004b0000017e0000c13d000000000006004b0000018f0000613d000000000771034f0000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f0000000100200190000002020000613d0000001f01400039000000600110018f00000080011001bf000000400010043f000000200030008c0000040b0000413d000000800300043d000000000003004b0000000002000039000000010200c039000000000023004b0000012c0000613d0000040b0000013d000500000005001d0000010a0010009c0000010a01008041000000c0011002100000011e011001c70423041e0000040f000000800a00003900000060031002700000010a03300197000000200030008c000000200400003900000000040340190000001f0640018f000000200740019000000080057001bf000001b40000613d000000000801034f000000008908043c000000000a9a043600000000005a004b000001b00000c13d000000000006004b000001c10000613d000000000771034f0000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00000001002001900000020e0000613d0000000505000029000000010600003900000000070004110000001f01400039000000600110018f00000080011001bf000000400010043f000000200030008c0000040b0000413d000000800100043d000000000001004b0000000002000039000000010200c039000000000021004b0000040b0000c13d000000000001004b000002490000c13d0000012201000041000000000010043f000000040070043f0000011d01000041000000240010043f000001230100004100000425000104300000001f0530018f0000010c06300198000000400200043d0000000004620019000002190000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b000001e30000c13d000002190000013d0000001f05b0018f0000010c06b00198000000400200043d0000000004620019000001f30000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b000001ef0000c13d000000000005004b000002000000613d000000000161034f0000000305500210000000000604043300000000065601cf000000000656022f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f00000000001404350000006001b00210000002270000013d0000001f0530018f0000010c06300198000000400200043d0000000004620019000002190000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b000002090000c13d000002190000013d0000001f0530018f0000010c06300198000000400200043d0000000004620019000002190000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b000002150000c13d000000000005004b000002260000613d000000000161034f0000000305500210000000000604043300000000065601cf000000000656022f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f000000000014043500000060013002100000010a0020009c0000010a020080410000004002200210000000000112019f00000425000104300000012401000041000000800010043f0000002001000039000000840010043f0000001b01000039000000a40010043f0000012501000041000000c40010043f00000126010000410000042500010430000000000503041a000000ff0450018f000000000007004b000002900000c13d000000000004004b000002a40000613d0000013e02500197000000000023041b0000000000610435000000400110021000000000020004140000010a0020009c0000010a02008041000000c002200210000000000112019f0000013a011001c70000800d020000390000013c040000410000029f0000013d00000008015002100000010f01100197000000000206041a0000011f02200197000000000112019f000000000016041b000000000005004b000000610000613d000002a20000013d000500000006001d000400000005001d0000010a0010009c0000010a01008041000000c00110021000000129011001c70423041e0000040f00000060031002700000010a03300197000000200030008c000000200400003900000000040340190000001f0640018f000000200740019000000080057001bf000002680000613d0000008008000039000000000901034f000000009a09043c0000000008a80436000000000058004b000002640000c13d000000000006004b000002750000613d000000000771034f0000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f0000000100200190000002b20000613d000000040500002900000005060000290000001f01400039000000600110018f00000080041001bf000000400040043f000000200030008c0000040b0000413d000000800200043d0000010d0020009c0000040b0000213d000000000002004b000002be0000c13d0000012402000041000000000024043500000084021001bf00000020030000390000000000320435000000c40210003900000134030000410000000000320435000000a4011000390000001902000039000002f10000013d000000000004004b000002a40000c13d0000013e0250019700000001022001bf000000000023041b0000000000610435000000400110021000000000020004140000010a0020009c0000010a02008041000000c002200210000000000112019f0000013a011001c70000800d020000390000013b04000041042304190000040f00000001002001900000040b0000613d0000000001000019000004240001042e0000012403000041000000000031043500000084032001bf00000020040000390000000000430435000000c4032000390000013d040000410000000000430435000000a4022000390000001403000039000000000032043500000040011002100000012b011001c700000425000104300000001f0530018f0000010c06300198000000400200043d0000000004620019000002190000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b000002b90000c13d000002190000013d000500000006001d000000000052004b000002e70000c13d0000012c02000041000300000004001d00000000002404350000000002000414000400000005001d000000040050008c000002f50000c13d00000003020000290000000003120019000000400030043f0000000002020433000100000002001d0000012d020000410000000000230435000200000003001d0000000002130019000300000002001d000000400020043f0000000403000029000000050400002900000002020000290000000002020433000000010020006b000002a20000813d0000012e0200004100000003050000290000000000250435000000040250003900000000004204350000000002000414000000040030008c000003680000c13d0000000302100029000200000002001d000000400020043f000000040400002900000005050000290000039a0000013d0000012402000041000000000024043500000084021001bf00000020030000390000000000320435000000c4021000390000012a030000410000000000320435000000a4011000390000001802000039000000000021043500000040014002100000012b011001c700000425000104300000010a0020009c0000010a02008041000000c00120021000000003020000290000004002200210000000000121019f00000121011001c700000004020000290423041e0000040f00000060031002700000010a03300197000000200030008c000000200400003900000000040340190000001f0640018f000000200740019000000003057000290000030d0000613d000000000801034f0000000309000029000000008a08043c0000000009a90436000000000059004b000003090000c13d000000000006004b0000031a0000613d000000000771034f0000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00000001002001900000035c0000613d0000001f01400039000000600110018f00000003040000290000000001410019000200000001001d000000400010043f000000200030008c00000004020000290000040b0000413d0000000001040433000100000001001d0000012d010000410000000203000029000000000013043500000000010004140000010a0010009c0000010a01008041000000c0011002100000004003300210000000000131019f00000121011001c70423041e0000040f00000060031002700000010a03300197000000200030008c000000200400003900000000040340190000001f0640018f00000020074001900000000205700029000003420000613d000000000801034f0000000209000029000000008a08043c0000000009a90436000000000059004b0000033e0000c13d000000000006004b0000034f0000613d000000000771034f0000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f0000000100200190000003d00000613d0000001f01400039000000600110018f0000000202100029000300000002001d000000400020043f000000200030008c00000004030000290000000504000029000002d50000813d0000040b0000013d0000001f0530018f0000010c06300198000000400200043d0000000004620019000002190000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b000003630000c13d000002190000013d0000010a0020009c0000010a02008041000000c0012002100000000302000029000300000002001d0000004002200210000000000121019f0000012f011001c700000004020000290423041e0000040f00000060031002700000010a03300197000000200030008c000000200400003900000000040340190000001f0640018f00000020074001900000000305700029000003810000613d000000000801034f0000000309000029000000008a08043c0000000009a90436000000000059004b0000037d0000c13d000000000006004b0000038e0000613d000000000771034f0000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f0000000100200190000003c40000613d0000001f01400039000000600110018f0000000302100029000200000002001d000000400020043f000000200030008c000000040400002900000005050000290000040b0000413d00000003020000290000000002020433000000000002004b0000000003000039000000010300c039000000000032004b0000040b0000c13d000000000002004b000002a20000613d000001300200004100000002030000290000000000230435000000040230003900000000005204350000000002000414000000040040008c000003dc0000c13d0000000201100029000000400010043f000000020200002900000000020204330000010d0020009c0000040b0000213d000000000002004b000002a20000613d00000064021000390000013103000041000000000032043500000044021000390000013203000041000000000032043500000024021000390000002f03000039000000000032043500000124020000410000000000210435000000040210003900000020030000390000000000320435000000400110021000000133011001c700000425000104300000001f0530018f0000010c06300198000000400200043d0000000004620019000002190000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b000003cb0000c13d000002190000013d0000001f0530018f0000010c06300198000000400200043d0000000004620019000002190000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b000003d70000c13d000002190000013d0000010a0020009c0000010a02008041000000c0012002100000000202000029000200000002001d0000004002200210000000000121019f0000012f011001c700000004020000290423041e0000040f00000060031002700000010a03300197000000200030008c000000200400003900000000040340190000001f0640018f00000020074001900000000205700029000003f50000613d000000000801034f0000000209000029000000008a08043c0000000009a90436000000000059004b000003f10000c13d000000000006004b000004020000613d000000000771034f0000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f0000000000650435000000000003001f00000001002001900000040d0000613d0000001f01400039000000600110018f0000000201100029000000400010043f000000200030008c000003ad0000813d000000000100001900000425000104300000001f0530018f0000010c06300198000000400200043d0000000004620019000002190000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b000004140000c13d000002190000013d0000041c002104210000000102000039000000000001042d0000000002000019000000000001042d00000421002104230000000102000039000000000001042d0000000002000019000000000001042d0000042300000432000004240001042e00000425000104300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffff00000000000000000000000000000000000000000000000000000001ffffffe000000000000000000000000000000000000000000000000000000000ffffffe0000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffff004f4bd3882cc84ab26defbbf72360f09a9747865338e4a7830f9bb151a78a8b700000000200000000000000000000000000000040000001000000000000000000000000000000000000000000000000000000000000000000000000008129fc1b00000000000000000000000000000000000000000000000000000000dd898b2e00000000000000000000000000000000000000000000000000000000dd898b2f00000000000000000000000000000000000000000000000000000000ed022ebd000000000000000000000000000000000000000000000000000000008129fc1c00000000000000000000000000000000000000000000000000000000cdcba5b50000000000000000000000000000000000000000000000000000000016c38b3c000000000000000000000000000000000000000000000000000000005c975abb000000000000000000000000000000000000000000000000000000005d1ca6310000000000000000000000000000000000000020000000800000000000000000c36dd7ea00000000000000000000000000000000000000000000000000000000241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b080000000000000000000000000000000000000044000000800000000000000000ffffffffffffffffffffff0000000000000000000000000000000000000000ffa4b914810000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000161a64a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004400000000000000000000000008c379a000000000000000000000000000000000000000000000000000000000556e617574686f72697a65642068616e646c6572207570646174650000000000000000000000000000000000000000000000006400000080000000000000000053e41c1e00000000000000000000000000000000000000000000000000000000d9a37d7c74ec5b11ca3635057b719aed5158ff7704d65f5572452e4c68c79cda0000000000000000000000000000000000000024000000800000000000000000496e636f727265637420746f6b656e20636f6e747261637400000000000000000000000000000000000000000000000000000064000000000000000000000000a2309ff8000000000000000000000000000000000000000000000000000000004c0f38c2000000000000000000000000000000000000000000000000000000004f558e790000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000240000000000000000000000006352211e000000000000000000000000000000000000000000000000000000006c206d696e7420636f6d706c657465000000000000000000000000000000000043616e6e6f74207472616e736665722047696761526f6d4e465420756e74696c000000000000000000000000000000000000008400000000000000000000000047696761526f6d4e4654206e6f74207265676973746572656400000000000000fc425f2263d0df187444b70e47283d622c70181c5baebb1306a01edba1ce184c5c975abb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000800000000000000000000000000000000000000000000000000000002000000000000000000000000065d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a020000000000000000000000000000000000002000000000000000000000000062e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2585db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa5061757361626c653a206e6f7420706175736564000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000000000000000000000000000000000000000000000000000000000000bab15b6390403dd49eefdf3e21ccaf4951d39a2dfcc53e6c865a6e01a2364bde
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000b5f84708957e5628c363709ae1d4cb346081fbf6
-----Decoded View---------------
Arg [0] : gameRegistryAddress (address): 0xb5f84708957E5628C363709AE1d4CB346081fbf6
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000b5f84708957e5628c363709ae1d4cb346081fbf6
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.