Overview
APE Balance
0 APE
APE Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 7 from a total of 7 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Airdrop Single | 8280352 | 20 hrs ago | IN | 0 APE | 0.00157842 | ||||
Airdrop Single | 8280250 | 20 hrs ago | IN | 0 APE | 0.00157842 | ||||
Airdrop Single | 8280131 | 20 hrs ago | IN | 0 APE | 0.00157842 | ||||
Airdrop Single | 8280126 | 20 hrs ago | IN | 0 APE | 0.00157839 | ||||
Airdrop Single | 8116639 | 3 days ago | IN | 0 APE | 0.00201311 | ||||
Grant Role | 7914349 | 6 days ago | IN | 0 APE | 0.00257259 | ||||
Grant Role | 7914307 | 6 days ago | IN | 0 APE | 0.00300729 |
Loading...
Loading
Contract Name:
FloorPack
Compiler Version
v0.8.18+commit.87f61d96
Optimization Enabled:
Yes with 1000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
pragma solidity ^0.8.18; import "./mason/utils/Administrable.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; import "operator-filter-registry/src/DefaultOperatorFilterer.sol"; import "./ERC2981.sol"; error CannotDecreaseMaxSupply(); error CannotIncreaseMaxSupply(); error CannotMintMoreThanMaxSupply(); error RoyaltiesTooHigh(); error TokenIdIsDisabled(); contract FloorPack is DefaultOperatorFilterer, ERC1155, ERC1155Supply, ERC2981Base, Administrable { // Used to enforce max supply constraints on a token. Note that by // default, maxSupply is 0, which means that there is unlimited supply. struct TokenConfig { uint64 maxSupply; bool isDisabled; } RoyaltyInfo private _royalties; string public name; string public symbol; string public contractMetadataUri; mapping(uint256 => TokenConfig) public tokenConfigs; constructor( string memory _name, string memory _symbol, string memory _uri, string memory _contractMetadataUri ) ERC1155(_uri) { _setRoyaltyInfo(msg.sender, 500); // 5% _setURI(_uri); _setContractURI(_contractMetadataUri); name = _name; symbol = _symbol; } // *********************** // * Token Management // *********************** function setTokenConfig( uint256 tokenId, TokenConfig memory newConfig ) external onlyOperatorsAndOwner { _setTokenConfig(tokenId, newConfig); } function _setTokenConfig( uint256 tokenId, TokenConfig memory newConfig ) internal { TokenConfig memory currentConfig = tokenConfigs[tokenId]; if ( currentConfig.maxSupply != 0 && newConfig.maxSupply > currentConfig.maxSupply ) revert CannotIncreaseMaxSupply(); if (newConfig.maxSupply < totalSupply(tokenId)) revert CannotDecreaseMaxSupply(); tokenConfigs[tokenId] = newConfig; } // *********************** // * Metadata Management // *********************** // Sets the base URI of the tokens. We rely on the substitution mechanism // so that we can use the same URI for all tokens. // Expected format is https://server.com/directory/{id}.json function setURI(string memory uri) public onlyOperatorsAndOwner { _setURI(uri); } // This defines contract-level metadata (that can be overridden by marketplace // configuration). function contractURI() public view returns (string memory) { return contractMetadataUri; } function setContractURI( string memory _contractMetadataUri ) public onlyOperatorsAndOwner { _setContractURI(_contractMetadataUri); } function _setContractURI(string memory _contractMetadataUri) internal { contractMetadataUri = _contractMetadataUri; } // *********************** // * Token Distribution // *********************** function batchAirdrop( uint256 tokenId, address[] memory recipients ) external onlyOperatorsAndOwner { TokenConfig memory config = tokenConfigs[tokenId]; if (config.isDisabled) revert TokenIdIsDisabled(); if ( config.maxSupply != 0 && config.maxSupply - totalSupply(tokenId) < recipients.length ) revert CannotMintMoreThanMaxSupply(); for (uint256 i = 0; i < recipients.length; ) { _mint(recipients[i], tokenId, 1, ""); unchecked { ++i; } } } function airdropSingle( uint256 tokenId, address to ) external onlyOperatorsAndOwner { TokenConfig memory config = tokenConfigs[tokenId]; if (config.isDisabled) revert TokenIdIsDisabled(); if (config.maxSupply != 0 && config.maxSupply == totalSupply(tokenId)) revert CannotMintMoreThanMaxSupply(); _mint(to, tokenId, 1, ""); } mapping(uint256 => uint256) private _tokenCounts; function airdropBatch( uint256[] memory tokenIds, address to ) external onlyOperatorsAndOwner { mapping(uint256 => uint256) storage localCounts = _tokenCounts; uint256[] memory amounts = new uint256[](tokenIds.length); for (uint256 i = 0; i < tokenIds.length; ) { uint256 tokenId = tokenIds[i]; TokenConfig memory config = tokenConfigs[tokenId]; localCounts[tokenId] += 1; if (config.isDisabled) revert TokenIdIsDisabled(); if ( config.maxSupply != 0 && config.maxSupply < totalSupply(tokenId) + localCounts[tokenId] ) revert CannotMintMoreThanMaxSupply(); amounts[i] = 1; unchecked { ++i; } } _mintBatch(to, tokenIds, amounts, ""); } // *********************** // * Boilerplate // *********************** function supportsInterface( bytes4 interfaceId ) public view virtual override(ERC1155, ERC2981Base, AccessControlEnumerable) returns (bool) { return interfaceId == type(ERC2981Base).interfaceId || interfaceId == type(IERC1155).interfaceId || super.supportsInterface(interfaceId); } // *********************** // * Royalties // *********************** function royaltyInfo( uint256 _tokenId, uint256 _salePrice ) external view returns (address receiver, uint256 royaltyAmount) { RoyaltyInfo memory royalties = _royalties; receiver = royalties.recipient; royaltyAmount = (_salePrice * royalties.amount) / 10000; } function setRoyalties( address recipient, uint256 value ) external onlyOperatorsAndOwner { _setRoyaltyInfo(recipient, value); } function _setRoyaltyInfo(address recipient, uint256 value) internal { if (value >= 10000) revert RoyaltiesTooHigh(); _royalties = RoyaltyInfo(recipient, uint24(value)); } function setApprovalForAll( address operator, bool approved ) public override(ERC1155) onlyAllowedOperatorApproval(operator) { super.setApprovalForAll(operator, approved); } function safeTransferFrom( address from, address to, uint256 tokenId, uint256 amount, bytes memory data ) public override(ERC1155) onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId, amount, data); } function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) public virtual override(ERC1155) onlyAllowedOperator(from) { super.safeBatchTransferFrom(from, to, ids, amounts, data); } function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal override(ERC1155, ERC1155Supply) { super._beforeTokenTransfer(operator, from, to, ids, amounts, data); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; import "../utils/Context.sol"; import "../utils/Strings.sol"; import "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ```solidity * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ```solidity * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules} * to enforce additional security measures for this role. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required 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})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `_msgSender()` is missing `role`. * Overriding this function changes the behavior of the {onlyRole} modifier. * * Format of the revert message is described in {_checkRole}. * * _Available since v4.6._ */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @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 (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(account), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleGranted} event. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleRevoked} event. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. * * May emit a {RoleRevoked} event. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * May emit a {RoleGranted} event. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. * * May emit a {RoleGranted} event. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. * * May emit a {RoleRevoked} event. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol) pragma solidity ^0.8.0; import "./IAccessControlEnumerable.sol"; import "./AccessControl.sol"; import "../utils/structs/EnumerableSet.sol"; /** * @dev Extension of {AccessControl} that allows enumerating the members of each role. */ abstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl { using EnumerableSet for EnumerableSet.AddressSet; mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) { return _roleMembers[role].at(index); } /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) { return _roleMembers[role].length(); } /** * @dev Overload {_grantRole} to track enumerable memberships */ function _grantRole(bytes32 role, address account) internal virtual override { super._grantRole(role, account); _roleMembers[role].add(account); } /** * @dev Overload {_revokeRole} to track enumerable memberships */ function _revokeRole(bytes32 role, address account) internal virtual override { super._revokeRole(role, account); _roleMembers[role].remove(account); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; /** * @dev External interface of AccessControlEnumerable declared to support ERC165 detection. */ interface IAccessControlEnumerable is IAccessControl { /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) external view returns (address); /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/ERC1155.sol) pragma solidity ^0.8.0; import "./IERC1155.sol"; import "./IERC1155Receiver.sol"; import "./extensions/IERC1155MetadataURI.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of the basic standard multi-token. * See https://eips.ethereum.org/EIPS/eip-1155 * Originally based on code by Enjin: https://github.com/enjin/erc-1155 * * _Available since v3.1._ */ contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI { using Address for address; // Mapping from token ID to account balances mapping(uint256 => mapping(address => uint256)) private _balances; // Mapping from account to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json string private _uri; /** * @dev See {_setURI}. */ constructor(string memory uri_) { _setURI(uri_); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC1155).interfaceId || interfaceId == type(IERC1155MetadataURI).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256) public view virtual override returns (string memory) { return _uri; } /** * @dev See {IERC1155-balanceOf}. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) public view virtual override returns (uint256) { require(account != address(0), "ERC1155: address zero is not a valid owner"); return _balances[id][account]; } /** * @dev See {IERC1155-balanceOfBatch}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch( address[] memory accounts, uint256[] memory ids ) public view virtual override returns (uint256[] memory) { require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch"); uint256[] memory batchBalances = new uint256[](accounts.length); for (uint256 i = 0; i < accounts.length; ++i) { batchBalances[i] = balanceOf(accounts[i], ids[i]); } return batchBalances; } /** * @dev See {IERC1155-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC1155-isApprovedForAll}. */ function isApprovedForAll(address account, address operator) public view virtual override returns (bool) { return _operatorApprovals[account][operator]; } /** * @dev See {IERC1155-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: caller is not token owner or approved" ); _safeTransferFrom(from, to, id, amount, data); } /** * @dev See {IERC1155-safeBatchTransferFrom}. */ function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: caller is not token owner or approved" ); _safeBatchTransferFrom(from, to, ids, amounts, data); } /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, from, to, ids, amounts, data); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; emit TransferSingle(operator, from, to, id, amount); _afterTokenTransfer(operator, from, to, ids, amounts, data); _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, to, ids, amounts, data); for (uint256 i = 0; i < ids.length; ++i) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; } emit TransferBatch(operator, from, to, ids, amounts); _afterTokenTransfer(operator, from, to, ids, amounts, data); _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data); } /** * @dev Sets a new URI for all token types, by relying on the token type ID * substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * By this mechanism, any occurrence of the `\{id\}` substring in either the * URI or any of the amounts in the JSON file at said URI will be replaced by * clients with the token type ID. * * For example, the `https://token-cdn-domain/\{id\}.json` URI would be * interpreted by clients as * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json` * for token type ID 0x4cce0. * * See {uri}. * * Because these URIs cannot be meaningfully represented by the {URI} event, * this function emits no events. */ function _setURI(string memory newuri) internal virtual { _uri = newuri; } /** * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mint(address to, uint256 id, uint256 amount, bytes memory data) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); _balances[id][to] += amount; emit TransferSingle(operator, address(0), to, id, amount); _afterTokenTransfer(operator, address(0), to, ids, amounts, data); _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _mintBatch( address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); for (uint256 i = 0; i < ids.length; i++) { _balances[ids[i]][to] += amounts[i]; } emit TransferBatch(operator, address(0), to, ids, amounts); _afterTokenTransfer(operator, address(0), to, ids, amounts, data); _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data); } /** * @dev Destroys `amount` tokens of token type `id` from `from` * * Emits a {TransferSingle} event. * * Requirements: * * - `from` cannot be the zero address. * - `from` must have at least `amount` tokens of token type `id`. */ function _burn(address from, uint256 id, uint256 amount) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][from] = fromBalance - amount; } emit TransferSingle(operator, from, address(0), id, amount); _afterTokenTransfer(operator, from, address(0), ids, amounts, ""); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. */ function _burnBatch(address from, uint256[] memory ids, uint256[] memory amounts) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); for (uint256 i = 0; i < ids.length; i++) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][from] = fromBalance - amount; } } emit TransferBatch(operator, from, address(0), ids, amounts); _afterTokenTransfer(operator, from, address(0), ids, amounts, ""); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits an {ApprovalForAll} event. */ function _setApprovalForAll(address owner, address operator, bool approved) internal virtual { require(owner != operator, "ERC1155: setting approval status for self"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Hook that is called before any token transfer. This includes minting * and burning, as well as batched variants. * * The same hook is called on both single and batched variants. For single * transfers, the length of the `ids` and `amounts` arrays will be 1. * * Calling conditions (for each `id` and `amount` pair): * * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens * of token type `id` will be transferred to `to`. * - When `from` is zero, `amount` tokens of token type `id` will be minted * for `to`. * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` * will be burned. * - `from` and `to` are never both zero. * - `ids` and `amounts` have the same, non-zero length. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual {} /** * @dev Hook that is called after any token transfer. This includes minting * and burning, as well as batched variants. * * The same hook is called on both single and batched variants. For single * transfers, the length of the `id` and `amount` arrays will be 1. * * Calling conditions (for each `id` and `amount` pair): * * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens * of token type `id` will be transferred to `to`. * - When `from` is zero, `amount` tokens of token type `id` will be minted * for `to`. * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` * will be burned. * - `from` and `to` are never both zero. * - `ids` and `amounts` have the same, non-zero length. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual {} function _doSafeTransferAcceptanceCheck( address operator, address from, address to, uint256 id, uint256 amount, bytes memory data ) private { if (to.isContract()) { try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) { if (response != IERC1155Receiver.onERC1155Received.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non-ERC1155Receiver implementer"); } } } function _doSafeBatchTransferAcceptanceCheck( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) private { if (to.isContract()) { try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns ( bytes4 response ) { if (response != IERC1155Receiver.onERC1155BatchReceived.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non-ERC1155Receiver implementer"); } } } function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) { uint256[] memory array = new uint256[](1); array[0] = element; return array; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC1155/extensions/ERC1155Supply.sol) pragma solidity ^0.8.0; import "../ERC1155.sol"; /** * @dev Extension of ERC1155 that adds tracking of total supply per id. * * Useful for scenarios where Fungible and Non-fungible tokens have to be * clearly identified. Note: While a totalSupply of 1 might mean the * corresponding is an NFT, there is no guarantees that no other token with the * same id are not going to be minted. */ abstract contract ERC1155Supply is ERC1155 { mapping(uint256 => uint256) private _totalSupply; /** * @dev Total amount of tokens in with a given id. */ function totalSupply(uint256 id) public view virtual returns (uint256) { return _totalSupply[id]; } /** * @dev Indicates whether any token exist with a given id, or not. */ function exists(uint256 id) public view virtual returns (bool) { return ERC1155Supply.totalSupply(id) > 0; } /** * @dev See {ERC1155-_beforeTokenTransfer}. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override { super._beforeTokenTransfer(operator, from, to, ids, amounts, data); if (from == address(0)) { for (uint256 i = 0; i < ids.length; ++i) { _totalSupply[ids[i]] += amounts[i]; } } if (to == address(0)) { for (uint256 i = 0; i < ids.length; ++i) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 supply = _totalSupply[id]; require(supply >= amount, "ERC1155: burn amount exceeds totalSupply"); unchecked { _totalSupply[id] = supply - amount; } } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol) pragma solidity ^0.8.0; import "../IERC1155.sol"; /** * @dev Interface of the optional ERC1155MetadataExtension interface, as defined * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP]. * * _Available since v3.1._ */ interface IERC1155MetadataURI is IERC1155 { /** * @dev Returns the URI for token type `id`. * * If the `\{id\}` substring is present in the URI, it must be replaced by * clients with the actual token type ID. */ function uri(uint256 id) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/IERC1155.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */ interface IERC1155 is IERC165 { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch( address[] calldata accounts, uint256[] calldata ids ) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev _Available since v3.1._ */ interface IERC1155Receiver is IERC165 { /** * @dev Handles the receipt of a single ERC1155 token type. This function is * called at the end of a `safeTransferFrom` after the balance has been updated. * * NOTE: To accept the transfer, this must return * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` * (i.e. 0xf23a6e61, or its own function selector). * * @param operator The address which initiated the transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param id The ID of the token being transferred * @param value The amount of tokens being transferred * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed */ function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external returns (bytes4); /** * @dev Handles the receipt of a multiple ERC1155 token types. This function * is called at the end of a `safeBatchTransferFrom` after the balances have * been updated. * * NOTE: To accept the transfer(s), this must return * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` * (i.e. 0xbc197c81, or its own function selector). * * @param operator The address which initiated the batch transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param ids An array containing ids of each token being transferred (order and length must match values array) * @param values An array containing amounts of each token being transferred (order and length must match ids array) * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed */ function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @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 * * Furthermore, `isContract` will also return true if the target contract within * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, * which only has an effect at the end of a transaction. * ==== * * [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://consensys.net/diligence/blog/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.8.0/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 Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(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); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// 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.9.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1, "Math: mulDiv overflow"); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10 ** 64) { value /= 10 ** 64; result += 64; } if (value >= 10 ** 32) { value /= 10 ** 32; result += 32; } if (value >= 10 ** 16) { value /= 10 ** 16; result += 16; } if (value >= 10 ** 8) { value /= 10 ** 8; result += 8; } if (value >= 10 ** 4) { value /= 10 ** 4; result += 4; } if (value >= 10 ** 2) { value /= 10 ** 2; result += 2; } if (value >= 10 ** 1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 256, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.0; /** * @dev Standard signed math utilities missing in the Solidity language. */ library SignedMath { /** * @dev Returns the largest of two signed numbers. */ function max(int256 a, int256 b) internal pure returns (int256) { return a > b ? a : b; } /** * @dev Returns the smallest of two signed numbers. */ function min(int256 a, int256 b) internal pure returns (int256) { return a < b ? a : b; } /** * @dev Returns the average of two signed numbers without overflow. * The result is rounded towards zero. */ function average(int256 a, int256 b) internal pure returns (int256) { // Formula from the book "Hacker's Delight" int256 x = (a & b) + ((a ^ b) >> 1); return x + (int256(uint256(x) >> 255) & (a ^ b)); } /** * @dev Returns the absolute unsigned value of a signed value. */ function abs(int256 n) internal pure returns (uint256) { unchecked { // must be unchecked in order to support `n = type(int256).min` return uint256(n >= 0 ? n : -n); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; import "./math/SignedMath.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `int256` to its ASCII `string` decimal representation. */ function toString(int256 value) internal pure returns (string memory) { return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value)))); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } /** * @dev Returns true if the two strings are equal. */ function equal(string memory a, string memory b) internal pure returns (bool) { return keccak256(bytes(a)) == keccak256(bytes(b)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol) // This file was procedurally generated from scripts/generate/templates/EnumerableSet.js. pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ```solidity * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. * * [WARNING] * ==== * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure * unusable. * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. * * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an * array of EnumerableSet. * ==== */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastValue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastValue; // Update the index for the moved value set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * 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 _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * 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 values(Bytes32Set storage set) internal view returns (bytes32[] memory) { bytes32[] memory store = _values(set._inner); bytes32[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * 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 values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values in the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * 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 values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } }
import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; import "./IERC2981.sol"; abstract contract ERC2981Base is ERC165, IERC2981Royalties { struct RoyaltyInfo { address recipient; uint24 amount; } function supportsInterface( bytes4 interfaceId ) public view virtual override returns (bool) { return interfaceId == type(IERC2981Royalties).interfaceId || super.supportsInterface(interfaceId); } }
interface IERC2981Royalties { function royaltyInfo( uint256 _tokenId, uint256 _value ) external view returns (address _receiver, uint256 _royaltyAmount); }
// SPDX-License-Identifier: Unlicense pragma solidity ^0.8.17; import "@openzeppelin/contracts/access/AccessControlEnumerable.sol"; import "./Ownable.sol"; error ContractsCannotMint(); error NotAuthorized(); error SaleNotActive(); error WhitelistNotActive(); abstract contract Administrable is AccessControlEnumerable, Ownable { bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE"); constructor() { _setupRole(DEFAULT_ADMIN_ROLE, msg.sender); } modifier onlyOperator() { if (!hasRole(OPERATOR_ROLE, msg.sender)) revert NotAuthorized(); _; } modifier onlyOperatorsAndOwner() { if (owner() != msg.sender && !hasRole(OPERATOR_ROLE, msg.sender)) revert NotAuthorized(); _; } modifier noContracts() { if (msg.sender != tx.origin) revert ContractsCannotMint(); _; } bool public saleIsActive = false; bool public whitelistIsActive = false; function flipWhitelistState() external onlyOperatorsAndOwner { whitelistIsActive = !whitelistIsActive; } function flipSaleState() external onlyOperatorsAndOwner { saleIsActive = !saleIsActive; } modifier requireActiveSale() { if (!saleIsActive) revert SaleNotActive(); _; } modifier requireActiveWhitelist() { if (!whitelistIsActive) revert WhitelistNotActive(); _; } }
// SPDX-License-Identifier: UNLICENSED // ███╗ ███╗ █████╗ ██████╗ ███████╗ ██╗ ██╗██╗████████╗██╗ ██╗ ███╗ ███╗ █████╗ ███████╗ ██████╗ ███╗ ██╗ // ████╗ ████║██╔══██╗██╔══██╗██╔════╝ ██║ ██║██║╚══██╔══╝██║ ██║ ████╗ ████║██╔══██╗██╔════╝██╔═══██╗████╗ ██║ // ██╔████╔██║███████║██║ ██║█████╗ ██║ █╗ ██║██║ ██║ ███████║ ██╔████╔██║███████║███████╗██║ ██║██╔██╗ ██║ // ██║╚██╔╝██║██╔══██║██║ ██║██╔══╝ ██║███╗██║██║ ██║ ██╔══██║ ██║╚██╔╝██║██╔══██║╚════██║██║ ██║██║╚██╗██║ // ██║ ╚═╝ ██║██║ ██║██████╔╝███████╗ ╚███╔███╔╝██║ ██║ ██║ ██║ ██║ ╚═╝ ██║██║ ██║███████║╚██████╔╝██║ ╚████║ // ╚═╝ ╚═╝╚═╝ ╚═╝╚═════╝ ╚══════╝ ╚══╝╚══╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ ╚═════╝ ╚═╝ ╚═══╝ pragma solidity ^0.8.17; abstract contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); error CallerIsNotTheOwner(); error NewOwnerIsZeroAddress(); constructor() { _transferOwnership(msg.sender); } function owner() public view virtual returns (address) { return _owner; } modifier onlyOwner() { if(owner() != msg.sender) revert CallerIsNotTheOwner(); _; } function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } function transferOwnership(address newOwner) public virtual onlyOwner { if(newOwner == address(0)) revert NewOwnerIsZeroAddress(); _transferOwnership(newOwner); } function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {OperatorFilterer} from "./OperatorFilterer.sol"; import {CANONICAL_CORI_SUBSCRIPTION} from "./lib/Constants.sol"; /** * @title DefaultOperatorFilterer * @notice Inherits from OperatorFilterer and automatically subscribes to the default OpenSea subscription. * @dev Please note that if your token contract does not provide an owner with EIP-173, it must provide * administration methods on the contract itself to interact with the registry otherwise the subscription * will be locked to the options set during construction. */ abstract contract DefaultOperatorFilterer is OperatorFilterer { /// @dev The constructor that is called when the contract is being deployed. constructor() OperatorFilterer(CANONICAL_CORI_SUBSCRIPTION, true) {} }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; interface IOperatorFilterRegistry { /** * @notice Returns true if operator is not filtered for a given token, either by address or codeHash. Also returns * true if supplied registrant address is not registered. */ function isOperatorAllowed(address registrant, address operator) external view returns (bool); /** * @notice Registers an address with the registry. May be called by address itself or by EIP-173 owner. */ function register(address registrant) external; /** * @notice Registers an address with the registry and "subscribes" to another address's filtered operators and codeHashes. */ function registerAndSubscribe(address registrant, address subscription) external; /** * @notice Registers an address with the registry and copies the filtered operators and codeHashes from another * address without subscribing. */ function registerAndCopyEntries(address registrant, address registrantToCopy) external; /** * @notice Unregisters an address with the registry and removes its subscription. May be called by address itself or by EIP-173 owner. * Note that this does not remove any filtered addresses or codeHashes. * Also note that any subscriptions to this registrant will still be active and follow the existing filtered addresses and codehashes. */ function unregister(address addr) external; /** * @notice Update an operator address for a registered address - when filtered is true, the operator is filtered. */ function updateOperator(address registrant, address operator, bool filtered) external; /** * @notice Update multiple operators for a registered address - when filtered is true, the operators will be filtered. Reverts on duplicates. */ function updateOperators(address registrant, address[] calldata operators, bool filtered) external; /** * @notice Update a codeHash for a registered address - when filtered is true, the codeHash is filtered. */ function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external; /** * @notice Update multiple codeHashes for a registered address - when filtered is true, the codeHashes will be filtered. Reverts on duplicates. */ function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external; /** * @notice Subscribe an address to another registrant's filtered operators and codeHashes. Will remove previous * subscription if present. * Note that accounts with subscriptions may go on to subscribe to other accounts - in this case, * subscriptions will not be forwarded. Instead the former subscription's existing entries will still be * used. */ function subscribe(address registrant, address registrantToSubscribe) external; /** * @notice Unsubscribe an address from its current subscribed registrant, and optionally copy its filtered operators and codeHashes. */ function unsubscribe(address registrant, bool copyExistingEntries) external; /** * @notice Get the subscription address of a given registrant, if any. */ function subscriptionOf(address addr) external returns (address registrant); /** * @notice Get the set of addresses subscribed to a given registrant. * Note that order is not guaranteed as updates are made. */ function subscribers(address registrant) external returns (address[] memory); /** * @notice Get the subscriber at a given index in the set of addresses subscribed to a given registrant. * Note that order is not guaranteed as updates are made. */ function subscriberAt(address registrant, uint256 index) external returns (address); /** * @notice Copy filtered operators and codeHashes from a different registrantToCopy to addr. */ function copyEntriesOf(address registrant, address registrantToCopy) external; /** * @notice Returns true if operator is filtered by a given address or its subscription. */ function isOperatorFiltered(address registrant, address operator) external returns (bool); /** * @notice Returns true if the hash of an address's code is filtered by a given address or its subscription. */ function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool); /** * @notice Returns true if a codeHash is filtered by a given address or its subscription. */ function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool); /** * @notice Returns a list of filtered operators for a given address or its subscription. */ function filteredOperators(address addr) external returns (address[] memory); /** * @notice Returns the set of filtered codeHashes for a given address or its subscription. * Note that order is not guaranteed as updates are made. */ function filteredCodeHashes(address addr) external returns (bytes32[] memory); /** * @notice Returns the filtered operator at the given index of the set of filtered operators for a given address or * its subscription. * Note that order is not guaranteed as updates are made. */ function filteredOperatorAt(address registrant, uint256 index) external returns (address); /** * @notice Returns the filtered codeHash at the given index of the list of filtered codeHashes for a given address or * its subscription. * Note that order is not guaranteed as updates are made. */ function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32); /** * @notice Returns true if an address has registered */ function isRegistered(address addr) external returns (bool); /** * @dev Convenience method to compute the code hash of an arbitrary contract */ function codeHashOf(address addr) external returns (bytes32); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; address constant CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS = 0x000000000000AAeB6D7670E522A718067333cd4E; address constant CANONICAL_CORI_SUBSCRIPTION = 0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6;
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {IOperatorFilterRegistry} from "./IOperatorFilterRegistry.sol"; import {CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS} from "./lib/Constants.sol"; /** * @title OperatorFilterer * @notice Abstract contract whose constructor automatically registers and optionally subscribes to or copies another * registrant's entries in the OperatorFilterRegistry. * @dev This smart contract is meant to be inherited by token contracts so they can use the following: * - `onlyAllowedOperator` modifier for `transferFrom` and `safeTransferFrom` methods. * - `onlyAllowedOperatorApproval` modifier for `approve` and `setApprovalForAll` methods. * Please note that if your token contract does not provide an owner with EIP-173, it must provide * administration methods on the contract itself to interact with the registry otherwise the subscription * will be locked to the options set during construction. */ abstract contract OperatorFilterer { /// @dev Emitted when an operator is not allowed. error OperatorNotAllowed(address operator); IOperatorFilterRegistry public constant OPERATOR_FILTER_REGISTRY = IOperatorFilterRegistry(CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS); /// @dev The constructor that is called when the contract is being deployed. constructor(address subscriptionOrRegistrantToCopy, bool subscribe) { // If an inheriting token contract is deployed to a network without the registry deployed, the modifier // will not revert, but the contract will need to be registered with the registry once it is deployed in // order for the modifier to filter addresses. if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) { if (subscribe) { OPERATOR_FILTER_REGISTRY.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy); } else { if (subscriptionOrRegistrantToCopy != address(0)) { OPERATOR_FILTER_REGISTRY.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy); } else { OPERATOR_FILTER_REGISTRY.register(address(this)); } } } } /** * @dev A helper function to check if an operator is allowed. */ modifier onlyAllowedOperator(address from) virtual { // Allow spending tokens from addresses with balance // Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred // from an EOA. if (from != msg.sender) { _checkFilterOperator(msg.sender); } _; } /** * @dev A helper function to check if an operator approval is allowed. */ modifier onlyAllowedOperatorApproval(address operator) virtual { _checkFilterOperator(operator); _; } /** * @dev A helper function to check if an operator is allowed. */ function _checkFilterOperator(address operator) internal view virtual { // Check registry code length to facilitate testing in environments without a deployed registry. if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) { // under normal circumstances, this function will revert rather than return false, but inheriting contracts // may specify their own OperatorFilterRegistry implementations, which may behave differently if (!OPERATOR_FILTER_REGISTRY.isOperatorAllowed(address(this), operator)) { revert OperatorNotAllowed(operator); } } } }
{ "optimizer": { "enabled": true, "runs": 1000 }, "viaIR": true, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"string","name":"_uri","type":"string"},{"internalType":"string","name":"_contractMetadataUri","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"CallerIsNotTheOwner","type":"error"},{"inputs":[],"name":"CannotDecreaseMaxSupply","type":"error"},{"inputs":[],"name":"CannotIncreaseMaxSupply","type":"error"},{"inputs":[],"name":"CannotMintMoreThanMaxSupply","type":"error"},{"inputs":[],"name":"NewOwnerIsZeroAddress","type":"error"},{"inputs":[],"name":"NotAuthorized","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"inputs":[],"name":"RoyaltiesTooHigh","type":"error"},{"inputs":[],"name":"TokenIdIsDisabled","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OPERATOR_FILTER_REGISTRY","outputs":[{"internalType":"contract IOperatorFilterRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OPERATOR_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"address","name":"to","type":"address"}],"name":"airdropBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"airdropSingle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address[]","name":"recipients","type":"address[]"}],"name":"batchAirdrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractMetadataUri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"flipSaleState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"flipWhitelistState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"saleIsActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_contractMetadataUri","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"setRoyalties","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"components":[{"internalType":"uint64","name":"maxSupply","type":"uint64"},{"internalType":"bool","name":"isDisabled","type":"bool"}],"internalType":"struct FloorPack.TokenConfig","name":"newConfig","type":"tuple"}],"name":"setTokenConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri","type":"string"}],"name":"setURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenConfigs","outputs":[{"internalType":"uint64","name":"maxSupply","type":"uint64"},{"internalType":"bool","name":"isDisabled","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"whitelistIsActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
6080604090808252346200069457600062003faa803803809162000024828662000699565b8439820190608083830312620006915782516001600160401b0392908381116200068d578162000056918601620006d3565b906020948581015185811162000689578262000074918301620006d3565b91878201518681116200068557816200008f918401620006d3565b916060810151908782116200068157620000ab929101620006d3565b936daaeb6d7670e522a718067333cd4e803b62000602575b5090620000d0816200074a565b600654336001600160a01b0382167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08580a36001600160b01b0319163361ffff60a01b19811691909117600655828052600480895289842060009283528952908990205490919060ff1615620005b7575b82805260059081895262000158338b86206200089a565b5089518a81018181108a821117620005a2578b52338082526101f4918b0191909152600780546001600160b81b03191662ffffff60a01b1990921691909117607d60a21b179055620001aa906200074a565b8551948786116200058f57600a54956001978888811c9816801562000584575b8b8910146200048a5781908b601f998a81116200052e575b50508b90898311600114620004c7578792620004bb575b5050600019600383901b1c191690881b17600a555b805190888211620004a8576008548881811c911680156200049d575b8b8210146200048a5790818884931162000437575b508a90888311600114620003d0578692620003c4575b5050600019600383901b1c191690871b176008555b8351968711620003b157600954918683811c93168015620003a6575b898410146200039357508482116200034b575b505085928511600114620002e2579394508492919083620002d6575b50501b916000199060031b1c1916176009555b516136829081620009288239f35b015192503880620002b5565b6009815285812093958591601f198316915b8883831062000330575050501062000316575b505050811b01600955620002c8565b015160001960f88460031b161c1916905538808062000307565b858701518855909601959485019487935090810190620002f4565b600983528783209085808901821c8301938a8a1062000389575b01901c019085905b8281106200037c575062000299565b600081550185906200036d565b9350829362000365565b634e487b7160e01b845260229052602483fd5b92607f169262000286565b634e487b7160e01b835260418252602483fd5b01519050388062000255565b600887528b87208a94509190601f198416888e5b8282106200041f575050841162000405575b505050811b016008556200026a565b015160001960f88460031b161c19169055388080620003f6565b8385015186558d979095019493840193018e620003e4565b909150600886528a862088808501861c8201928d861062000480575b918b918695949301871c01915b828110620004705750506200023f565b600081558594508b910162000460565b9250819262000453565b634e487b7160e01b865260228552602486fd5b90607f16906200022a565b634e487b7160e01b855260418452602485fd5b015190503880620001f9565b600a88528c88208b94509190601f198416898f5b828210620005165750508411620004fc575b505050811b01600a556200020e565b015160001960f88460031b161c19169055388080620004ed565b8385015186558e979095019493840193018f620004db565b90919250600a88528982892091818601881c83019386106200057a575b918c918695949301881c01915b8281106200056a57508d9150620001e2565b600081558594508c910162000558565b925081926200054b565b97607f1697620001ca565b634e487b7160e01b845260418352602484fd5b604185634e487b7160e01b6000525260246000fd5b82805281885288832033600052885288600020600160ff198254161790553333847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8180a462000141565b803b156200067d5781809160448b5180948193633e9f1edf60e11b8352306004840152733cc6cdda760b79bafa08df41ecfa224f810dceb660248401525af18015620006735715620000c3578681116200065f57885238620000c3565b634e487b7160e01b82526041600452602482fd5b89513d84823e3d90fd5b5080fd5b8680fd5b8580fd5b8480fd5b8280fd5b80fd5b600080fd5b601f909101601f19168101906001600160401b03821190821017620006bd57604052565b634e487b7160e01b600052604160045260246000fd5b919080601f8401121562000694578251906001600160401b038211620006bd57604051916020916200070f601f8301601f191684018562000699565b818452828287010111620006945760005b8181106200073657508260009394955001015290565b858101830151848201840152820162000720565b80516001600160401b038111620006bd5760025460019283821691841c821562000891575b602092838210146200087b57601f81116200082c575b5081601f8411600114620007c35750928293918392600094620007b7575b50501b916000199060031b1c191617600255565b015192503880620007a3565b919083601f198116600260005284600020946000905b88838310620008115750505010620007f7575b505050811b01600255565b015160001960f88460031b161c19169055388080620007ec565b858701518855909601959485019487935090810190620007d9565b600260005282600020601f850160051c81019184861062000870575b601f0160051c019085905b8281106200086357505062000785565b6000815501859062000853565b909150819062000848565b634e487b7160e01b600052602260045260246000fd5b607f166200076f565b919060018301600090828252806020526040822054156000146200092157845494680100000000000000008610156200090d5760018601808255861015620008f957836040949596828552602085200155549382526020522055600190565b634e487b7160e01b83526032600452602483fd5b634e487b7160e01b83526041600452602483fd5b5092505056fe6080604052600436101561001257600080fd5b60003560e01c8062fdd58e1461247257806301ffc9a71461230057806302fe53051461215757806306fdde03146120b15780630e89341c14611fcf57806314541a9914611ee95780631fe70d6f14611ec3578063248a9ca314611e945780632a55205a14611e2f5780632eb2c2d614611abc5780632f2ff15d146119f357806334918dfd1461194157806336568abe146118a257806341f43434146118795780634e1273f41461174c5780634f558e791461171e578063715018a6146116b65780638c7ea24b146115b85780638da5cb5b146115915780639010d07c1461154b57806391d14854146114fd578063938e3d7b1461133e57806395d89b4114611270578063a217fddf14611254578063a22cb46514611153578063ba66a5f914610a41578063bd85b03914611127578063c01bd0e9146110e6578063c09c4a1214610f42578063ca15c87314610f16578063d0c903d414610ab4578063d547741f14610a75578063e8a3d48514610a41578063e985e9c5146109ea578063eb8d2444146109c4578063f242432a14610557578063f2fde38b14610488578063f5b541a61461044d578063f6fa26ab1461039a5763fb7e6ccb146101d357600080fd5b346103955760403660031901126103955767ffffffffffffffff6004356024358281116103955761020890369060040161277e565b6001600160a01b039283600654163314158061035c575b6103325782600052600b602052604060002060ff60405191610240836124cd565b54838116835260401c16151580602083015261030857511680151590816102cf575b506102a55760005b81518110156102a3578061029d8561028460019486612cce565b51168560405191610294836124e9565b60008352612f19565b0161026a565b005b60046040517f74968af1000000000000000000000000000000000000000000000000000000008152fd5b905082600052600360205260406000205481039081116102f25781511138610262565b634e487b7160e01b600052601160045260246000fd5b60046040517fedf5a4db000000000000000000000000000000000000000000000000000000008152fd5b60046040517fea8e4eb5000000000000000000000000000000000000000000000000000000008152fd5b503360009081527f57018d00f0894f4c685bdd8ecad35c04cfd005a1a2fa559fc0e3d122bcf5b853602052604090205460ff161561021f565b600080fd5b3461039557600036600319011261039557600654336001600160a01b038216141580610414575b610332577fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff75ff00000000000000000000000000000000000000000060ff8360a81c161560a81b16911617600655600080f35b503360009081527f57018d00f0894f4c685bdd8ecad35c04cfd005a1a2fa559fc0e3d122bcf5b853602052604090205460ff16156103c1565b346103955760003660031901126103955760206040517f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b9298152f35b34610395576020366003190112610395576104a16124a1565b600654906001600160a01b038083169133830361052d57169182156105035773ffffffffffffffffffffffffffffffffffffffff191682176006557f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b60046040517f7448fbae000000000000000000000000000000000000000000000000000000008152fd5b60046040517f3e8be92f000000000000000000000000000000000000000000000000000000008152fd5b346103955760a0366003190112610395576105706124a1565b6105786124b7565b906084803567ffffffffffffffff81116103955761059a903690600401612763565b906001600160a01b03913383851614801590816109b6575b9061098b575b6105c190613402565b828516156105cf8115613473565b6105da604435613347565b6105e5606435613347565b918587161561092b575b61086c575b505060443560005260209460008652604060002084861660005286526040600020546106246064358210156134e4565b604435600052600087526040600020858716600052875260643590036040600020556044356000526000865260406000208482166000528652604060002061066f6064358254612cf8565b905560405160443581526064358782015284821690858716907fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6260403392a4803b6106b657005b60a06000610700958895604051978896879586938563f23a6e6160e01b9d8e87523360048801521660248601526044356044860152606435606486015284015260a48301906126c8565b0393165af16000918161083d575b506107d65750506001906107206132ba565b6308c379a0146107a1575b5061073257005b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d4552433131353560448201527f526563656976657220696d706c656d656e7465720000000000000000000000006064820152608490fd5b0390fd5b6107a96132d8565b90816107b5575061072b565b61079d60405192839262461bcd60e51b8452600484015260248301906126c8565b6001600160e01b0319161490506102a35760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a656374656044820152676420746f6b656e7360c01b6064820152608490fd5b61085e919250843d8611610865575b6108568183612505565b81019061329a565b908461070e565b503d61084c565b92959194909360005b845181101561091c576108888186612cce565b51906108948188612cce565b518260005260036020526040600020548181106108c8576108c393600052600360205203604060002055612cbf565b610875565b8a60405162461bcd60e51b815260206004820152602860248201527f455243313135353a206275726e20616d6f756e74206578636565647320746f74604482015267616c537570706c7960c01b6064820152fd5b509350939094915085806105f4565b959260009794919592975b865181101561097d578061094d610978928b612cce565b51610958828a612cce565b5160005260036020526109716040600020918254612cf8565b9055612cbf565b610936565b5092959691949093966105ef565b5082841660005260016020526040600020336000526020526105c160ff6040600020541690506105b8565b6109bf33613555565b6105b2565b3461039557600036600319011261039557602060ff60065460a01c166040519015158152f35b3461039557604036600319011261039557610a036124a1565b610a0b6124b7565b906001600160a01b03809116600052600160205260406000209116600052602052602060ff604060002054166040519015158152f35b3461039557600036600319011261039557610a71610a5d6125e7565b6040519182916020835260208301906126c8565b0390f35b34610395576040366003190112610395576102a3600435610a946124b7565b90806000526004602052610aaf600160406000200154612820565b612b6c565b34610395576003196040368201126103955767ffffffffffffffff9060043582811161039557610ae8903690600401612705565b610af06124b7565b906001600160a01b03806006541633141580610edd575b61033257610b158251612c8d565b9260005b8351811015610bd957610b2c8185612cce565b519081600052602091600b8352604060002060405190610b4b826124cd565b54938a8516825260ff8183019560401c161515855282600052600c9182825260406000209586546001978882018092116102f2575551610308578b905116918215159384610bae575b505050506102a55781610ba78288612cce565b5201610b19565b610bcf93945060005260038252604060002054915260406000205490612cf8565b1189808080610b94565b5083908560405193610bea856124e9565b60008552821690811594610bfe8615612ea8565b610c0b875186511461336c565b60005b8751811015610c355780610c25610c309288612cce565b51610958828b612cce565b610c0e565b509091939294610e1e575b60005b8651811015610c8f5780610c5a610c8a9286612cce565b51610c65828a612cce565b5160005260206000815260406000209088600052526109716040600020918254612cf8565b610c43565b50919290938160006040517f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb339180610cc98a8d836133dd565b0390a43b610cd357005b610d246000602094610d3360405197889687958694610d1463bc197c8160e01b9d8e885233600489015288602489015260a0604489015260a48801906127ec565b90848783030160648801526127ec565b918483030160848501526126c8565b03925af160009181610dfe575b50610d995750506001610d516132ba565b6308c379a014610d62575b61073257005b610d6a6132d8565b80610d755750610d5c565b61079d9060405191829162461bcd60e51b83526020600484015260248301906126c8565b6001600160e01b031916146102a35760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a656374656044820152676420746f6b656e7360c01b6064820152608490fd5b610e1791925060203d8111610865576108568183612505565b9083610d40565b939194929060005b8451811015610ed257610e398186612cce565b51610e448289612cce565b5190806000526003602081815260406000205492848410610e7d5790610e7895949392916000525203604060002055612cbf565b610e26565b6084826040519062461bcd60e51b82526004820152602860248201527f455243313135353a206275726e20616d6f756e74206578636565647320746f74604482015267616c537570706c7960c01b6064820152fd5b509092949193610c40565b503360009081527f57018d00f0894f4c685bdd8ecad35c04cfd005a1a2fa559fc0e3d122bcf5b853602052604090205460ff1615610b07565b346103955760203660031901126103955760043560005260056020526020604060002054604051908152f35b346103955760603660031901126103955760043560403660231901126103955760405190610f6f826124cd565b67ffffffffffffffff60243581811681036103955783526044359182151583036103955760208085019384526001600160a01b0360065416331415806110a3575b6103325781600052600b8152604060002060405190610fce826124cd565b54908260ff8684169384845260401c1615159101528015159081611096575b5061106c578285511682600052600382526040600020541161104257600b9160005252604060002092511668ff000000000000000083549251151560401b169168ffffffffffffffffff191617179055600080f35b60046040517f8423ff53000000000000000000000000000000000000000000000000000000008152fd5b60046040517fc4469e5b000000000000000000000000000000000000000000000000000000008152fd5b9050838651161186610fed565b507f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92960005260048152604060002033600052815260ff6040600020541615610fb0565b3461039557602036600319011261039557600435600052600b6020526040806000205460ff82519167ffffffffffffffff81168352831c1615156020820152f35b346103955760203660031901126103955760043560005260036020526020604060002054604051908152f35b346103955760403660031901126103955761116c6124a1565b60243590811515809203610395578061118c6001600160a01b0392613555565b16908133146111ea57336000526001602052604060002082600052602052604060002060ff1981541660ff83161790556040519081527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a3005b608460405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c2073746174757360448201527f20666f722073656c6600000000000000000000000000000000000000000000006064820152fd5b3461039557600036600319011261039557602060405160008152f35b34610395576000366003190112610395576040516000600954611292816125ad565b8084529060019081811690811561131757506001146112bc575b610a7184610a5d81860382612505565b6009600090815292507f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af5b8284106112ff575050508101602001610a5d826112ac565b805460208587018101919091529093019281016112e7565b60ff191660208087019190915292151560051b85019092019250610a5d91508390506112ac565b346103955761134c3661256e565b6001600160a01b0360065416331415806114c4575b61033257805167ffffffffffffffff81116114ae57611381600a546125ad565b601f8111611449575b50602080601f83116001146113c8575081926000926113bd575b5050600019600383901b1c191660019190911b17600a55005b0151905082806113a4565b90601f19831693600a6000527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a8926000905b8682106114315750508360019510611418575b505050811b01600a55005b015160001960f88460031b161c1916905582808061140d565b806001859682949686015181550195019301906113fa565b600a6000527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a8601f830160051c810191602084106114a4575b601f0160051c01905b818110611498575061138a565b6000815560010161148b565b9091508190611482565b634e487b7160e01b600052604160045260246000fd5b503360009081527f57018d00f0894f4c685bdd8ecad35c04cfd005a1a2fa559fc0e3d122bcf5b853602052604090205460ff1615611361565b34610395576040366003190112610395576115166124b7565b60043560005260046020526001600160a01b0360406000209116600052602052602060ff604060002054166040519015158152f35b3461039557604036600319011261039557600435600052600560205260206001600160a01b036115816024356040600020612d16565b9190546040519260031b1c168152f35b346103955760003660031901126103955760206001600160a01b0360065416604051908152f35b34610395576040366003190112610395576115d16124a1565b6024356001600160a01b0380600654163314158061167d575b61033257612710821015611653577fffffffffffffffffff0000000000000000000000000000000000000000000000906116256040516124cd565b76ffffff00000000000000000000000000000000000000006007549360a01b16931691161717600755600080f35b60046040517ffbbd0190000000000000000000000000000000000000000000000000000000008152fd5b503360009081527f57018d00f0894f4c685bdd8ecad35c04cfd005a1a2fa559fc0e3d122bcf5b853602052604090205460ff16156115ea565b34610395576000366003190112610395576006546001600160a01b03811633810361052d5773ffffffffffffffffffffffffffffffffffffffff19600092166006557f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b3461039557602036600319011261039557600435600052600360205260206040600020541515604051908152f35b346103955760403660031901126103955767ffffffffffffffff6004358181116103955761177e90369060040161277e565b9060243590811161039557611797903690600401612705565b90805182510361180f576117ab8151612c8d565b9160005b82518110156117f957806117e46001600160a01b036117d16117f49487612cce565b51166117dd8386612cce565b5190612bf6565b6117ee8287612cce565b52612cbf565b6117af565b60405160208082528190610a71908201876127ec565b608460405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e67746860448201527f206d69736d6174636800000000000000000000000000000000000000000000006064820152fd5b346103955760003660031901126103955760206040516daaeb6d7670e522a718067333cd4e8152f35b34610395576040366003190112610395576118bb6124b7565b336001600160a01b038216036118d7576102a390600435612b6c565b608460405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152fd5b3461039557600036600319011261039557600654336001600160a01b0382161415806119ba575b610332577fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff74ff000000000000000000000000000000000000000060ff8360a01c161560a01b16911617600655600080f35b503360009081527f57018d00f0894f4c685bdd8ecad35c04cfd005a1a2fa559fc0e3d122bcf5b853602052604090205460ff1615611968565b34610395576040366003190112610395576102a36004356005611a146124b7565b918060005260209060048252611a31600160406000200154612820565b80600052600482526001600160a01b03604060002094169384600052825260ff6040600020541615611a6c575b600052526040600020612d2e565b806000526004825260406000208460005282526040600020600160ff198254161790553384827f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d600080a4611a5e565b346103955760031960a03682011261039557611ad66124a1565b90611adf6124b7565b60449081359267ffffffffffffffff9384811161039557611b04903690600401612705565b6064803586811161039557611b1d903690600401612705565b94608496873590811161039557611b38903690600401612763565b6001600160a01b039433868b161480159081611e21575b90611df6575b611b5e90613402565b611b6b855189511461336c565b85871615611b798115613473565b868b1615611db3575b611cec575b60005b8551811015611c205780611ba1611c1b9288612cce565b518c611bad838d612cce565b519180600052826020926000845260406000208d8216600052845260406000205490611bdb838310156134e4565b83600052600085528d60406000209116600052845203604060002055600052600081526040600020908a8c16600052526109716040600020918254612cf8565b611b8a565b50888a989796949789604051887f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb89808d1694169280611c62873395836133dd565b0390a4873b611c6d57005b60405198899788968863bc197c8160e01b9d8e8a523360048b0152166024890152870160a0905260a48701611ca1916127ec565b90848783030190870152611cb4916127ec565b918483030190840152611cc6916126c8565b03921691815a602094600091f160009181610dfe5750610d995750506001610d516132ba565b9796949060009993999692965b8551811015611da357611d0c8187612cce565b51611d178289612cce565b51908060005260206003815260406000205491838310611d5057611d4b949392916003916000525203604060002055612cbf565b611cf9565b508b9067616c537570706c7960c01b8f7f455243313135353a206275726e20616d6f756e74206578636565647320746f748e6040519462461bcd60e51b8652600486015260286024860152840152820152fd5b5090949697989298959195611b87565b99969498959392919060005b8a51811015611de757808b61095882611ddb611de2958f612cce565b5192612cce565b611dbf565b50909192939598949699611b82565b50858a166000526001602052604060002033600052602052611b5e60ff604060002054169050611b55565b611e2a33613555565b611b4f565b3461039557604036600319011261039557602060243560405190611e52826124cd565b6007549162ffffff6001600160a01b0384169384835260a01c1693849101528281029281840414901517156102f2576127106040928351928352046020820152f35b346103955760203660031901126103955760043560005260046020526020600160406000200154604051908152f35b3461039557600036600319011261039557602060ff60065460a81c166040519015158152f35b3461039557604036600319011261039557600435611f056124b7565b6001600160a01b036006541633141580611f96575b6103325781600052600b602052604060002060405190611f39826124cd565b549060ff67ffffffffffffffff92838116835260401c1615158060208301526103085751168015159081611f7e575b506102a5576102a39160405191610294836124e9565b90508260005260036020526040600020541483611f68565b503360009081527f57018d00f0894f4c685bdd8ecad35c04cfd005a1a2fa559fc0e3d122bcf5b853602052604090205460ff1615611f1a565b3461039557602080600319360112610395576040519060008260025491611ff5836125ad565b92838352600190858282169182600014612091575050600114612034575b5061202092500383612505565b610a716040519282849384528301906126c8565b84915060026000527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace906000915b858310612079575050612020935082010185612013565b80548389018501528794508693909201918101612062565b60ff19168582015261202095151560051b85010192508791506120139050565b346103955760003660031901126103955760405160006008546120d3816125ad565b8084529060019081811690811561131757506001146120fc57610a7184610a5d81860382612505565b6008600090815292507ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee35b82841061213f575050508101602001610a5d826112ac565b80546020858701810191909152909301928101612127565b34610395576121653661256e565b6001600160a01b0360065416331415806122c7575b61033257805167ffffffffffffffff81116114ae5761219a6002546125ad565b601f8111612262575b50602080601f83116001146121e1575081926000926121d6575b5050600019600383901b1c191660019190911b17600255005b0151905082806121bd565b90601f1983169360026000527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace926000905b86821061224a5750508360019510612231575b505050811b01600255005b015160001960f88460031b161c19169055828080612226565b80600185968294968601518155019501930190612213565b60026000527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace601f830160051c810191602084106122bd575b601f0160051c01905b8181106122b157506121a3565b600081556001016122a4565b909150819061229b565b503360009081527f57018d00f0894f4c685bdd8ecad35c04cfd005a1a2fa559fc0e3d122bcf5b853602052604090205460ff161561217a565b34610395576020366003190112610395576004356001600160e01b0319811680910361039557807f01ffc9a700000000000000000000000000000000000000000000000000000000602092149081908215612461575b8215612369575b50506040519015158152f35b7f5a05180f000000000000000000000000000000000000000000000000000000008114925090821561239f575b5050828061235d565b7f7965db0b00000000000000000000000000000000000000000000000000000000821492509082156123d5575b50508280612396565b7f2a55205a000000000000000000000000000000000000000000000000000000008114925090821561240b575b505082806123cc565b636cdb3d1360e11b82149250908215612437575b50811561242f575b508280612402565b905082612427565b7f0e89341c000000000000000000000000000000000000000000000000000000001491508361241f565b636cdb3d1360e11b81149250612356565b346103955760403660031901126103955760206124996124906124a1565b60243590612bf6565b604051908152f35b600435906001600160a01b038216820361039557565b602435906001600160a01b038216820361039557565b6040810190811067ffffffffffffffff8211176114ae57604052565b6020810190811067ffffffffffffffff8211176114ae57604052565b90601f8019910116810190811067ffffffffffffffff8211176114ae57604052565b92919267ffffffffffffffff82116114ae5760405191612551601f8201601f191660200184612505565b829481845281830111610395578281602093846000960137010152565b6020600319820112610395576004359067ffffffffffffffff82116103955780602383011215610395578160246125aa93600401359101612527565b90565b90600182811c921680156125dd575b60208310146125c757565b634e487b7160e01b600052602260045260246000fd5b91607f16916125bc565b60405190600082600a54916125fb836125ad565b808352926001908181169081156126835750600114612624575b5061262292500383612505565b565b600a600090815291507fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a85b8483106126685750612622935050810160200138612615565b81935090816020925483858a0101520191019091859261264f565b90506020925061262294915060ff191682840152151560051b82010138612615565b60005b8381106126b85750506000910152565b81810151838201526020016126a8565b906020916126e1815180928185528580860191016126a5565b601f01601f1916010190565b67ffffffffffffffff81116114ae5760051b60200190565b81601f820112156103955780359161271c836126ed565b9261272a6040519485612505565b808452602092838086019260051b820101928311610395578301905b828210612754575050505090565b81358152908301908301612746565b9080601f83011215610395578160206125aa93359101612527565b81601f8201121561039557803591612795836126ed565b926127a36040519485612505565b808452602092838086019260051b820101928311610395578301905b8282106127cd575050505090565b81356001600160a01b03811681036103955781529083019083016127bf565b90815180825260208080930193019160005b82811061280c575050505090565b8351855293810193928101926001016127fe565b600090808252600490602092828452604091828220338352855260ff83832054161561284d575050505050565b825167ffffffffffffffff9190336060820184811183821017612b59578652602a82528782019286368537825115612b465760308453825191600192831015612b33576078602185015360295b838111612abf5750612a7e5790865194608086019086821090821117612a6b57875260428552888501956060368837855115612a5857603087538551821015612a585790607860218701536041915b8183116129e05750505061299f57867f416363657373436f6e74726f6c3a206163636f756e74200000000000000000009486946129766129859561294160489661079d9b519a8b9788015251809260378801906126a5565b8401917f206973206d697373696e6720726f6c65200000000000000000000000000000006037840152518093868401906126a5565b01036028810185520183612505565b5193849362461bcd60e51b855284015260248301906126c8565b606486888088519262461bcd60e51b845283015260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b909192600f81166010811015612a45577f3031323334353637383961626364656600000000000000000000000000000000901a612a1d8589612d05565b53891c928015612a32576000190191906128e9565b60248260118c634e487b7160e01b835252fd5b60248360328d634e487b7160e01b835252fd5b8060328a634e487b7160e01b6024945252fd5b60248760418b634e487b7160e01b835252fd5b6064888a808a519262461bcd60e51b845283015260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b90600f81166010811015612b20577f3031323334353637383961626364656600000000000000000000000000000000901a612afa8387612d05565b53891c908015612b0d576000190161289a565b60248860118c634e487b7160e01b835252fd5b60248960328d634e487b7160e01b835252fd5b60248760328b634e487b7160e01b835252fd5b60248660328a634e487b7160e01b835252fd5b60248660418a634e487b7160e01b835252fd5b906040612bab9260009080825260046020526001600160a01b0383832094169384835260205260ff8383205416612bae575b8152600560205220612db8565b50565b808252600460205282822084835260205282822060ff1981541690553384827ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b8580a4612b9e565b6001600160a01b0316908115612c2357600052600060205260406000209060005260205260406000205490565b608460405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201527f616c6964206f776e6572000000000000000000000000000000000000000000006064820152fd5b90612c97826126ed565b612ca46040519182612505565b8281528092612cb5601f19916126ed565b0190602036910137565b60001981146102f25760010190565b8051821015612ce25760209160051b010190565b634e487b7160e01b600052603260045260246000fd5b919082018092116102f257565b908151811015612ce2570160200190565b8054821015612ce25760005260206000200190600090565b91906001830160009082825280602052604082205415600014612db25784549468010000000000000000861015612d9e5783612d8e612d77886001604098999a01855584612d16565b819391549060031b91821b91600019901b19161790565b9055549382526020522055600190565b602483634e487b7160e01b81526041600452fd5b50925050565b90600182019060009281845282602052604084205490811515600014612ea15760001991808301818111612e8d57825490848201918211612e7957808203612e44575b50505080548015612e3057820191612e138383612d16565b909182549160031b1b191690555582526020526040812055600190565b602486634e487b7160e01b81526031600452fd5b612e64612e54612d779386612d16565b90549060031b1c92839286612d16565b90558652846020526040862055388080612dfb565b602488634e487b7160e01b81526011600452fd5b602487634e487b7160e01b81526011600452fd5b5050505090565b15612eaf57565b608460405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152fd5b91906001600160a01b03831690811592612f338415612ea8565b612f3c82613347565b926040958651612f4b816124cd565b60019586825260209788830189368237835115612ce2578890528791906000835b613247575b50613185575b505050836000526000865286600020826000528652866000208054908682018092116102f25755816000885186815287898201527fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628a3392a43b612fde575b505050505050565b6130228591600093885194858094819363f23a6e6160e01b998a845233600485015284602485015260448401528a606484015260a0608484015260a48301906126c8565b03925af160009181613166575b506130f95750509061303f6132ba565b6308c379a0146130c5575b5061305c57505b388080808080612fd6565b5162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d4552433131353560448201527f526563656976657220696d706c656d656e7465720000000000000000000000006064820152608490fd5b6130cd6132d8565b90816130d9575061304a565b61079d845192839262461bcd60e51b8452600484015260248301906126c8565b6001600160e01b03191603915061311290505750613051565b5162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a656374656044820152676420746f6b656e7360c01b6064820152608490fd5b61317e919250853d8711610865576108568183612505565b903861302f565b906000905b613197575b879150612f77565b8151811015613242576131aa8183612cce565b516131b58285612cce565b5190806000526003808c528c60002054918383106131ee57916131e793918c9695936000528d52038c60002055612cbf565b909161318a565b60848d8f519062461bcd60e51b82526004820152602860248201527f455243313135353a206275726e20616d6f756e74206578636565647320746f74604482015267616c537570706c7960c01b6064820152fd5b61318f565b8a8c849593945183101561328f57906109718392600361326a613286968b612cce565b5193613276868b612cce565b5160005252600020918254612cf8565b81939291612f6c565b505092919092612f71565b9081602091031261039557516001600160e01b0319811681036103955790565b60009060033d116132c757565b905060046000803e60005160e01c90565b600060443d106125aa57604051600319913d83016004833e815167ffffffffffffffff918282113d6024840111176133365781840194855193841161333e573d8501016020848701011161333657506125aa92910160200190612505565b949350505050565b50949350505050565b60405190613354826124cd565b60018252602082016020368237825115612ce2575290565b1561337357565b608460405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e6774682060448201527f6d69736d617463680000000000000000000000000000000000000000000000006064820152fd5b90916133f46125aa936040845260408401906127ec565b9160208184039101526127ec565b1561340957565b608460405162461bcd60e51b815260206004820152602e60248201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60448201527f6572206f7220617070726f7665640000000000000000000000000000000000006064820152fd5b1561347a57565b608460405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152fd5b156134eb57565b608460405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201527f72207472616e73666572000000000000000000000000000000000000000000006064820152fd5b6daaeb6d7670e522a718067333cd4e90813b61356f575050565b60206001600160a01b03916044604051809481937fc617113400000000000000000000000000000000000000000000000000000000835230600484015216958660248301525afa908115613640576000916135ff575b50156135ce5750565b602490604051907fede71dcc0000000000000000000000000000000000000000000000000000000082526004820152fd5b6020813d8211613638575b8161361760209383612505565b8101031261363457519081151582036136315750386135c5565b80fd5b5080fd5b3d915061360a565b6040513d6000823e3d90fdfea2646970667358221220c8ce0ebdcb31cabbbb59ce195771e8d182c3c35523c3385599bcd6696442450864736f6c63430008120033000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000000d5465737420436f6e74726163740000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045445535400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004968747470733a2f2f617277656176652e6e65742f5462767a37732d315a3736385f3556347164355079366e4b41705839735277713771746a6e4572316c42302f7b69647d2e6a736f6e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003f68747470733a2f2f617277656176652e6e65742f59454c66714f6352633375314f774c41687a6a6a757655507738336551394a6a547358546c38445536684900
Deployed Bytecode
0x6080604052600436101561001257600080fd5b60003560e01c8062fdd58e1461247257806301ffc9a71461230057806302fe53051461215757806306fdde03146120b15780630e89341c14611fcf57806314541a9914611ee95780631fe70d6f14611ec3578063248a9ca314611e945780632a55205a14611e2f5780632eb2c2d614611abc5780632f2ff15d146119f357806334918dfd1461194157806336568abe146118a257806341f43434146118795780634e1273f41461174c5780634f558e791461171e578063715018a6146116b65780638c7ea24b146115b85780638da5cb5b146115915780639010d07c1461154b57806391d14854146114fd578063938e3d7b1461133e57806395d89b4114611270578063a217fddf14611254578063a22cb46514611153578063ba66a5f914610a41578063bd85b03914611127578063c01bd0e9146110e6578063c09c4a1214610f42578063ca15c87314610f16578063d0c903d414610ab4578063d547741f14610a75578063e8a3d48514610a41578063e985e9c5146109ea578063eb8d2444146109c4578063f242432a14610557578063f2fde38b14610488578063f5b541a61461044d578063f6fa26ab1461039a5763fb7e6ccb146101d357600080fd5b346103955760403660031901126103955767ffffffffffffffff6004356024358281116103955761020890369060040161277e565b6001600160a01b039283600654163314158061035c575b6103325782600052600b602052604060002060ff60405191610240836124cd565b54838116835260401c16151580602083015261030857511680151590816102cf575b506102a55760005b81518110156102a3578061029d8561028460019486612cce565b51168560405191610294836124e9565b60008352612f19565b0161026a565b005b60046040517f74968af1000000000000000000000000000000000000000000000000000000008152fd5b905082600052600360205260406000205481039081116102f25781511138610262565b634e487b7160e01b600052601160045260246000fd5b60046040517fedf5a4db000000000000000000000000000000000000000000000000000000008152fd5b60046040517fea8e4eb5000000000000000000000000000000000000000000000000000000008152fd5b503360009081527f57018d00f0894f4c685bdd8ecad35c04cfd005a1a2fa559fc0e3d122bcf5b853602052604090205460ff161561021f565b600080fd5b3461039557600036600319011261039557600654336001600160a01b038216141580610414575b610332577fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff75ff00000000000000000000000000000000000000000060ff8360a81c161560a81b16911617600655600080f35b503360009081527f57018d00f0894f4c685bdd8ecad35c04cfd005a1a2fa559fc0e3d122bcf5b853602052604090205460ff16156103c1565b346103955760003660031901126103955760206040517f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b9298152f35b34610395576020366003190112610395576104a16124a1565b600654906001600160a01b038083169133830361052d57169182156105035773ffffffffffffffffffffffffffffffffffffffff191682176006557f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b60046040517f7448fbae000000000000000000000000000000000000000000000000000000008152fd5b60046040517f3e8be92f000000000000000000000000000000000000000000000000000000008152fd5b346103955760a0366003190112610395576105706124a1565b6105786124b7565b906084803567ffffffffffffffff81116103955761059a903690600401612763565b906001600160a01b03913383851614801590816109b6575b9061098b575b6105c190613402565b828516156105cf8115613473565b6105da604435613347565b6105e5606435613347565b918587161561092b575b61086c575b505060443560005260209460008652604060002084861660005286526040600020546106246064358210156134e4565b604435600052600087526040600020858716600052875260643590036040600020556044356000526000865260406000208482166000528652604060002061066f6064358254612cf8565b905560405160443581526064358782015284821690858716907fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6260403392a4803b6106b657005b60a06000610700958895604051978896879586938563f23a6e6160e01b9d8e87523360048801521660248601526044356044860152606435606486015284015260a48301906126c8565b0393165af16000918161083d575b506107d65750506001906107206132ba565b6308c379a0146107a1575b5061073257005b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d4552433131353560448201527f526563656976657220696d706c656d656e7465720000000000000000000000006064820152608490fd5b0390fd5b6107a96132d8565b90816107b5575061072b565b61079d60405192839262461bcd60e51b8452600484015260248301906126c8565b6001600160e01b0319161490506102a35760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a656374656044820152676420746f6b656e7360c01b6064820152608490fd5b61085e919250843d8611610865575b6108568183612505565b81019061329a565b908461070e565b503d61084c565b92959194909360005b845181101561091c576108888186612cce565b51906108948188612cce565b518260005260036020526040600020548181106108c8576108c393600052600360205203604060002055612cbf565b610875565b8a60405162461bcd60e51b815260206004820152602860248201527f455243313135353a206275726e20616d6f756e74206578636565647320746f74604482015267616c537570706c7960c01b6064820152fd5b509350939094915085806105f4565b959260009794919592975b865181101561097d578061094d610978928b612cce565b51610958828a612cce565b5160005260036020526109716040600020918254612cf8565b9055612cbf565b610936565b5092959691949093966105ef565b5082841660005260016020526040600020336000526020526105c160ff6040600020541690506105b8565b6109bf33613555565b6105b2565b3461039557600036600319011261039557602060ff60065460a01c166040519015158152f35b3461039557604036600319011261039557610a036124a1565b610a0b6124b7565b906001600160a01b03809116600052600160205260406000209116600052602052602060ff604060002054166040519015158152f35b3461039557600036600319011261039557610a71610a5d6125e7565b6040519182916020835260208301906126c8565b0390f35b34610395576040366003190112610395576102a3600435610a946124b7565b90806000526004602052610aaf600160406000200154612820565b612b6c565b34610395576003196040368201126103955767ffffffffffffffff9060043582811161039557610ae8903690600401612705565b610af06124b7565b906001600160a01b03806006541633141580610edd575b61033257610b158251612c8d565b9260005b8351811015610bd957610b2c8185612cce565b519081600052602091600b8352604060002060405190610b4b826124cd565b54938a8516825260ff8183019560401c161515855282600052600c9182825260406000209586546001978882018092116102f2575551610308578b905116918215159384610bae575b505050506102a55781610ba78288612cce565b5201610b19565b610bcf93945060005260038252604060002054915260406000205490612cf8565b1189808080610b94565b5083908560405193610bea856124e9565b60008552821690811594610bfe8615612ea8565b610c0b875186511461336c565b60005b8751811015610c355780610c25610c309288612cce565b51610958828b612cce565b610c0e565b509091939294610e1e575b60005b8651811015610c8f5780610c5a610c8a9286612cce565b51610c65828a612cce565b5160005260206000815260406000209088600052526109716040600020918254612cf8565b610c43565b50919290938160006040517f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb339180610cc98a8d836133dd565b0390a43b610cd357005b610d246000602094610d3360405197889687958694610d1463bc197c8160e01b9d8e885233600489015288602489015260a0604489015260a48801906127ec565b90848783030160648801526127ec565b918483030160848501526126c8565b03925af160009181610dfe575b50610d995750506001610d516132ba565b6308c379a014610d62575b61073257005b610d6a6132d8565b80610d755750610d5c565b61079d9060405191829162461bcd60e51b83526020600484015260248301906126c8565b6001600160e01b031916146102a35760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a656374656044820152676420746f6b656e7360c01b6064820152608490fd5b610e1791925060203d8111610865576108568183612505565b9083610d40565b939194929060005b8451811015610ed257610e398186612cce565b51610e448289612cce565b5190806000526003602081815260406000205492848410610e7d5790610e7895949392916000525203604060002055612cbf565b610e26565b6084826040519062461bcd60e51b82526004820152602860248201527f455243313135353a206275726e20616d6f756e74206578636565647320746f74604482015267616c537570706c7960c01b6064820152fd5b509092949193610c40565b503360009081527f57018d00f0894f4c685bdd8ecad35c04cfd005a1a2fa559fc0e3d122bcf5b853602052604090205460ff1615610b07565b346103955760203660031901126103955760043560005260056020526020604060002054604051908152f35b346103955760603660031901126103955760043560403660231901126103955760405190610f6f826124cd565b67ffffffffffffffff60243581811681036103955783526044359182151583036103955760208085019384526001600160a01b0360065416331415806110a3575b6103325781600052600b8152604060002060405190610fce826124cd565b54908260ff8684169384845260401c1615159101528015159081611096575b5061106c578285511682600052600382526040600020541161104257600b9160005252604060002092511668ff000000000000000083549251151560401b169168ffffffffffffffffff191617179055600080f35b60046040517f8423ff53000000000000000000000000000000000000000000000000000000008152fd5b60046040517fc4469e5b000000000000000000000000000000000000000000000000000000008152fd5b9050838651161186610fed565b507f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92960005260048152604060002033600052815260ff6040600020541615610fb0565b3461039557602036600319011261039557600435600052600b6020526040806000205460ff82519167ffffffffffffffff81168352831c1615156020820152f35b346103955760203660031901126103955760043560005260036020526020604060002054604051908152f35b346103955760403660031901126103955761116c6124a1565b60243590811515809203610395578061118c6001600160a01b0392613555565b16908133146111ea57336000526001602052604060002082600052602052604060002060ff1981541660ff83161790556040519081527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a3005b608460405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c2073746174757360448201527f20666f722073656c6600000000000000000000000000000000000000000000006064820152fd5b3461039557600036600319011261039557602060405160008152f35b34610395576000366003190112610395576040516000600954611292816125ad565b8084529060019081811690811561131757506001146112bc575b610a7184610a5d81860382612505565b6009600090815292507f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af5b8284106112ff575050508101602001610a5d826112ac565b805460208587018101919091529093019281016112e7565b60ff191660208087019190915292151560051b85019092019250610a5d91508390506112ac565b346103955761134c3661256e565b6001600160a01b0360065416331415806114c4575b61033257805167ffffffffffffffff81116114ae57611381600a546125ad565b601f8111611449575b50602080601f83116001146113c8575081926000926113bd575b5050600019600383901b1c191660019190911b17600a55005b0151905082806113a4565b90601f19831693600a6000527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a8926000905b8682106114315750508360019510611418575b505050811b01600a55005b015160001960f88460031b161c1916905582808061140d565b806001859682949686015181550195019301906113fa565b600a6000527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a8601f830160051c810191602084106114a4575b601f0160051c01905b818110611498575061138a565b6000815560010161148b565b9091508190611482565b634e487b7160e01b600052604160045260246000fd5b503360009081527f57018d00f0894f4c685bdd8ecad35c04cfd005a1a2fa559fc0e3d122bcf5b853602052604090205460ff1615611361565b34610395576040366003190112610395576115166124b7565b60043560005260046020526001600160a01b0360406000209116600052602052602060ff604060002054166040519015158152f35b3461039557604036600319011261039557600435600052600560205260206001600160a01b036115816024356040600020612d16565b9190546040519260031b1c168152f35b346103955760003660031901126103955760206001600160a01b0360065416604051908152f35b34610395576040366003190112610395576115d16124a1565b6024356001600160a01b0380600654163314158061167d575b61033257612710821015611653577fffffffffffffffffff0000000000000000000000000000000000000000000000906116256040516124cd565b76ffffff00000000000000000000000000000000000000006007549360a01b16931691161717600755600080f35b60046040517ffbbd0190000000000000000000000000000000000000000000000000000000008152fd5b503360009081527f57018d00f0894f4c685bdd8ecad35c04cfd005a1a2fa559fc0e3d122bcf5b853602052604090205460ff16156115ea565b34610395576000366003190112610395576006546001600160a01b03811633810361052d5773ffffffffffffffffffffffffffffffffffffffff19600092166006557f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b3461039557602036600319011261039557600435600052600360205260206040600020541515604051908152f35b346103955760403660031901126103955767ffffffffffffffff6004358181116103955761177e90369060040161277e565b9060243590811161039557611797903690600401612705565b90805182510361180f576117ab8151612c8d565b9160005b82518110156117f957806117e46001600160a01b036117d16117f49487612cce565b51166117dd8386612cce565b5190612bf6565b6117ee8287612cce565b52612cbf565b6117af565b60405160208082528190610a71908201876127ec565b608460405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e67746860448201527f206d69736d6174636800000000000000000000000000000000000000000000006064820152fd5b346103955760003660031901126103955760206040516daaeb6d7670e522a718067333cd4e8152f35b34610395576040366003190112610395576118bb6124b7565b336001600160a01b038216036118d7576102a390600435612b6c565b608460405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152fd5b3461039557600036600319011261039557600654336001600160a01b0382161415806119ba575b610332577fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff74ff000000000000000000000000000000000000000060ff8360a01c161560a01b16911617600655600080f35b503360009081527f57018d00f0894f4c685bdd8ecad35c04cfd005a1a2fa559fc0e3d122bcf5b853602052604090205460ff1615611968565b34610395576040366003190112610395576102a36004356005611a146124b7565b918060005260209060048252611a31600160406000200154612820565b80600052600482526001600160a01b03604060002094169384600052825260ff6040600020541615611a6c575b600052526040600020612d2e565b806000526004825260406000208460005282526040600020600160ff198254161790553384827f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d600080a4611a5e565b346103955760031960a03682011261039557611ad66124a1565b90611adf6124b7565b60449081359267ffffffffffffffff9384811161039557611b04903690600401612705565b6064803586811161039557611b1d903690600401612705565b94608496873590811161039557611b38903690600401612763565b6001600160a01b039433868b161480159081611e21575b90611df6575b611b5e90613402565b611b6b855189511461336c565b85871615611b798115613473565b868b1615611db3575b611cec575b60005b8551811015611c205780611ba1611c1b9288612cce565b518c611bad838d612cce565b519180600052826020926000845260406000208d8216600052845260406000205490611bdb838310156134e4565b83600052600085528d60406000209116600052845203604060002055600052600081526040600020908a8c16600052526109716040600020918254612cf8565b611b8a565b50888a989796949789604051887f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb89808d1694169280611c62873395836133dd565b0390a4873b611c6d57005b60405198899788968863bc197c8160e01b9d8e8a523360048b0152166024890152870160a0905260a48701611ca1916127ec565b90848783030190870152611cb4916127ec565b918483030190840152611cc6916126c8565b03921691815a602094600091f160009181610dfe5750610d995750506001610d516132ba565b9796949060009993999692965b8551811015611da357611d0c8187612cce565b51611d178289612cce565b51908060005260206003815260406000205491838310611d5057611d4b949392916003916000525203604060002055612cbf565b611cf9565b508b9067616c537570706c7960c01b8f7f455243313135353a206275726e20616d6f756e74206578636565647320746f748e6040519462461bcd60e51b8652600486015260286024860152840152820152fd5b5090949697989298959195611b87565b99969498959392919060005b8a51811015611de757808b61095882611ddb611de2958f612cce565b5192612cce565b611dbf565b50909192939598949699611b82565b50858a166000526001602052604060002033600052602052611b5e60ff604060002054169050611b55565b611e2a33613555565b611b4f565b3461039557604036600319011261039557602060243560405190611e52826124cd565b6007549162ffffff6001600160a01b0384169384835260a01c1693849101528281029281840414901517156102f2576127106040928351928352046020820152f35b346103955760203660031901126103955760043560005260046020526020600160406000200154604051908152f35b3461039557600036600319011261039557602060ff60065460a81c166040519015158152f35b3461039557604036600319011261039557600435611f056124b7565b6001600160a01b036006541633141580611f96575b6103325781600052600b602052604060002060405190611f39826124cd565b549060ff67ffffffffffffffff92838116835260401c1615158060208301526103085751168015159081611f7e575b506102a5576102a39160405191610294836124e9565b90508260005260036020526040600020541483611f68565b503360009081527f57018d00f0894f4c685bdd8ecad35c04cfd005a1a2fa559fc0e3d122bcf5b853602052604090205460ff1615611f1a565b3461039557602080600319360112610395576040519060008260025491611ff5836125ad565b92838352600190858282169182600014612091575050600114612034575b5061202092500383612505565b610a716040519282849384528301906126c8565b84915060026000527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace906000915b858310612079575050612020935082010185612013565b80548389018501528794508693909201918101612062565b60ff19168582015261202095151560051b85010192508791506120139050565b346103955760003660031901126103955760405160006008546120d3816125ad565b8084529060019081811690811561131757506001146120fc57610a7184610a5d81860382612505565b6008600090815292507ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee35b82841061213f575050508101602001610a5d826112ac565b80546020858701810191909152909301928101612127565b34610395576121653661256e565b6001600160a01b0360065416331415806122c7575b61033257805167ffffffffffffffff81116114ae5761219a6002546125ad565b601f8111612262575b50602080601f83116001146121e1575081926000926121d6575b5050600019600383901b1c191660019190911b17600255005b0151905082806121bd565b90601f1983169360026000527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace926000905b86821061224a5750508360019510612231575b505050811b01600255005b015160001960f88460031b161c19169055828080612226565b80600185968294968601518155019501930190612213565b60026000527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace601f830160051c810191602084106122bd575b601f0160051c01905b8181106122b157506121a3565b600081556001016122a4565b909150819061229b565b503360009081527f57018d00f0894f4c685bdd8ecad35c04cfd005a1a2fa559fc0e3d122bcf5b853602052604090205460ff161561217a565b34610395576020366003190112610395576004356001600160e01b0319811680910361039557807f01ffc9a700000000000000000000000000000000000000000000000000000000602092149081908215612461575b8215612369575b50506040519015158152f35b7f5a05180f000000000000000000000000000000000000000000000000000000008114925090821561239f575b5050828061235d565b7f7965db0b00000000000000000000000000000000000000000000000000000000821492509082156123d5575b50508280612396565b7f2a55205a000000000000000000000000000000000000000000000000000000008114925090821561240b575b505082806123cc565b636cdb3d1360e11b82149250908215612437575b50811561242f575b508280612402565b905082612427565b7f0e89341c000000000000000000000000000000000000000000000000000000001491508361241f565b636cdb3d1360e11b81149250612356565b346103955760403660031901126103955760206124996124906124a1565b60243590612bf6565b604051908152f35b600435906001600160a01b038216820361039557565b602435906001600160a01b038216820361039557565b6040810190811067ffffffffffffffff8211176114ae57604052565b6020810190811067ffffffffffffffff8211176114ae57604052565b90601f8019910116810190811067ffffffffffffffff8211176114ae57604052565b92919267ffffffffffffffff82116114ae5760405191612551601f8201601f191660200184612505565b829481845281830111610395578281602093846000960137010152565b6020600319820112610395576004359067ffffffffffffffff82116103955780602383011215610395578160246125aa93600401359101612527565b90565b90600182811c921680156125dd575b60208310146125c757565b634e487b7160e01b600052602260045260246000fd5b91607f16916125bc565b60405190600082600a54916125fb836125ad565b808352926001908181169081156126835750600114612624575b5061262292500383612505565b565b600a600090815291507fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a85b8483106126685750612622935050810160200138612615565b81935090816020925483858a0101520191019091859261264f565b90506020925061262294915060ff191682840152151560051b82010138612615565b60005b8381106126b85750506000910152565b81810151838201526020016126a8565b906020916126e1815180928185528580860191016126a5565b601f01601f1916010190565b67ffffffffffffffff81116114ae5760051b60200190565b81601f820112156103955780359161271c836126ed565b9261272a6040519485612505565b808452602092838086019260051b820101928311610395578301905b828210612754575050505090565b81358152908301908301612746565b9080601f83011215610395578160206125aa93359101612527565b81601f8201121561039557803591612795836126ed565b926127a36040519485612505565b808452602092838086019260051b820101928311610395578301905b8282106127cd575050505090565b81356001600160a01b03811681036103955781529083019083016127bf565b90815180825260208080930193019160005b82811061280c575050505090565b8351855293810193928101926001016127fe565b600090808252600490602092828452604091828220338352855260ff83832054161561284d575050505050565b825167ffffffffffffffff9190336060820184811183821017612b59578652602a82528782019286368537825115612b465760308453825191600192831015612b33576078602185015360295b838111612abf5750612a7e5790865194608086019086821090821117612a6b57875260428552888501956060368837855115612a5857603087538551821015612a585790607860218701536041915b8183116129e05750505061299f57867f416363657373436f6e74726f6c3a206163636f756e74200000000000000000009486946129766129859561294160489661079d9b519a8b9788015251809260378801906126a5565b8401917f206973206d697373696e6720726f6c65200000000000000000000000000000006037840152518093868401906126a5565b01036028810185520183612505565b5193849362461bcd60e51b855284015260248301906126c8565b606486888088519262461bcd60e51b845283015260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b909192600f81166010811015612a45577f3031323334353637383961626364656600000000000000000000000000000000901a612a1d8589612d05565b53891c928015612a32576000190191906128e9565b60248260118c634e487b7160e01b835252fd5b60248360328d634e487b7160e01b835252fd5b8060328a634e487b7160e01b6024945252fd5b60248760418b634e487b7160e01b835252fd5b6064888a808a519262461bcd60e51b845283015260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b90600f81166010811015612b20577f3031323334353637383961626364656600000000000000000000000000000000901a612afa8387612d05565b53891c908015612b0d576000190161289a565b60248860118c634e487b7160e01b835252fd5b60248960328d634e487b7160e01b835252fd5b60248760328b634e487b7160e01b835252fd5b60248660328a634e487b7160e01b835252fd5b60248660418a634e487b7160e01b835252fd5b906040612bab9260009080825260046020526001600160a01b0383832094169384835260205260ff8383205416612bae575b8152600560205220612db8565b50565b808252600460205282822084835260205282822060ff1981541690553384827ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b8580a4612b9e565b6001600160a01b0316908115612c2357600052600060205260406000209060005260205260406000205490565b608460405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201527f616c6964206f776e6572000000000000000000000000000000000000000000006064820152fd5b90612c97826126ed565b612ca46040519182612505565b8281528092612cb5601f19916126ed565b0190602036910137565b60001981146102f25760010190565b8051821015612ce25760209160051b010190565b634e487b7160e01b600052603260045260246000fd5b919082018092116102f257565b908151811015612ce2570160200190565b8054821015612ce25760005260206000200190600090565b91906001830160009082825280602052604082205415600014612db25784549468010000000000000000861015612d9e5783612d8e612d77886001604098999a01855584612d16565b819391549060031b91821b91600019901b19161790565b9055549382526020522055600190565b602483634e487b7160e01b81526041600452fd5b50925050565b90600182019060009281845282602052604084205490811515600014612ea15760001991808301818111612e8d57825490848201918211612e7957808203612e44575b50505080548015612e3057820191612e138383612d16565b909182549160031b1b191690555582526020526040812055600190565b602486634e487b7160e01b81526031600452fd5b612e64612e54612d779386612d16565b90549060031b1c92839286612d16565b90558652846020526040862055388080612dfb565b602488634e487b7160e01b81526011600452fd5b602487634e487b7160e01b81526011600452fd5b5050505090565b15612eaf57565b608460405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152fd5b91906001600160a01b03831690811592612f338415612ea8565b612f3c82613347565b926040958651612f4b816124cd565b60019586825260209788830189368237835115612ce2578890528791906000835b613247575b50613185575b505050836000526000865286600020826000528652866000208054908682018092116102f25755816000885186815287898201527fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628a3392a43b612fde575b505050505050565b6130228591600093885194858094819363f23a6e6160e01b998a845233600485015284602485015260448401528a606484015260a0608484015260a48301906126c8565b03925af160009181613166575b506130f95750509061303f6132ba565b6308c379a0146130c5575b5061305c57505b388080808080612fd6565b5162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d4552433131353560448201527f526563656976657220696d706c656d656e7465720000000000000000000000006064820152608490fd5b6130cd6132d8565b90816130d9575061304a565b61079d845192839262461bcd60e51b8452600484015260248301906126c8565b6001600160e01b03191603915061311290505750613051565b5162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a656374656044820152676420746f6b656e7360c01b6064820152608490fd5b61317e919250853d8711610865576108568183612505565b903861302f565b906000905b613197575b879150612f77565b8151811015613242576131aa8183612cce565b516131b58285612cce565b5190806000526003808c528c60002054918383106131ee57916131e793918c9695936000528d52038c60002055612cbf565b909161318a565b60848d8f519062461bcd60e51b82526004820152602860248201527f455243313135353a206275726e20616d6f756e74206578636565647320746f74604482015267616c537570706c7960c01b6064820152fd5b61318f565b8a8c849593945183101561328f57906109718392600361326a613286968b612cce565b5193613276868b612cce565b5160005252600020918254612cf8565b81939291612f6c565b505092919092612f71565b9081602091031261039557516001600160e01b0319811681036103955790565b60009060033d116132c757565b905060046000803e60005160e01c90565b600060443d106125aa57604051600319913d83016004833e815167ffffffffffffffff918282113d6024840111176133365781840194855193841161333e573d8501016020848701011161333657506125aa92910160200190612505565b949350505050565b50949350505050565b60405190613354826124cd565b60018252602082016020368237825115612ce2575290565b1561337357565b608460405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e6774682060448201527f6d69736d617463680000000000000000000000000000000000000000000000006064820152fd5b90916133f46125aa936040845260408401906127ec565b9160208184039101526127ec565b1561340957565b608460405162461bcd60e51b815260206004820152602e60248201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60448201527f6572206f7220617070726f7665640000000000000000000000000000000000006064820152fd5b1561347a57565b608460405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152fd5b156134eb57565b608460405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201527f72207472616e73666572000000000000000000000000000000000000000000006064820152fd5b6daaeb6d7670e522a718067333cd4e90813b61356f575050565b60206001600160a01b03916044604051809481937fc617113400000000000000000000000000000000000000000000000000000000835230600484015216958660248301525afa908115613640576000916135ff575b50156135ce5750565b602490604051907fede71dcc0000000000000000000000000000000000000000000000000000000082526004820152fd5b6020813d8211613638575b8161361760209383612505565b8101031261363457519081151582036136315750386135c5565b80fd5b5080fd5b3d915061360a565b6040513d6000823e3d90fdfea2646970667358221220c8ce0ebdcb31cabbbb59ce195771e8d182c3c35523c3385599bcd6696442450864736f6c63430008120033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000000d5465737420436f6e74726163740000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045445535400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004968747470733a2f2f617277656176652e6e65742f5462767a37732d315a3736385f3556347164355079366e4b41705839735277713771746a6e4572316c42302f7b69647d2e6a736f6e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003f68747470733a2f2f617277656176652e6e65742f59454c66714f6352633375314f774c41687a6a6a757655507738336551394a6a547358546c38445536684900
-----Decoded View---------------
Arg [0] : _name (string): Test Contract
Arg [1] : _symbol (string): TEST
Arg [2] : _uri (string): https://arweave.net/Tbvz7s-1Z768_5V4qd5Py6nKApX9sRwq7qtjnEr1lB0/{id}.json
Arg [3] : _contractMetadataUri (string): https://arweave.net/YELfqOcRc3u1OwLAhzjjuvUPw83eQ9JjTsXTl8DU6hI
-----Encoded View---------------
15 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000180
Arg [4] : 000000000000000000000000000000000000000000000000000000000000000d
Arg [5] : 5465737420436f6e747261637400000000000000000000000000000000000000
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [7] : 5445535400000000000000000000000000000000000000000000000000000000
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000049
Arg [9] : 68747470733a2f2f617277656176652e6e65742f5462767a37732d315a373638
Arg [10] : 5f3556347164355079366e4b41705839735277713771746a6e4572316c42302f
Arg [11] : 7b69647d2e6a736f6e0000000000000000000000000000000000000000000000
Arg [12] : 000000000000000000000000000000000000000000000000000000000000003f
Arg [13] : 68747470733a2f2f617277656176652e6e65742f59454c66714f635263337531
Arg [14] : 4f774c41687a6a6a757655507738336551394a6a547358546c38445536684900
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ 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.