Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
Latest 25 from a total of 193 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Withdraw | 19063026 | 328 days ago | IN | 0 ETH | 0.00095659 | ||||
Set Pause | 19063024 | 328 days ago | IN | 0 ETH | 0.00077185 | ||||
Mint Pie | 19063020 | 328 days ago | IN | 0.05 ETH | 0.00295463 | ||||
Mint | 19063006 | 328 days ago | IN | 0.1 ETH | 0.00262356 | ||||
Mint | 19062585 | 328 days ago | IN | 0.05 ETH | 0.00262079 | ||||
Mint | 19062159 | 328 days ago | IN | 0.05 ETH | 0.00241079 | ||||
Mint Pie | 19062124 | 328 days ago | IN | 0.05 ETH | 0.00156329 | ||||
Mint Pie | 19060597 | 328 days ago | IN | 0.05 ETH | 0.00144116 | ||||
Mint | 19059674 | 328 days ago | IN | 0.15 ETH | 0.00171156 | ||||
Mint Pie | 19059670 | 328 days ago | IN | 0.05 ETH | 0.00214472 | ||||
Mint | 19059259 | 328 days ago | IN | 0.05 ETH | 0.00179686 | ||||
Mint | 19056129 | 329 days ago | IN | 0.05 ETH | 0.00330932 | ||||
Mint | 19056055 | 329 days ago | IN | 0.15 ETH | 0.00225854 | ||||
Mint | 19056029 | 329 days ago | IN | 0.05 ETH | 0.00242971 | ||||
Mint | 19055939 | 329 days ago | IN | 0.05 ETH | 0.00177963 | ||||
Mint | 19055544 | 329 days ago | IN | 0.05 ETH | 0.00254321 | ||||
Mint | 19053527 | 329 days ago | IN | 0.1 ETH | 0.00135179 | ||||
Mint | 19052206 | 329 days ago | IN | 0.05 ETH | 0.00176729 | ||||
Mint | 19051434 | 329 days ago | IN | 0.05 ETH | 0.00205854 | ||||
Mint | 19041130 | 331 days ago | IN | 0.05 ETH | 0.00355004 | ||||
Mint | 19019404 | 334 days ago | IN | 0.1 ETH | 0.00334126 | ||||
Mint | 19017945 | 334 days ago | IN | 0.05 ETH | 0.00261355 | ||||
Mint | 19017941 | 334 days ago | IN | 0.05 ETH | 0.00359273 | ||||
Mint | 19009021 | 335 days ago | IN | 0.05 ETH | 0.00264821 | ||||
Mint | 19008975 | 335 days ago | IN | 0.05 ETH | 0.00301953 |
Loading...
Loading
Contract Name:
externalMinter
Compiler Version
v0.8.18+commit.87f61d96
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT // Copyright (c) 2023 Keisuke OHNO /* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ pragma solidity >=0.7.0 <0.9.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; interface iNFTCollection { function externalMint(address _address , uint256 _amount ) external payable ; } contract externalMinter is Ownable , AccessControl{ constructor(){ //Role initialization _setupRole(DEFAULT_ADMIN_ROLE, msg.sender); grantRole( ADMIN , msg.sender); setWithdrawAddress(0x0050Ab4970100557F44730ad13c944A1C68dCD61); setNFTCollection(0x5513A5909Fa4F2129b1376c46F0CF403502F2FEc); } iNFTCollection public NFTCollection; bytes32 public constant ADMIN = keccak256("ADMIN"); bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); // //withdraw section // address public withdrawAddress = 0xdEcf4B112d4120B6998e5020a6B4819E490F7db6; function setWithdrawAddress(address _withdrawAddress) public onlyOwner { withdrawAddress = _withdrawAddress; } function withdraw() public payable onlyOwner { (bool os, ) = payable(withdrawAddress).call{value: address(this).balance}(''); require(os); } // //mint section // uint256 public mintedAmount = 0; function _nextTokenId() internal view returns(uint256){ return mintedAmount + 1; } //https://eth-converter.com/ uint256 public cost = 0; uint256 public maxSupply = 500; uint256 public maxMintAmountPerTransaction = 200; uint256 public publicSaleMaxMintAmountPerAddress = 50; bool public paused = true; bool public onlyAllowlisted = true; bool public mintCount = true; bool public burnAndMintMode = false; //0 : Merkle Tree //1 : Mapping uint256 public allowlistType = 0; bytes32 public merkleRoot; uint256 public saleId = 0; mapping(uint256 => mapping(address => uint256)) public userMintedAmount; mapping(uint256 => mapping(address => uint256)) public allowlistUserAmount; modifier callerIsUser() { require(tx.origin == msg.sender, "The caller is another contract."); _; } //mint with merkle tree function mint(uint256 _mintAmount , uint256 _maxMintAmount , bytes32[] calldata _merkleProof , uint256 /*_burnId*/ ) public payable callerIsUser{ require(!paused, "the contract is paused"); require(0 < _mintAmount, "need to mint at least 1 NFT"); require(_mintAmount <= maxMintAmountPerTransaction, "max mint amount per session exceeded"); require( _nextTokenId() + _mintAmount -1 <= maxSupply , "max NFT limit exceeded"); require(cost * _mintAmount <= msg.value, "insufficient funds"); uint256 maxMintAmountPerAddress; if(onlyAllowlisted == true) { if(allowlistType == 0){ //Merkle tree bytes32 leaf = keccak256( abi.encodePacked(msg.sender, _maxMintAmount) ); require(MerkleProof.verify(_merkleProof, merkleRoot, leaf), "user is not allowlisted"); maxMintAmountPerAddress = _maxMintAmount; }else if(allowlistType == 1){ //Mapping require( allowlistUserAmount[saleId][msg.sender] != 0 , "user is not allowlisted"); maxMintAmountPerAddress = allowlistUserAmount[saleId][msg.sender]; } }else{ maxMintAmountPerAddress = publicSaleMaxMintAmountPerAddress; } if(mintCount == true){ require(_mintAmount <= maxMintAmountPerAddress - userMintedAmount[saleId][msg.sender] , "max NFT per address exceeded"); userMintedAmount[saleId][msg.sender] += _mintAmount; } mintedAmount += _mintAmount; NFTCollection.externalMint( msg.sender, _mintAmount ); } //mint with merkle tree function mintPie(uint256 _mintAmount , uint256 _maxMintAmount , bytes32[] calldata _merkleProof , address receiver ) public payable callerIsUser onlyRole(MINTER_ROLE){ require(!paused, "the contract is paused"); require(0 < _mintAmount, "need to mint at least 1 NFT"); require(_mintAmount <= maxMintAmountPerTransaction, "max mint amount per session exceeded"); require( _nextTokenId() + _mintAmount -1 <= maxSupply , "max NFT limit exceeded"); require(cost * _mintAmount <= msg.value, "insufficient funds"); uint256 maxMintAmountPerAddress; if(onlyAllowlisted == true) { if(allowlistType == 0){ //Merkle tree bytes32 leaf = keccak256( abi.encodePacked(receiver , _maxMintAmount) ); require(MerkleProof.verify(_merkleProof, merkleRoot, leaf), "user is not allowlisted"); maxMintAmountPerAddress = _maxMintAmount; }else if(allowlistType == 1){ //Mapping require( allowlistUserAmount[saleId][receiver] != 0 , "user is not allowlisted"); maxMintAmountPerAddress = allowlistUserAmount[saleId][receiver]; } }else{ maxMintAmountPerAddress = publicSaleMaxMintAmountPerAddress; } if(mintCount == true){ require(_mintAmount <= maxMintAmountPerAddress - userMintedAmount[saleId][receiver] , "max NFT per address exceeded"); userMintedAmount[saleId][receiver] += _mintAmount; } mintedAmount += _mintAmount; NFTCollection.externalMint( receiver , _mintAmount ); } function currentTokenId() public view returns(uint256){ return _nextTokenId() -1; } function setBurnAndMintMode(bool _burnAndMintMode) public onlyRole(ADMIN) { burnAndMintMode = _burnAndMintMode; } function setMerkleRoot(bytes32 _merkleRoot) public onlyRole(ADMIN) { merkleRoot = _merkleRoot; } function setPause(bool _state) public onlyRole(ADMIN) { paused = _state; } function setAllowListType(uint256 _type)public onlyRole(ADMIN){ require( _type == 0 || _type == 1 , "Allow list type error"); allowlistType = _type; } function setAllowlistMapping(uint256 _saleId , address[] memory addresses, uint256[] memory saleSupplies) public onlyRole(ADMIN) { require(addresses.length == saleSupplies.length); for (uint256 i = 0; i < addresses.length; i++) { allowlistUserAmount[_saleId][addresses[i]] = saleSupplies[i]; } } function getAllowlistUserAmount(address _address ) public view returns(uint256){ return allowlistUserAmount[saleId][_address]; } function getUserMintedAmountBySaleId(uint256 _saleId , address _address ) public view returns(uint256){ return userMintedAmount[_saleId][_address]; } function getUserMintedAmount(address _address ) public view returns(uint256){ return userMintedAmount[saleId][_address]; } function setSaleId(uint256 _saleId) public onlyRole(ADMIN) { saleId = _saleId; } function setMaxSupply(uint256 _maxSupply) public onlyRole(ADMIN) { maxSupply = _maxSupply; } function setPublicSaleMaxMintAmountPerAddress(uint256 _publicSaleMaxMintAmountPerAddress) public onlyRole(ADMIN) { publicSaleMaxMintAmountPerAddress = _publicSaleMaxMintAmountPerAddress; } function setCost(uint256 _newCost) public onlyRole(ADMIN) { cost = _newCost; } function setOnlyAllowlisted(bool _state) public onlyRole(ADMIN) { onlyAllowlisted = _state; } function setMaxMintAmountPerTransaction(uint256 _maxMintAmountPerTransaction) public onlyRole(ADMIN) { maxMintAmountPerTransaction = _maxMintAmountPerTransaction; } function setMintCount(bool _state) public onlyRole(ADMIN) { mintCount = _state; } function setMintedAmount(uint256 _mintedAmount) public onlyRole(ADMIN) { mintedAmount = _mintedAmount; } function setNFTCollection(address _address) public onlyRole(ADMIN) { NFTCollection = iNFTCollection(_address); } function totalSupply() public view returns (uint256) { return mintedAmount; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.2) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Tree proofs. * * The tree and the proofs can be generated using our * https://github.com/OpenZeppelin/merkle-tree[JavaScript library]. * You will find a quickstart guide in the readme. * * WARNING: You should avoid using leaf values that are 64 bytes long prior to * hashing, or use a hash function other than keccak256 for hashing leaves. * This is because the concatenation of a sorted pair of internal nodes in * the merkle tree could be reinterpreted as a leaf value. * OpenZeppelin's JavaScript library generates merkle trees that are safe * against this attack out of the box. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify(bytes32[] memory proof, bytes32 root, bytes32 leaf) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Calldata version of {verify} * * _Available since v4.7._ */ function verifyCalldata(bytes32[] calldata proof, bytes32 root, bytes32 leaf) internal pure returns (bool) { return processProofCalldata(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Calldata version of {processProof} * * _Available since v4.7._ */ function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a merkle tree defined by * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function multiProofVerify( bytes32[] memory proof, bool[] memory proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProof(proof, proofFlags, leaves) == root; } /** * @dev Calldata version of {multiProofVerify} * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function multiProofVerifyCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProofCalldata(proof, proofFlags, leaves) == root; } /** * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false * respectively. * * CAUTION: Not all merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer). * * _Available since v4.7._ */ function processMultiProof( bytes32[] memory proof, bool[] memory proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 proofLen = proof.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proofLen - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]) : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { require(proofPos == proofLen, "MerkleProof: invalid multiproof"); unchecked { return hashes[totalHashes - 1]; } } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @dev Calldata version of {processMultiProof}. * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function processMultiProofCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 proofLen = proof.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proofLen - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]) : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { require(proofPos == proofLen, "MerkleProof: invalid multiproof"); unchecked { return hashes[totalHashes - 1]; } } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { return a < b ? _efficientHash(a, b) : _efficientHash(b, a); } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { /// @solidity memory-safe-assembly assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; import "../utils/Context.sol"; import "../utils/Strings.sol"; import "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ```solidity * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ```solidity * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules} * to enforce additional security measures for this role. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `_msgSender()` is missing `role`. * Overriding this function changes the behavior of the {onlyRole} modifier. * * Format of the revert message is described in {_checkRole}. * * _Available since v4.6._ */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(account), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleGranted} event. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleRevoked} event. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. * * May emit a {RoleRevoked} event. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * May emit a {RoleGranted} event. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. * * May emit a {RoleGranted} event. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. * * May emit a {RoleRevoked} event. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; import "./math/SignedMath.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `int256` to its ASCII `string` decimal representation. */ function toString(int256 value) internal pure returns (string memory) { return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value)))); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } /** * @dev Returns true if the two strings are equal. */ function equal(string memory a, string memory b) internal pure returns (bool) { return keccak256(bytes(a)) == keccak256(bytes(b)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts 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/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.0; /** * @dev Standard signed math utilities missing in the Solidity language. */ library SignedMath { /** * @dev Returns the largest of two signed numbers. */ function max(int256 a, int256 b) internal pure returns (int256) { return a > b ? a : b; } /** * @dev Returns the smallest of two signed numbers. */ function min(int256 a, int256 b) internal pure returns (int256) { return a < b ? a : b; } /** * @dev Returns the average of two signed numbers without overflow. * The result is rounded towards zero. */ function average(int256 a, int256 b) internal pure returns (int256) { // Formula from the book "Hacker's Delight" int256 x = (a & b) + ((a ^ b) >> 1); return x + (int256(uint256(x) >> 255) & (a ^ b)); } /** * @dev Returns the absolute unsigned value of a signed value. */ function abs(int256 n) internal pure returns (uint256) { unchecked { // must be unchecked in order to support `n = type(int256).min` return uint256(n >= 0 ? n : -n); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1, "Math: mulDiv overflow"); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10 ** 64) { value /= 10 ** 64; result += 64; } if (value >= 10 ** 32) { value /= 10 ** 32; result += 32; } if (value >= 10 ** 16) { value /= 10 ** 16; result += 16; } if (value >= 10 ** 8) { value /= 10 ** 8; result += 8; } if (value >= 10 ** 4) { value /= 10 ** 4; result += 4; } if (value >= 10 ** 2) { value /= 10 ** 2; result += 2; } if (value >= 10 ** 1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 256, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0); } } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"inputs":[],"name":"ADMIN","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":"MINTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NFTCollection","outputs":[{"internalType":"contract iNFTCollection","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"allowlistType","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"allowlistUserAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"burnAndMintMode","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"getAllowlistUserAmount","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":"address","name":"_address","type":"address"}],"name":"getUserMintedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_saleId","type":"uint256"},{"internalType":"address","name":"_address","type":"address"}],"name":"getUserMintedAmountBySaleId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxMintAmountPerTransaction","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintAmount","type":"uint256"},{"internalType":"uint256","name":"_maxMintAmount","type":"uint256"},{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintCount","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintAmount","type":"uint256"},{"internalType":"uint256","name":"_maxMintAmount","type":"uint256"},{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"},{"internalType":"address","name":"receiver","type":"address"}],"name":"mintPie","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"onlyAllowlisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicSaleMaxMintAmountPerAddress","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"saleId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_type","type":"uint256"}],"name":"setAllowListType","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_saleId","type":"uint256"},{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256[]","name":"saleSupplies","type":"uint256[]"}],"name":"setAllowlistMapping","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_burnAndMintMode","type":"bool"}],"name":"setBurnAndMintMode","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newCost","type":"uint256"}],"name":"setCost","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxMintAmountPerTransaction","type":"uint256"}],"name":"setMaxMintAmountPerTransaction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxSupply","type":"uint256"}],"name":"setMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"}],"name":"setMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_state","type":"bool"}],"name":"setMintCount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintedAmount","type":"uint256"}],"name":"setMintedAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setNFTCollection","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_state","type":"bool"}],"name":"setOnlyAllowlisted","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_state","type":"bool"}],"name":"setPause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_publicSaleMaxMintAmountPerAddress","type":"uint256"}],"name":"setPublicSaleMaxMintAmountPerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_saleId","type":"uint256"}],"name":"setSaleId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_withdrawAddress","type":"address"}],"name":"setWithdrawAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"userMintedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"withdrawAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
6080604052600380546001600160a01b03191673decf4b112d4120b6998e5020a6b4819e490f7db61790556000600481905560058190556101f460065560c860075560326008556009805463ffffffff191662010101179055600a819055600c553480156200006d57600080fd5b506200007933620000e4565b6200008660003362000134565b620000a1600080516020620028558339815191523362000144565b620000bf7250ab4970100557f44730ad13c944a1c68dcd6162000173565b620000de735513a5909fa4f2129b1376c46f0cf403502f2fec6200019f565b62000694565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b620001408282620001dd565b5050565b6000828152600160208190526040909120015462000162816200024b565b6200016e8383620001dd565b505050565b6200017d6200025a565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b60008051602062002855833981519152620001ba816200024b565b50600280546001600160a01b0319166001600160a01b0392909216919091179055565b620001e98282620002bc565b620001405760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b620002578133620002e9565b50565b6000546001600160a01b03163314620002ba5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b565b60008281526001602090815260408083206001600160a01b038516845290915290205460ff165b92915050565b620002f58282620002bc565b620001405762000310816200036160201b620017cc1760201c565b62000326836020620017de62000374821b17811c565b604051602001620003399291906200055a565b60408051601f198184030181529082905262461bcd60e51b8252620002b191600401620005d3565b6060620002e36001600160a01b03831660145b60606000620003858360026200061e565b6200039290600262000638565b6001600160401b03811115620003ac57620003ac6200064e565b6040519080825280601f01601f191660200182016040528015620003d7576020820181803683370190505b509050600360fc1b81600081518110620003f557620003f562000664565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811062000427576200042762000664565b60200101906001600160f81b031916908160001a90535060006200044d8460026200061e565b6200045a90600162000638565b90505b6001811115620004dc576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811062000492576200049262000664565b1a60f81b828281518110620004ab57620004ab62000664565b60200101906001600160f81b031916908160001a90535060049490941c93620004d4816200067a565b90506200045d565b5083156200052d5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401620002b1565b9392505050565b60005b838110156200055157818101518382015260200162000537565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516200059481601785016020880162000534565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351620005c781602884016020880162000534565b01602801949350505050565b6020815260008251806020840152620005f481604085016020870162000534565b601f01601f19169190910160400192915050565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417620002e357620002e362000608565b80820180821115620002e357620002e362000608565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000816200068c576200068c62000608565b506000190190565b6121b180620006a46000396000f3fe6080604052600436106102e25760003560e01c8063715018a611610190578063a9e2acd5116100dc578063d539139311610095578063d728312a1161006f578063d728312a146108f8578063e39e026914610918578063f2fde38b14610938578063f48824db1461095857600080fd5b8063d53913931461088e578063d547741f146108c2578063d5abeb01146108e257600080fd5b8063a9e2acd5146107be578063b5f94d06146107de578063bbb89744146107fe578063bedb86fb14610814578063c84c038714610834578063d04f32d21461084a57600080fd5b80638da5cb5b1161014957806391d148541161012357806391d14854146107535780639659867e14610773578063a217fddf14610793578063a72193b6146107a857600080fd5b80638da5cb5b146107025780638e73cf00146107205780638fc59dd81461074057600080fd5b8063715018a61461065757806373ef64fd1461066c57806378b2e3a9146106825780637b9757db146106a25780637cb64759146106c25780637ee3b2ac146106e257600080fd5b80632f2ff15d1161024f57806347705cbc116102085780635c975abb116101e25780635c975abb146105eb578063674c02aa146106055780636b1a2b7f146106245780636f8b44b01461063757600080fd5b806347705cbc1461054f578063499a15d4146105935780634e6bf204146105cb57600080fd5b80632f2ff15d146104845780633511cd54146104a457806336568abe146104e75780633ab1a494146105075780633ccfd60b1461052757806344a0d68a1461052f57600080fd5b806318160ddd116102a157806318160ddd146103d0578063248a9ca3146103e55780632a0acc6a146104165780632b4fd779146104385780632d380242146104585780632eb4a7ab1461046e57600080fd5b806285bb6f146102e75780629a9b7b1461031d57806301ffc9a71461034057806313faede6146103605780631581b6001461037657806317dc10c4146103ae575b600080fd5b3480156102f357600080fd5b50600954610308906301000000900460ff1681565b60405190151581526020015b60405180910390f35b34801561032957600080fd5b50610332610990565b604051908152602001610314565b34801561034c57600080fd5b5061030861035b366004611c03565b6109ab565b34801561036c57600080fd5b5061033260055481565b34801561038257600080fd5b50600354610396906001600160a01b031681565b6040516001600160a01b039091168152602001610314565b3480156103ba57600080fd5b506103ce6103c9366004611c2d565b6109e2565b005b3480156103dc57600080fd5b50600454610332565b3480156103f157600080fd5b50610332610400366004611c4f565b6000908152600160208190526040909120015490565b34801561042257600080fd5b5061033260008051602061215c83398151915281565b34801561044457600080fd5b506103ce610453366004611c84565b610a15565b34801561046457600080fd5b5061033260045481565b34801561047a57600080fd5b50610332600b5481565b34801561049057600080fd5b506103ce61049f366004611c9f565b610a50565b3480156104b057600080fd5b506103326104bf366004611c9f565b6000918252600d602090815260408084206001600160a01b0393909316845291905290205490565b3480156104f357600080fd5b506103ce610502366004611c9f565b610a7b565b34801561051357600080fd5b506103ce610522366004611c84565b610afe565b6103ce610b28565b34801561053b57600080fd5b506103ce61054a366004611c4f565b610b93565b34801561055b57600080fd5b5061033261056a366004611c84565b600c546000908152600d602090815260408083206001600160a01b039094168352929052205490565b34801561059f57600080fd5b506103326105ae366004611c9f565b600e60209081526000928352604080842090915290825290205481565b3480156105d757600080fd5b506103ce6105e6366004611da1565b610bb1565b3480156105f757600080fd5b506009546103089060ff1681565b34801561061157600080fd5b5060095461030890610100900460ff1681565b6103ce610632366004611eb8565b610c6a565b34801561064357600080fd5b506103ce610652366004611c4f565b6110a7565b34801561066357600080fd5b506103ce6110c5565b34801561067857600080fd5b5061033260085481565b34801561068e57600080fd5b50600254610396906001600160a01b031681565b3480156106ae57600080fd5b506103ce6106bd366004611c4f565b6110d9565b3480156106ce57600080fd5b506103ce6106dd366004611c4f565b6110f7565b3480156106ee57600080fd5b506103ce6106fd366004611c4f565b611115565b34801561070e57600080fd5b506000546001600160a01b0316610396565b34801561072c57600080fd5b506103ce61073b366004611c2d565b611184565b6103ce61074e366004611f13565b6111b9565b34801561075f57600080fd5b5061030861076e366004611c9f565b611648565b34801561077f57600080fd5b506009546103089062010000900460ff1681565b34801561079f57600080fd5b50610332600081565b3480156107b457600080fd5b50610332600a5481565b3480156107ca57600080fd5b506103ce6107d9366004611c4f565b611673565b3480156107ea57600080fd5b506103ce6107f9366004611c4f565b611691565b34801561080a57600080fd5b5061033260075481565b34801561082057600080fd5b506103ce61082f366004611c2d565b6116af565b34801561084057600080fd5b50610332600c5481565b34801561085657600080fd5b50610332610865366004611c84565b600c546000908152600e602090815260408083206001600160a01b039094168352929052205490565b34801561089a57600080fd5b506103327f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b3480156108ce57600080fd5b506103ce6108dd366004611c9f565b6116db565b3480156108ee57600080fd5b5061033260065481565b34801561090457600080fd5b506103ce610913366004611c4f565b611701565b34801561092457600080fd5b506103ce610933366004611c2d565b61171f565b34801561094457600080fd5b506103ce610953366004611c84565b611756565b34801561096457600080fd5b50610332610973366004611c9f565b600d60209081526000928352604080842090915290825290205481565b6000600161099c611981565b6109a69190611f91565b905090565b60006001600160e01b03198216637965db0b60e01b14806109dc57506301ffc9a760e01b6001600160e01b03198316145b92915050565b60008051602061215c8339815191526109fa81611992565b50600980549115156101000261ff0019909216919091179055565b60008051602061215c833981519152610a2d81611992565b50600280546001600160a01b0319166001600160a01b0392909216919091179055565b60008281526001602081905260409091200154610a6c81611992565b610a76838361199c565b505050565b6001600160a01b0381163314610af05760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b610afa8282611a07565b5050565b610b06611a6e565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b610b30611a6e565b6003546040516000916001600160a01b03169047908381818185875af1925050503d8060008114610b7d576040519150601f19603f3d011682016040523d82523d6000602084013e610b82565b606091505b5050905080610b9057600080fd5b50565b60008051602061215c833981519152610bab81611992565b50600555565b60008051602061215c833981519152610bc981611992565b8151835114610bd757600080fd5b60005b8351811015610c6357828181518110610bf557610bf5611fa4565b6020026020010151600e60008781526020019081526020016000206000868481518110610c2457610c24611fa4565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020819055508080610c5b90611fba565b915050610bda565b5050505050565b323314610cb95760405162461bcd60e51b815260206004820152601f60248201527f5468652063616c6c657220697320616e6f7468657220636f6e74726163742e006044820152606401610ae7565b60095460ff1615610d055760405162461bcd60e51b81526020600482015260166024820152751d1a194818dbdb9d1c9858dd081a5cc81c185d5cd95960521b6044820152606401610ae7565b84600010610d555760405162461bcd60e51b815260206004820152601b60248201527f6e65656420746f206d696e74206174206c656173742031204e465400000000006044820152606401610ae7565b600754851115610d775760405162461bcd60e51b8152600401610ae790611fd3565b600654600186610d85611981565b610d8f9190612017565b610d999190611f91565b1115610de05760405162461bcd60e51b81526020600482015260166024820152751b585e08139195081b1a5b5a5d08195e18d95959195960521b6044820152606401610ae7565b3485600554610def919061202a565b1115610e325760405162461bcd60e51b8152602060048201526012602482015271696e73756666696369656e742066756e647360701b6044820152606401610ae7565b600954600090610100900460ff161515600103610f6257600a54600003610ef9576040516bffffffffffffffffffffffff193360601b16602082015260348101869052600090605401604051602081830303815290604052805190602001209050610ed485858080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600b549150849050611ac8565b610ef05760405162461bcd60e51b8152600401610ae790612041565b85915050610f67565b600a54600103610f5d57600c546000908152600e602090815260408083203384529091528120549003610f3e5760405162461bcd60e51b8152600401610ae790612041565b50600c546000908152600e602090815260408083203384529091529020545b610f67565b506008545b60095462010000900460ff16151560010361102457600c546000908152600d60209081526040808320338452909152902054610fa39082611f91565b861115610ff25760405162461bcd60e51b815260206004820152601c60248201527f6d6178204e4654207065722061646472657373206578636565646564000000006044820152606401610ae7565b600c546000908152600d602090815260408083203384529091528120805488929061101e908490612017565b90915550505b85600460008282546110369190612017565b909155505060025460405163133f311360e31b8152336004820152602481018890526001600160a01b03909116906399f9889890604401600060405180830381600087803b15801561108757600080fd5b505af115801561109b573d6000803e3d6000fd5b50505050505050505050565b60008051602061215c8339815191526110bf81611992565b50600655565b6110cd611a6e565b6110d76000611ade565b565b60008051602061215c8339815191526110f181611992565b50600455565b60008051602061215c83398151915261110f81611992565b50600b55565b60008051602061215c83398151915261112d81611992565b81158061113a5750816001145b61117e5760405162461bcd60e51b815260206004820152601560248201527420b63637bb903634b9ba103a3cb8329032b93937b960591b6044820152606401610ae7565b50600a55565b60008051602061215c83398151915261119c81611992565b5060098054911515620100000262ff000019909216919091179055565b3233146112085760405162461bcd60e51b815260206004820152601f60248201527f5468652063616c6c657220697320616e6f7468657220636f6e74726163742e006044820152606401610ae7565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a661123281611992565b60095460ff161561127e5760405162461bcd60e51b81526020600482015260166024820152751d1a194818dbdb9d1c9858dd081a5cc81c185d5cd95960521b6044820152606401610ae7565b856000106112ce5760405162461bcd60e51b815260206004820152601b60248201527f6e65656420746f206d696e74206174206c656173742031204e465400000000006044820152606401610ae7565b6007548611156112f05760405162461bcd60e51b8152600401610ae790611fd3565b6006546001876112fe611981565b6113089190612017565b6113129190611f91565b11156113595760405162461bcd60e51b81526020600482015260166024820152751b585e08139195081b1a5b5a5d08195e18d95959195960521b6044820152606401610ae7565b3486600554611368919061202a565b11156113ab5760405162461bcd60e51b8152602060048201526012602482015271696e73756666696369656e742066756e647360701b6044820152606401610ae7565b600954600090610100900460ff1615156001036114ee57600a54600003611473576040516bffffffffffffffffffffffff19606085901b1660208201526034810187905260009060540160405160208183030381529060405280519060200120905061144e86868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600b549150849050611ac8565b61146a5760405162461bcd60e51b8152600401610ae790612041565b869150506114f3565b600a546001036114e957600c546000908152600e602090815260408083206001600160a01b038716845290915281205490036114c15760405162461bcd60e51b8152600401610ae790612041565b50600c546000908152600e602090815260408083206001600160a01b03861684529091529020545b6114f3565b506008545b60095462010000900460ff1615156001036115c257600c546000908152600d602090815260408083206001600160a01b03871684529091529020546115389082611f91565b8711156115875760405162461bcd60e51b815260206004820152601c60248201527f6d6178204e4654207065722061646472657373206578636565646564000000006044820152606401610ae7565b600c546000908152600d602090815260408083206001600160a01b0387168452909152812080548992906115bc908490612017565b90915550505b86600460008282546115d49190612017565b909155505060025460405163133f311360e31b81526001600160a01b038581166004830152602482018a9052909116906399f9889890604401600060405180830381600087803b15801561162757600080fd5b505af115801561163b573d6000803e3d6000fd5b5050505050505050505050565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60008051602061215c83398151915261168b81611992565b50600755565b60008051602061215c8339815191526116a981611992565b50600855565b60008051602061215c8339815191526116c781611992565b506009805460ff1916911515919091179055565b600082815260016020819052604090912001546116f781611992565b610a768383611a07565b60008051602061215c83398151915261171981611992565b50600c55565b60008051602061215c83398151915261173781611992565b506009805491151563010000000263ff00000019909216919091179055565b61175e611a6e565b6001600160a01b0381166117c35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610ae7565b610b9081611ade565b60606109dc6001600160a01b03831660145b606060006117ed83600261202a565b6117f8906002612017565b67ffffffffffffffff81111561181057611810611ccb565b6040519080825280601f01601f19166020018201604052801561183a576020820181803683370190505b509050600360fc1b8160008151811061185557611855611fa4565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061188457611884611fa4565b60200101906001600160f81b031916908160001a90535060006118a884600261202a565b6118b3906001612017565b90505b600181111561192b576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106118e7576118e7611fa4565b1a60f81b8282815181106118fd576118fd611fa4565b60200101906001600160f81b031916908160001a90535060049490941c9361192481612078565b90506118b6565b50831561197a5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610ae7565b9392505050565b600060045460016109a69190612017565b610b908133611b2e565b6119a68282611648565b610afa5760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b611a118282611648565b15610afa5760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000546001600160a01b031633146110d75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ae7565b600082611ad58584611b87565b14949350505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b611b388282611648565b610afa57611b45816117cc565b611b508360206117de565b604051602001611b619291906120b3565b60408051601f198184030181529082905262461bcd60e51b8252610ae791600401612128565b600081815b8451811015611bcc57611bb882868381518110611bab57611bab611fa4565b6020026020010151611bd4565b915080611bc481611fba565b915050611b8c565b509392505050565b6000818310611bf057600082815260208490526040902061197a565b600083815260208390526040902061197a565b600060208284031215611c1557600080fd5b81356001600160e01b03198116811461197a57600080fd5b600060208284031215611c3f57600080fd5b8135801515811461197a57600080fd5b600060208284031215611c6157600080fd5b5035919050565b80356001600160a01b0381168114611c7f57600080fd5b919050565b600060208284031215611c9657600080fd5b61197a82611c68565b60008060408385031215611cb257600080fd5b82359150611cc260208401611c68565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611d0a57611d0a611ccb565b604052919050565b600067ffffffffffffffff821115611d2c57611d2c611ccb565b5060051b60200190565b600082601f830112611d4757600080fd5b81356020611d5c611d5783611d12565b611ce1565b82815260059290921b84018101918181019086841115611d7b57600080fd5b8286015b84811015611d965780358352918301918301611d7f565b509695505050505050565b600080600060608486031215611db657600080fd5b8335925060208085013567ffffffffffffffff80821115611dd657600080fd5b818701915087601f830112611dea57600080fd5b8135611df8611d5782611d12565b81815260059190911b8301840190848101908a831115611e1757600080fd5b938501935b82851015611e3c57611e2d85611c68565b82529385019390850190611e1c565b965050506040870135925080831115611e5457600080fd5b5050611e6286828701611d36565b9150509250925092565b60008083601f840112611e7e57600080fd5b50813567ffffffffffffffff811115611e9657600080fd5b6020830191508360208260051b8501011115611eb157600080fd5b9250929050565b600080600080600060808688031215611ed057600080fd5b8535945060208601359350604086013567ffffffffffffffff811115611ef557600080fd5b611f0188828901611e6c565b96999598509660600135949350505050565b600080600080600060808688031215611f2b57600080fd5b8535945060208601359350604086013567ffffffffffffffff811115611f5057600080fd5b611f5c88828901611e6c565b9094509250611f6f905060608701611c68565b90509295509295909350565b634e487b7160e01b600052601160045260246000fd5b818103818111156109dc576109dc611f7b565b634e487b7160e01b600052603260045260246000fd5b600060018201611fcc57611fcc611f7b565b5060010190565b60208082526024908201527f6d6178206d696e7420616d6f756e74207065722073657373696f6e20657863656040820152631959195960e21b606082015260800190565b808201808211156109dc576109dc611f7b565b80820281158282048414176109dc576109dc611f7b565b60208082526017908201527f75736572206973206e6f7420616c6c6f776c6973746564000000000000000000604082015260600190565b60008161208757612087611f7b565b506000190190565b60005b838110156120aa578181015183820152602001612092565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516120eb81601785016020880161208f565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161211c81602884016020880161208f565b01602801949350505050565b602081526000825180602084015261214781604085016020870161208f565b601f01601f1916919091016040019291505056fedf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec42a264697066735822122043e076ef99adfcae6371b08b24b70ead9a67852c221a9b0a0ac9aaaeab6fa95164736f6c63430008120033df8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec42
Deployed Bytecode
0x6080604052600436106102e25760003560e01c8063715018a611610190578063a9e2acd5116100dc578063d539139311610095578063d728312a1161006f578063d728312a146108f8578063e39e026914610918578063f2fde38b14610938578063f48824db1461095857600080fd5b8063d53913931461088e578063d547741f146108c2578063d5abeb01146108e257600080fd5b8063a9e2acd5146107be578063b5f94d06146107de578063bbb89744146107fe578063bedb86fb14610814578063c84c038714610834578063d04f32d21461084a57600080fd5b80638da5cb5b1161014957806391d148541161012357806391d14854146107535780639659867e14610773578063a217fddf14610793578063a72193b6146107a857600080fd5b80638da5cb5b146107025780638e73cf00146107205780638fc59dd81461074057600080fd5b8063715018a61461065757806373ef64fd1461066c57806378b2e3a9146106825780637b9757db146106a25780637cb64759146106c25780637ee3b2ac146106e257600080fd5b80632f2ff15d1161024f57806347705cbc116102085780635c975abb116101e25780635c975abb146105eb578063674c02aa146106055780636b1a2b7f146106245780636f8b44b01461063757600080fd5b806347705cbc1461054f578063499a15d4146105935780634e6bf204146105cb57600080fd5b80632f2ff15d146104845780633511cd54146104a457806336568abe146104e75780633ab1a494146105075780633ccfd60b1461052757806344a0d68a1461052f57600080fd5b806318160ddd116102a157806318160ddd146103d0578063248a9ca3146103e55780632a0acc6a146104165780632b4fd779146104385780632d380242146104585780632eb4a7ab1461046e57600080fd5b806285bb6f146102e75780629a9b7b1461031d57806301ffc9a71461034057806313faede6146103605780631581b6001461037657806317dc10c4146103ae575b600080fd5b3480156102f357600080fd5b50600954610308906301000000900460ff1681565b60405190151581526020015b60405180910390f35b34801561032957600080fd5b50610332610990565b604051908152602001610314565b34801561034c57600080fd5b5061030861035b366004611c03565b6109ab565b34801561036c57600080fd5b5061033260055481565b34801561038257600080fd5b50600354610396906001600160a01b031681565b6040516001600160a01b039091168152602001610314565b3480156103ba57600080fd5b506103ce6103c9366004611c2d565b6109e2565b005b3480156103dc57600080fd5b50600454610332565b3480156103f157600080fd5b50610332610400366004611c4f565b6000908152600160208190526040909120015490565b34801561042257600080fd5b5061033260008051602061215c83398151915281565b34801561044457600080fd5b506103ce610453366004611c84565b610a15565b34801561046457600080fd5b5061033260045481565b34801561047a57600080fd5b50610332600b5481565b34801561049057600080fd5b506103ce61049f366004611c9f565b610a50565b3480156104b057600080fd5b506103326104bf366004611c9f565b6000918252600d602090815260408084206001600160a01b0393909316845291905290205490565b3480156104f357600080fd5b506103ce610502366004611c9f565b610a7b565b34801561051357600080fd5b506103ce610522366004611c84565b610afe565b6103ce610b28565b34801561053b57600080fd5b506103ce61054a366004611c4f565b610b93565b34801561055b57600080fd5b5061033261056a366004611c84565b600c546000908152600d602090815260408083206001600160a01b039094168352929052205490565b34801561059f57600080fd5b506103326105ae366004611c9f565b600e60209081526000928352604080842090915290825290205481565b3480156105d757600080fd5b506103ce6105e6366004611da1565b610bb1565b3480156105f757600080fd5b506009546103089060ff1681565b34801561061157600080fd5b5060095461030890610100900460ff1681565b6103ce610632366004611eb8565b610c6a565b34801561064357600080fd5b506103ce610652366004611c4f565b6110a7565b34801561066357600080fd5b506103ce6110c5565b34801561067857600080fd5b5061033260085481565b34801561068e57600080fd5b50600254610396906001600160a01b031681565b3480156106ae57600080fd5b506103ce6106bd366004611c4f565b6110d9565b3480156106ce57600080fd5b506103ce6106dd366004611c4f565b6110f7565b3480156106ee57600080fd5b506103ce6106fd366004611c4f565b611115565b34801561070e57600080fd5b506000546001600160a01b0316610396565b34801561072c57600080fd5b506103ce61073b366004611c2d565b611184565b6103ce61074e366004611f13565b6111b9565b34801561075f57600080fd5b5061030861076e366004611c9f565b611648565b34801561077f57600080fd5b506009546103089062010000900460ff1681565b34801561079f57600080fd5b50610332600081565b3480156107b457600080fd5b50610332600a5481565b3480156107ca57600080fd5b506103ce6107d9366004611c4f565b611673565b3480156107ea57600080fd5b506103ce6107f9366004611c4f565b611691565b34801561080a57600080fd5b5061033260075481565b34801561082057600080fd5b506103ce61082f366004611c2d565b6116af565b34801561084057600080fd5b50610332600c5481565b34801561085657600080fd5b50610332610865366004611c84565b600c546000908152600e602090815260408083206001600160a01b039094168352929052205490565b34801561089a57600080fd5b506103327f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b3480156108ce57600080fd5b506103ce6108dd366004611c9f565b6116db565b3480156108ee57600080fd5b5061033260065481565b34801561090457600080fd5b506103ce610913366004611c4f565b611701565b34801561092457600080fd5b506103ce610933366004611c2d565b61171f565b34801561094457600080fd5b506103ce610953366004611c84565b611756565b34801561096457600080fd5b50610332610973366004611c9f565b600d60209081526000928352604080842090915290825290205481565b6000600161099c611981565b6109a69190611f91565b905090565b60006001600160e01b03198216637965db0b60e01b14806109dc57506301ffc9a760e01b6001600160e01b03198316145b92915050565b60008051602061215c8339815191526109fa81611992565b50600980549115156101000261ff0019909216919091179055565b60008051602061215c833981519152610a2d81611992565b50600280546001600160a01b0319166001600160a01b0392909216919091179055565b60008281526001602081905260409091200154610a6c81611992565b610a76838361199c565b505050565b6001600160a01b0381163314610af05760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b610afa8282611a07565b5050565b610b06611a6e565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b610b30611a6e565b6003546040516000916001600160a01b03169047908381818185875af1925050503d8060008114610b7d576040519150601f19603f3d011682016040523d82523d6000602084013e610b82565b606091505b5050905080610b9057600080fd5b50565b60008051602061215c833981519152610bab81611992565b50600555565b60008051602061215c833981519152610bc981611992565b8151835114610bd757600080fd5b60005b8351811015610c6357828181518110610bf557610bf5611fa4565b6020026020010151600e60008781526020019081526020016000206000868481518110610c2457610c24611fa4565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020819055508080610c5b90611fba565b915050610bda565b5050505050565b323314610cb95760405162461bcd60e51b815260206004820152601f60248201527f5468652063616c6c657220697320616e6f7468657220636f6e74726163742e006044820152606401610ae7565b60095460ff1615610d055760405162461bcd60e51b81526020600482015260166024820152751d1a194818dbdb9d1c9858dd081a5cc81c185d5cd95960521b6044820152606401610ae7565b84600010610d555760405162461bcd60e51b815260206004820152601b60248201527f6e65656420746f206d696e74206174206c656173742031204e465400000000006044820152606401610ae7565b600754851115610d775760405162461bcd60e51b8152600401610ae790611fd3565b600654600186610d85611981565b610d8f9190612017565b610d999190611f91565b1115610de05760405162461bcd60e51b81526020600482015260166024820152751b585e08139195081b1a5b5a5d08195e18d95959195960521b6044820152606401610ae7565b3485600554610def919061202a565b1115610e325760405162461bcd60e51b8152602060048201526012602482015271696e73756666696369656e742066756e647360701b6044820152606401610ae7565b600954600090610100900460ff161515600103610f6257600a54600003610ef9576040516bffffffffffffffffffffffff193360601b16602082015260348101869052600090605401604051602081830303815290604052805190602001209050610ed485858080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600b549150849050611ac8565b610ef05760405162461bcd60e51b8152600401610ae790612041565b85915050610f67565b600a54600103610f5d57600c546000908152600e602090815260408083203384529091528120549003610f3e5760405162461bcd60e51b8152600401610ae790612041565b50600c546000908152600e602090815260408083203384529091529020545b610f67565b506008545b60095462010000900460ff16151560010361102457600c546000908152600d60209081526040808320338452909152902054610fa39082611f91565b861115610ff25760405162461bcd60e51b815260206004820152601c60248201527f6d6178204e4654207065722061646472657373206578636565646564000000006044820152606401610ae7565b600c546000908152600d602090815260408083203384529091528120805488929061101e908490612017565b90915550505b85600460008282546110369190612017565b909155505060025460405163133f311360e31b8152336004820152602481018890526001600160a01b03909116906399f9889890604401600060405180830381600087803b15801561108757600080fd5b505af115801561109b573d6000803e3d6000fd5b50505050505050505050565b60008051602061215c8339815191526110bf81611992565b50600655565b6110cd611a6e565b6110d76000611ade565b565b60008051602061215c8339815191526110f181611992565b50600455565b60008051602061215c83398151915261110f81611992565b50600b55565b60008051602061215c83398151915261112d81611992565b81158061113a5750816001145b61117e5760405162461bcd60e51b815260206004820152601560248201527420b63637bb903634b9ba103a3cb8329032b93937b960591b6044820152606401610ae7565b50600a55565b60008051602061215c83398151915261119c81611992565b5060098054911515620100000262ff000019909216919091179055565b3233146112085760405162461bcd60e51b815260206004820152601f60248201527f5468652063616c6c657220697320616e6f7468657220636f6e74726163742e006044820152606401610ae7565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a661123281611992565b60095460ff161561127e5760405162461bcd60e51b81526020600482015260166024820152751d1a194818dbdb9d1c9858dd081a5cc81c185d5cd95960521b6044820152606401610ae7565b856000106112ce5760405162461bcd60e51b815260206004820152601b60248201527f6e65656420746f206d696e74206174206c656173742031204e465400000000006044820152606401610ae7565b6007548611156112f05760405162461bcd60e51b8152600401610ae790611fd3565b6006546001876112fe611981565b6113089190612017565b6113129190611f91565b11156113595760405162461bcd60e51b81526020600482015260166024820152751b585e08139195081b1a5b5a5d08195e18d95959195960521b6044820152606401610ae7565b3486600554611368919061202a565b11156113ab5760405162461bcd60e51b8152602060048201526012602482015271696e73756666696369656e742066756e647360701b6044820152606401610ae7565b600954600090610100900460ff1615156001036114ee57600a54600003611473576040516bffffffffffffffffffffffff19606085901b1660208201526034810187905260009060540160405160208183030381529060405280519060200120905061144e86868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600b549150849050611ac8565b61146a5760405162461bcd60e51b8152600401610ae790612041565b869150506114f3565b600a546001036114e957600c546000908152600e602090815260408083206001600160a01b038716845290915281205490036114c15760405162461bcd60e51b8152600401610ae790612041565b50600c546000908152600e602090815260408083206001600160a01b03861684529091529020545b6114f3565b506008545b60095462010000900460ff1615156001036115c257600c546000908152600d602090815260408083206001600160a01b03871684529091529020546115389082611f91565b8711156115875760405162461bcd60e51b815260206004820152601c60248201527f6d6178204e4654207065722061646472657373206578636565646564000000006044820152606401610ae7565b600c546000908152600d602090815260408083206001600160a01b0387168452909152812080548992906115bc908490612017565b90915550505b86600460008282546115d49190612017565b909155505060025460405163133f311360e31b81526001600160a01b038581166004830152602482018a9052909116906399f9889890604401600060405180830381600087803b15801561162757600080fd5b505af115801561163b573d6000803e3d6000fd5b5050505050505050505050565b60009182526001602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60008051602061215c83398151915261168b81611992565b50600755565b60008051602061215c8339815191526116a981611992565b50600855565b60008051602061215c8339815191526116c781611992565b506009805460ff1916911515919091179055565b600082815260016020819052604090912001546116f781611992565b610a768383611a07565b60008051602061215c83398151915261171981611992565b50600c55565b60008051602061215c83398151915261173781611992565b506009805491151563010000000263ff00000019909216919091179055565b61175e611a6e565b6001600160a01b0381166117c35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610ae7565b610b9081611ade565b60606109dc6001600160a01b03831660145b606060006117ed83600261202a565b6117f8906002612017565b67ffffffffffffffff81111561181057611810611ccb565b6040519080825280601f01601f19166020018201604052801561183a576020820181803683370190505b509050600360fc1b8160008151811061185557611855611fa4565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061188457611884611fa4565b60200101906001600160f81b031916908160001a90535060006118a884600261202a565b6118b3906001612017565b90505b600181111561192b576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106118e7576118e7611fa4565b1a60f81b8282815181106118fd576118fd611fa4565b60200101906001600160f81b031916908160001a90535060049490941c9361192481612078565b90506118b6565b50831561197a5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610ae7565b9392505050565b600060045460016109a69190612017565b610b908133611b2e565b6119a68282611648565b610afa5760008281526001602081815260408084206001600160a01b0386168086529252808420805460ff19169093179092559051339285917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9190a45050565b611a118282611648565b15610afa5760008281526001602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000546001600160a01b031633146110d75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ae7565b600082611ad58584611b87565b14949350505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b611b388282611648565b610afa57611b45816117cc565b611b508360206117de565b604051602001611b619291906120b3565b60408051601f198184030181529082905262461bcd60e51b8252610ae791600401612128565b600081815b8451811015611bcc57611bb882868381518110611bab57611bab611fa4565b6020026020010151611bd4565b915080611bc481611fba565b915050611b8c565b509392505050565b6000818310611bf057600082815260208490526040902061197a565b600083815260208390526040902061197a565b600060208284031215611c1557600080fd5b81356001600160e01b03198116811461197a57600080fd5b600060208284031215611c3f57600080fd5b8135801515811461197a57600080fd5b600060208284031215611c6157600080fd5b5035919050565b80356001600160a01b0381168114611c7f57600080fd5b919050565b600060208284031215611c9657600080fd5b61197a82611c68565b60008060408385031215611cb257600080fd5b82359150611cc260208401611c68565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611d0a57611d0a611ccb565b604052919050565b600067ffffffffffffffff821115611d2c57611d2c611ccb565b5060051b60200190565b600082601f830112611d4757600080fd5b81356020611d5c611d5783611d12565b611ce1565b82815260059290921b84018101918181019086841115611d7b57600080fd5b8286015b84811015611d965780358352918301918301611d7f565b509695505050505050565b600080600060608486031215611db657600080fd5b8335925060208085013567ffffffffffffffff80821115611dd657600080fd5b818701915087601f830112611dea57600080fd5b8135611df8611d5782611d12565b81815260059190911b8301840190848101908a831115611e1757600080fd5b938501935b82851015611e3c57611e2d85611c68565b82529385019390850190611e1c565b965050506040870135925080831115611e5457600080fd5b5050611e6286828701611d36565b9150509250925092565b60008083601f840112611e7e57600080fd5b50813567ffffffffffffffff811115611e9657600080fd5b6020830191508360208260051b8501011115611eb157600080fd5b9250929050565b600080600080600060808688031215611ed057600080fd5b8535945060208601359350604086013567ffffffffffffffff811115611ef557600080fd5b611f0188828901611e6c565b96999598509660600135949350505050565b600080600080600060808688031215611f2b57600080fd5b8535945060208601359350604086013567ffffffffffffffff811115611f5057600080fd5b611f5c88828901611e6c565b9094509250611f6f905060608701611c68565b90509295509295909350565b634e487b7160e01b600052601160045260246000fd5b818103818111156109dc576109dc611f7b565b634e487b7160e01b600052603260045260246000fd5b600060018201611fcc57611fcc611f7b565b5060010190565b60208082526024908201527f6d6178206d696e7420616d6f756e74207065722073657373696f6e20657863656040820152631959195960e21b606082015260800190565b808201808211156109dc576109dc611f7b565b80820281158282048414176109dc576109dc611f7b565b60208082526017908201527f75736572206973206e6f7420616c6c6f776c6973746564000000000000000000604082015260600190565b60008161208757612087611f7b565b506000190190565b60005b838110156120aa578181015183820152602001612092565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516120eb81601785016020880161208f565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161211c81602884016020880161208f565b01602801949350505050565b602081526000825180602084015261214781604085016020870161208f565b601f01601f1916919091016040019291505056fedf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec42a264697066735822122043e076ef99adfcae6371b08b24b70ead9a67852c221a9b0a0ac9aaaeab6fa95164736f6c63430008120033
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.