Source Code
Overview
ETH Balance
0 ETH
More Info
ContractCreator
Multichain Info
N/A
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Latest 1 internal transaction
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
4945097 | 19 days ago | Contract Creation | 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:
ConsumerSystem
Compiler Version
v0.8.26+commit.8a97fa7a
ZkSolc Version
v1.5.10
Optimization Enabled:
Yes with Mode 3
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT LICENSE pragma solidity ^0.8.26; import {ReentrancyGuardUpgradeable} from '@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol'; import {GAME_LOGIC_CONTRACT_ROLE, VRF_SYSTEM_ROLE} from '../../Constants.sol'; import {GameRegistryConsumerUpgradeable} from '../../GameRegistryConsumerUpgradeable.sol'; import {IVRFSystem} from '../vrf/IVRFSystem.sol'; import {IVRFSystemCallback} from '../vrf/IVRFSystemCallback.sol'; error InvalidCaller(); error InvalidAddress(); event ReceivedRandomNumber(uint256 requestId, uint256 randomNumber); uint256 constant ID = uint256(keccak256('com.proofofplay.consumersystem.v1')); /** * Example contract that uses the VRF system to request random numbers */ contract ConsumerSystem is GameRegistryConsumerUpgradeable { // request Id => random number mapping(uint256 => uint256) public requestIdToRandomNumber; /** SETUP **/ function initialize(address gameRegistryAddress) public initializer { __GameRegistryConsumer_init(gameRegistryAddress, ID); } // this is an example contract with no role. anyone can call this // @returns requestId function getRandomNumber(uint256 traceId) external returns (uint256) { return _requestRandomNumber(traceId); } // this is an example contract with no role. anyone can call this function randomNumberCallback(uint256 requestId, uint256 randomNumber) external override { // if (msg.sender != address(_vrf())) { // revert InvalidCaller(); // } requestIdToRandomNumber[requestId] = randomNumber; emit ReceivedRandomNumber(requestId, randomNumber); } }
// SPDX-License-Identifier: MIT LICENSE pragma solidity ^0.8.13; import {ReentrancyGuardUpgradeable} from '@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol'; import {IERC2771Recipient} from '@opengsn/contracts/src/interfaces/IERC2771Recipient.sol'; import {PERCENTAGE_RANGE, TRUSTED_FORWARDER_ROLE, PAUSER_ROLE, MANAGER_ROLE} from './Constants.sol'; import {ISystem} from './core/ISystem.sol'; import {IVRFSystem, ID as VRF_SYSTEM_ID} from './systems/vrf/IVRFSystem.sol'; import {IVRFSystemCallback} from './systems/vrf/IVRFSystemCallback.sol'; import {IGameRegistry, IERC165} from './core/IGameRegistry.sol'; /** @title Contract that lets a child contract access the GameRegistry contract */ abstract contract GameRegistryConsumerUpgradeable is ReentrancyGuardUpgradeable, IERC2771Recipient, IVRFSystemCallback, 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, _msgSender()); _; } /** * @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(address gameRegistry); /** SETUP **/ /** * Initializer for this upgradeable contract * * @param gameRegistryAddress Address of the GameRegistry contract * @param id Id of the system/component */ function __GameRegistryConsumer_init(address gameRegistryAddress, uint256 id) internal onlyInitializing { __ReentrancyGuard_init(); _gameRegistry = IGameRegistry(gameRegistryAddress); if (gameRegistryAddress == address(0)) { revert InvalidGameRegistry(gameRegistryAddress); } _paused = true; _id = id; } /** @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(gameRegistryAddress); } } /** @return GameRegistry contract for this contract */ function getGameRegistry() external view returns (IGameRegistry) { return _gameRegistry; } /// @inheritdoc IERC2771Recipient function isTrustedForwarder(address forwarder) public view virtual override(IERC2771Recipient) returns (bool) { return address(_gameRegistry) != address(0) && _hasAccessRole(TRUSTED_FORWARDER_ROLE, forwarder); } /** * Callback for when a random number request has returned with a random number * * @param requestId Id of the request * @param randomNumber Random number */ function randomNumberCallback(uint256 requestId, uint256 randomNumber) external virtual override { // Do nothing by default } /** 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 Interface to the VRF */ function _vrf() internal view returns (IVRFSystem) { return IVRFSystem(_gameRegistry.getSystem(VRF_SYSTEM_ID)); } /** @return Address for a given system */ function _getSystem(uint256 systemId) internal view returns (address) { return _gameRegistry.getSystem(systemId); } /** * Requests randomness from the game's VRF * * @param traceId A traceId to use that joins many x-chain requests together * * @return requestId of the randomness request */ function _requestRandomNumber(uint256 traceId) internal returns (uint256) { return _vrf().requestRandomNumberWithTraceId(traceId); } /** * Returns the Player address for the Operator account * @param operatorAccount address of the Operator account to retrieve the player for */ function _getPlayerAccount(address operatorAccount) internal view returns (address playerAccount) { return _gameRegistry.getPlayerAccount(operatorAccount); } /// @inheritdoc IERC2771Recipient function _msgSender() internal view virtual override(IERC2771Recipient) returns (address ret) { if (msg.data.length >= 20 && isTrustedForwarder(msg.sender)) { assembly { ret := shr(96, calldataload(sub(calldatasize(), 20))) } } else { ret = msg.sender; } } /// @inheritdoc IERC2771Recipient function _msgData() internal view virtual override(IERC2771Recipient) returns (bytes calldata ret) { if (msg.data.length >= 20 && isTrustedForwarder(msg.sender)) { return msg.data[0:msg.data.length - 20]; } else { return msg.data; } } /** 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(_msgSender()); } /** * @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(_msgSender()); } uint256[47] private __gap; }
// SPDX-License-Identifier: MIT LICENSE pragma solidity ^0.8.9; // Used for calculating decimal-point percentages (10000 = 100%) uint256 constant PERCENTAGE_RANGE = 10000; // 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'); // Game Currency Contract - Allowlisted currency ERC20 contract bytes32 constant GAME_CURRENCY_CONTRACT_ROLE = keccak256('GAME_CURRENCY_CONTRACT_ROLE'); // Game NFT Contract - Allowlisted game NFT ERC721 contract bytes32 constant GAME_NFT_CONTRACT_ROLE = keccak256('GAME_NFT_CONTRACT_ROLE'); // Game Items Contract - Allowlist game items ERC1155 contract bytes32 constant GAME_ITEMS_CONTRACT_ROLE = keccak256('GAME_ITEMS_CONTRACT_ROLE'); // Depositor role - used by Polygon bridge to mint on child chain bytes32 constant DEPOSITOR_ROLE = keccak256('DEPOSITOR_ROLE'); // Randomizer role - Used by the randomizer contract to callback bytes32 constant VRF_SYSTEM_ROLE = keccak256('VRF_SYSTEM_ROLE'); // VRF Consumer Contract - Contract that uses VRF to demonstrate randomness bytes32 constant VRF_CONSUMER_ROLE = keccak256('VRF_CONSUMER_ROLE'); // Trusted forwarder role - Used by meta transactions to verify trusted forwader(s) bytes32 constant TRUSTED_FORWARDER_ROLE = keccak256('TRUSTED_FORWARDER_ROLE'); // Trusted mirror role - Used by pirate mirroring bytes32 constant TRUSTED_MIRROR_ROLE = keccak256('TRUSTED_MIRROR_ROLE'); // Trusted multichain oracle role - Used by multichain contracts bytes32 constant TRUSTED_MULTICHAIN_ORACLE_ROLE = keccak256('TRUSTED_MULTICHAIN_ORACLE_ROLE'); // ===== // All of the possible traits in the system // ===== /// @dev Trait that points to another token/template id uint256 constant TEMPLATE_ID_TRAIT_ID = uint256(keccak256('template_id')); // Generation of a token uint256 constant GENERATION_TRAIT_ID = uint256(keccak256('generation')); // XP for a token uint256 constant XP_TRAIT_ID = uint256(keccak256('xp')); // Current level of a token uint256 constant LEVEL_TRAIT_ID = uint256(keccak256('level')); // Whether or not a token is a pirate uint256 constant IS_PIRATE_TRAIT_ID = uint256(keccak256('is_pirate')); // Whether or not a token is a ship uint256 constant IS_SHIP_TRAIT_ID = uint256(keccak256('is_ship')); // Whether or not an item is equippable on ships uint256 constant EQUIPMENT_TYPE_TRAIT_ID = uint256(keccak256('equipment_type')); // Combat modifiers for items and tokens uint256 constant COMBAT_MODIFIERS_TRAIT_ID = uint256(keccak256('combat_modifiers')); // Animation URL for the token uint256 constant ANIMATION_URL_TRAIT_ID = uint256(keccak256('animation_url')); // Item slots uint256 constant ITEM_SLOTS_TRAIT_ID = uint256(keccak256('item_slots')); // Rank of the ship uint256 constant SHIP_RANK_TRAIT_ID = uint256(keccak256('ship_rank')); // Current Health trait uint256 constant CURRENT_HEALTH_TRAIT_ID = uint256(keccak256('current_health')); // Health trait uint256 constant HEALTH_TRAIT_ID = uint256(keccak256('health')); // Damage trait uint256 constant DAMAGE_TRAIT_ID = uint256(keccak256('damage')); // Speed trait uint256 constant SPEED_TRAIT_ID = uint256(keccak256('speed')); // Accuracy trait uint256 constant ACCURACY_TRAIT_ID = uint256(keccak256('accuracy')); // Evasion trait uint256 constant EVASION_TRAIT_ID = uint256(keccak256('evasion')); // Image hash of token's image, used for verifiable / fair drops uint256 constant IMAGE_HASH_TRAIT_ID = uint256(keccak256('image_hash')); // Name of a token uint256 constant NAME_TRAIT_ID = uint256(keccak256('name_trait')); // Description of a token uint256 constant DESCRIPTION_TRAIT_ID = uint256(keccak256('description_trait')); // General rarity for a token (corresponds to IGameRarity) uint256 constant RARITY_TRAIT_ID = uint256(keccak256('rarity')); // The character's affinity for a specific element uint256 constant ELEMENTAL_AFFINITY_TRAIT_ID = uint256(keccak256('affinity_id')); // The character's expertise value uint256 constant EXPERTISE_TRAIT_ID = uint256(keccak256('expertise_id')); // Expertise damage mod ID from SoT uint256 constant EXPERTISE_DAMAGE_ID = uint256(keccak256('expertise.levelmultiplier.damage')); // Expertise evasion mod ID from SoT uint256 constant EXPERTISE_EVASION_ID = uint256(keccak256('expertise.levelmultiplier.evasion')); // Expertise speed mod ID from SoT uint256 constant EXPERTISE_SPEED_ID = uint256(keccak256('expertise.levelmultiplier.speed')); // Expertise accuracy mod ID from SoT uint256 constant EXPERTISE_ACCURACY_ID = uint256(keccak256('expertise.levelmultiplier.accuracy')); // Expertise health mod ID from SoT uint256 constant EXPERTISE_HEALTH_ID = uint256(keccak256('expertise.levelmultiplier.health')); // Boss start time trait uint256 constant BOSS_START_TIME_TRAIT_ID = uint256(keccak256('boss_start_time')); // Boss end time trait uint256 constant BOSS_END_TIME_TRAIT_ID = uint256(keccak256('boss_end_time')); // Boss type trait uint256 constant BOSS_TYPE_TRAIT_ID = uint256(keccak256('boss_type')); // The character's dice rolls uint256 constant DICE_ROLL_1_TRAIT_ID = uint256(keccak256('dice_roll_1')); uint256 constant DICE_ROLL_2_TRAIT_ID = uint256(keccak256('dice_roll_2')); // The character's star sign (astrology) uint256 constant STAR_SIGN_TRAIT_ID = uint256(keccak256('star_sign')); // Image for the token uint256 constant IMAGE_TRAIT_ID = uint256(keccak256('image_trait')); // How much energy the token provides if used uint256 constant ENERGY_PROVIDED_TRAIT_ID = uint256(keccak256('energy_provided')); // Whether a given token is soulbound, meaning it is unable to be transferred uint256 constant SOULBOUND_TRAIT_ID = uint256(keccak256('soulbound')); // ------ // Avatar Profile Picture related traits // If an avatar is a 1 of 1, this is their only trait uint256 constant PROFILE_IS_LEGENDARY_TRAIT_ID = uint256(keccak256('profile_is_legendary')); // Avatar's archetype -- possible values: Human (including Druid, Mage, Berserker, Crusty), Robot, Animal, Zombie, Vampire, Ghost uint256 constant PROFILE_CHARACTER_TYPE = uint256(keccak256('profile_character_type')); // Avatar's profile picture's background image uint256 constant PROFILE_BACKGROUND_TRAIT_ID = uint256(keccak256('profile_background')); // Avatar's eye style uint256 constant PROFILE_EYES_TRAIT_ID = uint256(keccak256('profile_eyes')); // Avatar's facial hair type uint256 constant PROFILE_FACIAL_HAIR_TRAIT_ID = uint256(keccak256('profile_facial_hair')); // Avatar's hair style uint256 constant PROFILE_HAIR_TRAIT_ID = uint256(keccak256('profile_hair')); // Avatar's skin color uint256 constant PROFILE_SKIN_TRAIT_ID = uint256(keccak256('profile_skin')); // Avatar's coat color uint256 constant PROFILE_COAT_TRAIT_ID = uint256(keccak256('profile_coat')); // Avatar's earring(s) type uint256 constant PROFILE_EARRING_TRAIT_ID = uint256(keccak256('profile_facial_hair')); // Avatar's eye covering uint256 constant PROFILE_EYE_COVERING_TRAIT_ID = uint256(keccak256('profile_eye_covering')); // Avatar's headwear uint256 constant PROFILE_HEADWEAR_TRAIT_ID = uint256(keccak256('profile_headwear')); // Avatar's (Mages only) gem color uint256 constant PROFILE_MAGE_GEM_TRAIT_ID = uint256(keccak256('profile_mage_gem')); // ------ // Dungeon traits // Whether this token template is a dungeon trigger uint256 constant IS_DUNGEON_TRIGGER_TRAIT_ID = uint256(keccak256('is_dungeon_trigger')); // Dungeon start time trait uint256 constant DUNGEON_START_TIME_TRAIT_ID = uint256(keccak256('dungeon.start_time')); // Dungeon end time trait uint256 constant DUNGEON_END_TIME_TRAIT_ID = uint256(keccak256('dungeon.end_time')); // Dungeon SoT map id trait uint256 constant DUNGEON_MAP_TRAIT_ID = uint256(keccak256('dungeon.map_id')); // Whether this token template is a mob uint256 constant IS_MOB_TRAIT_ID = uint256(keccak256('is_mob')); // ------ // Island traits // Whether a game item is placeable on an island uint256 constant IS_PLACEABLE_TRAIT_ID = uint256(keccak256('is_placeable')); // ------ // Extra traits for component migration // NOTE: CURRENTLY NOT USED IN CONTRACTS CODE uint256 constant MODEL_GLTF_URL_TRAIT_ID = uint256(keccak256('model_gltf_url')); uint256 constant PLACEABLE_CATEGORY_TRAIT_ID = uint256(keccak256('placeable_category')); uint256 constant PLACEABLE_IS_BOTTOM_STACKABLE_TRAIT_ID = uint256(keccak256('placeable.is_bottom_stackable')); uint256 constant PLACEABLE_IS_TOP_STACKABLE_TRAIT_ID = uint256(keccak256('placeable.is_top_stackable')); uint256 constant PLACEABLE_TERRAIN_TRAIT_ID = uint256(keccak256('placeable.terrain')); uint256 constant GLTF_SCALING_FACTOR_TRAIT_ID = uint256(keccak256('gltf_scaling_factor')); uint256 constant SIZE_TRAIT_ID = uint256(keccak256('size'));
// SPDX-License-Identifier: MIT LICENSE pragma solidity ^0.8.26; interface IVRFSystemCallback { /** * Callback for when a Random Number is delivered * * @param requestId Id of the VRF request * @param randomNumber Random number that was generated by the VRF */ function randomNumberCallback(uint256 requestId, uint256 randomNumber) external; }
// SPDX-License-Identifier: MIT LICENSE pragma solidity ^0.8.26; uint256 constant ID = uint256(keccak256('com.proofofplay.vrfsystem.v1')); interface IVRFSystem { /** * Starts a VRF random number request * * @param traceId Optional Id to use when tracing the request * @return requestId for the random number, will be passed to the callback contract */ function requestRandomNumberWithTraceId(uint256 traceId) external returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @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 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 ReentrancyGuardUpgradeable is Initializable { // 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; function __ReentrancyGuard_init() internal onlyInitializing { __ReentrancyGuard_init_unchained(); } function __ReentrancyGuard_init_unchained() internal onlyInitializing { _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 require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // 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 This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT LICENSE pragma solidity ^0.8.13; 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); }
// SPDX-License-Identifier: MIT LICENSE pragma solidity ^0.8.13; 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) external; /** * @param systemId Id of the system * @return System based on an id */ function getSystem(uint256 systemId) external view returns (address); /** * Registers a component using an id and contract address * @param componentId Id of the component to register * @param componentAddress Address of the component contract */ function registerComponent( uint256 componentId, address componentAddress ) external; /** * @param componentId Id of the component * @return A component's contract address given its ID */ function getComponent(uint256 componentId) external view returns (address); /** * @param componentAddr Address of the component contract * @return A component's id given its contract address */ function getComponentIdFromAddress( address componentAddr ) external view returns (uint256); /** * @param entity Entity to check * @param componentId Component to check * @return Boolean indicating if entity belongs to component */ function getEntityHasComponent( uint256 entity, uint256 componentId ) external view returns (bool); /** * @return Boolean array indicating if entity belongs to component * @param entities Entities to check * @param componentIds Components to check */ function batchGetEntitiesHasComponents( uint256[] calldata entities, uint256[] calldata componentIds ) external view returns (bool[] memory); /** * Sets multiple component values at once * @param entities Entities to set values for * @param componentIds Component to set value on * @param values Values to set */ function batchSetComponentValue( uint256[] calldata entities, uint256[] calldata componentIds, bytes[] calldata values ) external; /** * Sets multiple component values at once and emits a publish event (for cross-chain) * @param entities Entities to set values for * @param componentIds Component to set value on * @param values Values to set */ function batchPublishSetComponentValue( uint256[] calldata entities, uint256[] calldata componentIds, bytes[] calldata values ) external returns (uint256 requestId); /** * @param componentId Id of the component * @return Entire array of components belonging an entity * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function getEntityComponents( uint256 componentId ) external view returns (uint256[] memory); /** * @param componentId Id of the component * @return Number of components belonging to an entity */ function getEntityComponentCount( uint256 componentId ) external view returns (uint256); /** * Gets multiple component values at once * @param entities Entities to get values for * @param componentIds Component to get value from */ function batchGetComponentValues( uint256[] calldata entities, uint256[] calldata componentIds ) external view returns (bytes[] memory values); /** * Register a component value update. * Emits the `ComponentValueSet` event for clients to reconstruct the state. * @param entity Entity to update * @param data Data to update */ function registerComponentValueSet( uint256 entity, bytes calldata data ) external; /** * Emit a component value update across chains. * Emits the `PublishComponentValueSet` event for cross-chain clients to reconstruct the state. * @param entity Entity to update * @param data Data to update */ function publishComponentValueSet( uint256 componentId, uint256 entity, bytes calldata data ) external returns (uint256); /** * Register a component batch value update. * Emits the `ComponentBatchValueSet` event for clients to reconstruct the state. * @param entities Entities to update * @param data Data to update */ function batchRegisterComponentValueSet( uint256[] calldata entities, bytes[] calldata data ) external; /** * Emit a component batch value update across chains. * Emits the `PublishComponentBatchValueSet` event for cross-chain clients to reconstruct the state. * @param entities Entities to update * @param data Data to update */ function batchPublishComponentValueSet( uint256 componentId, uint256[] calldata entities, bytes[] calldata data ) external returns (uint256); /** * Register a component value removal. * Emits the `ComponentValueRemoved` event for clients to reconstruct the state. */ function registerComponentValueRemoved(uint256 entity) external; /** * Emit a component value removal across chains. * Emits the `PublishComponentValueRemoved` event for cross-chain clients to reconstruct the state. */ // TODO: Reenable when we're ready to support cross-chain removal // function publishComponentValueRemoved( // uint256 componentId, // uint256 entity // ) external returns (uint256); /** * Register a component batch value removal. * Emits the `ComponentBatchValueRemoved` event for clients to reconstruct the state. * @param entities Entities to update */ function batchRegisterComponentValueRemoved( uint256[] calldata entities ) external; /** * Emit a component batch value removal across chains. * Emits the `PublishComponentBatchValueRemoved` event for cross-chain clients to reconstruct the state. * @param entities Entities to update */ // TODO: Reenable when we're ready to support cross-chain removal // function batchPublishComponentValueRemoved( // uint256 componentId, // uint256[] calldata entities // ) external returns (uint256); /** * DEPRECATED: Generate a new general-purpose entity GUID */ function generateGUIDDeprecated() external returns (uint256); /** * * @param operatorAddress Address of the Operator account * @return Authorized Player account for an address */ function getPlayerAccount( address operatorAddress ) external view returns (address); /** * @notice Sends a transfer to another chain in the multichain * @param systemId Id of the 1155 System (Must implement IMultichain1155) * @param from From address of the user sending the token * @param to To address of the user receiving the token * @param toChainId Chain ID of the receiving chain * @param id Array of token IDs to send * @param amount Array of token amounts to send */ function sendMultichain1155TransferSingle( uint256 systemId, address from, address to, uint256 toChainId, uint256 id, uint256 amount ) external; /** * @notice Sends a transfer to another chain in the multichain * @param systemId Id of the 1155 System (Must implement IMultichain1155) * @param from From address of the user sending the token * @param to To address of the user receiving the token * @param toChainId Chain ID of the receiving chain * @param ids Array of token IDs to send * @param amounts Array of token amounts to send */ function sendMultichain1155TransferBatch( uint256 systemId, address from, address to, uint256 toChainId, uint256[] calldata ids, uint256[] calldata amounts ) external; /** * @notice Sends a transfer to another chain in the multichain * @param systemId Id of the 1155 System (Must implement Multichain721) * @param from From address of the user sending the token * @param to To address of the user receiving the token * @param tokenId the tokenId being transferred * @param toChainId Chain ID of the receiving chain */ function sendMultichain721Transfer( uint256 systemId, address from, address to, uint256 tokenId, uint256 toChainId ) external; }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0; /** * @title The ERC-2771 Recipient Base Abstract Class - Declarations * * @notice A contract must implement this interface in order to support relayed transaction. * * @notice It is recommended that your contract inherits from the ERC2771Recipient contract. */ abstract contract IERC2771Recipient { /** * :warning: **Warning** :warning: The Forwarder can have a full control over your Recipient. Only trust verified Forwarder. * @param forwarder The address of the Forwarder contract that is being used. * @return isTrustedForwarder `true` if the Forwarder is trusted to forward relayed transactions by this Recipient. */ function isTrustedForwarder(address forwarder) public virtual view returns(bool); /** * @notice Use this method the contract anywhere instead of msg.sender to support relayed transactions. * @return sender The real sender of this call. * For a call that came through the Forwarder the real sender is extracted from the last 20 bytes of the `msg.data`. * Otherwise simply returns `msg.sender`. */ function _msgSender() internal virtual view returns (address); /** * @notice Use this method in the contract instead of `msg.data` when difference matters (hashing, signature, etc.) * @return data The real `msg.data` of this call. * For a call that came through the Forwarder, the real sender address was appended as the last 20 bytes * of the `msg.data` - so this method will strip those 20 bytes off. * Otherwise (if the call was made directly and not through the forwarder) simply returns `msg.data`. */ function _msgData() internal virtual view returns (bytes calldata); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.2; import "../../utils/AddressUpgradeable.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ``` * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. * @custom:oz-retyped-from bool */ uint8 private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint8 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. * * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a * constructor. * * Emits an {Initialized} event. */ modifier initializer() { bool isTopLevelCall = !_initializing; require( (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1), "Initializable: contract is already initialized" ); _initialized = 1; if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * A reinitializer may be used after the original initialization step. This is essential to configure modules that * are added through upgrades and that require initialization. * * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer` * cannot be nested. If one is invoked in the context of another, execution will revert. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. * * WARNING: setting the version to 255 will prevent any future reinitialization. * * Emits an {Initialized} event. */ modifier reinitializer(uint8 version) { require(!_initializing && _initialized < version, "Initializable: contract is already initialized"); _initialized = version; _initializing = true; _; _initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. * * Emits an {Initialized} event the first time it is successfully executed. */ function _disableInitializers() internal virtual { require(!_initializing, "Initializable: contract is initializing"); if (_initialized < type(uint8).max) { _initialized = type(uint8).max; emit Initialized(type(uint8).max); } } /** * @dev Internal function that returns the initialized version. Returns `_initialized` */ function _getInitializedVersion() internal view returns (uint8) { return _initialized; } /** * @dev Internal function that returns the initialized version. Returns `_initializing` */ function _isInitializing() internal view returns (bool) { return _initializing; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * 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[EIP 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 // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
{ "optimizer": { "enabled": true, "mode": "3" }, "evmVersion": "paris", "outputSelection": { "*": { "*": [ "abi" ] } }, "detectMissingLibraries": false, "forceEVMLA": false, "enableEraVMExtensions": false, "libraries": {} }
[{"inputs":[{"internalType":"address","name":"gameRegistry","type":"address"}],"name":"InvalidGameRegistry","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"expectedRole","type":"bytes32"}],"name":"MissingRole","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"requestId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"randomNumber","type":"uint256"}],"name":"ReceivedRandomNumber","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":[{"internalType":"uint256","name":"traceId","type":"uint256"}],"name":"getRandomNumber","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"gameRegistryAddress","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"forwarder","type":"address"}],"name":"isTrustedForwarder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"requestId","type":"uint256"},{"internalType":"uint256","name":"randomNumber","type":"uint256"}],"name":"randomNumberCallback","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"requestIdToRandomNumber","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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"}]
Contract Creation Code
9c4d535b00000000000000000000000000000000000000000000000000000000000000000100017bb130a1f23eff4b1dcb913ab1f9e609dbcbe0e11d7e2ea12ef20a75b800000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x00020000000000020006000000000002000100000001035500000060031002700000013e0030019d0000008006000039000000400060043f0000000100200190000000240000c13d0000013e02300197000000040020008c0000044d0000413d000000000301043b000000e003300270000001400030009c0000002c0000213d000001470030009c0000003e0000a13d000001480030009c000000cb0000613d000001490030009c000001070000613d0000014a0030009c0000044d0000c13d000000240020008c0000044d0000413d0000000002000416000000000002004b0000044d0000c13d0000000401100370000000000101043b000000000010043f0000006401000039000000200010043f04f504de0000040f0000010b0000013d0000000001000416000000000001004b0000044d0000c13d0000002001000039000001000010044300000120000004430000013f01000041000004f60001042e000001410030009c000000560000a13d000001420030009c0000010f0000613d000001430030009c000001330000613d000001440030009c0000044d0000c13d0000000001000416000000000001004b0000044d0000c13d0000003301000039000000000101041a00000008011002700000014d01100197000000800010043f0000014e01000041000004f60001042e0000014b0030009c0000018e0000613d0000014c0030009c0000044d0000c13d000000240020008c0000044d0000413d0000000002000416000000000002004b0000044d0000c13d0000000401100370000000000101043b0000014d0010009c0000044d0000213d04f504670000040f000000000001004b0000000001000039000000010100c039000000400200043d00000000001204350000013e0020009c0000013e0200804100000040012002100000016b011001c7000004f60001042e000001450030009c000001ee0000613d000001460030009c0000044d0000c13d000000240020008c0000044d0000413d0000000001000416000000000001004b0000044d0000c13d0000003301000039000000000101041a0000016702000041000000800020043f0000016802000041000000840020043f000000000300041400000008011002700000014d021001970000013e0030009c0000013e03008041000000c00130021000000169011001c704f504f00000040f00000060031002700000013e03300197000000200030008c000000200400003900000000040340190000001f0640018f000000200740019000000080057001bf0000007c0000613d0000008008000039000000000901034f000000009a09043c0000000008a80436000000000058004b000000780000c13d000000000006004b000000890000613d000000000771034f0000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f000000000065043500000001002001900000021e0000613d0000001f01400039000000600110018f00000080041001bf000000400040043f000000200030008c0000044d0000413d000000800200043d0000014d0020009c0000044d0000213d0000016a03000041000000000034043500000004030000390000000103300367000000000303043b00000084011001bf000000000031043500000000010004140000013e0010009c0000013e01008041000000c0011002100000004003400210000000000131019f00000164011001c7000400000004001d04f504eb0000040f000000040b00002900000060031002700000013e03300197000000200030008c000000200400003900000000040340190000001f0640018f000000200740019000000000057b0019000000b40000613d000000000801034f00000000090b0019000000008a08043c0000000009a90436000000000059004b000000b00000c13d000000000006004b000000c10000613d000000000771034f0000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f00000000006504350000000100200190000003280000613d0000001f01400039000000600110018f0000000001b10019000000400010043f000000200030008c0000044d0000413d00000000020b04330000022d0000013d0000000001000416000000000001004b0000044d0000c13d0000003301000039000000000101041a000000ff001001900000022a0000c13d0000016e02000041000000800020043f000000000300041400000008011002700000014d021001970000013e0030009c0000013e03008041000000c0013002100000016f011001c704f504f00000040f00000060031002700000013e03300197000000200030008c000000200400003900000000040340190000001f0640018f000000200740019000000080057001bf000000eb0000613d0000008008000039000000000901034f000000009a09043c0000000008a80436000000000058004b000000e70000c13d000000000006004b000000f80000613d000000000771034f0000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f000000000065043500000001002001900000025f0000613d0000001f01400039000000600110018f00000080011001bf000000400010043f000000200030008c0000044d0000413d000000800300043d000000000003004b0000000002000039000000010200c039000000000023004b0000022c0000613d0000044d0000013d0000000001000416000000000001004b0000044d0000c13d0000003401000039000000000101041a000000800010043f0000014e01000041000004f60001042e000000240020008c0000044d0000413d0000000002000416000000000002004b0000044d0000c13d0000000401100370000000000601043b0000014d0060009c0000044d0000213d0000000003000415000000060330008a0000000503300210000000000200041a0000ff0001200190000002310000c13d0000000003000415000000050330008a0000000503300210000000ff00200190000002310000c13d0000015e0120019700000101011001bf0000000002000019000000000010041b0000ff0000100190000002560000c13d000000400100043d00000064021000390000016503000041000000000032043500000044021000390000016603000041000000000032043500000024021000390000002b030000390000031d0000013d000000240020008c0000044d0000413d0000000002000416000000000002004b0000044d0000c13d0000000401100370000000000301043b0000014d0030009c0000044d0000213d00000000010004110000014d051001970000003304000039000000000104041a00000008011002700000014d02100198000400000003001d0000026b0000c13d000200000006001d000000000204041a0000002401600039000300000005001d00000000005104350000014f01000041000000000016043500000004016000390000015303000041000000000031043500000000010004140000013e0010009c0000013e01008041000000c0011002100000004003600210000000000113019f00000154011001c700000008022002700000014d0220019704f504f00000040f000000020b00002900000060031002700000013e03300197000000200030008c000000200400003900000000040340190000001f0640018f000000200740019000000000057b0019000001680000613d000000000801034f00000000090b0019000000008a08043c0000000009a90436000000000059004b000001640000c13d000000000006004b000001750000613d000000000771034f0000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f00000000006504350000000100200190000002e10000613d0000001f01400039000000600110018f0000000001b10019000000400010043f000000200030008c00000004030000290000044d0000413d00000000010b0433000000000001004b0000000002000039000000010200c039000000000021004b0000044d0000c13d000000000001004b000003630000c13d0000015701000041000000000010043f0000000301000029000000040010043f0000015301000041000000240010043f0000015401000041000004f700010430000000240020008c0000044d0000413d0000000002000416000000000002004b0000044d0000c13d0000000401100370000000000501043b000000000005004b0000000001000039000000010100c039000000000015004b0000044d0000c13d00000000030004110000003304000039000000000104041a00000008011002700000014d02100198000400000005001d000002a60000c13d00000080050000390000000001030019000300000005001d000000000204041a0000014f0300004100000000003504350000000403500039000001700400004100000000004304350000014d031001970000002401500039000200000003001d000000000031043500000000010004140000013e0010009c0000013e01008041000000c0011002100000004003500210000000000113019f00000154011001c700000008022002700000014d0220019704f504f00000040f000000030b00002900000060031002700000013e03300197000000200030008c000000200400003900000000040340190000001f0640018f000000200740019000000000057b0019000001c80000613d000000000801034f00000000090b0019000000008a08043c0000000009a90436000000000059004b000001c40000c13d000000000006004b000001d50000613d000000000771034f0000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f00000000006504350000000100200190000002ed0000613d0000001f01400039000000600110018f0000000004b10019000000400040043f000000200030008c00000004050000290000044d0000413d00000000010b0433000000000001004b0000000002000039000000010200c039000000000021004b0000044d0000c13d000000000001004b0000036d0000c13d0000015701000041000000000010043f0000000201000029000000040010043f0000017001000041000000240010043f0000015401000041000004f700010430000000440020008c0000044d0000413d0000000002000416000000000002004b0000044d0000c13d0000002402100370000000000202043b000400000002001d0000000401100370000000000101043b000300000001001d000000000010043f0000006401000039000000200010043f00000000010004140000013e0010009c0000013e01008041000000c0011002100000016c011001c7000080100200003904f504f00000040f00000001002001900000044d0000613d000000000101043b0000000403000029000000000031041b000000400100043d00000020021000390000000000320435000000030200002900000000002104350000013e0010009c0000013e01008041000000400110021000000000020004140000013e0020009c0000013e02008041000000c002200210000000000112019f0000016c011001c70000800d0200003900000001030000390000016d0400004104f504eb0000040f00000001002001900000044d0000613d0000000001000019000004f60001042e0000001f0530018f0000015206300198000000400200043d0000000004620019000003330000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b000002250000c13d000003330000013d00000080010000390000000102000039000000010220018f000000000021043500000040011002100000016b011001c7000004f60001042e000400000003001d000100000001001d000300000002001d000200000006001d000001580100004100000000001004430000000001000410000000040010044300000000010004140000013e0010009c0000013e01008041000000c00110021000000159011001c7000080020200003904f504f00000040f0000000100200190000002e00000613d000000000101043b000000000001004b000003110000c13d0000000302000029000000ff0120018f000000010010008c00000004010000290000000501100270000000000100003f000000010100603f000003140000c13d000000010000006b0000000206000029000001230000613d0000017501200197000000010200003900000001011001bf000000000010041b0000ff0000100190000001290000613d0000014d006001980000000103000039000000000033041b000003460000c13d0000016301000041000000000010043f000000040000043f0000016401000041000004f7000104300000001f0530018f0000015206300198000000400200043d0000000004620019000003330000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b000002660000c13d000003330000013d0000014f01000041000000800010043f0000015001000041000000840010043f000300000005001d000000a40050043f00000000010004140000013e0010009c0000013e01008041000000c00110021000000151011001c704f504f00000040f00000060031002700000013e03300197000000200030008c000000200400003900000000040340190000001f0640018f000000200740019000000080057001bf000002860000613d0000008008000039000000000901034f000000009a09043c0000000008a80436000000000058004b000002820000c13d000000000006004b000002930000613d000000000771034f0000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f00000000006504350000000100200190000002f90000613d0000001f01400039000000600110018f00000080061001bf000000400060043f000000200030008c0000044d0000413d000000800100043d000000000001004b0000000002000039000000010200c039000000000021004b0000044d0000c13d000000000001004b0000038c0000c13d00000033040000390000000305000029000001440000013d0000014f01000041000000800010043f0000015001000041000000840010043f0000014d01300197000000a40010043f00000000010004140000013e0010009c0000013e01008041000000c00110021000000151011001c704f504f00000040f00000060031002700000013e03300197000000200030008c000000200400003900000000040340190000001f0640018f000000200740019000000080057001bf000002c10000613d0000008008000039000000000901034f000000009a09043c0000000008a80436000000000058004b000002bd0000c13d000000000006004b000002ce0000613d000000000771034f0000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f00000000006504350000000100200190000003050000613d0000001f01400039000000600110018f00000080051001bf000000400050043f000000200030008c0000044d0000413d000000800100043d000000000001004b0000000002000039000000010200c039000000000021004b0000044d0000c13d000000000001004b000003930000c13d0000000001000411000003980000013d000000000001042f0000001f0530018f0000015206300198000000400200043d0000000004620019000003330000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b000002e80000c13d000003330000013d0000001f0530018f0000015206300198000000400200043d0000000004620019000003330000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b000002f40000c13d000003330000013d0000001f0530018f0000015206300198000000400200043d0000000004620019000003330000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b000003000000c13d000003330000013d0000001f0530018f0000015206300198000000400200043d0000000004620019000003330000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b0000030c0000c13d000003330000013d00000004010000290000000501100270000000000100003f000000400100043d00000064021000390000015a03000041000000000032043500000044021000390000015b03000041000000000032043500000024021000390000002e0300003900000000003204350000015c0200004100000000002104350000000402100039000000200300003900000000003204350000013e0010009c0000013e0100804100000040011002100000015d011001c7000004f7000104300000001f0530018f0000015206300198000000400200043d0000000004620019000003330000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b0000032f0000c13d000000000005004b000003400000613d000000000161034f0000000305500210000000000604043300000000065601cf000000000656022f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f000000000014043500000060013002100000013e0020009c0000013e020080410000004002200210000000000112019f000004f7000104300000003304000039000000000504041a0000015f0550019700000008066002100000015506600197000000000556019f00000001055001bf000000000054041b00000160040000410000003405000039000000000045041b000000000002004b0000021c0000c13d0000017601100197000000000010041b000000400100043d00000000003104350000013e0010009c0000013e01008041000000400110021000000000020004140000013e0020009c0000013e02008041000000c002200210000000000112019f00000161011001c70000800d020000390000016204000041000002190000013d0000014d00300198000000080130021000000155011001970000003303000039000000000203041a0000015602200197000000000112019f000000000013041b0000021c0000c13d0000025a0000013d0000003303000039000000000103041a000000ff0210018f000000000005004b0000039a0000c13d000000000002004b000003b50000613d000100000004001d0000017502100197000000000023041b0000000002000031000000140020008c0000037d0000413d00000008011002700000014d02100198000003c30000c13d000000010100002900000000020004110000014d022001970000000000210435000000400110021000000000020004140000013e0020009c0000013e02008041000000c002200210000000000121019f00000161011001c70000800d0200003900000001030000390000017204000041000002190000013d000000140100008a00000000011000310000000101100367000000000101043b00000060051002700000003304000039000001440000013d000000140100008a00000000011000310000000101100367000000000101043b00000060011002700000003304000039000001a30000013d000000000002004b000003b50000c13d000100000004001d000001750210019700000001022001bf000000000023041b0000000002000031000000140020008c000003a60000413d00000008011002700000014d02100198000004080000c13d000000010100002900000000020004110000014d022001970000000000210435000000400110021000000000020004140000013e0020009c0000013e02008041000000c002200210000000000121019f00000161011001c70000800d0200003900000001030000390000017104000041000002190000013d0000004401400039000001730200004100000000002104350000002401400039000000140200003900000000002104350000015c010000410000000000140435000000040140003900000020020000390000000000210435000000400140021000000174011001c7000004f70001043000000000010004110000014d011001970000000104000029000000240340003900000000001304350000014f01000041000000000014043500000004014000390000015003000041000000000031043500000000010004140000013e0010009c0000013e01008041000000c0011002100000004003400210000000000113019f00000154011001c704f504f00000040f00000060031002700000013e03300197000000200030008c000000200400003900000000040340190000001f0640018f00000020074001900000000105700029000003e40000613d000000000801034f0000000109000029000000008a08043c0000000009a90436000000000059004b000003e00000c13d000000000006004b000003f10000613d000000000771034f0000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f000000000065043500000001002001900000044f0000613d0000001f01400039000000600110018f00000001020000290000000001210019000000400010043f000000200030008c0000044d0000413d0000000002020433000000000002004b0000000003000039000000010300c039000000000032004b0000044d0000c13d000000000002004b0000037e0000613d000000140200008a00000000022000310000000102200367000000000202043b0000006002200270000003800000013d00000000010004110000014d011001970000000104000029000000240340003900000000001304350000014f01000041000000000014043500000004014000390000015003000041000000000031043500000000010004140000013e0010009c0000013e01008041000000c0011002100000004003400210000000000113019f00000154011001c704f504f00000040f00000060031002700000013e03300197000000200030008c000000200400003900000000040340190000001f0640018f00000020074001900000000105700029000004290000613d000000000801034f0000000109000029000000008a08043c0000000009a90436000000000059004b000004250000c13d000000000006004b000004360000613d000000000771034f0000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f000000000065043500000001002001900000045b0000613d0000001f01400039000000600110018f00000001020000290000000001210019000000400010043f000000200030008c0000044d0000413d0000000002020433000000000002004b0000000003000039000000010300c039000000000032004b0000044d0000c13d000000000002004b000003a70000613d000000140200008a00000000022000310000000102200367000000000202043b0000006002200270000003a90000013d0000000001000019000004f7000104300000001f0530018f0000015206300198000000400200043d0000000004620019000003330000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b000004560000c13d000003330000013d0000001f0530018f0000015206300198000000400200043d0000000004620019000003330000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b000004620000c13d000003330000013d00010000000000020000003302000039000000000202041a00000008022002700000014d02200198000004b50000613d0000014d01100197000000400400043d000100000004001d000000240340003900000000001304350000014f0100004100000000001404350000000401400039000001500300004100000000003104350000013e0040009c0000013e010000410000000001044019000000400110021000000000030004140000013e0030009c0000013e03008041000000c003300210000000000113019f00000154011001c704f504f00000040f000000010b00002900000060031002700000013e03300197000000200030008c000000200400003900000000040340190000001f0640018f000000200740019000000000057b0019000004920000613d000000000801034f00000000090b0019000000008a08043c0000000009a90436000000000059004b0000048e0000c13d000000000006004b0000049f0000613d000000000771034f0000000306600210000000000805043300000000086801cf000000000868022f000000000707043b0000010006600089000000000767022f00000000066701cf000000000686019f00000000006504350000000100200190000004b90000613d0000001f01400039000000600210018f0000000001b20019000000000021004b00000000020000390000000102004039000001770010009c000004d70000213d0000000100200190000004d70000c13d000000400010043f0000001f0030008c000004b70000a13d00000000010b0433000000000001004b0000000002000039000000010200c039000000000021004b000004b70000c13d000000000001042d0000000001000019000000000001042d0000000001000019000004f7000104300000001f0530018f0000015206300198000000400200043d0000000004620019000004c40000613d000000000701034f0000000008020019000000007907043c0000000008980436000000000048004b000004c00000c13d000000000005004b000004d10000613d000000000161034f0000000305500210000000000604043300000000065601cf000000000656022f000000000101043b0000010005500089000000000151022f00000000015101cf000000000161019f000000000014043500000060013002100000013e0020009c0000013e020080410000004002200210000000000112019f000004f7000104300000017801000041000000000010043f0000004101000039000000040010043f0000016401000041000004f700010430000000000001042f00000000010004140000013e0010009c0000013e01008041000000c0011002100000016c011001c7000080100200003904f504f00000040f0000000100200190000004e90000613d000000000101043b000000000001042d0000000001000019000004f700010430000004ee002104210000000102000039000000000001042d0000000002000019000000000001042d000004f3002104230000000102000039000000000001042d0000000002000019000000000001042d000004f500000432000004f60001042e000004f70001043000000000000000000000000000000000000000000000000000000000ffffffff0000000200000000000000000000000000000040000001000000000000000000000000000000000000000000000000000000000000000000000000008f561acb00000000000000000000000000000000000000000000000000000000c4d66de700000000000000000000000000000000000000000000000000000000c4d66de800000000000000000000000000000000000000000000000000000000dd898b2f00000000000000000000000000000000000000000000000000000000ed022ebd000000000000000000000000000000000000000000000000000000008f561acc00000000000000000000000000000000000000000000000000000000b37217a4000000000000000000000000000000000000000000000000000000005c975aba000000000000000000000000000000000000000000000000000000005c975abb000000000000000000000000000000000000000000000000000000005d1ca63100000000000000000000000000000000000000000000000000000000876770a80000000000000000000000000000000000000000000000000000000016c38b3c00000000000000000000000000000000000000000000000000000000572b6c05000000000000000000000000ffffffffffffffffffffffffffffffffffffffff0000000000000000000000000000000000000020000000800000000000000000c36dd7ea00000000000000000000000000000000000000000000000000000000d3df22cd6a774f62b0ae21ffd602cc92e7f3390518eee8b33307fc70380da7d2000000000000000000000000000000000000004400000080000000000000000000000000000000000000000000000000000000000000000000000000ffffffe0241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b0800000000000000000000000000000000000000440000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffff00ffffffffffffffffffffff0000000000000000000000000000000000000000ff0161a64a000000000000000000000000000000000000000000000000000000001806aa1896bbf26568e884a7374b41e002500962caba6a15023a8d90e8508b830200000200000000000000000000000000000024000000000000000000000000647920696e697469616c697a6564000000000000000000000000000000000000496e697469616c697a61626c653a20636f6e747261637420697320616c72656108c379a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000084000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000ffffffffffffffffffffff000000000000000000000000000000000000000000832e68c2af6432ede9876d142405243e5bea1f5b013f46b01a7e09d5b126c66802000000000000000000000000000000000000200000000000000000000000007f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498f46aa4f80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000240000000000000000000000006e697469616c697a696e67000000000000000000000000000000000000000000496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206953e41c1e00000000000000000000000000000000000000000000000000000000848d8047ca671fa7d4bcb715604314b1cf8bc7332773d13d3d22bda6b50a62240000000000000000000000000000000000000024000000800000000000000000e391447200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000002000000000000000000000000000000000000400000000000000000000000002e6a7a58ec7d8d7e71bb2ffae652d4dca0c30cb18d745638f761245e3d7fff475c975abb00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000080000000000000000065d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2585db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa5061757361626c653a206e6f74207061757365640000000000000000000000000000000000000000000000000000000000000064000000000000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff000000000000000000000000000000000000000000000000ffffffffffffffff4e487b71000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000efb521d3c84914e9b573d6c5fadd6eb5097fa45585530d47ba79aee144df053e
Loading...
Loading
Loading...
Loading
[ 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.