Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 940 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Set Approval For... | 16640047 | 769 days ago | IN | 0 ETH | 0.00150278 | ||||
Transfer From | 16122639 | 841 days ago | IN | 0 ETH | 0.00089379 | ||||
Set Approval For... | 16060969 | 850 days ago | IN | 0 ETH | 0.00051021 | ||||
Set Approval For... | 16060951 | 850 days ago | IN | 0 ETH | 0.00051927 | ||||
Set Approval For... | 16060936 | 850 days ago | IN | 0 ETH | 0.00049689 | ||||
Set Approval For... | 16060916 | 850 days ago | IN | 0 ETH | 0.00047085 | ||||
Set Approval For... | 16060903 | 850 days ago | IN | 0 ETH | 0.0005118 | ||||
Set Approval For... | 16060890 | 850 days ago | IN | 0 ETH | 0.00056442 | ||||
Set Approval For... | 16060875 | 850 days ago | IN | 0 ETH | 0.00046494 | ||||
Set Approval For... | 16060847 | 850 days ago | IN | 0 ETH | 0.00047071 | ||||
Set Approval For... | 16060800 | 850 days ago | IN | 0 ETH | 0.00046017 | ||||
Set Approval For... | 16060783 | 850 days ago | IN | 0 ETH | 0.00046722 | ||||
Set Approval For... | 16060767 | 850 days ago | IN | 0 ETH | 0.00047251 | ||||
Set Approval For... | 16060740 | 850 days ago | IN | 0 ETH | 0.00046947 | ||||
Set Approval For... | 16060724 | 850 days ago | IN | 0 ETH | 0.00048002 | ||||
Set Approval For... | 16060711 | 850 days ago | IN | 0 ETH | 0.00048147 | ||||
Set Approval For... | 16060676 | 850 days ago | IN | 0 ETH | 0.00052067 | ||||
Set Approval For... | 16060662 | 850 days ago | IN | 0 ETH | 0.00047539 | ||||
Set Approval For... | 16060641 | 850 days ago | IN | 0 ETH | 0.00046619 | ||||
Set Approval For... | 16060616 | 850 days ago | IN | 0 ETH | 0.00049006 | ||||
Set Approval For... | 16060605 | 850 days ago | IN | 0 ETH | 0.0004759 | ||||
Set Approval For... | 16060579 | 850 days ago | IN | 0 ETH | 0.00044637 | ||||
Set Approval For... | 16060562 | 850 days ago | IN | 0 ETH | 0.00047281 | ||||
Set Approval For... | 16060508 | 850 days ago | IN | 0 ETH | 0.00048484 | ||||
Set Approval For... | 16060500 | 850 days ago | IN | 0 ETH | 0.00050281 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
NFTCollectionContract
Compiler Version
v0.8.13+commit.abaa5c0e
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./templates/NFTCollection.sol"; contract NFTCollectionContract is NFTCollection { constructor( DeploymentConfig memory deploymentConfig, RuntimeConfig memory runtimeConfig ) { _preventInitialization = false; initialize(deploymentConfig, runtimeConfig); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.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: * * ``` * 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}: * * ``` * 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. */ 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(uint160(account), 20), " 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 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 (last updated v4.6.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. * * _Available since v4.5._ */ interface IERC2981 is IERC165 { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be paid in that same unit of exchange. */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.2; import "../../utils/Address.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ``` * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. * @custom:oz-retyped-from bool */ uint8 private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint8 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`. */ modifier initializer() { bool isTopLevelCall = !_initializing; require( (isTopLevelCall && _initialized < 1) || (!Address.isContract(address(this)) && _initialized == 1), "Initializable: contract is already initialized" ); _initialized = 1; if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original * initialization step. This is essential to configure modules that are added through upgrades and that require * initialization. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. */ modifier reinitializer(uint8 version) { require(!_initializing && _initialized < version, "Initializable: contract is already initialized"); _initialized = version; _initializing = true; _; _initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. */ function _disableInitializers() internal virtual { require(!_initializing, "Initializable: contract is initializing"); if (_initialized < type(uint8).max) { _initialized = type(uint8).max; emit Initialized(type(uint8).max); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/common/ERC2981.sol) pragma solidity ^0.8.0; import "../../interfaces/IERC2981.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information. * * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first. * * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the * fee is specified in basis points by default. * * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. * * _Available since v4.5._ */ abstract contract ERC2981 is IERC2981, ERC165 { struct RoyaltyInfo { address receiver; uint96 royaltyFraction; } RoyaltyInfo private _defaultRoyaltyInfo; mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) { return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId); } /** * @inheritdoc IERC2981 */ function royaltyInfo(uint256 _tokenId, uint256 _salePrice) public view virtual override returns (address, uint256) { RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId]; if (royalty.receiver == address(0)) { royalty = _defaultRoyaltyInfo; } uint256 royaltyAmount = (_salePrice * royalty.royaltyFraction) / _feeDenominator(); return (royalty.receiver, royaltyAmount); } /** * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an * override. */ function _feeDenominator() internal pure virtual returns (uint96) { return 10000; } /** * @dev Sets the royalty information that all ids in this contract will default to. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: invalid receiver"); _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Removes default royalty information. */ function _deleteDefaultRoyalty() internal virtual { delete _defaultRoyaltyInfo; } /** * @dev Sets the royalty information for a specific token id, overriding the global default. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setTokenRoyalty( uint256 tokenId, address receiver, uint96 feeNumerator ) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: Invalid parameters"); _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Resets royalty information for the token id back to the global default. */ function _resetTokenRoyalty(uint256 tokenId) internal virtual { delete _tokenRoyaltyInfo[tokenId]; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.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 * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "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"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(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) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(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) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason 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 { // 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 (last updated v4.7.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_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) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @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] = _HEX_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); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Tree proofs. * * The proofs can be generated using the JavaScript library * https://github.com/miguelmota/merkletreejs[merkletreejs]. * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled. * * See `test/utils/cryptography/MerkleProof.test.js` for some examples. * * WARNING: You should avoid using leaf values that are 64 bytes long prior to * hashing, or use a hash function other than keccak256 for hashing leaves. * This is because the concatenation of a sorted pair of internal nodes in * the merkle tree could be reinterpreted as a leaf value. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Calldata version of {verify} * * _Available since v4.7._ */ function verifyCalldata( bytes32[] calldata proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProofCalldata(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Calldata version of {processProof} * * _Available since v4.7._ */ function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Returns true if the `leaves` can be proved to be a part of a Merkle tree defined by * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. * * _Available since v4.7._ */ function multiProofVerify( bytes32[] memory proof, bool[] memory proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProof(proof, proofFlags, leaves) == root; } /** * @dev Calldata version of {multiProofVerify} * * _Available since v4.7._ */ function multiProofVerifyCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProofCalldata(proof, proofFlags, leaves) == root; } /** * @dev Returns the root of a tree reconstructed from `leaves` and the sibling nodes in `proof`, * consuming from one or the other at each step according to the instructions given by * `proofFlags`. * * _Available since v4.7._ */ function processMultiProof( bytes32[] memory proof, bool[] memory proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @dev Calldata version of {processMultiProof} * * _Available since v4.7._ */ function processMultiProofCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { return a < b ? _efficientHash(a, b) : _efficientHash(b, a); } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { /// @solidity memory-safe-assembly assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// 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 pragma solidity ^0.8.0; /// @title Base64 /// @notice Provides a function for encoding some bytes in base64 /// @author Brecht Devos <[email protected]> library Base64 { bytes internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; /// @notice Encodes some bytes to the base64 representation function encode(bytes memory data) internal pure returns (string memory) { uint256 len = data.length; if (len == 0) return ""; // multiply by 4/3 rounded up uint256 encodedLen = 4 * ((len + 2) / 3); // Add some extra buffer at the end bytes memory result = new bytes(encodedLen + 32); bytes memory table = TABLE; // solium-disable-next-line security/no-inline-assembly assembly { let tablePtr := add(table, 1) let resultPtr := add(result, 32) for { let i := 0 } lt(i, len) { } { i := add(i, 3) let input := and(mload(add(data, i)), 0xffffff) let out := mload(add(tablePtr, and(shr(18, input), 0x3F))) out := shl(8, out) out := add( out, and(mload(add(tablePtr, and(shr(12, input), 0x3F))), 0xFF) ) out := shl(8, out) out := add( out, and(mload(add(tablePtr, and(shr(6, input), 0x3F))), 0xFF) ) out := shl(8, out) out := add( out, and(mload(add(tablePtr, and(input, 0x3F))), 0xFF) ) out := shl(224, out) mstore(resultPtr, out) resultPtr := add(resultPtr, 4) } switch mod(len, 3) case 1 { mstore(sub(resultPtr, 2), shl(240, 0x3d3d)) } case 2 { mstore(sub(resultPtr, 1), shl(248, 0x3d)) } mstore(result, encodedLen) } return string(result); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; import {IERC2981} from "@openzeppelin/contracts/token/common/ERC2981.sol"; abstract contract ERC2981 is IERC165, IERC2981 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC2981).interfaceId; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/proxy/utils/Initializable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "operator-filter-registry/src/DefaultOperatorFilterer.sol"; import "../lib/ERC2981.sol"; import "../lib/Base64.sol"; contract NFTCollection is ERC721A, ERC2981, AccessControl, Initializable,DefaultOperatorFilterer { using Address for address payable; using Strings for uint256; /// Fixed at deployment time struct DeploymentConfig { // Name of the NFT contract. string name; // Symbol of the NFT contract. string symbol; // The contract owner address. If you wish to own the contract, then set it as your wallet address. // This is also the wallet that can manage the contract on NFT marketplaces. Use `transferOwnership()` // to update the contract owner. address owner; // The maximum number of tokens that can be minted in this collection. uint256 maxSupply; // The number of free token mints reserved for the contract owner uint256 reservedSupply; /// The maximum number of tokens the user can mint per transaction. uint256 tokensPerMint; // Treasury address is the address where minting fees can be withdrawn to. // Use `withdrawFees()` to transfer the entire contract balance to the treasury address. address payable treasuryAddress; } /// Updatable by admins and owner struct RuntimeConfig { // Metadata base URI for tokens, NFTs minted in this contract will have metadata URI of `baseURI` + `tokenID`. // Set this to reveal token metadata. string baseURI; // If true, the base URI of the NFTs minted in the specified contract can be updated after minting (token URIs // are not frozen on the contract level). This is useful for revealing NFTs after the drop. If false, all the // NFTs minted in this contract are frozen by default which means token URIs are non-updatable. bool metadataUpdatable; // Minting price per token for public minting uint256 publicMintPrice; // Flag for freezing the public mint price bool publicMintPriceFrozen; // Minting price per token for presale minting uint256 presaleMintPrice; // Flag for freezing the presale mint price bool presaleMintPriceFrozen; // Starting timestamp for public minting. uint256 publicMintStart; // Starting timestamp for whitelisted/presale minting. uint256 presaleMintStart; // Pre-reveal token URI for placholder metadata. This will be returned for all token IDs until a `baseURI` // has been set. string prerevealTokenURI; // Root of the Merkle tree of whitelisted addresses. This is used to check if a wallet has been whitelisted // for presale minting. bytes32 presaleMerkleRoot; // Secondary market royalties in basis points (100 bps = 1%) uint256 royaltiesBps; // Address for royalties address royaltiesAddress; } struct ContractInfo { uint256 version; DeploymentConfig deploymentConfig; RuntimeConfig runtimeConfig; } event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /************* * Constants * *************/ /// Contract version, semver-style uint X_YY_ZZ uint256 public constant VERSION = 1_03_00; /// Admin role bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); // Basis for calculating royalties. // This has to be 10k for royaltiesBps to be in basis points. uint16 public constant ROYALTIES_BASIS = 10000; /******************** * Public variables * ********************/ /// The number of tokens remaining in the reserve /// @dev Managed by the contract uint256 public reserveRemaining; /*************************** * Contract initialization * ***************************/ constructor() ERC721A("", "") { _preventInitialization = true; } /// Contract initializer function initialize( DeploymentConfig memory deploymentConfig, RuntimeConfig memory runtimeConfig ) public initializer { require(!_preventInitialization, "Cannot be initialized"); _validateDeploymentConfig(deploymentConfig); _grantRole(ADMIN_ROLE, msg.sender); _transferOwnership(deploymentConfig.owner); _deploymentConfig = deploymentConfig; _runtimeConfig = runtimeConfig; reserveRemaining = deploymentConfig.reservedSupply; } /**************** * User actions * ****************/ /// Mint tokens // function mint(uint256 amount) // external // payable // paymentProvided(amount * _runtimeConfig.publicMintPrice) // { // require(mintingActive(), "Minting has not started yet"); // _mintTokens(msg.sender, amount); // } /// Mint tokens if the wallet has been whitelisted // function presaleMint(uint256 amount, bytes32[] calldata proof) function mint(uint256 amount, bytes32[] calldata proof,address sender) external payable paymentProvided(amount * _runtimeConfig.presaleMintPrice) { require(presaleActive(), "Presale has not started yet"); require( isWhitelisted(sender, proof), "Not whitelisted for presale" ); _presaleMinted[sender] = true; _mintTokens(sender, amount); } /****************** * View functions * ******************/ /// Check if public minting is active function mintingActive() public view returns (bool) { // We need to rely on block.timestamp since it's // asier to configure across different chains // solhint-disable-next-line not-rely-on-time return block.timestamp > _runtimeConfig.publicMintStart; } /// Check if presale minting is active function presaleActive() public view returns (bool) { // We need to rely on block.timestamp since it's // easier to configure across different chains // solhint-disable-next-line not-rely-on-time return block.timestamp > _runtimeConfig.presaleMintStart; } /// Get the number of tokens still available for minting function availableSupply() public view returns (uint256) { return _deploymentConfig.maxSupply - totalSupply() - reserveRemaining; } /// Check if the wallet is whitelisted for the presale function isWhitelisted(address wallet, bytes32[] calldata proof) public view returns (bool) { require(!_presaleMinted[wallet], "Already minted"); bytes32 leaf = keccak256(abi.encodePacked(wallet)); return MerkleProof.verify(proof, _runtimeConfig.presaleMerkleRoot, leaf); } /// Contract owner address /// @dev Required for easy integration with OpenSea function owner() public view returns (address) { return _deploymentConfig.owner; } /******************* * Access controls * *******************/ /// Transfer contract ownership function transferOwnership(address newOwner) external onlyRole(DEFAULT_ADMIN_ROLE) { require(newOwner != _deploymentConfig.owner, "Already the owner"); _transferOwnership(newOwner); } /// Transfer contract ownership function transferAdminRights(address to) external onlyRole(ADMIN_ROLE) { require(!hasRole(ADMIN_ROLE, to), "Already an admin"); require(msg.sender != _deploymentConfig.owner, "Use transferOwnership"); _revokeRole(ADMIN_ROLE, msg.sender); _grantRole(ADMIN_ROLE, to); } /***************** * Admin actions * *****************/ /// Mint a token from the reserve function reserveMint(address to, uint256 amount) external onlyRole(ADMIN_ROLE) { require(amount <= reserveRemaining, "Not enough reserved"); reserveRemaining -= amount; _safeMint(to, amount); } /// Get full contract information /// @dev Convenience helper function getInfo() external view returns (ContractInfo memory info) { info.version = VERSION; info.deploymentConfig = _deploymentConfig; info.runtimeConfig = _runtimeConfig; } /// Update contract configuration /// @dev Callable by admin roles only function updateConfig(RuntimeConfig calldata newConfig) external onlyRole(ADMIN_ROLE) { _validateRuntimeConfig(newConfig); _runtimeConfig = newConfig; } /// Withdraw minting fees to the treasury address /// @dev Callable by admin roles only function withdrawFees() external onlyRole(ADMIN_ROLE) { _deploymentConfig.treasuryAddress.sendValue(address(this).balance); } /************* * Internals * *************/ /// Contract configuration RuntimeConfig internal _runtimeConfig; DeploymentConfig internal _deploymentConfig; /// Flag for disabling initalization for template contracts bool internal _preventInitialization; /// Mapping for tracking presale mint status mapping(address => bool) internal _presaleMinted; /// @dev Internal function for performing token mints function _mintTokens(address to, uint256 amount) internal { require(amount <= _deploymentConfig.tokensPerMint, "Amount too large"); require(amount <= availableSupply(), "Not enough tokens left"); _safeMint(to, amount); } /// Validate deployment config function _validateDeploymentConfig(DeploymentConfig memory config) internal pure { require(config.maxSupply > 0, "Maximum supply must be non-zero"); require(config.tokensPerMint > 0, "Tokens per mint must be non-zero"); require( config.treasuryAddress != address(0), "Treasury address cannot be null" ); require(config.owner != address(0), "Contract must have an owner"); require( config.reservedSupply <= config.maxSupply, "Reserve greater than supply" ); } /// Validate a runtime configuration change function _validateRuntimeConfig(RuntimeConfig calldata config) internal view { // Can't set royalties to more than 100% require(config.royaltiesBps <= ROYALTIES_BASIS, "Royalties too high"); // Validate mint price changes _validatePublicMintPrice(config); _validatePresaleMintPrice(config); // Validate metadata changes _validateMetadata(config); } function _validatePublicMintPrice(RuntimeConfig calldata config) internal view { // As long as public mint price is not frozen, all changes are valid if (!_runtimeConfig.publicMintPriceFrozen) return; // Can't change public mint price once frozen require( _runtimeConfig.publicMintPrice == config.publicMintPrice, "publicMintPrice is frozen" ); // Can't unfreeze public mint price require( config.publicMintPriceFrozen, "publicMintPriceFrozen is frozen" ); } function _validatePresaleMintPrice(RuntimeConfig calldata config) internal view { // As long as presale mint price is not frozen, all changes are valid if (!_runtimeConfig.presaleMintPriceFrozen) return; // Can't change presale mint price once frozen require( _runtimeConfig.presaleMintPrice == config.presaleMintPrice, "presaleMintPrice is frozen" ); // Can't unfreeze presale mint price require( config.presaleMintPriceFrozen, "presaleMintPriceFrozen is frozen" ); } function _validateMetadata(RuntimeConfig calldata config) internal view { // If metadata is updatable, we don't have any other limitations if (_runtimeConfig.metadataUpdatable) return; // If it isn't, we can't allow the flag to change anymore require(!config.metadataUpdatable, "Cannot unfreeze metadata"); // We also can't allow base URI to change require( keccak256(abi.encodePacked(_runtimeConfig.baseURI)) == keccak256(abi.encodePacked(config.baseURI)), "Metadata is frozen" ); } /// Internal function without any checks for performing the ownership transfer function _transferOwnership(address newOwner) internal { address previousOwner = _deploymentConfig.owner; _revokeRole(ADMIN_ROLE, previousOwner); _revokeRole(DEFAULT_ADMIN_ROLE, previousOwner); _deploymentConfig.owner = newOwner; _grantRole(ADMIN_ROLE, newOwner); _grantRole(DEFAULT_ADMIN_ROLE, newOwner); emit OwnershipTransferred(previousOwner, newOwner); } /// @dev See {IERC165-supportsInterface}. function supportsInterface(bytes4 interfaceId) public view override(ERC721A, AccessControl, ERC2981) returns (bool) { return ERC721A.supportsInterface(interfaceId) || AccessControl.supportsInterface(interfaceId) || ERC2981.supportsInterface(interfaceId); } /// Get the token metadata URI function tokenURI(uint256 tokenId) public view override returns (string memory) { require(_exists(tokenId), "Token does not exist"); return bytes(_runtimeConfig.baseURI).length > 0 ? string( abi.encodePacked(_runtimeConfig.baseURI, tokenId.toString()) ) : _runtimeConfig.prerevealTokenURI; } /// @dev Need name() to support setting it in the initializer instead of constructor function name() public view override returns (string memory) { return _deploymentConfig.name; } /// @dev Need symbol() to support setting it in the initializer instead of constructor function symbol() public view override returns (string memory) { return _deploymentConfig.symbol; } /// @dev ERC2981 token royalty info function royaltyInfo(uint256, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount) { receiver = _runtimeConfig.royaltiesAddress; royaltyAmount = (_runtimeConfig.royaltiesBps * salePrice) / ROYALTIES_BASIS; } /// @dev OpenSea contract metadata function contractURI() external view returns (string memory) { string memory json = Base64.encode( bytes( string( abi.encodePacked( '{"seller_fee_basis_points": ', // solhint-disable-line quotes _runtimeConfig.royaltiesBps.toString(), ', "fee_recipient": "', // solhint-disable-line quotes uint256(uint160(_runtimeConfig.royaltiesAddress)) .toHexString(20), '"}' // solhint-disable-line quotes ) ) ) ); string memory output = string( abi.encodePacked("data:application/json;base64,", json) ); return output; } /// Check if enough payment was provided modifier paymentProvided(uint256 payment) { require(msg.value >= payment, "Payment too small"); _; } /*********************** * Convenience getters * ***********************/ function maxSupply() public view returns (uint256) { return _deploymentConfig.maxSupply; } function reservedSupply() public view returns (uint256) { return _deploymentConfig.reservedSupply; } function publicMintPrice() public view returns (uint256) { return _runtimeConfig.publicMintPrice; } function presaleMintPrice() public view returns (uint256) { return _runtimeConfig.presaleMintPrice; } function tokensPerMint() public view returns (uint256) { return _deploymentConfig.tokensPerMint; } function treasuryAddress() public view returns (address) { return _deploymentConfig.treasuryAddress; } function publicMintStart() public view returns (uint256) { return _runtimeConfig.publicMintStart; } function presaleMintStart() public view returns (uint256) { return _runtimeConfig.presaleMintStart; } function presaleMerkleRoot() public view returns (bytes32) { return _runtimeConfig.presaleMerkleRoot; } function baseURI() public view returns (string memory) { return _runtimeConfig.baseURI; } function metadataUpdatable() public view returns (bool) { return _runtimeConfig.metadataUpdatable; } function prerevealTokenURI() public view returns (string memory) { return _runtimeConfig.prerevealTokenURI; } //opensea function transferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) { super.transferFrom(from, to, tokenId); } function safeTransferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId); } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public override onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId, data); } }
// SPDX-License-Identifier: MIT // Creator: Chiru Labs pragma solidity ^0.8.4; import '@openzeppelin/contracts/token/ERC721/IERC721.sol'; import '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol'; import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol'; import '@openzeppelin/contracts/utils/Address.sol'; import '@openzeppelin/contracts/utils/Context.sol'; import '@openzeppelin/contracts/utils/Strings.sol'; import '@openzeppelin/contracts/utils/introspection/ERC165.sol'; error ApprovalCallerNotOwnerNorApproved(); error ApprovalQueryForNonexistentToken(); error ApproveToCaller(); error ApprovalToCurrentOwner(); error BalanceQueryForZeroAddress(); error MintToZeroAddress(); error MintZeroQuantity(); error OwnerQueryForNonexistentToken(); error TransferCallerNotOwnerNorApproved(); error TransferFromIncorrectOwner(); error TransferToNonERC721ReceiverImplementer(); error TransferToZeroAddress(); error URIQueryForNonexistentToken(); /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at _startTokenId() (defaults to 0, e.g. 0, 1, 2, 3..). * * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * * Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721A is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps track of the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; } // Compiler will pack this into a single 256bit word. struct AddressData { // Realistically, 2**64-1 is more than enough. uint64 balance; // Keeps track of mint count with minimal overhead for tokenomics. uint64 numberMinted; // Keeps track of burn count with minimal overhead for tokenomics. uint64 numberBurned; // For miscellaneous variable(s) pertaining to the address // (e.g. number of whitelist mint slots used). // If there are multiple variables, please pack them into a uint64. uint64 aux; } // The tokenId of the next token to be minted. uint256 internal _currentIndex; // The number of tokens burned. uint256 internal _burnCounter; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. See _ownershipOf implementation for details. mapping(uint256 => TokenOwnership) internal _ownerships; // Mapping owner address to address data mapping(address => AddressData) private _addressData; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; _currentIndex = _startTokenId(); } /** * To change the starting tokenId, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { return 0; } /** * @dev Burned tokens are calculated here, use _totalMinted() if you want to count just minted tokens. */ function totalSupply() public view returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than _currentIndex - _startTokenId() times unchecked { return _currentIndex - _burnCounter - _startTokenId(); } } /** * Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view returns (uint256) { // Counter underflow is impossible as _currentIndex does not decrement, // and it is initialized to _startTokenId() unchecked { return _currentIndex - _startTokenId(); } } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view override returns (uint256) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return uint256(_addressData[owner].balance); } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { return uint256(_addressData[owner].numberMinted); } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { return uint256(_addressData[owner].numberBurned); } /** * Returns the auxillary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { return _addressData[owner].aux; } /** * Sets the auxillary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal { _addressData[owner].aux = aux; } /** * Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around in the collection over time. */ function _ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) { uint256 curr = tokenId; unchecked { if (_startTokenId() <= curr && curr < _currentIndex) { TokenOwnership memory ownership = _ownerships[curr]; if (!ownership.burned) { if (ownership.addr != address(0)) { return ownership; } // Invariant: // There will always be an ownership that has an address and is not burned // before an ownership that does not have an address and is not burned. // Hence, curr will not underflow. while (true) { curr--; ownership = _ownerships[curr]; if (ownership.addr != address(0)) { return ownership; } } } } } revert OwnerQueryForNonexistentToken(); } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view override returns (address) { return _ownershipOf(tokenId).addr; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); string memory baseURI = _baseURI(); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ''; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ''; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public override { address owner = ERC721A.ownerOf(tokenId); if (to == owner) revert ApprovalToCurrentOwner(); if (_msgSender() != owner && !isApprovedForAll(owner, _msgSender())) { revert ApprovalCallerNotOwnerNorApproved(); } _approve(to, tokenId, owner); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { if (operator == _msgSender()) revert ApproveToCaller(); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ''); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { _transfer(from, to, tokenId); if (to.isContract() && !_checkContractOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), */ function _exists(uint256 tokenId) internal view returns (bool) { return _startTokenId() <= tokenId && tokenId < _currentIndex && !_ownerships[tokenId].burned; } function _safeMint(address to, uint256 quantity) internal { _safeMint(to, quantity, ''); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal { _mint(to, quantity, _data, true); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _mint( address to, uint256 quantity, bytes memory _data, bool safe ) internal { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1 // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1 unchecked { _addressData[to].balance += uint64(quantity); _addressData[to].numberMinted += uint64(quantity); _ownerships[startTokenId].addr = to; _ownerships[startTokenId].startTimestamp = uint64(block.timestamp); uint256 updatedIndex = startTokenId; uint256 end = updatedIndex + quantity; if (safe && to.isContract()) { do { emit Transfer(address(0), to, updatedIndex); if (!_checkContractOnERC721Received(address(0), to, updatedIndex++, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } while (updatedIndex != end); // Reentrancy protection if (_currentIndex != startTokenId) revert(); } else { do { emit Transfer(address(0), to, updatedIndex++); } while (updatedIndex != end); } _currentIndex = updatedIndex; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) private { TokenOwnership memory prevOwnership = _ownershipOf(tokenId); if (prevOwnership.addr != from) revert TransferFromIncorrectOwner(); bool isApprovedOrOwner = (_msgSender() == from || isApprovedForAll(from, _msgSender()) || getApproved(tokenId) == _msgSender()); if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, from); // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256. unchecked { _addressData[from].balance -= 1; _addressData[to].balance += 1; TokenOwnership storage currSlot = _ownerships[tokenId]; currSlot.addr = to; currSlot.startTimestamp = uint64(block.timestamp); // If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it. // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls. uint256 nextTokenId = tokenId + 1; TokenOwnership storage nextSlot = _ownerships[nextTokenId]; if (nextSlot.addr == address(0)) { // This will suffice for checking _exists(nextTokenId), // as a burned slot cannot contain the zero address. if (nextTokenId != _currentIndex) { nextSlot.addr = from; nextSlot.startTimestamp = prevOwnership.startTimestamp; } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev This is equivalent to _burn(tokenId, false) */ function _burn(uint256 tokenId) internal virtual { _burn(tokenId, false); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId, bool approvalCheck) internal virtual { TokenOwnership memory prevOwnership = _ownershipOf(tokenId); address from = prevOwnership.addr; if (approvalCheck) { bool isApprovedOrOwner = (_msgSender() == from || isApprovedForAll(from, _msgSender()) || getApproved(tokenId) == _msgSender()); if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved(); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, from); // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256. unchecked { AddressData storage addressData = _addressData[from]; addressData.balance -= 1; addressData.numberBurned += 1; // Keep track of who burned the token, and the timestamp of burning. TokenOwnership storage currSlot = _ownerships[tokenId]; currSlot.addr = from; currSlot.startTimestamp = uint64(block.timestamp); currSlot.burned = true; // If the ownership slot of tokenId+1 is not explicitly set, that means the burn initiator owns it. // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls. uint256 nextTokenId = tokenId + 1; TokenOwnership storage nextSlot = _ownerships[nextTokenId]; if (nextSlot.addr == address(0)) { // This will suffice for checking _exists(nextTokenId), // as a burned slot cannot contain the zero address. if (nextTokenId != _currentIndex) { nextSlot.addr = from; nextSlot.startTimestamp = prevOwnership.startTimestamp; } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve( address to, uint256 tokenId, address owner ) private { _tokenApprovals[tokenId] = to; emit Approval(owner, to, tokenId); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } /** * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting. * And also called before burning one token. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes * minting. * And also called after one token has been burned. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {OperatorFilterer} from "./OperatorFilterer.sol"; abstract contract DefaultOperatorFilterer is OperatorFilterer { address constant DEFAULT_SUBSCRIPTION = address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6); constructor() OperatorFilterer(DEFAULT_SUBSCRIPTION, true) {} }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; interface IOperatorFilterRegistry { function isOperatorAllowed(address registrant, address operator) external view returns (bool); function register(address registrant) external; function registerAndSubscribe(address registrant, address subscription) external; function registerAndCopyEntries(address registrant, address registrantToCopy) external; function updateOperator(address registrant, address operator, bool filtered) external; function updateOperators(address registrant, address[] calldata operators, bool filtered) external; function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external; function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external; function subscribe(address registrant, address registrantToSubscribe) external; function unsubscribe(address registrant, bool copyExistingEntries) external; function subscriptionOf(address addr) external returns (address registrant); function subscribers(address registrant) external returns (address[] memory); function subscriberAt(address registrant, uint256 index) external returns (address); function copyEntriesOf(address registrant, address registrantToCopy) external; function isOperatorFiltered(address registrant, address operator) external returns (bool); function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool); function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool); function filteredOperators(address addr) external returns (address[] memory); function filteredCodeHashes(address addr) external returns (bytes32[] memory); function filteredOperatorAt(address registrant, uint256 index) external returns (address); function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32); function isRegistered(address addr) external returns (bool); function codeHashOf(address addr) external returns (bytes32); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {IOperatorFilterRegistry} from "./IOperatorFilterRegistry.sol"; abstract contract OperatorFilterer { error OperatorNotAllowed(address operator); IOperatorFilterRegistry constant operatorFilterRegistry = IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E); 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(operatorFilterRegistry).code.length > 0) { if (subscribe) { operatorFilterRegistry.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy); } else { if (subscriptionOrRegistrantToCopy != address(0)) { operatorFilterRegistry.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy); } else { operatorFilterRegistry.register(address(this)); } } } } modifier onlyAllowedOperator(address from) virtual { // Check registry code length to facilitate testing in environments without a deployed registry. if (address(operatorFilterRegistry).code.length > 0) { // 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) { _; return; } if ( !( operatorFilterRegistry.isOperatorAllowed(address(this), msg.sender) && operatorFilterRegistry.isOperatorAllowed(address(this), from) ) ) { revert OperatorNotAllowed(msg.sender); } } _; } }
{ "evmVersion": "london", "libraries": {}, "metadata": { "bytecodeHash": "ipfs", "useLiteralContent": true }, "optimizer": { "enabled": true, "runs": 200 }, "remappings": [], "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"maxSupply","type":"uint256"},{"internalType":"uint256","name":"reservedSupply","type":"uint256"},{"internalType":"uint256","name":"tokensPerMint","type":"uint256"},{"internalType":"address payable","name":"treasuryAddress","type":"address"}],"internalType":"struct NFTCollection.DeploymentConfig","name":"deploymentConfig","type":"tuple"},{"components":[{"internalType":"string","name":"baseURI","type":"string"},{"internalType":"bool","name":"metadataUpdatable","type":"bool"},{"internalType":"uint256","name":"publicMintPrice","type":"uint256"},{"internalType":"bool","name":"publicMintPriceFrozen","type":"bool"},{"internalType":"uint256","name":"presaleMintPrice","type":"uint256"},{"internalType":"bool","name":"presaleMintPriceFrozen","type":"bool"},{"internalType":"uint256","name":"publicMintStart","type":"uint256"},{"internalType":"uint256","name":"presaleMintStart","type":"uint256"},{"internalType":"string","name":"prerevealTokenURI","type":"string"},{"internalType":"bytes32","name":"presaleMerkleRoot","type":"bytes32"},{"internalType":"uint256","name":"royaltiesBps","type":"uint256"},{"internalType":"address","name":"royaltiesAddress","type":"address"}],"internalType":"struct NFTCollection.RuntimeConfig","name":"runtimeConfig","type":"tuple"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApprovalToCurrentOwner","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","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":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"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":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ROYALTIES_BASIS","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VERSION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"availableSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","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":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getInfo","outputs":[{"components":[{"internalType":"uint256","name":"version","type":"uint256"},{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"maxSupply","type":"uint256"},{"internalType":"uint256","name":"reservedSupply","type":"uint256"},{"internalType":"uint256","name":"tokensPerMint","type":"uint256"},{"internalType":"address payable","name":"treasuryAddress","type":"address"}],"internalType":"struct NFTCollection.DeploymentConfig","name":"deploymentConfig","type":"tuple"},{"components":[{"internalType":"string","name":"baseURI","type":"string"},{"internalType":"bool","name":"metadataUpdatable","type":"bool"},{"internalType":"uint256","name":"publicMintPrice","type":"uint256"},{"internalType":"bool","name":"publicMintPriceFrozen","type":"bool"},{"internalType":"uint256","name":"presaleMintPrice","type":"uint256"},{"internalType":"bool","name":"presaleMintPriceFrozen","type":"bool"},{"internalType":"uint256","name":"publicMintStart","type":"uint256"},{"internalType":"uint256","name":"presaleMintStart","type":"uint256"},{"internalType":"string","name":"prerevealTokenURI","type":"string"},{"internalType":"bytes32","name":"presaleMerkleRoot","type":"bytes32"},{"internalType":"uint256","name":"royaltiesBps","type":"uint256"},{"internalType":"address","name":"royaltiesAddress","type":"address"}],"internalType":"struct NFTCollection.RuntimeConfig","name":"runtimeConfig","type":"tuple"}],"internalType":"struct NFTCollection.ContractInfo","name":"info","type":"tuple"}],"stateMutability":"view","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":"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":[{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"maxSupply","type":"uint256"},{"internalType":"uint256","name":"reservedSupply","type":"uint256"},{"internalType":"uint256","name":"tokensPerMint","type":"uint256"},{"internalType":"address payable","name":"treasuryAddress","type":"address"}],"internalType":"struct NFTCollection.DeploymentConfig","name":"deploymentConfig","type":"tuple"},{"components":[{"internalType":"string","name":"baseURI","type":"string"},{"internalType":"bool","name":"metadataUpdatable","type":"bool"},{"internalType":"uint256","name":"publicMintPrice","type":"uint256"},{"internalType":"bool","name":"publicMintPriceFrozen","type":"bool"},{"internalType":"uint256","name":"presaleMintPrice","type":"uint256"},{"internalType":"bool","name":"presaleMintPriceFrozen","type":"bool"},{"internalType":"uint256","name":"publicMintStart","type":"uint256"},{"internalType":"uint256","name":"presaleMintStart","type":"uint256"},{"internalType":"string","name":"prerevealTokenURI","type":"string"},{"internalType":"bytes32","name":"presaleMerkleRoot","type":"bytes32"},{"internalType":"uint256","name":"royaltiesBps","type":"uint256"},{"internalType":"address","name":"royaltiesAddress","type":"address"}],"internalType":"struct NFTCollection.RuntimeConfig","name":"runtimeConfig","type":"tuple"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"isWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"metadataUpdatable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"},{"internalType":"address","name":"sender","type":"address"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintingActive","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":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"prerevealTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presaleActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presaleMerkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presaleMintPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presaleMintStart","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicMintPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicMintStart","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"reserveMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reserveRemaining","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"reservedSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":"","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":"tokenId","type":"uint256"}],"name":"safeTransferFrom","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":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","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":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokensPerMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"transferAdminRights","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasuryAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"string","name":"baseURI","type":"string"},{"internalType":"bool","name":"metadataUpdatable","type":"bool"},{"internalType":"uint256","name":"publicMintPrice","type":"uint256"},{"internalType":"bool","name":"publicMintPriceFrozen","type":"bool"},{"internalType":"uint256","name":"presaleMintPrice","type":"uint256"},{"internalType":"bool","name":"presaleMintPriceFrozen","type":"bool"},{"internalType":"uint256","name":"publicMintStart","type":"uint256"},{"internalType":"uint256","name":"presaleMintStart","type":"uint256"},{"internalType":"string","name":"prerevealTokenURI","type":"string"},{"internalType":"bytes32","name":"presaleMerkleRoot","type":"bytes32"},{"internalType":"uint256","name":"royaltiesBps","type":"uint256"},{"internalType":"address","name":"royaltiesAddress","type":"address"}],"internalType":"struct NFTCollection.RuntimeConfig","name":"newConfig","type":"tuple"}],"name":"updateConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawFees","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b5060405162004fc738038062004fc7833981016040819052620000349162000bf0565b604080516020808201808452600080845284519283019094529281528151733cc6cdda760b79bafa08df41ecfa224f810dceb69360019392916200007b91600291620008e5565b50805162000091906003906020840190620008e5565b506000805550506daaeb6d7670e522a718067333cd4e3b15620001dd5780156200012b57604051633e9f1edf60e11b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe906044015b600060405180830381600087803b1580156200010c57600080fd5b505af115801562000121573d6000803e3d6000fd5b50505050620001dd565b6001600160a01b038216156200017c5760405163a0af290360e01b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e9063a0af290390604401620000f1565b604051632210724360e11b81523060048201526daaeb6d7670e522a718067333cd4e90634420e48690602401600060405180830381600087803b158015620001c357600080fd5b505af1158015620001d8573d6000803e3d6000fd5b505050505b5050601e805460ff19169055620001f58282620001fd565b505062000d34565b600954610100900460ff16158080156200021e5750600954600160ff909116105b806200024e57506200023b306200053160201b62001d581760201c565b1580156200024e575060095460ff166001145b620002b75760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b6009805460ff191660011790558015620002db576009805461ff0019166101001790555b601e5460ff1615620003305760405162461bcd60e51b815260206004820152601560248201527f43616e6e6f7420626520696e697469616c697a656400000000000000000000006044820152606401620002ae565b6200033b8362000540565b6200035660008051602062004fa78339815191523362000701565b60408301516200036690620007a6565b82518051849160179162000382918391602090910190620008e5565b5060208281015180516200039d9260018501920190620008e5565b5060408201516002820180546001600160a01b03199081166001600160a01b0393841617909155606084015160038401556080840151600484015560a0840151600584015560c090930151600690920180549093169116179055815180518391600b9162000413918391602090910190620008e5565b5060208281015160018301805491151560ff199283161790556040840151600284015560608401516003840180549115159183169190911790556080840151600484015560a08401516005840180549115159190921617905560c0830151600683015560e0830151600783015561010083015180516200049a9260088501920190620008e5565b506101208201516009820155610140820151600a8083019190915561016090920151600b90910180546001600160a01b0319166001600160a01b039092169190911790556080840151905580156200052c576009805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b505050565b6001600160a01b03163b151590565b6000816060015111620005965760405162461bcd60e51b815260206004820152601f60248201527f4d6178696d756d20737570706c79206d757374206265206e6f6e2d7a65726f006044820152606401620002ae565b60008160a0015111620005ec5760405162461bcd60e51b815260206004820181905260248201527f546f6b656e7320706572206d696e74206d757374206265206e6f6e2d7a65726f6044820152606401620002ae565b60c08101516001600160a01b0316620006485760405162461bcd60e51b815260206004820152601f60248201527f547265617375727920616464726573732063616e6e6f74206265206e756c6c006044820152606401620002ae565b60408101516001600160a01b0316620006a45760405162461bcd60e51b815260206004820152601b60248201527f436f6e7472616374206d757374206861766520616e206f776e657200000000006044820152606401620002ae565b806060015181608001511115620006fe5760405162461bcd60e51b815260206004820152601b60248201527f526573657276652067726561746572207468616e20737570706c7900000000006044820152606401620002ae565b50565b60008281526008602090815260408083206001600160a01b038516845290915290205460ff16620007a25760008281526008602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620007613390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6019546001600160a01b0316620007cd60008051602062004fa78339815191528262000861565b620007da60008262000861565b601980546001600160a01b0319166001600160a01b0384161790556200081060008051602062004fa78339815191528362000701565b6200081d60008362000701565b816001600160a01b0316816001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60008281526008602090815260408083206001600160a01b038516845290915290205460ff1615620007a25760008281526008602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b828054620008f39062000cf8565b90600052602060002090601f01602090048101928262000917576000855562000962565b82601f106200093257805160ff191683800117855562000962565b8280016001018555821562000962579182015b828111156200096257825182559160200191906001019062000945565b506200097092915062000974565b5090565b5b8082111562000970576000815560010162000975565b634e487b7160e01b600052604160045260246000fd5b60405161018081016001600160401b0381118282101715620009c757620009c76200098b565b60405290565b60405160e081016001600160401b0381118282101715620009c757620009c76200098b565b604051601f8201601f191681016001600160401b038111828210171562000a1d5762000a1d6200098b565b604052919050565b600082601f83011262000a3757600080fd5b81516001600160401b0381111562000a535762000a536200098b565b602062000a69601f8301601f19168201620009f2565b828152858284870101111562000a7e57600080fd5b60005b8381101562000a9e57858101830151828201840152820162000a81565b8381111562000ab05760008385840101525b5095945050505050565b80516001600160a01b038116811462000ad257600080fd5b919050565b8051801515811462000ad257600080fd5b6000610180828403121562000afc57600080fd5b62000b06620009a1565b82519091506001600160401b038082111562000b2157600080fd5b62000b2f8583860162000a25565b835262000b3f6020850162000ad7565b60208401526040840151604084015262000b5c6060850162000ad7565b60608401526080840151608084015262000b7960a0850162000ad7565b60a084015260c084015160c084015260e084015160e08401526101009150818401518181111562000ba957600080fd5b62000bb78682870162000a25565b8385015250505061012080830151818301525061014080830151818301525061016062000be681840162000aba565b9082015292915050565b6000806040838503121562000c0457600080fd5b82516001600160401b038082111562000c1c57600080fd5b9084019060e0828703121562000c3157600080fd5b62000c3b620009cd565b82518281111562000c4b57600080fd5b62000c598882860162000a25565b82525060208301518281111562000c6f57600080fd5b62000c7d8882860162000a25565b60208301525062000c916040840162000aba565b6040820152606083015160608201526080830151608082015260a083015160a082015262000cc260c0840162000aba565b60c0820152602086015190945091508082111562000cdf57600080fd5b5062000cee8582860162000ae8565b9150509250929050565b600181811c9082168062000d0d57607f821691505b60208210810362000d2e57634e487b7160e01b600052602260045260246000fd5b50919050565b6142638062000d446000396000f3fe6080604052600436106102e45760003560e01c806370a0823111610190578063c5f956af116100dc578063d761aa4811610095578063e985e9c51161006f578063e985e9c51461086a578063f2fde38b146108b3578063f4ad0f97146108d3578063ffa1ad74146108e857600080fd5b8063d761aa4814610820578063dc53fd9214610840578063e8a3d4851461085557600080fd5b8063c5f956af1461077a578063c87b56dd14610798578063cbbf42c1146107b8578063d1bff694146107cb578063d547741f146107eb578063d5abeb011461080b57600080fd5b806395d89b4111610149578063a22cb46511610123578063a22cb465146106fa578063b0ea18021461071a578063b5106add1461073a578063b88d4fde1461075a57600080fd5b806395d89b41146106a75780639da5b0a5146106bc578063a217fddf146106e557600080fd5b806370a08231146105fd57806375b238fc1461061d5780637ecc2b561461063f5780638cfec4c0146106545780638da5cb5b1461066957806391d148541461068757600080fd5b806336568abe1161024f57806353135ca0116102085780635be50521116101e25780635be505211461059d5780635c629f4c146105b25780636352211e146105c85780636c0360eb146105e857600080fd5b806353135ca0146105445780635a23dd991461055b5780635a9b0b891461057b57600080fd5b806336568abe146104ad57806342842e0e146104cd57806344d19d2b146104ed5780634653124b14610502578063476343ee146105175780634e6f9dd61461052c57600080fd5b806322212e2b116102a157806322212e2b146103d257806323b872dd146103e7578063248a9ca3146104075780632a55205a146104375780632f2ff15d1461047657806331f9c9191461049657600080fd5b806301ffc9a7146102e957806306fdde031461031e5780630807b9e214610340578063081812fc1461035f578063095ea7b31461039757806318160ddd146103b9575b600080fd5b3480156102f557600080fd5b50610309610304366004613364565b6108fe565b60405190151581526020015b60405180910390f35b34801561032a57600080fd5b50610333610939565b60405161031591906133d9565b34801561034c57600080fd5b50601c545b604051908152602001610315565b34801561036b57600080fd5b5061037f61037a3660046133ec565b6109ce565b6040516001600160a01b039091168152602001610315565b3480156103a357600080fd5b506103b76103b236600461342a565b610a12565b005b3480156103c557600080fd5b5060015460005403610351565b3480156103de57600080fd5b50601454610351565b3480156103f357600080fd5b506103b7610402366004613456565b610a9f565b34801561041357600080fd5b506103516104223660046133ec565b60009081526008602052604090206001015490565b34801561044357600080fd5b50610457610452366004613497565b610c00565b604080516001600160a01b039093168352602083019190915201610315565b34801561048257600080fd5b506103b76104913660046134b9565b610c37565b3480156104a257600080fd5b506011544211610309565b3480156104b957600080fd5b506103b76104c83660046134b9565b610c5c565b3480156104d957600080fd5b506103b76104e8366004613456565b610cda565b3480156104f957600080fd5b50601b54610351565b34801561050e57600080fd5b50601254610351565b34801561052357600080fd5b506103b7610e2b565b34801561053857600080fd5b50600c5460ff16610309565b34801561055057600080fd5b506012544211610309565b34801561056757600080fd5b50610309610576366004613534565b610e5c565b34801561058757600080fd5b50610590610f3a565b604051610315919061365e565b3480156105a957600080fd5b50600f54610351565b3480156105be57600080fd5b50610351600a5481565b3480156105d457600080fd5b5061037f6105e33660046133ec565b611283565b3480156105f457600080fd5b50610333611295565b34801561060957600080fd5b5061035161061836600461370f565b6112a7565b34801561062957600080fd5b5061035160008051602061420e83398151915281565b34801561064b57600080fd5b506103516112f5565b34801561066057600080fd5b50601154610351565b34801561067557600080fd5b506019546001600160a01b031661037f565b34801561069357600080fd5b506103096106a23660046134b9565b611323565b3480156106b357600080fd5b5061033361134e565b3480156106c857600080fd5b506106d261271081565b60405161ffff9091168152602001610315565b3480156106f157600080fd5b50610351600081565b34801561070657600080fd5b506103b7610715366004613745565b611360565b34801561072657600080fd5b506103b761073536600461342a565b6113f5565b34801561074657600080fd5b506103b761075536600461370f565b611477565b34801561076657600080fd5b506103b7610775366004613849565b611569565b34801561078657600080fd5b50601d546001600160a01b031661037f565b3480156107a457600080fd5b506103336107b33660046133ec565b6116c8565b6103b76107c63660046138c8565b6117f0565b3480156107d757600080fd5b506103b76107e6366004613a3c565b611916565b3480156107f757600080fd5b506103b76108063660046134b9565b611c10565b34801561081757600080fd5b50601a54610351565b34801561082c57600080fd5b506103b761083b366004613b31565b611c35565b34801561084c57600080fd5b50600d54610351565b34801561086157600080fd5b50610333611c63565b34801561087657600080fd5b50610309610885366004613b6c565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b3480156108bf57600080fd5b506103b76108ce36600461370f565b611ce0565b3480156108df57600080fd5b50610333611d46565b3480156108f457600080fd5b5061035161283c81565b600061090982611d67565b80610918575061091882611db7565b80610933575063152a902d60e11b6001600160e01b03198316145b92915050565b60606017600001805461094b90613b9a565b80601f016020809104026020016040519081016040528092919081815260200182805461097790613b9a565b80156109c45780601f10610999576101008083540402835291602001916109c4565b820191906000526020600020905b8154815290600101906020018083116109a757829003601f168201915b5050505050905090565b60006109d982611dec565b6109f6576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b6000610a1d82611283565b9050806001600160a01b0316836001600160a01b031603610a515760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b03821614801590610a715750610a6f8133610885565b155b15610a8f576040516367d9dca160e11b815260040160405180910390fd5b610a9a838383611e17565b505050565b826daaeb6d7670e522a718067333cd4e3b15610bef57336001600160a01b03821603610ad557610ad0848484611e73565b610bfa565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015610b24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b489190613bd4565b8015610bcb5750604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015610ba7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bcb9190613bd4565b610bef57604051633b79c77360e21b81523360048201526024015b60405180910390fd5b610bfa848484611e73565b50505050565b6016546015546001600160a01b039091169060009061271090610c24908590613c07565b610c2e9190613c3c565b90509250929050565b600082815260086020526040902060010154610c5281611e7e565b610a9a8383611e88565b6001600160a01b0381163314610ccc5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610be6565b610cd68282611f0e565b5050565b826daaeb6d7670e522a718067333cd4e3b15610e2057336001600160a01b03821603610d0b57610ad0848484611f75565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015610d5a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d7e9190613bd4565b8015610e015750604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015610ddd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e019190613bd4565b610e2057604051633b79c77360e21b8152336004820152602401610be6565b610bfa848484611f75565b60008051602061420e833981519152610e4381611e7e565b601d54610e59906001600160a01b031647611f90565b50565b6001600160a01b0383166000908152601f602052604081205460ff1615610eb65760405162461bcd60e51b815260206004820152600e60248201526d105b1c9958591e481b5a5b9d195960921b6044820152606401610be6565b6040516bffffffffffffffffffffffff19606086901b166020820152600090603401604051602081830303815290604052805190602001209050610f318484808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505060145491508490506120a9565b95945050505050565b610f426131d1565b61283c81526040805160e081019091526017805482908290610f6390613b9a565b80601f0160208091040260200160405190810160405280929190818152602001828054610f8f90613b9a565b8015610fdc5780601f10610fb157610100808354040283529160200191610fdc565b820191906000526020600020905b815481529060010190602001808311610fbf57829003601f168201915b50505050508152602001600182018054610ff590613b9a565b80601f016020809104026020016040519081016040528092919081815260200182805461102190613b9a565b801561106e5780601f106110435761010080835404028352916020019161106e565b820191906000526020600020905b81548152906001019060200180831161105157829003601f168201915b505050918352505060028201546001600160a01b039081166020808401919091526003840154604080850191909152600485015460608501526005850154608085015260069094015490911660a09092019190915283019190915280516101808101909152600b8054829082906110e490613b9a565b80601f016020809104026020016040519081016040528092919081815260200182805461111090613b9a565b801561115d5780601f106111325761010080835404028352916020019161115d565b820191906000526020600020905b81548152906001019060200180831161114057829003601f168201915b5050509183525050600182015460ff9081161515602083015260028301546040830152600383015481161515606083015260048301546080830152600583015416151560a0820152600682015460c0820152600782015460e0820152600882018054610100909201916111cf90613b9a565b80601f01602080910402602001604051908101604052809291908181526020018280546111fb90613b9a565b80156112485780601f1061121d57610100808354040283529160200191611248565b820191906000526020600020905b81548152906001019060200180831161122b57829003601f168201915b505050918352505060098201546020820152600a820154604080830191909152600b909201546001600160a01b031660609091015282015290565b600061128e826120bf565b5192915050565b6060600b600001805461094b90613b9a565b60006001600160a01b0382166112d0576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600560205260409020546001600160401b031690565b6000600a546113076001546000540390565b601a546113149190613c50565b61131e9190613c50565b905090565b60009182526008602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60606017600101805461094b90613b9a565b336001600160a01b038316036113895760405163b06307db60e01b815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b60008051602061420e83398151915261140d81611e7e565b600a548211156114555760405162461bcd60e51b8152602060048201526013602482015272139bdd08195b9bdd59da081c995cd95c9d9959606a1b6044820152606401610be6565b81600a60008282546114679190613c50565b90915550610a9a905083836121d9565b60008051602061420e83398151915261148f81611e7e565b6114a760008051602061420e83398151915283611323565b156114e75760405162461bcd60e51b815260206004820152601060248201526f20b63932b0b23c9030b71030b236b4b760811b6044820152606401610be6565b6019546001600160a01b031633036115395760405162461bcd60e51b81526020600482015260156024820152740557365207472616e736665724f776e65727368697605c1b6044820152606401610be6565b61155160008051602061420e83398151915233611f0e565b610cd660008051602061420e83398151915283611e88565b836daaeb6d7670e522a718067333cd4e3b156116b557336001600160a01b038216036115a05761159b858585856121f3565b6116c1565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa1580156115ef573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116139190613bd4565b80156116965750604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015611672573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116969190613bd4565b6116b557604051633b79c77360e21b8152336004820152602401610be6565b6116c1858585856121f3565b5050505050565b60606116d382611dec565b6117165760405162461bcd60e51b8152602060048201526014602482015273151bdad95b88191bd95cc81b9bdd08195e1a5cdd60621b6044820152606401610be6565b6000600b600001805461172890613b9a565b9050116117bf576013805461173c90613b9a565b80601f016020809104026020016040519081016040528092919081815260200182805461176890613b9a565b80156117b55780601f1061178a576101008083540402835291602001916117b5565b820191906000526020600020905b81548152906001019060200180831161179857829003601f168201915b5050505050610933565b600b6117ca8361223e565b6040516020016117db929190613cd6565b60405160208183030381529060405292915050565b600f546117fd9085613c07565b803410156118415760405162461bcd60e51b815260206004820152601160248201527014185e5b595b9d081d1bdbc81cdb585b1b607a1b6044820152606401610be6565b60125442116118925760405162461bcd60e51b815260206004820152601b60248201527f50726573616c6520686173206e6f7420737461727465642079657400000000006044820152606401610be6565b61189d828585610e5c565b6118e95760405162461bcd60e51b815260206004820152601b60248201527f4e6f742077686974656c697374656420666f722070726573616c6500000000006044820152606401610be6565b6001600160a01b0382166000908152601f60205260409020805460ff191660011790556116c18286612346565b600954610100900460ff16158080156119365750600954600160ff909116105b806119505750303b158015611950575060095460ff166001145b6119b35760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610be6565b6009805460ff1916600117905580156119d6576009805461ff0019166101001790555b601e5460ff1615611a215760405162461bcd60e51b815260206004820152601560248201527410d85b9b9bdd081899481a5b9a5d1a585b1a5e9959605a1b6044820152606401610be6565b611a2a836123e5565b611a4260008051602061420e83398151915233611e88565b611a4f8360400151612599565b825180518491601791611a699183916020909101906132b5565b506020828101518051611a8292600185019201906132b5565b5060408201516002820180546001600160a01b03199081166001600160a01b0393841617909155606084015160038401556080840151600484015560a0840151600584015560c090930151600690920180549093169116179055815180518391600b91611af69183916020909101906132b5565b5060208281015160018301805491151560ff199283161790556040840151600284015560608401516003840180549115159183169190911790556080840151600484015560a08401516005840180549115159190921617905560c0830151600683015560e083015160078301556101008301518051611b7b92600885019201906132b5565b506101208201516009820155610140820151600a8083019190915561016090920151600b90910180546001600160a01b0319166001600160a01b03909216919091179055608084015190558015610a9a576009805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a1505050565b600082815260086020526040902060010154611c2b81611e7e565b610a9a8383611f0e565b60008051602061420e833981519152611c4d81611e7e565b611c568261264a565b81600b610bfa8282613e68565b60606000611cb4611c78600b600a015461223e565b601654611c8f906001600160a01b031660146126b1565b604051602001611ca0929190613f87565b604051602081830303815290604052612853565b9050600081604051602001611cc9919061400e565b60408051601f198184030181529190529392505050565b6000611ceb81611e7e565b6019546001600160a01b0390811690831603611d3d5760405162461bcd60e51b815260206004820152601160248201527020b63932b0b23c903a34329037bbb732b960791b6044820152606401610be6565b610cd682612599565b6060600b600801805461094b90613b9a565b6001600160a01b03163b151590565b60006001600160e01b031982166380ac58cd60e01b1480611d9857506001600160e01b03198216635b5e139f60e01b145b8061093357506301ffc9a760e01b6001600160e01b0319831614610933565b60006001600160e01b03198216637965db0b60e01b1480610933575063152a902d60e11b6001600160e01b0319831614610933565b6000805482108015610933575050600090815260046020526040902054600160e01b900460ff161590565b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b610a9a8383836129bc565b610e598133612ba7565b611e928282611323565b610cd65760008281526008602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611eca3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611f188282611323565b15610cd65760008281526008602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b610a9a83838360405180602001604052806000815250611569565b80471015611fe05760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610be6565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461202d576040519150601f19603f3d011682016040523d82523d6000602084013e612032565b606091505b5050905080610a9a5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610be6565b6000826120b68584612c0b565b14949350505050565b6040805160608101825260008082526020820181905291810191909152816000548110156121c057600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff161515918101829052906121be5780516001600160a01b031615612155579392505050565b5060001901600081815260046020908152604091829020825160608101845290546001600160a01b038116808352600160a01b82046001600160401b031693830193909352600160e01b900460ff16151592810192909252156121b9579392505050565b612155565b505b604051636f96cda160e11b815260040160405180910390fd5b610cd6828260405180602001604052806000815250612c58565b6121fe8484846129bc565b6001600160a01b0383163b15158015612220575061221e84848484612c65565b155b15610bfa576040516368d2bf6b60e11b815260040160405180910390fd5b6060816000036122655750506040805180820190915260018152600360fc1b602082015290565b8160005b811561228f578061227981614053565b91506122889050600a83613c3c565b9150612269565b6000816001600160401b038111156122a9576122a9613773565b6040519080825280601f01601f1916602001820160405280156122d3576020820181803683370190505b5090505b841561233e576122e8600183613c50565b91506122f5600a8661406c565b612300906030614080565b60f81b81838151811061231557612315614098565b60200101906001600160f81b031916908160001a905350612337600a86613c3c565b94506122d7565b949350505050565b601c5481111561238b5760405162461bcd60e51b815260206004820152601060248201526f416d6f756e7420746f6f206c6172676560801b6044820152606401610be6565b6123936112f5565b8111156123db5760405162461bcd60e51b8152602060048201526016602482015275139bdd08195b9bdd59da081d1bdad95b9cc81b19599d60521b6044820152606401610be6565b610cd682826121d9565b60008160600151116124395760405162461bcd60e51b815260206004820152601f60248201527f4d6178696d756d20737570706c79206d757374206265206e6f6e2d7a65726f006044820152606401610be6565b60008160a001511161248d5760405162461bcd60e51b815260206004820181905260248201527f546f6b656e7320706572206d696e74206d757374206265206e6f6e2d7a65726f6044820152606401610be6565b60c08101516001600160a01b03166124e75760405162461bcd60e51b815260206004820152601f60248201527f547265617375727920616464726573732063616e6e6f74206265206e756c6c006044820152606401610be6565b60408101516001600160a01b03166125415760405162461bcd60e51b815260206004820152601b60248201527f436f6e7472616374206d757374206861766520616e206f776e657200000000006044820152606401610be6565b806060015181608001511115610e595760405162461bcd60e51b815260206004820152601b60248201527f526573657276652067726561746572207468616e20737570706c7900000000006044820152606401610be6565b6019546001600160a01b03166125bd60008051602061420e83398151915282611f0e565b6125c8600082611f0e565b601980546001600160a01b0319166001600160a01b0384161790556125fb60008051602061420e83398151915283611e88565b612606600083611e88565b816001600160a01b0316816001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b61271061014082013511156126965760405162461bcd60e51b81526020600482015260126024820152710a4def2c2d8e8d2cae640e8dede40d0d2ced60731b6044820152606401610be6565b61269f81612d50565b6126a881612e0e565b610e5981612ecc565b606060006126c0836002613c07565b6126cb906002614080565b6001600160401b038111156126e2576126e2613773565b6040519080825280601f01601f19166020018201604052801561270c576020820181803683370190505b509050600360fc1b8160008151811061272757612727614098565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061275657612756614098565b60200101906001600160f81b031916908160001a905350600061277a846002613c07565b612785906001614080565b90505b60018111156127fd576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106127b9576127b9614098565b1a60f81b8282815181106127cf576127cf614098565b60200101906001600160f81b031916908160001a90535060049490941c936127f6816140ae565b9050612788565b50831561284c5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610be6565b9392505050565b80516060906000819003612877575050604080516020810190915260008152919050565b60006003612886836002614080565b6128909190613c3c565b61289b906004613c07565b905060006128aa826020614080565b6001600160401b038111156128c1576128c1613773565b6040519080825280601f01601f1916602001820160405280156128eb576020820181803683370190505b50905060006040518060600160405280604081526020016141ce604091399050600181016020830160005b86811015612977576003818a01810151603f601282901c8116860151600c83901c8216870151600684901c831688015192909316870151600891821b60ff94851601821b92841692909201901b91160160e01b835260049092019101612916565b50600386066001811461299157600281146129a2576129ae565b613d3d60f01b6001198301526129ae565b603d60f81b6000198301525b505050918152949350505050565b60006129c7826120bf565b9050836001600160a01b031681600001516001600160a01b0316146129fe5760405162a1148160e81b815260040160405180910390fd5b6000336001600160a01b0386161480612a1c5750612a1c8533610885565b80612a37575033612a2c846109ce565b6001600160a01b0316145b905080612a5757604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038416612a7e57604051633a954ecd60e21b815260040160405180910390fd5b612a8a60008487611e17565b6001600160a01b038581166000908152600560209081526040808320805467ffffffffffffffff198082166001600160401b0392831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600490945282852080546001600160e01b031916909417600160a01b42909216919091021783558701808452922080549193909116612b5e576000548214612b5e57805460208601516001600160401b0316600160a01b026001600160e01b03199091166001600160a01b038a16171781555b50505082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46116c1565b612bb18282611323565b610cd657612bc9816001600160a01b031660146126b1565b612bd48360206126b1565b604051602001612be59291906140c5565b60408051601f198184030181529082905262461bcd60e51b8252610be6916004016133d9565b600081815b8451811015612c5057612c3c82868381518110612c2f57612c2f614098565b6020026020010151612fd1565b915080612c4881614053565b915050612c10565b509392505050565b610a9a8383836001613000565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290612c9a90339089908890889060040161413a565b6020604051808303816000875af1925050508015612cd5575060408051601f3d908101601f19168201909252612cd291810190614177565b60015b612d33573d808015612d03576040519150601f19603f3d011682016040523d82523d6000602084013e612d08565b606091505b508051600003612d2b576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b600e5460ff16612d5d5750565b600d54604082013514612db25760405162461bcd60e51b815260206004820152601960248201527f7075626c69634d696e7450726963652069732066726f7a656e000000000000006044820152606401610be6565b612dc26080820160608301614194565b610e595760405162461bcd60e51b815260206004820152601f60248201527f7075626c69634d696e74507269636546726f7a656e2069732066726f7a656e006044820152606401610be6565b60105460ff16612e1b5750565b600f54608082013514612e705760405162461bcd60e51b815260206004820152601a60248201527f70726573616c654d696e7450726963652069732066726f7a656e0000000000006044820152606401610be6565b612e8060c0820160a08301614194565b610e595760405162461bcd60e51b815260206004820181905260248201527f70726573616c654d696e74507269636546726f7a656e2069732066726f7a656e6044820152606401610be6565b600c5460ff1615612eda5750565b612eea6040820160208301614194565b15612f375760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420756e667265657a65206d6574616461746100000000000000006044820152606401610be6565b612f418180613cfb565b604051602001612f529291906141b1565b60408051601f1981840301815290829052805160209182012091612f7991600b91016141c1565b6040516020818303038152906040528051906020012014610e595760405162461bcd60e51b815260206004820152601260248201527126b2ba30b230ba309034b990333937bd32b760711b6044820152606401610be6565b6000818310612fed57600082815260208490526040902061284c565b600083815260208390526040902061284c565b6000546001600160a01b03851661302957604051622e076360e81b815260040160405180910390fd5b8360000361304a5760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038516600081815260056020908152604080832080546fffffffffffffffffffffffffffffffff1981166001600160401b038083168c0181169182176801000000000000000067ffffffffffffffff1990941690921783900481168c01811690920217909155858452600490925290912080546001600160e01b031916909217600160a01b4290921691909102179055808085018380156130fb57506001600160a01b0387163b15155b15613183575b60405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a461314c6000888480600101955088612c65565b613169576040516368d2bf6b60e11b815260040160405180910390fd5b80820361310157826000541461317e57600080fd5b6131c8565b5b6040516001830192906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4808203613184575b506000556116c1565b6040518060600160405280600081526020016132356040518060e00160405280606081526020016060815260200160006001600160a01b0316815260200160008152602001600081526020016000815260200160006001600160a01b031681525090565b81526020016132b0604051806101800160405280606081526020016000151581526020016000815260200160001515815260200160008152602001600015158152602001600081526020016000815260200160608152602001600080191681526020016000815260200160006001600160a01b031681525090565b905290565b8280546132c190613b9a565b90600052602060002090601f0160209004810192826132e35760008555613329565b82601f106132fc57805160ff1916838001178555613329565b82800160010185558215613329579182015b8281111561332957825182559160200191906001019061330e565b50613335929150613339565b5090565b5b80821115613335576000815560010161333a565b6001600160e01b031981168114610e5957600080fd5b60006020828403121561337657600080fd5b813561284c8161334e565b60005b8381101561339c578181015183820152602001613384565b83811115610bfa5750506000910152565b600081518084526133c5816020860160208601613381565b601f01601f19169290920160200192915050565b60208152600061284c60208301846133ad565b6000602082840312156133fe57600080fd5b5035919050565b6001600160a01b0381168114610e5957600080fd5b803561342581613405565b919050565b6000806040838503121561343d57600080fd5b823561344881613405565b946020939093013593505050565b60008060006060848603121561346b57600080fd5b833561347681613405565b9250602084013561348681613405565b929592945050506040919091013590565b600080604083850312156134aa57600080fd5b50508035926020909101359150565b600080604083850312156134cc57600080fd5b8235915060208301356134de81613405565b809150509250929050565b60008083601f8401126134fb57600080fd5b5081356001600160401b0381111561351257600080fd5b6020830191508360208260051b850101111561352d57600080fd5b9250929050565b60008060006040848603121561354957600080fd5b833561355481613405565b925060208401356001600160401b0381111561356f57600080fd5b61357b868287016134e9565b9497909650939450505050565b6000610180825181855261359e828601826133ad565b91505060208301516135b4602086018215159052565b506040830151604085015260608301516135d2606086018215159052565b506080830151608085015260a08301516135f060a086018215159052565b5060c083015160c085015260e083015160e0850152610100808401518583038287015261361d83826133ad565b9250505061012080840151818601525061014080840151818601525061016080840151613654828701826001600160a01b03169052565b5090949350505050565b60208152815160208201526000602083015160606040840152805160e0608085015261368e6101608501826133ad565b90506020820151607f198583030160a08601526136ab82826133ad565b6040848101516001600160a01b0390811660c08981019190915260608088015160e08b015260808801516101008b015260a08801516101208b015296015116610140880152870151868203601f1901948701949094529150610f3190508183613588565b60006020828403121561372157600080fd5b813561284c81613405565b8015158114610e5957600080fd5b80356134258161372c565b6000806040838503121561375857600080fd5b823561376381613405565b915060208301356134de8161372c565b634e487b7160e01b600052604160045260246000fd5b60405161018081016001600160401b03811182821017156137ac576137ac613773565b60405290565b60405160e081016001600160401b03811182821017156137ac576137ac613773565b60006001600160401b03808411156137ee576137ee613773565b604051601f8501601f19908116603f0116810190828211818310171561381657613816613773565b8160405280935085815286868601111561382f57600080fd5b858560208301376000602087830101525050509392505050565b6000806000806080858703121561385f57600080fd5b843561386a81613405565b9350602085013561387a81613405565b92506040850135915060608501356001600160401b0381111561389c57600080fd5b8501601f810187136138ad57600080fd5b6138bc878235602084016137d4565b91505092959194509250565b600080600080606085870312156138de57600080fd5b8435935060208501356001600160401b038111156138fb57600080fd5b613907878288016134e9565b909450925050604085013561391b81613405565b939692955090935050565b600082601f83011261393757600080fd5b61284c838335602085016137d4565b6000610180828403121561395957600080fd5b613961613789565b905081356001600160401b038082111561397a57600080fd5b61398685838601613926565b83526139946020850161373a565b6020840152604084013560408401526139af6060850161373a565b6060840152608084013560808401526139ca60a0850161373a565b60a084015260c084013560c084015260e084013560e0840152610100915081840135818111156139f957600080fd5b613a0586828701613926565b83850152505050610120808301358183015250610140808301358183015250610160613a3281840161341a565b9082015292915050565b60008060408385031215613a4f57600080fd5b82356001600160401b0380821115613a6657600080fd5b9084019060e08287031215613a7a57600080fd5b613a826137b2565b823582811115613a9157600080fd5b613a9d88828601613926565b825250602083013582811115613ab257600080fd5b613abe88828601613926565b602083015250613ad06040840161341a565b6040820152606083013560608201526080830135608082015260a083013560a0820152613aff60c0840161341a565b60c082015293506020850135915080821115613b1a57600080fd5b50613b2785828601613946565b9150509250929050565b600060208284031215613b4357600080fd5b81356001600160401b03811115613b5957600080fd5b8201610180818503121561284c57600080fd5b60008060408385031215613b7f57600080fd5b8235613b8a81613405565b915060208301356134de81613405565b600181811c90821680613bae57607f821691505b602082108103613bce57634e487b7160e01b600052602260045260246000fd5b50919050565b600060208284031215613be657600080fd5b815161284c8161372c565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615613c2157613c21613bf1565b500290565b634e487b7160e01b600052601260045260246000fd5b600082613c4b57613c4b613c26565b500490565b600082821015613c6257613c62613bf1565b500390565b60008154613c7481613b9a565b60018281168015613c8c5760018114613c9d57613ccc565b60ff19841687528287019450613ccc565b8560005260208060002060005b85811015613cc35781548a820152908401908201613caa565b50505082870194505b5050505092915050565b6000613ce28285613c67565b8351613cf2818360208801613381565b01949350505050565b6000808335601e19843603018112613d1257600080fd5b8301803591506001600160401b03821115613d2c57600080fd5b60200191503681900382131561352d57600080fd5b601f821115610a9a57600081815260208120601f850160051c81016020861015613d685750805b601f850160051c820191505b81811015613d8757828155600101613d74565b505050505050565b6001600160401b03831115613da657613da6613773565b613dba83613db48354613b9a565b83613d41565b6000601f841160018114613dee5760008515613dd65750838201355b600019600387901b1c1916600186901b1783556116c1565b600083815260209020601f19861690835b82811015613e1f5786850135825560209485019460019092019101613dff565b5086821015613e3c5760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b600081356109338161372c565b6000813561093381613405565b613e728283613cfb565b613e7d818385613d8f565b5050613ea7613e8e60208401613e4e565b6001830160ff1981541660ff8315151681178255505050565b60408201356002820155613ed9613ec060608401613e4e565b6003830160ff1981541660ff8315151681178255505050565b60808201356004820155613f0b613ef260a08401613e4e565b6005830160ff1981541660ff8315151681178255505050565b60c0820135600682015560e08201356007820155613f2d610100830183613cfb565b613f3b818360088601613d8f565b50506101208201356009820155610140820135600a820155610cd6613f636101608401613e5b565b600b830180546001600160a01b0319166001600160a01b0392909216919091179055565b7f7b2273656c6c65725f6665655f62617369735f706f696e7473223a2000000000815260008351613fbf81601c850160208801613381565b731610113332b2afb932b1b4b834b2b73a111d101160611b601c918401918201528351613ff3816030840160208801613381565b61227d60f01b60309290910191820152603201949350505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c00000081526000825161404681601d850160208701613381565b91909101601d0192915050565b60006001820161406557614065613bf1565b5060010190565b60008261407b5761407b613c26565b500690565b6000821982111561409357614093613bf1565b500190565b634e487b7160e01b600052603260045260246000fd5b6000816140bd576140bd613bf1565b506000190190565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516140fd816017850160208801613381565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161412e816028840160208801613381565b01602801949350505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061416d908301846133ad565b9695505050505050565b60006020828403121561418957600080fd5b815161284c8161334e565b6000602082840312156141a657600080fd5b813561284c8161372c565b8183823760009101908152919050565b600061284c8284613c6756fe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775a264697066735822122061f3ec749530d888ee687b27f10ffb2510519f43ef0f3563d9ccf09fb02f75c764736f6c634300080d0033a49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000120000000000000000000000000c94b521130ccdefc168dbcc0eac896f10b1938e300000000000000000000000000000000000000000000000000000000000007d000000000000000000000000000000000000000000000000000000000000001f40000000000000000000000000000000000000000000000000000000000000006000000000000000000000000c94b521130ccdefc168dbcc0eac896f10b1938e3000000000000000000000000000000000000000000000000000000000000000877656232746f6d620000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004746f6d62000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000065903e80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e0b137e1119257d99eeb58993e0eeb6363cce8dfa07ea58b3935b41e75c824733700000000000000000000000000000000000000000000000000000000000002ee000000000000000000000000c94b521130ccdefc168dbcc0eac896f10b1938e30000000000000000000000000000000000000000000000000000000000000036697066733a2f2f516d5170434c446d7063557551547156397a32706f445335707656765439355738466239587179514145674535532f000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106102e45760003560e01c806370a0823111610190578063c5f956af116100dc578063d761aa4811610095578063e985e9c51161006f578063e985e9c51461086a578063f2fde38b146108b3578063f4ad0f97146108d3578063ffa1ad74146108e857600080fd5b8063d761aa4814610820578063dc53fd9214610840578063e8a3d4851461085557600080fd5b8063c5f956af1461077a578063c87b56dd14610798578063cbbf42c1146107b8578063d1bff694146107cb578063d547741f146107eb578063d5abeb011461080b57600080fd5b806395d89b4111610149578063a22cb46511610123578063a22cb465146106fa578063b0ea18021461071a578063b5106add1461073a578063b88d4fde1461075a57600080fd5b806395d89b41146106a75780639da5b0a5146106bc578063a217fddf146106e557600080fd5b806370a08231146105fd57806375b238fc1461061d5780637ecc2b561461063f5780638cfec4c0146106545780638da5cb5b1461066957806391d148541461068757600080fd5b806336568abe1161024f57806353135ca0116102085780635be50521116101e25780635be505211461059d5780635c629f4c146105b25780636352211e146105c85780636c0360eb146105e857600080fd5b806353135ca0146105445780635a23dd991461055b5780635a9b0b891461057b57600080fd5b806336568abe146104ad57806342842e0e146104cd57806344d19d2b146104ed5780634653124b14610502578063476343ee146105175780634e6f9dd61461052c57600080fd5b806322212e2b116102a157806322212e2b146103d257806323b872dd146103e7578063248a9ca3146104075780632a55205a146104375780632f2ff15d1461047657806331f9c9191461049657600080fd5b806301ffc9a7146102e957806306fdde031461031e5780630807b9e214610340578063081812fc1461035f578063095ea7b31461039757806318160ddd146103b9575b600080fd5b3480156102f557600080fd5b50610309610304366004613364565b6108fe565b60405190151581526020015b60405180910390f35b34801561032a57600080fd5b50610333610939565b60405161031591906133d9565b34801561034c57600080fd5b50601c545b604051908152602001610315565b34801561036b57600080fd5b5061037f61037a3660046133ec565b6109ce565b6040516001600160a01b039091168152602001610315565b3480156103a357600080fd5b506103b76103b236600461342a565b610a12565b005b3480156103c557600080fd5b5060015460005403610351565b3480156103de57600080fd5b50601454610351565b3480156103f357600080fd5b506103b7610402366004613456565b610a9f565b34801561041357600080fd5b506103516104223660046133ec565b60009081526008602052604090206001015490565b34801561044357600080fd5b50610457610452366004613497565b610c00565b604080516001600160a01b039093168352602083019190915201610315565b34801561048257600080fd5b506103b76104913660046134b9565b610c37565b3480156104a257600080fd5b506011544211610309565b3480156104b957600080fd5b506103b76104c83660046134b9565b610c5c565b3480156104d957600080fd5b506103b76104e8366004613456565b610cda565b3480156104f957600080fd5b50601b54610351565b34801561050e57600080fd5b50601254610351565b34801561052357600080fd5b506103b7610e2b565b34801561053857600080fd5b50600c5460ff16610309565b34801561055057600080fd5b506012544211610309565b34801561056757600080fd5b50610309610576366004613534565b610e5c565b34801561058757600080fd5b50610590610f3a565b604051610315919061365e565b3480156105a957600080fd5b50600f54610351565b3480156105be57600080fd5b50610351600a5481565b3480156105d457600080fd5b5061037f6105e33660046133ec565b611283565b3480156105f457600080fd5b50610333611295565b34801561060957600080fd5b5061035161061836600461370f565b6112a7565b34801561062957600080fd5b5061035160008051602061420e83398151915281565b34801561064b57600080fd5b506103516112f5565b34801561066057600080fd5b50601154610351565b34801561067557600080fd5b506019546001600160a01b031661037f565b34801561069357600080fd5b506103096106a23660046134b9565b611323565b3480156106b357600080fd5b5061033361134e565b3480156106c857600080fd5b506106d261271081565b60405161ffff9091168152602001610315565b3480156106f157600080fd5b50610351600081565b34801561070657600080fd5b506103b7610715366004613745565b611360565b34801561072657600080fd5b506103b761073536600461342a565b6113f5565b34801561074657600080fd5b506103b761075536600461370f565b611477565b34801561076657600080fd5b506103b7610775366004613849565b611569565b34801561078657600080fd5b50601d546001600160a01b031661037f565b3480156107a457600080fd5b506103336107b33660046133ec565b6116c8565b6103b76107c63660046138c8565b6117f0565b3480156107d757600080fd5b506103b76107e6366004613a3c565b611916565b3480156107f757600080fd5b506103b76108063660046134b9565b611c10565b34801561081757600080fd5b50601a54610351565b34801561082c57600080fd5b506103b761083b366004613b31565b611c35565b34801561084c57600080fd5b50600d54610351565b34801561086157600080fd5b50610333611c63565b34801561087657600080fd5b50610309610885366004613b6c565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b3480156108bf57600080fd5b506103b76108ce36600461370f565b611ce0565b3480156108df57600080fd5b50610333611d46565b3480156108f457600080fd5b5061035161283c81565b600061090982611d67565b80610918575061091882611db7565b80610933575063152a902d60e11b6001600160e01b03198316145b92915050565b60606017600001805461094b90613b9a565b80601f016020809104026020016040519081016040528092919081815260200182805461097790613b9a565b80156109c45780601f10610999576101008083540402835291602001916109c4565b820191906000526020600020905b8154815290600101906020018083116109a757829003601f168201915b5050505050905090565b60006109d982611dec565b6109f6576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b6000610a1d82611283565b9050806001600160a01b0316836001600160a01b031603610a515760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b03821614801590610a715750610a6f8133610885565b155b15610a8f576040516367d9dca160e11b815260040160405180910390fd5b610a9a838383611e17565b505050565b826daaeb6d7670e522a718067333cd4e3b15610bef57336001600160a01b03821603610ad557610ad0848484611e73565b610bfa565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015610b24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b489190613bd4565b8015610bcb5750604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015610ba7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bcb9190613bd4565b610bef57604051633b79c77360e21b81523360048201526024015b60405180910390fd5b610bfa848484611e73565b50505050565b6016546015546001600160a01b039091169060009061271090610c24908590613c07565b610c2e9190613c3c565b90509250929050565b600082815260086020526040902060010154610c5281611e7e565b610a9a8383611e88565b6001600160a01b0381163314610ccc5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610be6565b610cd68282611f0e565b5050565b826daaeb6d7670e522a718067333cd4e3b15610e2057336001600160a01b03821603610d0b57610ad0848484611f75565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015610d5a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d7e9190613bd4565b8015610e015750604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015610ddd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e019190613bd4565b610e2057604051633b79c77360e21b8152336004820152602401610be6565b610bfa848484611f75565b60008051602061420e833981519152610e4381611e7e565b601d54610e59906001600160a01b031647611f90565b50565b6001600160a01b0383166000908152601f602052604081205460ff1615610eb65760405162461bcd60e51b815260206004820152600e60248201526d105b1c9958591e481b5a5b9d195960921b6044820152606401610be6565b6040516bffffffffffffffffffffffff19606086901b166020820152600090603401604051602081830303815290604052805190602001209050610f318484808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505060145491508490506120a9565b95945050505050565b610f426131d1565b61283c81526040805160e081019091526017805482908290610f6390613b9a565b80601f0160208091040260200160405190810160405280929190818152602001828054610f8f90613b9a565b8015610fdc5780601f10610fb157610100808354040283529160200191610fdc565b820191906000526020600020905b815481529060010190602001808311610fbf57829003601f168201915b50505050508152602001600182018054610ff590613b9a565b80601f016020809104026020016040519081016040528092919081815260200182805461102190613b9a565b801561106e5780601f106110435761010080835404028352916020019161106e565b820191906000526020600020905b81548152906001019060200180831161105157829003601f168201915b505050918352505060028201546001600160a01b039081166020808401919091526003840154604080850191909152600485015460608501526005850154608085015260069094015490911660a09092019190915283019190915280516101808101909152600b8054829082906110e490613b9a565b80601f016020809104026020016040519081016040528092919081815260200182805461111090613b9a565b801561115d5780601f106111325761010080835404028352916020019161115d565b820191906000526020600020905b81548152906001019060200180831161114057829003601f168201915b5050509183525050600182015460ff9081161515602083015260028301546040830152600383015481161515606083015260048301546080830152600583015416151560a0820152600682015460c0820152600782015460e0820152600882018054610100909201916111cf90613b9a565b80601f01602080910402602001604051908101604052809291908181526020018280546111fb90613b9a565b80156112485780601f1061121d57610100808354040283529160200191611248565b820191906000526020600020905b81548152906001019060200180831161122b57829003601f168201915b505050918352505060098201546020820152600a820154604080830191909152600b909201546001600160a01b031660609091015282015290565b600061128e826120bf565b5192915050565b6060600b600001805461094b90613b9a565b60006001600160a01b0382166112d0576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600560205260409020546001600160401b031690565b6000600a546113076001546000540390565b601a546113149190613c50565b61131e9190613c50565b905090565b60009182526008602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60606017600101805461094b90613b9a565b336001600160a01b038316036113895760405163b06307db60e01b815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b60008051602061420e83398151915261140d81611e7e565b600a548211156114555760405162461bcd60e51b8152602060048201526013602482015272139bdd08195b9bdd59da081c995cd95c9d9959606a1b6044820152606401610be6565b81600a60008282546114679190613c50565b90915550610a9a905083836121d9565b60008051602061420e83398151915261148f81611e7e565b6114a760008051602061420e83398151915283611323565b156114e75760405162461bcd60e51b815260206004820152601060248201526f20b63932b0b23c9030b71030b236b4b760811b6044820152606401610be6565b6019546001600160a01b031633036115395760405162461bcd60e51b81526020600482015260156024820152740557365207472616e736665724f776e65727368697605c1b6044820152606401610be6565b61155160008051602061420e83398151915233611f0e565b610cd660008051602061420e83398151915283611e88565b836daaeb6d7670e522a718067333cd4e3b156116b557336001600160a01b038216036115a05761159b858585856121f3565b6116c1565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa1580156115ef573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116139190613bd4565b80156116965750604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015611672573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116969190613bd4565b6116b557604051633b79c77360e21b8152336004820152602401610be6565b6116c1858585856121f3565b5050505050565b60606116d382611dec565b6117165760405162461bcd60e51b8152602060048201526014602482015273151bdad95b88191bd95cc81b9bdd08195e1a5cdd60621b6044820152606401610be6565b6000600b600001805461172890613b9a565b9050116117bf576013805461173c90613b9a565b80601f016020809104026020016040519081016040528092919081815260200182805461176890613b9a565b80156117b55780601f1061178a576101008083540402835291602001916117b5565b820191906000526020600020905b81548152906001019060200180831161179857829003601f168201915b5050505050610933565b600b6117ca8361223e565b6040516020016117db929190613cd6565b60405160208183030381529060405292915050565b600f546117fd9085613c07565b803410156118415760405162461bcd60e51b815260206004820152601160248201527014185e5b595b9d081d1bdbc81cdb585b1b607a1b6044820152606401610be6565b60125442116118925760405162461bcd60e51b815260206004820152601b60248201527f50726573616c6520686173206e6f7420737461727465642079657400000000006044820152606401610be6565b61189d828585610e5c565b6118e95760405162461bcd60e51b815260206004820152601b60248201527f4e6f742077686974656c697374656420666f722070726573616c6500000000006044820152606401610be6565b6001600160a01b0382166000908152601f60205260409020805460ff191660011790556116c18286612346565b600954610100900460ff16158080156119365750600954600160ff909116105b806119505750303b158015611950575060095460ff166001145b6119b35760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610be6565b6009805460ff1916600117905580156119d6576009805461ff0019166101001790555b601e5460ff1615611a215760405162461bcd60e51b815260206004820152601560248201527410d85b9b9bdd081899481a5b9a5d1a585b1a5e9959605a1b6044820152606401610be6565b611a2a836123e5565b611a4260008051602061420e83398151915233611e88565b611a4f8360400151612599565b825180518491601791611a699183916020909101906132b5565b506020828101518051611a8292600185019201906132b5565b5060408201516002820180546001600160a01b03199081166001600160a01b0393841617909155606084015160038401556080840151600484015560a0840151600584015560c090930151600690920180549093169116179055815180518391600b91611af69183916020909101906132b5565b5060208281015160018301805491151560ff199283161790556040840151600284015560608401516003840180549115159183169190911790556080840151600484015560a08401516005840180549115159190921617905560c0830151600683015560e083015160078301556101008301518051611b7b92600885019201906132b5565b506101208201516009820155610140820151600a8083019190915561016090920151600b90910180546001600160a01b0319166001600160a01b03909216919091179055608084015190558015610a9a576009805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a1505050565b600082815260086020526040902060010154611c2b81611e7e565b610a9a8383611f0e565b60008051602061420e833981519152611c4d81611e7e565b611c568261264a565b81600b610bfa8282613e68565b60606000611cb4611c78600b600a015461223e565b601654611c8f906001600160a01b031660146126b1565b604051602001611ca0929190613f87565b604051602081830303815290604052612853565b9050600081604051602001611cc9919061400e565b60408051601f198184030181529190529392505050565b6000611ceb81611e7e565b6019546001600160a01b0390811690831603611d3d5760405162461bcd60e51b815260206004820152601160248201527020b63932b0b23c903a34329037bbb732b960791b6044820152606401610be6565b610cd682612599565b6060600b600801805461094b90613b9a565b6001600160a01b03163b151590565b60006001600160e01b031982166380ac58cd60e01b1480611d9857506001600160e01b03198216635b5e139f60e01b145b8061093357506301ffc9a760e01b6001600160e01b0319831614610933565b60006001600160e01b03198216637965db0b60e01b1480610933575063152a902d60e11b6001600160e01b0319831614610933565b6000805482108015610933575050600090815260046020526040902054600160e01b900460ff161590565b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b610a9a8383836129bc565b610e598133612ba7565b611e928282611323565b610cd65760008281526008602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611eca3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611f188282611323565b15610cd65760008281526008602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b610a9a83838360405180602001604052806000815250611569565b80471015611fe05760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610be6565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461202d576040519150601f19603f3d011682016040523d82523d6000602084013e612032565b606091505b5050905080610a9a5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610be6565b6000826120b68584612c0b565b14949350505050565b6040805160608101825260008082526020820181905291810191909152816000548110156121c057600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff161515918101829052906121be5780516001600160a01b031615612155579392505050565b5060001901600081815260046020908152604091829020825160608101845290546001600160a01b038116808352600160a01b82046001600160401b031693830193909352600160e01b900460ff16151592810192909252156121b9579392505050565b612155565b505b604051636f96cda160e11b815260040160405180910390fd5b610cd6828260405180602001604052806000815250612c58565b6121fe8484846129bc565b6001600160a01b0383163b15158015612220575061221e84848484612c65565b155b15610bfa576040516368d2bf6b60e11b815260040160405180910390fd5b6060816000036122655750506040805180820190915260018152600360fc1b602082015290565b8160005b811561228f578061227981614053565b91506122889050600a83613c3c565b9150612269565b6000816001600160401b038111156122a9576122a9613773565b6040519080825280601f01601f1916602001820160405280156122d3576020820181803683370190505b5090505b841561233e576122e8600183613c50565b91506122f5600a8661406c565b612300906030614080565b60f81b81838151811061231557612315614098565b60200101906001600160f81b031916908160001a905350612337600a86613c3c565b94506122d7565b949350505050565b601c5481111561238b5760405162461bcd60e51b815260206004820152601060248201526f416d6f756e7420746f6f206c6172676560801b6044820152606401610be6565b6123936112f5565b8111156123db5760405162461bcd60e51b8152602060048201526016602482015275139bdd08195b9bdd59da081d1bdad95b9cc81b19599d60521b6044820152606401610be6565b610cd682826121d9565b60008160600151116124395760405162461bcd60e51b815260206004820152601f60248201527f4d6178696d756d20737570706c79206d757374206265206e6f6e2d7a65726f006044820152606401610be6565b60008160a001511161248d5760405162461bcd60e51b815260206004820181905260248201527f546f6b656e7320706572206d696e74206d757374206265206e6f6e2d7a65726f6044820152606401610be6565b60c08101516001600160a01b03166124e75760405162461bcd60e51b815260206004820152601f60248201527f547265617375727920616464726573732063616e6e6f74206265206e756c6c006044820152606401610be6565b60408101516001600160a01b03166125415760405162461bcd60e51b815260206004820152601b60248201527f436f6e7472616374206d757374206861766520616e206f776e657200000000006044820152606401610be6565b806060015181608001511115610e595760405162461bcd60e51b815260206004820152601b60248201527f526573657276652067726561746572207468616e20737570706c7900000000006044820152606401610be6565b6019546001600160a01b03166125bd60008051602061420e83398151915282611f0e565b6125c8600082611f0e565b601980546001600160a01b0319166001600160a01b0384161790556125fb60008051602061420e83398151915283611e88565b612606600083611e88565b816001600160a01b0316816001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b61271061014082013511156126965760405162461bcd60e51b81526020600482015260126024820152710a4def2c2d8e8d2cae640e8dede40d0d2ced60731b6044820152606401610be6565b61269f81612d50565b6126a881612e0e565b610e5981612ecc565b606060006126c0836002613c07565b6126cb906002614080565b6001600160401b038111156126e2576126e2613773565b6040519080825280601f01601f19166020018201604052801561270c576020820181803683370190505b509050600360fc1b8160008151811061272757612727614098565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061275657612756614098565b60200101906001600160f81b031916908160001a905350600061277a846002613c07565b612785906001614080565b90505b60018111156127fd576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106127b9576127b9614098565b1a60f81b8282815181106127cf576127cf614098565b60200101906001600160f81b031916908160001a90535060049490941c936127f6816140ae565b9050612788565b50831561284c5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610be6565b9392505050565b80516060906000819003612877575050604080516020810190915260008152919050565b60006003612886836002614080565b6128909190613c3c565b61289b906004613c07565b905060006128aa826020614080565b6001600160401b038111156128c1576128c1613773565b6040519080825280601f01601f1916602001820160405280156128eb576020820181803683370190505b50905060006040518060600160405280604081526020016141ce604091399050600181016020830160005b86811015612977576003818a01810151603f601282901c8116860151600c83901c8216870151600684901c831688015192909316870151600891821b60ff94851601821b92841692909201901b91160160e01b835260049092019101612916565b50600386066001811461299157600281146129a2576129ae565b613d3d60f01b6001198301526129ae565b603d60f81b6000198301525b505050918152949350505050565b60006129c7826120bf565b9050836001600160a01b031681600001516001600160a01b0316146129fe5760405162a1148160e81b815260040160405180910390fd5b6000336001600160a01b0386161480612a1c5750612a1c8533610885565b80612a37575033612a2c846109ce565b6001600160a01b0316145b905080612a5757604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038416612a7e57604051633a954ecd60e21b815260040160405180910390fd5b612a8a60008487611e17565b6001600160a01b038581166000908152600560209081526040808320805467ffffffffffffffff198082166001600160401b0392831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600490945282852080546001600160e01b031916909417600160a01b42909216919091021783558701808452922080549193909116612b5e576000548214612b5e57805460208601516001600160401b0316600160a01b026001600160e01b03199091166001600160a01b038a16171781555b50505082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46116c1565b612bb18282611323565b610cd657612bc9816001600160a01b031660146126b1565b612bd48360206126b1565b604051602001612be59291906140c5565b60408051601f198184030181529082905262461bcd60e51b8252610be6916004016133d9565b600081815b8451811015612c5057612c3c82868381518110612c2f57612c2f614098565b6020026020010151612fd1565b915080612c4881614053565b915050612c10565b509392505050565b610a9a8383836001613000565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290612c9a90339089908890889060040161413a565b6020604051808303816000875af1925050508015612cd5575060408051601f3d908101601f19168201909252612cd291810190614177565b60015b612d33573d808015612d03576040519150601f19603f3d011682016040523d82523d6000602084013e612d08565b606091505b508051600003612d2b576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b600e5460ff16612d5d5750565b600d54604082013514612db25760405162461bcd60e51b815260206004820152601960248201527f7075626c69634d696e7450726963652069732066726f7a656e000000000000006044820152606401610be6565b612dc26080820160608301614194565b610e595760405162461bcd60e51b815260206004820152601f60248201527f7075626c69634d696e74507269636546726f7a656e2069732066726f7a656e006044820152606401610be6565b60105460ff16612e1b5750565b600f54608082013514612e705760405162461bcd60e51b815260206004820152601a60248201527f70726573616c654d696e7450726963652069732066726f7a656e0000000000006044820152606401610be6565b612e8060c0820160a08301614194565b610e595760405162461bcd60e51b815260206004820181905260248201527f70726573616c654d696e74507269636546726f7a656e2069732066726f7a656e6044820152606401610be6565b600c5460ff1615612eda5750565b612eea6040820160208301614194565b15612f375760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420756e667265657a65206d6574616461746100000000000000006044820152606401610be6565b612f418180613cfb565b604051602001612f529291906141b1565b60408051601f1981840301815290829052805160209182012091612f7991600b91016141c1565b6040516020818303038152906040528051906020012014610e595760405162461bcd60e51b815260206004820152601260248201527126b2ba30b230ba309034b990333937bd32b760711b6044820152606401610be6565b6000818310612fed57600082815260208490526040902061284c565b600083815260208390526040902061284c565b6000546001600160a01b03851661302957604051622e076360e81b815260040160405180910390fd5b8360000361304a5760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038516600081815260056020908152604080832080546fffffffffffffffffffffffffffffffff1981166001600160401b038083168c0181169182176801000000000000000067ffffffffffffffff1990941690921783900481168c01811690920217909155858452600490925290912080546001600160e01b031916909217600160a01b4290921691909102179055808085018380156130fb57506001600160a01b0387163b15155b15613183575b60405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a461314c6000888480600101955088612c65565b613169576040516368d2bf6b60e11b815260040160405180910390fd5b80820361310157826000541461317e57600080fd5b6131c8565b5b6040516001830192906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4808203613184575b506000556116c1565b6040518060600160405280600081526020016132356040518060e00160405280606081526020016060815260200160006001600160a01b0316815260200160008152602001600081526020016000815260200160006001600160a01b031681525090565b81526020016132b0604051806101800160405280606081526020016000151581526020016000815260200160001515815260200160008152602001600015158152602001600081526020016000815260200160608152602001600080191681526020016000815260200160006001600160a01b031681525090565b905290565b8280546132c190613b9a565b90600052602060002090601f0160209004810192826132e35760008555613329565b82601f106132fc57805160ff1916838001178555613329565b82800160010185558215613329579182015b8281111561332957825182559160200191906001019061330e565b50613335929150613339565b5090565b5b80821115613335576000815560010161333a565b6001600160e01b031981168114610e5957600080fd5b60006020828403121561337657600080fd5b813561284c8161334e565b60005b8381101561339c578181015183820152602001613384565b83811115610bfa5750506000910152565b600081518084526133c5816020860160208601613381565b601f01601f19169290920160200192915050565b60208152600061284c60208301846133ad565b6000602082840312156133fe57600080fd5b5035919050565b6001600160a01b0381168114610e5957600080fd5b803561342581613405565b919050565b6000806040838503121561343d57600080fd5b823561344881613405565b946020939093013593505050565b60008060006060848603121561346b57600080fd5b833561347681613405565b9250602084013561348681613405565b929592945050506040919091013590565b600080604083850312156134aa57600080fd5b50508035926020909101359150565b600080604083850312156134cc57600080fd5b8235915060208301356134de81613405565b809150509250929050565b60008083601f8401126134fb57600080fd5b5081356001600160401b0381111561351257600080fd5b6020830191508360208260051b850101111561352d57600080fd5b9250929050565b60008060006040848603121561354957600080fd5b833561355481613405565b925060208401356001600160401b0381111561356f57600080fd5b61357b868287016134e9565b9497909650939450505050565b6000610180825181855261359e828601826133ad565b91505060208301516135b4602086018215159052565b506040830151604085015260608301516135d2606086018215159052565b506080830151608085015260a08301516135f060a086018215159052565b5060c083015160c085015260e083015160e0850152610100808401518583038287015261361d83826133ad565b9250505061012080840151818601525061014080840151818601525061016080840151613654828701826001600160a01b03169052565b5090949350505050565b60208152815160208201526000602083015160606040840152805160e0608085015261368e6101608501826133ad565b90506020820151607f198583030160a08601526136ab82826133ad565b6040848101516001600160a01b0390811660c08981019190915260608088015160e08b015260808801516101008b015260a08801516101208b015296015116610140880152870151868203601f1901948701949094529150610f3190508183613588565b60006020828403121561372157600080fd5b813561284c81613405565b8015158114610e5957600080fd5b80356134258161372c565b6000806040838503121561375857600080fd5b823561376381613405565b915060208301356134de8161372c565b634e487b7160e01b600052604160045260246000fd5b60405161018081016001600160401b03811182821017156137ac576137ac613773565b60405290565b60405160e081016001600160401b03811182821017156137ac576137ac613773565b60006001600160401b03808411156137ee576137ee613773565b604051601f8501601f19908116603f0116810190828211818310171561381657613816613773565b8160405280935085815286868601111561382f57600080fd5b858560208301376000602087830101525050509392505050565b6000806000806080858703121561385f57600080fd5b843561386a81613405565b9350602085013561387a81613405565b92506040850135915060608501356001600160401b0381111561389c57600080fd5b8501601f810187136138ad57600080fd5b6138bc878235602084016137d4565b91505092959194509250565b600080600080606085870312156138de57600080fd5b8435935060208501356001600160401b038111156138fb57600080fd5b613907878288016134e9565b909450925050604085013561391b81613405565b939692955090935050565b600082601f83011261393757600080fd5b61284c838335602085016137d4565b6000610180828403121561395957600080fd5b613961613789565b905081356001600160401b038082111561397a57600080fd5b61398685838601613926565b83526139946020850161373a565b6020840152604084013560408401526139af6060850161373a565b6060840152608084013560808401526139ca60a0850161373a565b60a084015260c084013560c084015260e084013560e0840152610100915081840135818111156139f957600080fd5b613a0586828701613926565b83850152505050610120808301358183015250610140808301358183015250610160613a3281840161341a565b9082015292915050565b60008060408385031215613a4f57600080fd5b82356001600160401b0380821115613a6657600080fd5b9084019060e08287031215613a7a57600080fd5b613a826137b2565b823582811115613a9157600080fd5b613a9d88828601613926565b825250602083013582811115613ab257600080fd5b613abe88828601613926565b602083015250613ad06040840161341a565b6040820152606083013560608201526080830135608082015260a083013560a0820152613aff60c0840161341a565b60c082015293506020850135915080821115613b1a57600080fd5b50613b2785828601613946565b9150509250929050565b600060208284031215613b4357600080fd5b81356001600160401b03811115613b5957600080fd5b8201610180818503121561284c57600080fd5b60008060408385031215613b7f57600080fd5b8235613b8a81613405565b915060208301356134de81613405565b600181811c90821680613bae57607f821691505b602082108103613bce57634e487b7160e01b600052602260045260246000fd5b50919050565b600060208284031215613be657600080fd5b815161284c8161372c565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615613c2157613c21613bf1565b500290565b634e487b7160e01b600052601260045260246000fd5b600082613c4b57613c4b613c26565b500490565b600082821015613c6257613c62613bf1565b500390565b60008154613c7481613b9a565b60018281168015613c8c5760018114613c9d57613ccc565b60ff19841687528287019450613ccc565b8560005260208060002060005b85811015613cc35781548a820152908401908201613caa565b50505082870194505b5050505092915050565b6000613ce28285613c67565b8351613cf2818360208801613381565b01949350505050565b6000808335601e19843603018112613d1257600080fd5b8301803591506001600160401b03821115613d2c57600080fd5b60200191503681900382131561352d57600080fd5b601f821115610a9a57600081815260208120601f850160051c81016020861015613d685750805b601f850160051c820191505b81811015613d8757828155600101613d74565b505050505050565b6001600160401b03831115613da657613da6613773565b613dba83613db48354613b9a565b83613d41565b6000601f841160018114613dee5760008515613dd65750838201355b600019600387901b1c1916600186901b1783556116c1565b600083815260209020601f19861690835b82811015613e1f5786850135825560209485019460019092019101613dff565b5086821015613e3c5760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b600081356109338161372c565b6000813561093381613405565b613e728283613cfb565b613e7d818385613d8f565b5050613ea7613e8e60208401613e4e565b6001830160ff1981541660ff8315151681178255505050565b60408201356002820155613ed9613ec060608401613e4e565b6003830160ff1981541660ff8315151681178255505050565b60808201356004820155613f0b613ef260a08401613e4e565b6005830160ff1981541660ff8315151681178255505050565b60c0820135600682015560e08201356007820155613f2d610100830183613cfb565b613f3b818360088601613d8f565b50506101208201356009820155610140820135600a820155610cd6613f636101608401613e5b565b600b830180546001600160a01b0319166001600160a01b0392909216919091179055565b7f7b2273656c6c65725f6665655f62617369735f706f696e7473223a2000000000815260008351613fbf81601c850160208801613381565b731610113332b2afb932b1b4b834b2b73a111d101160611b601c918401918201528351613ff3816030840160208801613381565b61227d60f01b60309290910191820152603201949350505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c00000081526000825161404681601d850160208701613381565b91909101601d0192915050565b60006001820161406557614065613bf1565b5060010190565b60008261407b5761407b613c26565b500690565b6000821982111561409357614093613bf1565b500190565b634e487b7160e01b600052603260045260246000fd5b6000816140bd576140bd613bf1565b506000190190565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516140fd816017850160208801613381565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161412e816028840160208801613381565b01602801949350505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061416d908301846133ad565b9695505050505050565b60006020828403121561418957600080fd5b815161284c8161334e565b6000602082840312156141a657600080fd5b813561284c8161372c565b8183823760009101908152919050565b600061284c8284613c6756fe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775a264697066735822122061f3ec749530d888ee687b27f10ffb2510519f43ef0f3563d9ccf09fb02f75c764736f6c634300080d0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000120000000000000000000000000c94b521130ccdefc168dbcc0eac896f10b1938e300000000000000000000000000000000000000000000000000000000000007d000000000000000000000000000000000000000000000000000000000000001f40000000000000000000000000000000000000000000000000000000000000006000000000000000000000000c94b521130ccdefc168dbcc0eac896f10b1938e3000000000000000000000000000000000000000000000000000000000000000877656232746f6d620000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004746f6d62000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000065903e80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001e0b137e1119257d99eeb58993e0eeb6363cce8dfa07ea58b3935b41e75c824733700000000000000000000000000000000000000000000000000000000000002ee000000000000000000000000c94b521130ccdefc168dbcc0eac896f10b1938e30000000000000000000000000000000000000000000000000000000000000036697066733a2f2f516d5170434c446d7063557551547156397a32706f445335707656765439355738466239587179514145674535532f000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : deploymentConfig (tuple): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]
Arg [1] : runtimeConfig (tuple): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]
-----Encoded View---------------
29 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [1] : 00000000000000000000000000000000000000000000000000000000000001a0
Arg [2] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [4] : 000000000000000000000000c94b521130ccdefc168dbcc0eac896f10b1938e3
Arg [5] : 00000000000000000000000000000000000000000000000000000000000007d0
Arg [6] : 00000000000000000000000000000000000000000000000000000000000001f4
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000006
Arg [8] : 000000000000000000000000c94b521130ccdefc168dbcc0eac896f10b1938e3
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000008
Arg [10] : 77656232746f6d62000000000000000000000000000000000000000000000000
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [12] : 746f6d6200000000000000000000000000000000000000000000000000000000
Arg [13] : 0000000000000000000000000000000000000000000000000000000000000180
Arg [14] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [15] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [16] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [17] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [18] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [19] : 0000000000000000000000000000000000000000000000000000000065903e80
Arg [20] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [21] : 00000000000000000000000000000000000000000000000000000000000001e0
Arg [22] : b137e1119257d99eeb58993e0eeb6363cce8dfa07ea58b3935b41e75c8247337
Arg [23] : 00000000000000000000000000000000000000000000000000000000000002ee
Arg [24] : 000000000000000000000000c94b521130ccdefc168dbcc0eac896f10b1938e3
Arg [25] : 0000000000000000000000000000000000000000000000000000000000000036
Arg [26] : 697066733a2f2f516d5170434c446d7063557551547156397a32706f44533570
Arg [27] : 7656765439355738466239587179514145674535532f00000000000000000000
Arg [28] : 0000000000000000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 35 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.