Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 654 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Withdraw All | 14151241 | 1061 days ago | IN | 0 ETH | 0.00334314 | ||||
Set Status | 14121051 | 1066 days ago | IN | 0 ETH | 0.00495895 | ||||
Mint | 14119391 | 1066 days ago | IN | 0.18 ETH | 0.01638596 | ||||
Mint | 14117018 | 1066 days ago | IN | 0.18 ETH | 0.01670489 | ||||
Mint | 14116756 | 1066 days ago | IN | 0.18 ETH | 0.02301142 | ||||
Mint | 14116646 | 1066 days ago | IN | 0.36 ETH | 0.03080157 | ||||
Mint | 14116457 | 1066 days ago | IN | 0.18 ETH | 0.02261287 | ||||
Mint | 14116290 | 1066 days ago | IN | 0.54 ETH | 0.02421322 | ||||
Mint | 14116047 | 1066 days ago | IN | 0.18 ETH | 0.01657649 | ||||
Mint | 14115947 | 1066 days ago | IN | 0.18 ETH | 0.02280912 | ||||
Mint | 14115636 | 1066 days ago | IN | 0.54 ETH | 0.03163753 | ||||
Mint | 14115601 | 1066 days ago | IN | 0.18 ETH | 0.02100025 | ||||
Mint | 14115564 | 1066 days ago | IN | 0.36 ETH | 0.03023792 | ||||
Mint | 14115551 | 1066 days ago | IN | 0.18 ETH | 0.02789715 | ||||
Mint | 14115444 | 1066 days ago | IN | 0.18 ETH | 0.02393991 | ||||
Mint | 14115436 | 1066 days ago | IN | 0.36 ETH | 0.02702719 | ||||
Mint | 14115430 | 1066 days ago | IN | 0.54 ETH | 0.03789947 | ||||
Mint | 14115414 | 1066 days ago | IN | 0.54 ETH | 0.04211757 | ||||
Mint | 14115382 | 1066 days ago | IN | 0.54 ETH | 0.03937737 | ||||
Mint | 14115370 | 1066 days ago | IN | 0.36 ETH | 0.02781025 | ||||
Mint | 14115324 | 1066 days ago | IN | 0.36 ETH | 0.03752542 | ||||
Mint | 14115297 | 1066 days ago | IN | 0.18 ETH | 0.06393635 | ||||
Mint | 14115273 | 1066 days ago | IN | 0.18 ETH | 0.01869665 | ||||
Mint | 14115272 | 1066 days ago | IN | 0.18 ETH | 0.01874159 | ||||
Mint | 14115268 | 1066 days ago | IN | 0.18 ETH | 0.01952621 |
Loading...
Loading
Contract Name:
MetaPopitMinter
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 500 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.0; pragma abicoder v2; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "./libraries/NftMintingStation.sol"; /** * @title MetaPopit Minter * @notice MetaPopit Minting Station */ contract MetaPopitMinter is NftMintingStation { using SafeMath for uint256; bytes32 public constant SIGN_MINT_TYPEHASH = keccak256("Mint(uint256 quantity,uint256 value,address account)"); uint8 public constant WL_FAST = 1; uint8 public constant WL_TURBO = 2; uint8 public constant WL_SUPERSONIC = 3; uint256 public constant MAX_FREE = 200; uint256 public constant MAX_MINT_PER_WALLET = 3; uint256 public startTimestamp; uint256 public startPublicTimestamp; uint256 public endTimestamp; uint256 public freeTokens; uint256 public immutable creator1Fee; uint256 public immutable creator2Fee; uint256 public immutable creator3Fee; uint256 public immutable creator4Fee; address public immutable creator1; address public immutable creator2; address public immutable creator3; address public immutable creator4; mapping(uint256 => uint256) private _tokenIdsCache; mapping(address => uint256) private _userMints; event Withdraw(uint256 amount); modifier whenClaimable() { require(currentStatus == STATUS_CLAIM, "Status not claim"); _; } modifier whenMintOpened(uint256 _wl) { require(startTimestamp <= block.timestamp, "Mint too early"); require(endTimestamp == 0 || endTimestamp > block.timestamp, "Mint too late"); if (_wl == 0) require(startPublicTimestamp <= block.timestamp, "Mint not public"); _; } modifier whenValidQuantity(uint256 _quantity) { require(availableSupply > 0, "No more supply"); require(availableSupply >= _quantity, "Not enough supply"); require(_quantity > 0, "Qty <= 0"); _; } constructor(INftCollection _collection) NftMintingStation(_collection, "MetaPopit", "1.0") { creator1Fee = 2500; creator2Fee = 2500; creator3Fee = 2500; creator4Fee = 2500; creator1 = 0x90A7237f48F3EE8FD60ae267Ae4C0551ab2030A3; creator2 = 0x872c125125A003610dE6581E165808bA4B153fd6; creator3 = 0x2B21eCcaB47B18f79f9167A2aC1636DA3dC25505; creator4 = 0xF4a202Ed4541C5735d584966a52cFa17749acb7b; _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); } /** * @dev initialize the default configuration */ function initialize( uint256 _unitPrice, uint256 _startTimestamp, uint256 _endTimestamp, uint256 _startPublicTimestamp ) external onlyOwnerOrOperator { unitPrice = _unitPrice; startTimestamp = _startTimestamp; endTimestamp = _endTimestamp; startPublicTimestamp = _startPublicTimestamp; _syncSupply(); currentStatus = STATUS_PREPARING; } /** * @dev mint a `_quantity` NFT (quantity max for a wallet is limited by `MAX_MINT_PER_WALLET`) * _wl: whitelist level * _signature: backend signature for the transaction */ function mint( uint256 _quantity, uint8 _wl, bytes memory _signature ) external payable notContract nonReentrant whenValidQuantity(_quantity) whenClaimable whenMintOpened(_wl) { require(_userMints[_msgSender()].add(_quantity) <= MAX_MINT_PER_WALLET, "Above quantity allowed"); uint256 value = unitPrice.mul(_quantity); if (_wl == WL_SUPERSONIC) { value = value.mul(800).div(1000); // 20% discount } else if (_wl == WL_TURBO) { value = value.mul(900).div(1000); // 10% discount } require(isAuthorized(_hashMintPayload(_quantity, value, _msgSender()), _signature), "Not signed by authorizer"); require(msg.value >= value, "Payment failed"); _mint(_quantity, _msgSender()); _userMints[_msgSender()] = _userMints[_msgSender()] + _quantity; } /** * @dev mint a free NFT (number of free NFT is limited by `MAX_FREE`) */ function mintFree(address _destination, uint256 _quantity) external onlyOwnerOrOperator whenValidQuantity(_quantity) { require(freeTokens + _quantity <= MAX_FREE, "Above free quantity allowed"); _mint(_quantity, _destination); freeTokens = freeTokens + _quantity; } /** * @dev mint a free NFT by specifying the tokenIds (number of free NFT is limited by `MAX_FREE`) */ function mintReserve(address _destination, uint256[] calldata _tokenIds) external onlyOwnerOrOperator whenValidQuantity(_tokenIds.length) { require(freeTokens + _tokenIds.length <= MAX_FREE, "Above free quantity allowed"); for (uint256 i = 0; i < _tokenIds.length; i++) { uint256 cacheId = _tokenIds[i] - 1; _tokenIdsCache[cacheId] = _tokenIdsCache[availableSupply - 1] == 0 ? availableSupply - 1 : _tokenIdsCache[availableSupply - 1]; nftCollection.mint(_destination, _tokenIds[i]); availableSupply = availableSupply - 1; } freeTokens = freeTokens + _tokenIds.length; } /** * @dev mint the remaining NFTs when the sale is closed */ function mintRemaining(address _destination, uint256 _quantity) external onlyOwnerOrOperator whenValidQuantity(_quantity) { require(currentStatus == STATUS_CLOSED, "Status not closed"); _mint(_quantity, _destination); } function _withdraw(uint256 amount) private { require(amount <= address(this).balance, "amount > balance"); require(amount > 0, "Empty amount"); uint256 amount1 = amount.mul(creator1Fee).div(10000); uint256 amount2 = amount.mul(creator2Fee).div(10000); uint256 amount3 = amount.mul(creator3Fee).div(10000); uint256 amount4 = amount.sub(amount3).sub(amount2).sub(amount1); payable(creator1).transfer(amount1); payable(creator2).transfer(amount2); payable(creator3).transfer(amount3); payable(creator4).transfer(amount4); emit Withdraw(amount); } /** * @dev withdraw selected amount */ function withdraw(uint256 amount) external onlyOwnerOrOperator { _withdraw(amount); } /** * @dev withdraw full balance */ function withdrawAll() external onlyOwnerOrOperator { _withdraw(address(this).balance); } /** * @dev configure the mint dates */ function setMintDates( uint256 _startTimestamp, uint256 _endTimestamp, uint256 _startPublicTimestamp ) external onlyOwnerOrOperator { require(_endTimestamp == 0 || _startTimestamp < _endTimestamp, "Invalid timestamps"); require( _endTimestamp == 0 || (_startPublicTimestamp < _endTimestamp && _startTimestamp <= _startPublicTimestamp), "Invalid public timestamp" ); startTimestamp = _startTimestamp; endTimestamp = _endTimestamp; startPublicTimestamp = _startPublicTimestamp; } function _getNextRandomNumber() private returns (uint256 index) { require(availableSupply > 0, "Invalid _remaining"); uint256 i = maxSupply.add(uint256(keccak256(abi.encode(block.difficulty, blockhash(block.number))))).mod( availableSupply ); // if there's a cache at _tokenIdsCache[i] then use it // otherwise use i itself index = _tokenIdsCache[i] == 0 ? i : _tokenIdsCache[i]; // grab a number from the tail _tokenIdsCache[i] = _tokenIdsCache[availableSupply - 1] == 0 ? availableSupply - 1 : _tokenIdsCache[availableSupply - 1]; } function getNextTokenId() internal override returns (uint256 index) { return _getNextRandomNumber() + 1; } function _hashMintPayload( uint256 _quantity, uint256 _value, address _account ) internal pure returns (bytes32) { return keccak256(abi.encode(SIGN_MINT_TYPEHASH, _quantity, _value, _account)); } /** * @dev returns the number of tokens minted by `account` */ function mintedTokensCount(address account) public view returns (uint256) { return _userMints[account]; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol) pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "../interfaces/INftCollection.sol"; import "./AuthorizeAccess.sol"; import "./OperatorAccess.sol"; import "./ContractGuard.sol"; /** @title NftMintingStation. */ contract NftMintingStation is AuthorizeAccess, OperatorAccess, EIP712, ReentrancyGuard, ContractGuard { using Address for address; using ECDSA for bytes32; using SafeMath for uint256; uint8 public constant STATUS_NOT_INITIALIZED = 0; uint8 public constant STATUS_PREPARING = 1; uint8 public constant STATUS_CLAIM = 2; uint8 public constant STATUS_CLOSED = 3; uint8 public currentStatus = STATUS_NOT_INITIALIZED; uint256 public maxSupply; uint256 public availableSupply; uint256 public unitPrice; INftCollection public nftCollection; // modifier to allow execution by owner or operator modifier onlyOwnerOrOperator() { require( hasRole(DEFAULT_ADMIN_ROLE, _msgSender()) || hasRole(OPERATOR_ROLE, _msgSender()), "Not an owner or operator" ); _; } constructor( INftCollection _nftCollection, string memory _eipName, string memory _eipVersion ) EIP712(_eipName, _eipVersion) { nftCollection = _nftCollection; } function setUnitPrice(uint256 _amount) external onlyOwnerOrOperator { unitPrice = _amount; } function setStatus(uint8 _status) external onlyOwnerOrOperator { currentStatus = _status; } function getNextTokenId() internal virtual returns (uint256) { return maxSupply - availableSupply + 1; } function _mint(uint256 _quantity, address _to) internal { require(availableSupply >= _quantity, "Not enough supply"); for (uint256 i = 0; i < _quantity; i++) { uint256 tokenId = getNextTokenId(); nftCollection.mint(_to, tokenId); availableSupply = availableSupply - 1; } } function _syncSupply() internal { uint256 totalSupply = nftCollection.totalSupply(); maxSupply = nftCollection.maxSupply(); availableSupply = maxSupply - totalSupply; } function syncSupply() external onlyOwnerOrOperator { _syncSupply(); } /** * @notice verifify signature is valid for `structHash` and signers is a member of role `AUTHORIZER_ROLE` * @param structHash: hash of the structure to verify the signature against */ function isAuthorized(bytes32 structHash, bytes memory signature) internal view returns (bool) { bytes32 hash = _hashTypedDataV4(structHash); (address recovered, ECDSA.RecoverError error) = ECDSA.tryRecover(hash, signature); if (error == ECDSA.RecoverError.NoError && hasRole(AUTHORIZER_ROLE, recovered)) { return true; } return false; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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, _msgSender()); _; } /** * @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 override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view { 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 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. */ 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. */ 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`. */ 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. * * [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. */ 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. */ 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 (utils/cryptography/draft-EIP712.sol) pragma solidity ^0.8.0; import "./ECDSA.sol"; /** * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data. * * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible, * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding * they need in their contracts using a combination of `abi.encode` and `keccak256`. * * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA * ({_hashTypedDataV4}). * * The implementation of the domain separator was designed to be as efficient as possible while still properly updating * the chain id to protect against replay attacks on an eventual fork of the chain. * * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask]. * * _Available since v3.4._ */ abstract contract EIP712 { /* solhint-disable var-name-mixedcase */ // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to // invalidate the cached domain separator if the chain id changes. bytes32 private immutable _CACHED_DOMAIN_SEPARATOR; uint256 private immutable _CACHED_CHAIN_ID; address private immutable _CACHED_THIS; bytes32 private immutable _HASHED_NAME; bytes32 private immutable _HASHED_VERSION; bytes32 private immutable _TYPE_HASH; /* solhint-enable var-name-mixedcase */ /** * @dev Initializes the domain separator and parameter caches. * * The meaning of `name` and `version` is specified in * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]: * * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol. * - `version`: the current major version of the signing domain. * * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart * contract upgrade]. */ constructor(string memory name, string memory version) { bytes32 hashedName = keccak256(bytes(name)); bytes32 hashedVersion = keccak256(bytes(version)); bytes32 typeHash = keccak256( "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)" ); _HASHED_NAME = hashedName; _HASHED_VERSION = hashedVersion; _CACHED_CHAIN_ID = block.chainid; _CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion); _CACHED_THIS = address(this); _TYPE_HASH = typeHash; } /** * @dev Returns the domain separator for the current chain. */ function _domainSeparatorV4() internal view returns (bytes32) { if (address(this) == _CACHED_THIS && block.chainid == _CACHED_CHAIN_ID) { return _CACHED_DOMAIN_SEPARATOR; } else { return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION); } } function _buildDomainSeparator( bytes32 typeHash, bytes32 nameHash, bytes32 versionHash ) private view returns (bytes32) { return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this))); } /** * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this * function returns the hash of the fully encoded EIP712 message for this domain. * * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example: * * ```solidity * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode( * keccak256("Mail(address to,string contents)"), * mailTo, * keccak256(bytes(mailContents)) * ))); * address signer = ECDSA.recover(digest, signature); * ``` */ function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) { return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { // Check the signature length // - case 65: r,s,v signature (standard) // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._ if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else if (signature.length == 64) { bytes32 r; bytes32 vs; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) vs := mload(add(signature, 0x40)) } return tryRecover(hash, r, vs); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s; uint8 v; assembly { s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) v := add(shr(255, vs), 27) } return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } if (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) pragma solidity ^0.8.0; /** * @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 * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 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 assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface INftCollection { /** * @dev Returns the current supply */ function totalSupply() external view returns (uint256); /** * @dev Returns the max total supply */ function maxSupply() external view returns (uint256); /** * @dev Mint NFTs from the NFT contract. */ function mint(address _to, uint256 _tokenId) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/AccessControl.sol"; abstract contract AuthorizeAccess is AccessControl { bytes32 public constant AUTHORIZER_ROLE = keccak256("AUTHORIZER_ROLE"); // Modifier for authorizer roles modifier onlyAuthorizer() { require(hasRole(AUTHORIZER_ROLE, _msgSender()), "Not an authorizer"); _; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/AccessControl.sol"; abstract contract OperatorAccess is AccessControl { bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE"); // Modifier for operator roles modifier onlyOperator() { require(hasRole(OPERATOR_ROLE, _msgSender()), "Not an operator"); _; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; abstract contract ContractGuard { /** * @notice Checks if the msg.sender is a contract or a proxy */ modifier notContract() { require(!_isContract(msg.sender), "contract not allowed"); require(msg.sender == tx.origin, "proxy contract not allowed"); _; } /** * @notice Checks if address is a contract * @dev It prevents contract from being targetted */ function _isContract(address addr) internal view returns (bool) { uint256 size; assembly { size := extcodesize(addr) } return size > 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @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); } }
// 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); }
{ "optimizer": { "enabled": true, "runs": 500 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract INftCollection","name":"_collection","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"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":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"AUTHORIZER_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":"MAX_FREE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_MINT_PER_WALLET","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OPERATOR_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SIGN_MINT_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STATUS_CLAIM","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STATUS_CLOSED","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STATUS_NOT_INITIALIZED","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STATUS_PREPARING","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WL_FAST","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WL_SUPERSONIC","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WL_TURBO","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"availableSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"creator1","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"creator1Fee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"creator2","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"creator2Fee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"creator3","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"creator3Fee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"creator4","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"creator4Fee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentStatus","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"endTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"freeTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":[{"internalType":"uint256","name":"_unitPrice","type":"uint256"},{"internalType":"uint256","name":"_startTimestamp","type":"uint256"},{"internalType":"uint256","name":"_endTimestamp","type":"uint256"},{"internalType":"uint256","name":"_startPublicTimestamp","type":"uint256"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"uint8","name":"_wl","type":"uint8"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_destination","type":"address"},{"internalType":"uint256","name":"_quantity","type":"uint256"}],"name":"mintFree","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_destination","type":"address"},{"internalType":"uint256","name":"_quantity","type":"uint256"}],"name":"mintRemaining","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_destination","type":"address"},{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"}],"name":"mintReserve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"mintedTokensCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nftCollection","outputs":[{"internalType":"contract INftCollection","name":"","type":"address"}],"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":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_startTimestamp","type":"uint256"},{"internalType":"uint256","name":"_endTimestamp","type":"uint256"},{"internalType":"uint256","name":"_startPublicTimestamp","type":"uint256"}],"name":"setMintDates","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_status","type":"uint8"}],"name":"setStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"setUnitPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startPublicTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"syncSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unitPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawAll","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6102406040526002805460ff191690553480156200001c57600080fd5b5060405162003125380380620031258339810160408190526200003f9162000279565b604080518082018252600981526813595d18541bdc1a5d60ba1b60208083019182528351808501855260038152620312e360ec1b908201529151902060e08190527fe6bbd6277e1bf288eed5e8d1780f9a50b239e86b153736bceebccf4ea79d90b36101008190524660a081815285517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818701819052818801959095526060810193909352608080840192909252308382018190528651808503909201825260c093840190965280519401939093209092529190526101205260018055600680546001600160a01b0319166001600160a01b0383161790556109c46101408190526101608190526101808190526101a0527390a7237f48f3ee8fd60ae267ae4c0551ab2030a36101c05273872c125125a003610de6581e165808ba4b153fd66101e052732b21eccab47b18f79f9167a2ac1636da3dc255056102005273f4a202ed4541c5735d584966a52cfa17749acb7b61022052620001c2600033620001c9565b50620002ab565b620001d58282620001d9565b5050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16620001d5576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620002353390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000602082840312156200028c57600080fd5b81516001600160a01b0381168114620002a457600080fd5b9392505050565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516101c0516101e0516102005161022051612da162000384600039600081816105f90152611cd10152600081816105240152611c7a0152600081816106620152611c230152600081816104a40152611bcc015260006106da0152600081816107a30152611b7e01526000818161043b0152611b4a0152600081816104f00152611b1601526000612677015260006126b901526000612698015260006125fc01526000612626015260006126500152612da16000f3fe6080604052600436106103135760003560e01c806391d148541161019a578063d547741f116100e1578063e9d5596a1161008a578063ef8a923511610064578063ef8a923514610923578063f5b541a61461093d578063feae79071461047d57600080fd5b8063e9d5596a146108c2578063ea87e0a8146108f8578063ed6661c21461090e57600080fd5b8063e6a5f0e9116100bb578063e6a5f0e914610862578063e6fd48bc14610896578063e73faa2d146108ac57600080fd5b8063d547741f1461080c578063d5abeb011461082c578063dc1b73281461084257600080fd5b8063adf66d3111610143578063bb2980c01161011d578063bb2980c014610791578063bc06946f146107c5578063d0c801d5146107f957600080fd5b8063adf66d311461073c578063b19960e61461075c578063b1b46fc01461077157600080fd5b8063a85adeab11610174578063a85adeab14610711578063acc28f9114610727578063ad33821d1461034d57600080fd5b806391d148541461068457806394c9da79146106c8578063a217fddf146106fc57600080fd5b80635c4280d91161025e578063742253f611610207578063853828b6116101e1578063853828b61461061b5780638920c3f2146106305780638ea4ffc21461065057600080fd5b8063742253f6146105b15780637ecc2b56146105d1578063836b0874146105e757600080fd5b80636588103b116102385780636588103b1461057b5780636fe8f9c51461059b578063715468791461041457600080fd5b80635c4280d9146105125780635df5729b1461054657806360a2da441461055b57600080fd5b80632ff7ed8e116102c0578063433835d71161029a578063433835d71461047d57806346fe30e71461049257806350d121fb146104de57600080fd5b80632ff7ed8e14610414578063319265e41461042957806336568abe1461045d57600080fd5b80632e1a7d4d116102f15780632e1a7d4d146103b25780632e49d78b146103d45780632f2ff15d146103f457600080fd5b806301ffc9a714610318578063219e30351461034d578063248a9ca314610374575b600080fd5b34801561032457600080fd5b5061033861033336600461284d565b610971565b60405190151581526020015b60405180910390f35b34801561035957600080fd5b50610362600181565b60405160ff9091168152602001610344565b34801561038057600080fd5b506103a461038f366004612877565b60009081526020819052604090206001015490565b604051908152602001610344565b3480156103be57600080fd5b506103d26103cd366004612877565b6109a8565b005b3480156103e057600080fd5b506103d26103ef3660046128a6565b610a3a565b34801561040057600080fd5b506103d261040f3660046128d8565b610ad1565b34801561042057600080fd5b50610362600381565b34801561043557600080fd5b506103a47f000000000000000000000000000000000000000000000000000000000000000081565b34801561046957600080fd5b506103d26104783660046128d8565b610afc565b34801561048957600080fd5b50610362600281565b34801561049e57600080fd5b506104c67f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610344565b3480156104ea57600080fd5b506103a47f000000000000000000000000000000000000000000000000000000000000000081565b34801561051e57600080fd5b506104c67f000000000000000000000000000000000000000000000000000000000000000081565b34801561055257600080fd5b506103d2610b88565b34801561056757600080fd5b506103d2610576366004612904565b610c13565b34801561058757600080fd5b506006546104c6906001600160a01b031681565b3480156105a757600080fd5b506103a4600a5481565b3480156105bd57600080fd5b506103d26105cc366004612936565b610cc3565b3480156105dd57600080fd5b506103a460045481565b3480156105f357600080fd5b506104c67f000000000000000000000000000000000000000000000000000000000000000081565b34801561062757600080fd5b506103d2610e0d565b34801561063c57600080fd5b506103d261064b366004612962565b610e97565b34801561065c57600080fd5b506104c67f000000000000000000000000000000000000000000000000000000000000000081565b34801561069057600080fd5b5061033861069f3660046128d8565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b3480156106d457600080fd5b506103a47f000000000000000000000000000000000000000000000000000000000000000081565b34801561070857600080fd5b506103a4600081565b34801561071d57600080fd5b506103a460095481565b34801561073357600080fd5b50610362600081565b34801561074857600080fd5b506103d2610757366004612962565b61103c565b34801561076857600080fd5b506103a4600381565b34801561077d57600080fd5b506103d261078c36600461298c565b611200565b34801561079d57600080fd5b506103a47f000000000000000000000000000000000000000000000000000000000000000081565b3480156107d157600080fd5b506103a47f14dd327f3834be9d0f7cf44f6cf11c96ded83bd68d1a1b3926d35739e7bb88d081565b6103d2610807366004612a28565b61150d565b34801561081857600080fd5b506103d26108273660046128d8565b6119cd565b34801561083857600080fd5b506103a460035481565b34801561084e57600080fd5b506103d261085d366004612877565b6119f3565b34801561086e57600080fd5b506103a47f846845e183a15dc56860347e70130a6b3f365acacf07a40688b4c0799dbf1d0981565b3480156108a257600080fd5b506103a460075481565b3480156108b857600080fd5b506103a460055481565b3480156108ce57600080fd5b506103a46108dd366004612af3565b6001600160a01b03166000908152600c602052604090205490565b34801561090457600080fd5b506103a460085481565b34801561091a57600080fd5b506103a460c881565b34801561092f57600080fd5b506002546103629060ff1681565b34801561094957600080fd5b506103a47f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92981565b60006001600160e01b03198216637965db0b60e01b14806109a257506301ffc9a760e01b6001600160e01b03198316145b92915050565b336000908152600080516020612d4c833981519152602052604090205460ff16806109ef5750336000908152600080516020612d0c833981519152602052604090205460ff165b610a2e5760405162461bcd60e51b81526020600482015260186024820152600080516020612d2c83398151915260448201526064015b60405180910390fd5b610a3781611a79565b50565b336000908152600080516020612d4c833981519152602052604090205460ff1680610a815750336000908152600080516020612d0c833981519152602052604090205460ff165b610abb5760405162461bcd60e51b81526020600482015260186024820152600080516020612d2c8339815191526044820152606401610a25565b6002805460ff191660ff92909216919091179055565b600082815260208190526040902060010154610aed8133611d55565b610af78383611dd3565b505050565b6001600160a01b0381163314610b7a5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610a25565b610b848282611e71565b5050565b336000908152600080516020612d4c833981519152602052604090205460ff1680610bcf5750336000908152600080516020612d0c833981519152602052604090205460ff165b610c095760405162461bcd60e51b81526020600482015260186024820152600080516020612d2c8339815191526044820152606401610a25565b610c11611ef0565b565b336000908152600080516020612d4c833981519152602052604090205460ff1680610c5a5750336000908152600080516020612d0c833981519152602052604090205460ff165b610c945760405162461bcd60e51b81526020600482015260186024820152600080516020612d2c8339815191526044820152606401610a25565b6005849055600783905560098290556008819055610cb0611ef0565b50506002805460ff191660011790555050565b336000908152600080516020612d4c833981519152602052604090205460ff1680610d0a5750336000908152600080516020612d0c833981519152602052604090205460ff165b610d445760405162461bcd60e51b81526020600482015260186024820152600080516020612d2c8339815191526044820152606401610a25565b811580610d5057508183105b610d9c5760405162461bcd60e51b815260206004820152601260248201527f496e76616c69642074696d657374616d707300000000000000000000000000006044820152606401610a25565b811580610db357508181108015610db35750808311155b610dff5760405162461bcd60e51b815260206004820152601860248201527f496e76616c6964207075626c69632074696d657374616d7000000000000000006044820152606401610a25565b600792909255600955600855565b336000908152600080516020612d4c833981519152602052604090205460ff1680610e545750336000908152600080516020612d0c833981519152602052604090205460ff165b610e8e5760405162461bcd60e51b81526020600482015260186024820152600080516020612d2c8339815191526044820152606401610a25565b610c1147611a79565b336000908152600080516020612d4c833981519152602052604090205460ff1680610ede5750336000908152600080516020612d0c833981519152602052604090205460ff165b610f185760405162461bcd60e51b81526020600482015260186024820152600080516020612d2c8339815191526044820152606401610a25565b80600060045411610f5c5760405162461bcd60e51b815260206004820152600e60248201526d4e6f206d6f726520737570706c7960901b6044820152606401610a25565b806004541015610fa25760405162461bcd60e51b81526020600482015260116024820152704e6f7420656e6f75676820737570706c7960781b6044820152606401610a25565b60008111610fdd5760405162461bcd60e51b81526020600482015260086024820152670517479203c3d20360c41b6044820152606401610a25565b60025460ff166003146110325760405162461bcd60e51b815260206004820152601160248201527f537461747573206e6f7420636c6f7365640000000000000000000000000000006044820152606401610a25565b610af7828461200b565b336000908152600080516020612d4c833981519152602052604090205460ff16806110835750336000908152600080516020612d0c833981519152602052604090205460ff165b6110bd5760405162461bcd60e51b81526020600482015260186024820152600080516020612d2c8339815191526044820152606401610a25565b806000600454116111015760405162461bcd60e51b815260206004820152600e60248201526d4e6f206d6f726520737570706c7960901b6044820152606401610a25565b8060045410156111475760405162461bcd60e51b81526020600482015260116024820152704e6f7420656e6f75676820737570706c7960781b6044820152606401610a25565b600081116111825760405162461bcd60e51b81526020600482015260086024820152670517479203c3d20360c41b6044820152606401610a25565b60c882600a546111929190612b24565b11156111e05760405162461bcd60e51b815260206004820152601b60248201527f41626f76652066726565207175616e7469747920616c6c6f77656400000000006044820152606401610a25565b6111ea828461200b565b81600a546111f89190612b24565b600a55505050565b336000908152600080516020612d4c833981519152602052604090205460ff16806112475750336000908152600080516020612d0c833981519152602052604090205460ff165b6112815760405162461bcd60e51b81526020600482015260186024820152600080516020612d2c8339815191526044820152606401610a25565b60045481906112c35760405162461bcd60e51b815260206004820152600e60248201526d4e6f206d6f726520737570706c7960901b6044820152606401610a25565b8060045410156113095760405162461bcd60e51b81526020600482015260116024820152704e6f7420656e6f75676820737570706c7960781b6044820152606401610a25565b600081116113445760405162461bcd60e51b81526020600482015260086024820152670517479203c3d20360c41b6044820152606401610a25565b600a5460c890611355908490612b24565b11156113a35760405162461bcd60e51b815260206004820152601b60248201527f41626f76652066726565207175616e7469747920616c6c6f77656400000000006044820152606401610a25565b60005b828110156114f557600060018585848181106113c4576113c4612b3c565b905060200201356113d59190612b52565b9050600b600060016004546113ea9190612b52565b81526020019081526020016000205460001461142757600b600060016004546114139190612b52565b815260200190815260200160002054611436565b60016004546114369190612b52565b6000828152600b60205260409020556006546001600160a01b03166340c10f198787878681811061146957611469612b3c565b6040516001600160e01b031960e087901b1681526001600160a01b0390941660048501526020029190910135602483015250604401600060405180830381600087803b1580156114b857600080fd5b505af11580156114cc573d6000803e3d6000fd5b5050505060016004546114df9190612b52565b60045550806114ed81612b69565b9150506113a6565b50600a54611504908390612b24565b600a5550505050565b333b1561155c5760405162461bcd60e51b815260206004820152601460248201527f636f6e7472616374206e6f7420616c6c6f7765640000000000000000000000006044820152606401610a25565b3332146115ab5760405162461bcd60e51b815260206004820152601a60248201527f70726f787920636f6e7472616374206e6f7420616c6c6f7765640000000000006044820152606401610a25565b600260015414156115fe5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610a25565b600260015560045483906116455760405162461bcd60e51b815260206004820152600e60248201526d4e6f206d6f726520737570706c7960901b6044820152606401610a25565b80600454101561168b5760405162461bcd60e51b81526020600482015260116024820152704e6f7420656e6f75676820737570706c7960781b6044820152606401610a25565b600081116116c65760405162461bcd60e51b81526020600482015260086024820152670517479203c3d20360c41b6044820152606401610a25565b6002805460ff161461171a5760405162461bcd60e51b815260206004820152601060248201527f537461747573206e6f7420636c61696d000000000000000000000000000000006044820152606401610a25565b8260ff164260075411156117705760405162461bcd60e51b815260206004820152600e60248201527f4d696e7420746f6f206561726c790000000000000000000000000000000000006044820152606401610a25565b6009541580611780575042600954115b6117bc5760405162461bcd60e51b815260206004820152600d60248201526c4d696e7420746f6f206c61746560981b6044820152606401610a25565b80611813574260085411156118135760405162461bcd60e51b815260206004820152600f60248201527f4d696e74206e6f74207075626c696300000000000000000000000000000000006044820152606401610a25565b336000908152600c602052604090205460039061183090876120f3565b111561187e5760405162461bcd60e51b815260206004820152601660248201527f41626f7665207175616e7469747920616c6c6f776564000000000000000000006044820152606401610a25565b60055460009061188e9087612106565b905060ff8516600314156118bb576118b46103e86118ae83610320612106565b90612112565b90506118dc565b60ff8516600214156118dc576118d96103e86118ae83610384612106565b90505b6118f06118ea87833361211e565b8561218a565b61193c5760405162461bcd60e51b815260206004820152601860248201527f4e6f74207369676e656420627920617574686f72697a657200000000000000006044820152606401610a25565b8034101561198c5760405162461bcd60e51b815260206004820152600e60248201527f5061796d656e74206661696c65640000000000000000000000000000000000006044820152606401610a25565b611996863361200b565b336000908152600c60205260409020546119b1908790612b24565b336000908152600c602052604090205550506001805550505050565b6000828152602081905260409020600101546119e98133611d55565b610af78383611e71565b336000908152600080516020612d4c833981519152602052604090205460ff1680611a3a5750336000908152600080516020612d0c833981519152602052604090205460ff165b611a745760405162461bcd60e51b81526020600482015260186024820152600080516020612d2c8339815191526044820152606401610a25565b600555565b47811115611ac95760405162461bcd60e51b815260206004820152601060248201527f616d6f756e74203e2062616c616e6365000000000000000000000000000000006044820152606401610a25565b60008111611b085760405162461bcd60e51b815260206004820152600c60248201526b115b5c1d1e48185b5bdd5b9d60a21b6044820152606401610a25565b6000611b3a6127106118ae847f0000000000000000000000000000000000000000000000000000000000000000612106565b90506000611b6e6127106118ae857f0000000000000000000000000000000000000000000000000000000000000000612106565b90506000611ba26127106118ae867f0000000000000000000000000000000000000000000000000000000000000000612106565b90506000611bbc84611bb68581898761221f565b9061221f565b6040519091506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169085156108fc029086906000818181858888f19350505050158015611c15573d6000803e3d6000fd5b506040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169084156108fc029085906000818181858888f19350505050158015611c6c573d6000803e3d6000fd5b506040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169083156108fc029084906000818181858888f19350505050158015611cc3573d6000803e3d6000fd5b506040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169082156108fc029083906000818181858888f19350505050158015611d1a573d6000803e3d6000fd5b506040518581527f5b6b431d4476a211bb7d41c20d1aab9ae2321deee0d20be3d9fc9b1093fa6e3d9060200160405180910390a15050505050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610b8457611d91816001600160a01b0316601461222b565b611d9c83602061222b565b604051602001611dad929190612bb4565b60408051601f198184030181529082905262461bcd60e51b8252610a2591600401612c35565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610b84576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055611e2d3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1615610b84576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600654604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd916004808301926020929190829003018186803b158015611f3557600080fd5b505afa158015611f49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f6d9190612c68565b9050600660009054906101000a90046001600160a01b03166001600160a01b031663d5abeb016040518163ffffffff1660e01b815260040160206040518083038186803b158015611fbd57600080fd5b505afa158015611fd1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ff59190612c68565b6003819055612005908290612b52565b60045550565b8160045410156120515760405162461bcd60e51b81526020600482015260116024820152704e6f7420656e6f75676820737570706c7960781b6044820152606401610a25565b60005b82811015610af75760006120666123d4565b6006546040516340c10f1960e01b81526001600160a01b038681166004830152602482018490529293509116906340c10f1990604401600060405180830381600087803b1580156120b657600080fd5b505af11580156120ca573d6000803e3d6000fd5b5050505060016004546120dd9190612b52565b60045550806120eb81612b69565b915050612054565b60006120ff8284612b24565b9392505050565b60006120ff8284612c81565b60006120ff8284612cb6565b604080517f846845e183a15dc56860347e70130a6b3f365acacf07a40688b4c0799dbf1d096020820152908101849052606081018390526001600160a01b038216608082015260009060a0015b6040516020818303038152906040528051906020012090509392505050565b600080612196846123ee565b90506000806121a5838661243c565b909250905060008160048111156121be576121be612cca565b14801561220257506001600160a01b03821660009081527f20d1f9afebdbbcb1ccac3d78464405112787c011b45b4f0d787e84ef93a48613602052604090205460ff165b1561221357600193505050506109a2565b50600095945050505050565b60006120ff8284612b52565b6060600061223a836002612c81565b612245906002612b24565b67ffffffffffffffff81111561225d5761225d612a12565b6040519080825280601f01601f191660200182016040528015612287576020820181803683370190505b509050600360fc1b816000815181106122a2576122a2612b3c565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106122d1576122d1612b3c565b60200101906001600160f81b031916908160001a90535060006122f5846002612c81565b612300906001612b24565b90505b6001811115612385577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061234157612341612b3c565b1a60f81b82828151811061235757612357612b3c565b60200101906001600160f81b031916908160001a90535060049490941c9361237e81612ce0565b9050612303565b5083156120ff5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610a25565b60006123de6124ac565b6123e9906001612b24565b905090565b60006109a26123fb6125ef565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b6000808251604114156124735760208301516040840151606085015160001a612467878285856126dd565b945094505050506124a5565b82516040141561249d57602083015160408401516124928683836127ca565b9350935050506124a5565b506000905060025b9250929050565b600080600454116124ff5760405162461bcd60e51b815260206004820152601260248201527f496e76616c6964205f72656d61696e696e6700000000000000000000000000006044820152606401610a25565b600061254e600454612548444340604051602001612527929190918252602082015260400190565b60408051601f198184030181529190528051602090910120600354906120f3565b90612812565b6000818152600b602052604090205490915015612579576000818152600b602052604090205461257b565b805b9150600b600060016004546125909190612b52565b8152602001908152602001600020546000146125cd57600b600060016004546125b99190612b52565b8152602001908152602001600020546125dc565b60016004546125dc9190612b52565b6000918252600b60205260409091205590565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614801561264857507f000000000000000000000000000000000000000000000000000000000000000046145b1561267257507f000000000000000000000000000000000000000000000000000000000000000090565b6123e97f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000061281e565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561271457506000905060036127c1565b8460ff16601b1415801561272c57508460ff16601c14155b1561273d57506000905060046127c1565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612791573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166127ba576000600192509250506127c1565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831660ff84901c601b01612804878288856126dd565b935093505050935093915050565b60006120ff8284612cf7565b6040805160208101859052908101839052606081018290524660808201523060a082015260009060c00161216b565b60006020828403121561285f57600080fd5b81356001600160e01b0319811681146120ff57600080fd5b60006020828403121561288957600080fd5b5035919050565b803560ff811681146128a157600080fd5b919050565b6000602082840312156128b857600080fd5b6120ff82612890565b80356001600160a01b03811681146128a157600080fd5b600080604083850312156128eb57600080fd5b823591506128fb602084016128c1565b90509250929050565b6000806000806080858703121561291a57600080fd5b5050823594602084013594506040840135936060013592509050565b60008060006060848603121561294b57600080fd5b505081359360208301359350604090920135919050565b6000806040838503121561297557600080fd5b61297e836128c1565b946020939093013593505050565b6000806000604084860312156129a157600080fd5b6129aa846128c1565b9250602084013567ffffffffffffffff808211156129c757600080fd5b818601915086601f8301126129db57600080fd5b8135818111156129ea57600080fd5b8760208260051b85010111156129ff57600080fd5b6020830194508093505050509250925092565b634e487b7160e01b600052604160045260246000fd5b600080600060608486031215612a3d57600080fd5b83359250612a4d60208501612890565b9150604084013567ffffffffffffffff80821115612a6a57600080fd5b818601915086601f830112612a7e57600080fd5b813581811115612a9057612a90612a12565b604051601f8201601f19908116603f01168101908382118183101715612ab857612ab8612a12565b81604052828152896020848701011115612ad157600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b600060208284031215612b0557600080fd5b6120ff826128c1565b634e487b7160e01b600052601160045260246000fd5b60008219821115612b3757612b37612b0e565b500190565b634e487b7160e01b600052603260045260246000fd5b600082821015612b6457612b64612b0e565b500390565b6000600019821415612b7d57612b7d612b0e565b5060010190565b60005b83811015612b9f578181015183820152602001612b87565b83811115612bae576000848401525b50505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612bec816017850160208801612b84565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351612c29816028840160208801612b84565b01602801949350505050565b6020815260008251806020840152612c54816040850160208701612b84565b601f01601f19169190910160400192915050565b600060208284031215612c7a57600080fd5b5051919050565b6000816000190483118215151615612c9b57612c9b612b0e565b500290565b634e487b7160e01b600052601260045260246000fd5b600082612cc557612cc5612ca0565b500490565b634e487b7160e01b600052602160045260246000fd5b600081612cef57612cef612b0e565b506000190190565b600082612d0657612d06612ca0565b50069056feee57cd81e84075558e8fcc182a1f4393f91fc97f963a136e66b7f949a62f319f4e6f7420616e206f776e6572206f72206f70657261746f720000000000000000ad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5a2646970667358221220b0ecd4821789771d5f7fe9d08aa7c134b2b34395df596577e9168f36a370589b64736f6c63430008090033000000000000000000000000d9a0139d78fcb906b5a39a9e289a7ae846f29798
Deployed Bytecode
0x6080604052600436106103135760003560e01c806391d148541161019a578063d547741f116100e1578063e9d5596a1161008a578063ef8a923511610064578063ef8a923514610923578063f5b541a61461093d578063feae79071461047d57600080fd5b8063e9d5596a146108c2578063ea87e0a8146108f8578063ed6661c21461090e57600080fd5b8063e6a5f0e9116100bb578063e6a5f0e914610862578063e6fd48bc14610896578063e73faa2d146108ac57600080fd5b8063d547741f1461080c578063d5abeb011461082c578063dc1b73281461084257600080fd5b8063adf66d3111610143578063bb2980c01161011d578063bb2980c014610791578063bc06946f146107c5578063d0c801d5146107f957600080fd5b8063adf66d311461073c578063b19960e61461075c578063b1b46fc01461077157600080fd5b8063a85adeab11610174578063a85adeab14610711578063acc28f9114610727578063ad33821d1461034d57600080fd5b806391d148541461068457806394c9da79146106c8578063a217fddf146106fc57600080fd5b80635c4280d91161025e578063742253f611610207578063853828b6116101e1578063853828b61461061b5780638920c3f2146106305780638ea4ffc21461065057600080fd5b8063742253f6146105b15780637ecc2b56146105d1578063836b0874146105e757600080fd5b80636588103b116102385780636588103b1461057b5780636fe8f9c51461059b578063715468791461041457600080fd5b80635c4280d9146105125780635df5729b1461054657806360a2da441461055b57600080fd5b80632ff7ed8e116102c0578063433835d71161029a578063433835d71461047d57806346fe30e71461049257806350d121fb146104de57600080fd5b80632ff7ed8e14610414578063319265e41461042957806336568abe1461045d57600080fd5b80632e1a7d4d116102f15780632e1a7d4d146103b25780632e49d78b146103d45780632f2ff15d146103f457600080fd5b806301ffc9a714610318578063219e30351461034d578063248a9ca314610374575b600080fd5b34801561032457600080fd5b5061033861033336600461284d565b610971565b60405190151581526020015b60405180910390f35b34801561035957600080fd5b50610362600181565b60405160ff9091168152602001610344565b34801561038057600080fd5b506103a461038f366004612877565b60009081526020819052604090206001015490565b604051908152602001610344565b3480156103be57600080fd5b506103d26103cd366004612877565b6109a8565b005b3480156103e057600080fd5b506103d26103ef3660046128a6565b610a3a565b34801561040057600080fd5b506103d261040f3660046128d8565b610ad1565b34801561042057600080fd5b50610362600381565b34801561043557600080fd5b506103a47f00000000000000000000000000000000000000000000000000000000000009c481565b34801561046957600080fd5b506103d26104783660046128d8565b610afc565b34801561048957600080fd5b50610362600281565b34801561049e57600080fd5b506104c67f00000000000000000000000090a7237f48f3ee8fd60ae267ae4c0551ab2030a381565b6040516001600160a01b039091168152602001610344565b3480156104ea57600080fd5b506103a47f00000000000000000000000000000000000000000000000000000000000009c481565b34801561051e57600080fd5b506104c67f0000000000000000000000002b21eccab47b18f79f9167a2ac1636da3dc2550581565b34801561055257600080fd5b506103d2610b88565b34801561056757600080fd5b506103d2610576366004612904565b610c13565b34801561058757600080fd5b506006546104c6906001600160a01b031681565b3480156105a757600080fd5b506103a4600a5481565b3480156105bd57600080fd5b506103d26105cc366004612936565b610cc3565b3480156105dd57600080fd5b506103a460045481565b3480156105f357600080fd5b506104c67f000000000000000000000000f4a202ed4541c5735d584966a52cfa17749acb7b81565b34801561062757600080fd5b506103d2610e0d565b34801561063c57600080fd5b506103d261064b366004612962565b610e97565b34801561065c57600080fd5b506104c67f000000000000000000000000872c125125a003610de6581e165808ba4b153fd681565b34801561069057600080fd5b5061033861069f3660046128d8565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b3480156106d457600080fd5b506103a47f00000000000000000000000000000000000000000000000000000000000009c481565b34801561070857600080fd5b506103a4600081565b34801561071d57600080fd5b506103a460095481565b34801561073357600080fd5b50610362600081565b34801561074857600080fd5b506103d2610757366004612962565b61103c565b34801561076857600080fd5b506103a4600381565b34801561077d57600080fd5b506103d261078c36600461298c565b611200565b34801561079d57600080fd5b506103a47f00000000000000000000000000000000000000000000000000000000000009c481565b3480156107d157600080fd5b506103a47f14dd327f3834be9d0f7cf44f6cf11c96ded83bd68d1a1b3926d35739e7bb88d081565b6103d2610807366004612a28565b61150d565b34801561081857600080fd5b506103d26108273660046128d8565b6119cd565b34801561083857600080fd5b506103a460035481565b34801561084e57600080fd5b506103d261085d366004612877565b6119f3565b34801561086e57600080fd5b506103a47f846845e183a15dc56860347e70130a6b3f365acacf07a40688b4c0799dbf1d0981565b3480156108a257600080fd5b506103a460075481565b3480156108b857600080fd5b506103a460055481565b3480156108ce57600080fd5b506103a46108dd366004612af3565b6001600160a01b03166000908152600c602052604090205490565b34801561090457600080fd5b506103a460085481565b34801561091a57600080fd5b506103a460c881565b34801561092f57600080fd5b506002546103629060ff1681565b34801561094957600080fd5b506103a47f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92981565b60006001600160e01b03198216637965db0b60e01b14806109a257506301ffc9a760e01b6001600160e01b03198316145b92915050565b336000908152600080516020612d4c833981519152602052604090205460ff16806109ef5750336000908152600080516020612d0c833981519152602052604090205460ff165b610a2e5760405162461bcd60e51b81526020600482015260186024820152600080516020612d2c83398151915260448201526064015b60405180910390fd5b610a3781611a79565b50565b336000908152600080516020612d4c833981519152602052604090205460ff1680610a815750336000908152600080516020612d0c833981519152602052604090205460ff165b610abb5760405162461bcd60e51b81526020600482015260186024820152600080516020612d2c8339815191526044820152606401610a25565b6002805460ff191660ff92909216919091179055565b600082815260208190526040902060010154610aed8133611d55565b610af78383611dd3565b505050565b6001600160a01b0381163314610b7a5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610a25565b610b848282611e71565b5050565b336000908152600080516020612d4c833981519152602052604090205460ff1680610bcf5750336000908152600080516020612d0c833981519152602052604090205460ff165b610c095760405162461bcd60e51b81526020600482015260186024820152600080516020612d2c8339815191526044820152606401610a25565b610c11611ef0565b565b336000908152600080516020612d4c833981519152602052604090205460ff1680610c5a5750336000908152600080516020612d0c833981519152602052604090205460ff165b610c945760405162461bcd60e51b81526020600482015260186024820152600080516020612d2c8339815191526044820152606401610a25565b6005849055600783905560098290556008819055610cb0611ef0565b50506002805460ff191660011790555050565b336000908152600080516020612d4c833981519152602052604090205460ff1680610d0a5750336000908152600080516020612d0c833981519152602052604090205460ff165b610d445760405162461bcd60e51b81526020600482015260186024820152600080516020612d2c8339815191526044820152606401610a25565b811580610d5057508183105b610d9c5760405162461bcd60e51b815260206004820152601260248201527f496e76616c69642074696d657374616d707300000000000000000000000000006044820152606401610a25565b811580610db357508181108015610db35750808311155b610dff5760405162461bcd60e51b815260206004820152601860248201527f496e76616c6964207075626c69632074696d657374616d7000000000000000006044820152606401610a25565b600792909255600955600855565b336000908152600080516020612d4c833981519152602052604090205460ff1680610e545750336000908152600080516020612d0c833981519152602052604090205460ff165b610e8e5760405162461bcd60e51b81526020600482015260186024820152600080516020612d2c8339815191526044820152606401610a25565b610c1147611a79565b336000908152600080516020612d4c833981519152602052604090205460ff1680610ede5750336000908152600080516020612d0c833981519152602052604090205460ff165b610f185760405162461bcd60e51b81526020600482015260186024820152600080516020612d2c8339815191526044820152606401610a25565b80600060045411610f5c5760405162461bcd60e51b815260206004820152600e60248201526d4e6f206d6f726520737570706c7960901b6044820152606401610a25565b806004541015610fa25760405162461bcd60e51b81526020600482015260116024820152704e6f7420656e6f75676820737570706c7960781b6044820152606401610a25565b60008111610fdd5760405162461bcd60e51b81526020600482015260086024820152670517479203c3d20360c41b6044820152606401610a25565b60025460ff166003146110325760405162461bcd60e51b815260206004820152601160248201527f537461747573206e6f7420636c6f7365640000000000000000000000000000006044820152606401610a25565b610af7828461200b565b336000908152600080516020612d4c833981519152602052604090205460ff16806110835750336000908152600080516020612d0c833981519152602052604090205460ff165b6110bd5760405162461bcd60e51b81526020600482015260186024820152600080516020612d2c8339815191526044820152606401610a25565b806000600454116111015760405162461bcd60e51b815260206004820152600e60248201526d4e6f206d6f726520737570706c7960901b6044820152606401610a25565b8060045410156111475760405162461bcd60e51b81526020600482015260116024820152704e6f7420656e6f75676820737570706c7960781b6044820152606401610a25565b600081116111825760405162461bcd60e51b81526020600482015260086024820152670517479203c3d20360c41b6044820152606401610a25565b60c882600a546111929190612b24565b11156111e05760405162461bcd60e51b815260206004820152601b60248201527f41626f76652066726565207175616e7469747920616c6c6f77656400000000006044820152606401610a25565b6111ea828461200b565b81600a546111f89190612b24565b600a55505050565b336000908152600080516020612d4c833981519152602052604090205460ff16806112475750336000908152600080516020612d0c833981519152602052604090205460ff165b6112815760405162461bcd60e51b81526020600482015260186024820152600080516020612d2c8339815191526044820152606401610a25565b60045481906112c35760405162461bcd60e51b815260206004820152600e60248201526d4e6f206d6f726520737570706c7960901b6044820152606401610a25565b8060045410156113095760405162461bcd60e51b81526020600482015260116024820152704e6f7420656e6f75676820737570706c7960781b6044820152606401610a25565b600081116113445760405162461bcd60e51b81526020600482015260086024820152670517479203c3d20360c41b6044820152606401610a25565b600a5460c890611355908490612b24565b11156113a35760405162461bcd60e51b815260206004820152601b60248201527f41626f76652066726565207175616e7469747920616c6c6f77656400000000006044820152606401610a25565b60005b828110156114f557600060018585848181106113c4576113c4612b3c565b905060200201356113d59190612b52565b9050600b600060016004546113ea9190612b52565b81526020019081526020016000205460001461142757600b600060016004546114139190612b52565b815260200190815260200160002054611436565b60016004546114369190612b52565b6000828152600b60205260409020556006546001600160a01b03166340c10f198787878681811061146957611469612b3c565b6040516001600160e01b031960e087901b1681526001600160a01b0390941660048501526020029190910135602483015250604401600060405180830381600087803b1580156114b857600080fd5b505af11580156114cc573d6000803e3d6000fd5b5050505060016004546114df9190612b52565b60045550806114ed81612b69565b9150506113a6565b50600a54611504908390612b24565b600a5550505050565b333b1561155c5760405162461bcd60e51b815260206004820152601460248201527f636f6e7472616374206e6f7420616c6c6f7765640000000000000000000000006044820152606401610a25565b3332146115ab5760405162461bcd60e51b815260206004820152601a60248201527f70726f787920636f6e7472616374206e6f7420616c6c6f7765640000000000006044820152606401610a25565b600260015414156115fe5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610a25565b600260015560045483906116455760405162461bcd60e51b815260206004820152600e60248201526d4e6f206d6f726520737570706c7960901b6044820152606401610a25565b80600454101561168b5760405162461bcd60e51b81526020600482015260116024820152704e6f7420656e6f75676820737570706c7960781b6044820152606401610a25565b600081116116c65760405162461bcd60e51b81526020600482015260086024820152670517479203c3d20360c41b6044820152606401610a25565b6002805460ff161461171a5760405162461bcd60e51b815260206004820152601060248201527f537461747573206e6f7420636c61696d000000000000000000000000000000006044820152606401610a25565b8260ff164260075411156117705760405162461bcd60e51b815260206004820152600e60248201527f4d696e7420746f6f206561726c790000000000000000000000000000000000006044820152606401610a25565b6009541580611780575042600954115b6117bc5760405162461bcd60e51b815260206004820152600d60248201526c4d696e7420746f6f206c61746560981b6044820152606401610a25565b80611813574260085411156118135760405162461bcd60e51b815260206004820152600f60248201527f4d696e74206e6f74207075626c696300000000000000000000000000000000006044820152606401610a25565b336000908152600c602052604090205460039061183090876120f3565b111561187e5760405162461bcd60e51b815260206004820152601660248201527f41626f7665207175616e7469747920616c6c6f776564000000000000000000006044820152606401610a25565b60055460009061188e9087612106565b905060ff8516600314156118bb576118b46103e86118ae83610320612106565b90612112565b90506118dc565b60ff8516600214156118dc576118d96103e86118ae83610384612106565b90505b6118f06118ea87833361211e565b8561218a565b61193c5760405162461bcd60e51b815260206004820152601860248201527f4e6f74207369676e656420627920617574686f72697a657200000000000000006044820152606401610a25565b8034101561198c5760405162461bcd60e51b815260206004820152600e60248201527f5061796d656e74206661696c65640000000000000000000000000000000000006044820152606401610a25565b611996863361200b565b336000908152600c60205260409020546119b1908790612b24565b336000908152600c602052604090205550506001805550505050565b6000828152602081905260409020600101546119e98133611d55565b610af78383611e71565b336000908152600080516020612d4c833981519152602052604090205460ff1680611a3a5750336000908152600080516020612d0c833981519152602052604090205460ff165b611a745760405162461bcd60e51b81526020600482015260186024820152600080516020612d2c8339815191526044820152606401610a25565b600555565b47811115611ac95760405162461bcd60e51b815260206004820152601060248201527f616d6f756e74203e2062616c616e6365000000000000000000000000000000006044820152606401610a25565b60008111611b085760405162461bcd60e51b815260206004820152600c60248201526b115b5c1d1e48185b5bdd5b9d60a21b6044820152606401610a25565b6000611b3a6127106118ae847f00000000000000000000000000000000000000000000000000000000000009c4612106565b90506000611b6e6127106118ae857f00000000000000000000000000000000000000000000000000000000000009c4612106565b90506000611ba26127106118ae867f00000000000000000000000000000000000000000000000000000000000009c4612106565b90506000611bbc84611bb68581898761221f565b9061221f565b6040519091506001600160a01b037f00000000000000000000000090a7237f48f3ee8fd60ae267ae4c0551ab2030a3169085156108fc029086906000818181858888f19350505050158015611c15573d6000803e3d6000fd5b506040516001600160a01b037f000000000000000000000000872c125125a003610de6581e165808ba4b153fd6169084156108fc029085906000818181858888f19350505050158015611c6c573d6000803e3d6000fd5b506040516001600160a01b037f0000000000000000000000002b21eccab47b18f79f9167a2ac1636da3dc25505169083156108fc029084906000818181858888f19350505050158015611cc3573d6000803e3d6000fd5b506040516001600160a01b037f000000000000000000000000f4a202ed4541c5735d584966a52cfa17749acb7b169082156108fc029083906000818181858888f19350505050158015611d1a573d6000803e3d6000fd5b506040518581527f5b6b431d4476a211bb7d41c20d1aab9ae2321deee0d20be3d9fc9b1093fa6e3d9060200160405180910390a15050505050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610b8457611d91816001600160a01b0316601461222b565b611d9c83602061222b565b604051602001611dad929190612bb4565b60408051601f198184030181529082905262461bcd60e51b8252610a2591600401612c35565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610b84576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055611e2d3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1615610b84576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600654604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd916004808301926020929190829003018186803b158015611f3557600080fd5b505afa158015611f49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f6d9190612c68565b9050600660009054906101000a90046001600160a01b03166001600160a01b031663d5abeb016040518163ffffffff1660e01b815260040160206040518083038186803b158015611fbd57600080fd5b505afa158015611fd1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ff59190612c68565b6003819055612005908290612b52565b60045550565b8160045410156120515760405162461bcd60e51b81526020600482015260116024820152704e6f7420656e6f75676820737570706c7960781b6044820152606401610a25565b60005b82811015610af75760006120666123d4565b6006546040516340c10f1960e01b81526001600160a01b038681166004830152602482018490529293509116906340c10f1990604401600060405180830381600087803b1580156120b657600080fd5b505af11580156120ca573d6000803e3d6000fd5b5050505060016004546120dd9190612b52565b60045550806120eb81612b69565b915050612054565b60006120ff8284612b24565b9392505050565b60006120ff8284612c81565b60006120ff8284612cb6565b604080517f846845e183a15dc56860347e70130a6b3f365acacf07a40688b4c0799dbf1d096020820152908101849052606081018390526001600160a01b038216608082015260009060a0015b6040516020818303038152906040528051906020012090509392505050565b600080612196846123ee565b90506000806121a5838661243c565b909250905060008160048111156121be576121be612cca565b14801561220257506001600160a01b03821660009081527f20d1f9afebdbbcb1ccac3d78464405112787c011b45b4f0d787e84ef93a48613602052604090205460ff165b1561221357600193505050506109a2565b50600095945050505050565b60006120ff8284612b52565b6060600061223a836002612c81565b612245906002612b24565b67ffffffffffffffff81111561225d5761225d612a12565b6040519080825280601f01601f191660200182016040528015612287576020820181803683370190505b509050600360fc1b816000815181106122a2576122a2612b3c565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106122d1576122d1612b3c565b60200101906001600160f81b031916908160001a90535060006122f5846002612c81565b612300906001612b24565b90505b6001811115612385577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061234157612341612b3c565b1a60f81b82828151811061235757612357612b3c565b60200101906001600160f81b031916908160001a90535060049490941c9361237e81612ce0565b9050612303565b5083156120ff5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610a25565b60006123de6124ac565b6123e9906001612b24565b905090565b60006109a26123fb6125ef565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b6000808251604114156124735760208301516040840151606085015160001a612467878285856126dd565b945094505050506124a5565b82516040141561249d57602083015160408401516124928683836127ca565b9350935050506124a5565b506000905060025b9250929050565b600080600454116124ff5760405162461bcd60e51b815260206004820152601260248201527f496e76616c6964205f72656d61696e696e6700000000000000000000000000006044820152606401610a25565b600061254e600454612548444340604051602001612527929190918252602082015260400190565b60408051601f198184030181529190528051602090910120600354906120f3565b90612812565b6000818152600b602052604090205490915015612579576000818152600b602052604090205461257b565b805b9150600b600060016004546125909190612b52565b8152602001908152602001600020546000146125cd57600b600060016004546125b99190612b52565b8152602001908152602001600020546125dc565b60016004546125dc9190612b52565b6000918252600b60205260409091205590565b6000306001600160a01b037f000000000000000000000000d773e60da44ccc8689ef9f2f538d85a9978621a61614801561264857507f000000000000000000000000000000000000000000000000000000000000000146145b1561267257507fd701a55a8ace8e3559937142f52ca923e171a35ce3208ce0a86b97670db6473e90565b6123e97f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f7f6553eeabfe9422497cd692297fd7d83ced0bd9b6d14d90306cbb13d089a63b2f7fe6bbd6277e1bf288eed5e8d1780f9a50b239e86b153736bceebccf4ea79d90b361281e565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561271457506000905060036127c1565b8460ff16601b1415801561272c57508460ff16601c14155b1561273d57506000905060046127c1565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612791573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166127ba576000600192509250506127c1565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831660ff84901c601b01612804878288856126dd565b935093505050935093915050565b60006120ff8284612cf7565b6040805160208101859052908101839052606081018290524660808201523060a082015260009060c00161216b565b60006020828403121561285f57600080fd5b81356001600160e01b0319811681146120ff57600080fd5b60006020828403121561288957600080fd5b5035919050565b803560ff811681146128a157600080fd5b919050565b6000602082840312156128b857600080fd5b6120ff82612890565b80356001600160a01b03811681146128a157600080fd5b600080604083850312156128eb57600080fd5b823591506128fb602084016128c1565b90509250929050565b6000806000806080858703121561291a57600080fd5b5050823594602084013594506040840135936060013592509050565b60008060006060848603121561294b57600080fd5b505081359360208301359350604090920135919050565b6000806040838503121561297557600080fd5b61297e836128c1565b946020939093013593505050565b6000806000604084860312156129a157600080fd5b6129aa846128c1565b9250602084013567ffffffffffffffff808211156129c757600080fd5b818601915086601f8301126129db57600080fd5b8135818111156129ea57600080fd5b8760208260051b85010111156129ff57600080fd5b6020830194508093505050509250925092565b634e487b7160e01b600052604160045260246000fd5b600080600060608486031215612a3d57600080fd5b83359250612a4d60208501612890565b9150604084013567ffffffffffffffff80821115612a6a57600080fd5b818601915086601f830112612a7e57600080fd5b813581811115612a9057612a90612a12565b604051601f8201601f19908116603f01168101908382118183101715612ab857612ab8612a12565b81604052828152896020848701011115612ad157600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b600060208284031215612b0557600080fd5b6120ff826128c1565b634e487b7160e01b600052601160045260246000fd5b60008219821115612b3757612b37612b0e565b500190565b634e487b7160e01b600052603260045260246000fd5b600082821015612b6457612b64612b0e565b500390565b6000600019821415612b7d57612b7d612b0e565b5060010190565b60005b83811015612b9f578181015183820152602001612b87565b83811115612bae576000848401525b50505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612bec816017850160208801612b84565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351612c29816028840160208801612b84565b01602801949350505050565b6020815260008251806020840152612c54816040850160208701612b84565b601f01601f19169190910160400192915050565b600060208284031215612c7a57600080fd5b5051919050565b6000816000190483118215151615612c9b57612c9b612b0e565b500290565b634e487b7160e01b600052601260045260246000fd5b600082612cc557612cc5612ca0565b500490565b634e487b7160e01b600052602160045260246000fd5b600081612cef57612cef612b0e565b506000190190565b600082612d0657612d06612ca0565b50069056feee57cd81e84075558e8fcc182a1f4393f91fc97f963a136e66b7f949a62f319f4e6f7420616e206f776e6572206f72206f70657261746f720000000000000000ad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5a2646970667358221220b0ecd4821789771d5f7fe9d08aa7c134b2b34395df596577e9168f36a370589b64736f6c63430008090033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000d9a0139d78fcb906b5a39a9e289a7ae846f29798
-----Decoded View---------------
Arg [0] : _collection (address): 0xd9A0139d78fcB906b5a39A9E289a7Ae846F29798
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000d9a0139d78fcb906b5a39a9e289a7ae846f29798
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.