ERC-721
Overview
Max Total Supply
1,052 MANISU
Holders
173
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
4 MANISULoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
MiniAnisu
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 800 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.17; import "contract-allow-list/contracts/ERC721AntiScam/ERC721AntiScam.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; contract MiniAnisu is ERC721AntiScam, AccessControl, Pausable { // Manage bytes32 public constant ADMIN = "ADMIN"; bytes32 public constant PIEMENT = "PIEMENT"; address public withdrawAddress; // Metadata string public baseURI; string public baseExtension; // SaleInfo uint256 public salesId; uint256 public maxSupply; uint256 public mintCost; bytes32 merkleRoot; mapping(uint256 => mapping(address => uint256)) public mintedAmountBySales; // Modifier modifier enoughEth(uint256 amount) { require(msg.value >= amount * mintCost, 'Not Enough Eth'); _; } modifier withinMaxSupply(uint256 amount) { require(totalSupply() + amount <= maxSupply, 'Over Max Supply'); _; } modifier withinMaxAmountPerAddress(address _to, uint256 amount, uint256 allowedAmount) { require(mintedAmountBySales[salesId][_to] + amount <= allowedAmount, 'Over Max Amount Per Address'); _; } modifier validProof(address _to, uint256 allowedAmount, bytes32[] calldata merkleProof) { bytes32 node = keccak256(abi.encodePacked(_to, allowedAmount)); require(MerkleProof.verifyCalldata(merkleProof, merkleRoot, node), "Invalid proof"); _; } // Constructor constructor() ERC721A("miniANISU", "MANISU") { grantRole(ADMIN, msg.sender); setWithdrawAddress(msg.sender); } // AirDrop function airdrop(address[] calldata _addresses, uint256[] calldata _amounts) external onlyRole(ADMIN) { require(_addresses.length == _amounts.length, 'Invalid Arguments'); uint256 _supply = totalSupply(); for (uint256 i = 0; i < _addresses.length; i++) { uint256 _amount = _amounts[i]; if (_supply + _amount > maxSupply) continue; _mint(_addresses[i], _amount); _supply = _supply + _amount; } } // Mint function claim(uint256 _amount, uint256 _allowedAmount, bytes32[] calldata _merkleProof) external payable whenNotPaused enoughEth(_amount) withinMaxSupply(_amount) withinMaxAmountPerAddress(msg.sender, _amount, _allowedAmount) validProof(msg.sender, _allowedAmount, _merkleProof) { mintedAmountBySales[salesId][msg.sender] += _amount; _mint(msg.sender, _amount); } function piementClaim(address _to, uint256 _amount, uint256 _allowedAmount, bytes32[] calldata _merkleProof) external payable onlyRole(PIEMENT) whenNotPaused enoughEth(_amount) withinMaxSupply(_amount) withinMaxAmountPerAddress(_to, _amount, _allowedAmount) validProof(_to, _allowedAmount, _merkleProof) { mintedAmountBySales[salesId][_to] += _amount; _mint(_to, _amount); } // Getter function _startTokenId() internal view virtual override returns (uint256) { return 1; } function _baseURI() internal view virtual override returns (string memory) { return baseURI; } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { return string(abi.encodePacked(ERC721A.tokenURI(tokenId), baseExtension)); } function exists(uint256 tokenId) public view virtual returns (bool) { return _exists(tokenId); } function isTokenOwner(address _owner, uint256 _tokenId) view external returns(bool) { return ownerOf(_tokenId) == _owner; } // Setter function setWithdrawAddress(address _value) public onlyRole(ADMIN) { withdrawAddress = _value; } function setBaseURI(string memory _value) public onlyRole(ADMIN) { baseURI = _value; } function setBaseExtension(string memory _value) public onlyRole(ADMIN) { baseExtension = _value; } function resetBaseExtension() public onlyRole(ADMIN) { baseExtension = ""; } function setSalesInfo(uint256 _salesId, uint256 _maxSupply, uint256 _mintCost, bytes32 _merkleRoot) public onlyRole(ADMIN) { salesId = _salesId; maxSupply = _maxSupply; mintCost = _mintCost; merkleRoot = _merkleRoot; } function setSalesId(uint256 _value) public onlyRole(ADMIN) { salesId = _value; } function setMaxSupply(uint256 _value) public onlyRole(ADMIN) { maxSupply = _value; } function setMintCost(uint256 _value) public onlyRole(ADMIN) { mintCost = _value; } function setMerkleRoot(bytes32 _value) public onlyRole(ADMIN) { merkleRoot = _value; } // Metadata function withdraw() public onlyRole(ADMIN) { (bool os, ) = payable(withdrawAddress).call{value: address(this).balance}(""); require(os); } // Pausable function pause() public onlyRole(ADMIN) { _pause(); } function unpause() public onlyRole(ADMIN) { _unpause(); } // AccessControl function grantRole(bytes32 role, address account) public override onlyOwner { _grantRole(role, account); } function revokeRole(bytes32 role, address account) public override onlyOwner { _revokeRole(role, account); } // interface function supportsInterface(bytes4 interfaceId) public view virtual override(AccessControl, ERC721AntiScam) returns (bool) { return ERC721A.supportsInterface(interfaceId) || ERC721AntiScam.supportsInterface(interfaceId) || AccessControl.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0; import "erc721a/contracts/ERC721A.sol"; import './IERC721AntiScam.sol'; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import "../proxy/interface/IContractAllowListProxy.sol"; /// @title AntiScam機能付きERC721A /// @dev Readmeを見てください。 abstract contract ERC721AntiScam is ERC721A, IERC721AntiScam, Ownable { using EnumerableSet for EnumerableSet.AddressSet; IContractAllowListProxy public CAL; EnumerableSet.AddressSet localAllowedAddresses; /*////////////////////////////////////////////////////////////// ロック変数。トークンごとに個別ロック設定を行う //////////////////////////////////////////////////////////////*/ // token lock mapping(uint256 => LockStatus) internal _tokenLockStatus; mapping(uint256 => uint256) internal _tokenCALLevel; // wallet lock mapping(address => LockStatus) internal _walletLockStatus; mapping(address => uint256) internal _walletCALLevel; // contract lock LockStatus public contractLockStatus = LockStatus.CalLock; uint256 public CALLevel = 1; /*/////////////////////////////////////////////////////////////// ロック機能ロジック //////////////////////////////////////////////////////////////*/ function getLockStatus(uint256 tokenId) public virtual view returns (LockStatus) { require(_exists(tokenId), "AntiScam: locking query for nonexistent token"); return _getLockStatus(ownerOf(tokenId), tokenId); } function getTokenLocked(address operator, uint256 tokenId) public virtual view returns(bool isLocked) { address holder = ownerOf(tokenId); LockStatus status = _getLockStatus(holder, tokenId); uint256 level = _getCALLevel(holder, tokenId); if (status == LockStatus.CalLock) { if (ownerOf(tokenId) == msg.sender) { return false; } } else { return _getLocked(operator, status, level); } } // TODO 標準実装 function getTokensUnderLock(address to) external view returns (uint256[] memory){ return new uint256[](0); } // TODO 標準実装 function getTokensUnderLock(address to, uint256 start, uint256 end) external view returns (uint256[] memory){ return new uint256[](0); } // TODO 標準実装 function getTokensUnderLock(address holder, address to) external view returns (uint256[] memory){ return new uint256[](0); } // TODO 標準実装 function getTokensUnderLock(address holder, address to, uint256 start, uint256 end) external view returns (uint256[] memory){ return new uint256[](0); } function getLocked(address operator, address holder) public virtual view returns(bool) { LockStatus status = _getLockStatus(holder); uint256 level = _getCALLevel(holder); return _getLocked(operator, status, level); } function _getLocked(address operator, LockStatus status, uint256 level) internal virtual view returns(bool){ if (status == LockStatus.UnLock) { return false; } else if (status == LockStatus.AllLock) { return true; } else if (status == LockStatus.CalLock) { if (isLocalAllowed(operator)) { return false; } if (address(CAL) == address(0)) { return true; } if (CAL.isAllowed(operator, level)) { return false; } else { return true; } } else { revert("LockStatus is invalid"); } } function addLocalContractAllowList(address _contract) external onlyOwner { localAllowedAddresses.add(_contract); } function removeLocalContractAllowList(address _contract) external onlyOwner { localAllowedAddresses.remove(_contract); } function isLocalAllowed(address _transferer) public view returns (bool) { bool Allowed = false; if(localAllowedAddresses.contains(_transferer) == true){ Allowed = true; } return Allowed; } function _getLockStatus(address holder, uint256 tokenId) internal virtual view returns(LockStatus){ if(_tokenLockStatus[tokenId] != LockStatus.UnSet) { return _tokenLockStatus[tokenId]; } return _getLockStatus(holder); } function _getLockStatus(address holder) internal virtual view returns(LockStatus){ if(_walletLockStatus[holder] != LockStatus.UnSet) { return _walletLockStatus[holder]; } return contractLockStatus; } function _getCALLevel(address holder, uint256 tokenId) internal virtual view returns(uint256){ if(_tokenCALLevel[tokenId] > 0) { return _tokenCALLevel[tokenId]; } return _getCALLevel(holder); } function _getCALLevel(address holder) internal virtual view returns(uint256){ if(_walletCALLevel[holder] > 0) { return _walletCALLevel[holder]; } return CALLevel; } // For token lock function _lock(LockStatus status, uint256 id) internal virtual { _tokenLockStatus[id] = status; emit TokenLock(ownerOf(id), msg.sender, uint(status), id); } // For wallet lock function _setWalletLock(address to, LockStatus status) internal virtual { _walletLockStatus[to] = status; } function _setWalletCALLevel(address to ,uint256 level) internal virtual { _walletCALLevel[to] = level; } // For contract lock function setContractAllowListLevel(uint256 level) external onlyOwner{ CALLevel = level; } function setContractLockStatus(LockStatus status) external onlyOwner { require(status != LockStatus.UnSet, "AntiScam: contract lock status can not set UNSET"); contractLockStatus = status; } function setCAL(address _cal) external onlyOwner { CAL = IContractAllowListProxy(_cal); } /*/////////////////////////////////////////////////////////////// OVERRIDES //////////////////////////////////////////////////////////////*/ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { if(getLocked(operator, owner)){ return false; } return super.isApprovedForAll(owner, operator); } function setApprovalForAll(address operator, bool approved) public virtual override { require (getLocked(operator, msg.sender) == false || approved == false, "Can not approve locked token"); super.setApprovalForAll(operator, approved); } function approve(address to, uint256 tokenId) public payable virtual override { require (getTokenLocked(to, tokenId) == false, "Can not approve locked token"); super.approve(to, tokenId); } function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 /*quantity*/ ) internal virtual override { // 転送やバーンにおいては、常にstartTokenIdは TokenIDそのものとなります。 if (from != address(0)) { // トークンがロックされている場合、転送を許可しない require(getTokenLocked(to, startTokenId) == false , "LOCKED"); } } function _afterTokenTransfers( address from, address /*to*/, uint256 startTokenId, uint256 /*quantity*/ ) internal virtual override { // 転送やバーンにおいては、常にstartTokenIdは TokenIDそのものとなります。 if (from != address(0)) { // ロックをデフォルトに戻す。(デフォルトは、 contractのLock status) delete _tokenLockStatus[startTokenId]; delete _tokenCALLevel[startTokenId]; } } function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC721AntiScam).interfaceId || super.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; import "../utils/Context.sol"; import "../utils/Strings.sol"; import "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `_msgSender()` is missing `role`. * Overriding this function changes the behavior of the {onlyRole} modifier. * * Format of the revert message is described in {_checkRole}. * * _Available since v4.6._ */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(uint160(account), 20), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleGranted} event. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleRevoked} event. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. * * May emit a {RoleRevoked} event. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * May emit a {RoleGranted} event. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. * * May emit a {RoleGranted} event. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. * * May emit a {RoleRevoked} event. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { require(!paused(), "Pausable: paused"); } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { require(paused(), "Pausable: not paused"); } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Tree proofs. * * The proofs can be generated using the JavaScript library * https://github.com/miguelmota/merkletreejs[merkletreejs]. * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled. * * See `test/utils/cryptography/MerkleProof.test.js` for some examples. * * WARNING: You should avoid using leaf values that are 64 bytes long prior to * hashing, or use a hash function other than keccak256 for hashing leaves. * This is because the concatenation of a sorted pair of internal nodes in * the merkle tree could be reinterpreted as a leaf value. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Calldata version of {verify} * * _Available since v4.7._ */ function verifyCalldata( bytes32[] calldata proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProofCalldata(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Calldata version of {processProof} * * _Available since v4.7._ */ function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Returns true if the `leaves` can be proved to be a part of a Merkle tree defined by * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. * * _Available since v4.7._ */ function multiProofVerify( bytes32[] memory proof, bool[] memory proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProof(proof, proofFlags, leaves) == root; } /** * @dev Calldata version of {multiProofVerify} * * _Available since v4.7._ */ function multiProofVerifyCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProofCalldata(proof, proofFlags, leaves) == root; } /** * @dev Returns the root of a tree reconstructed from `leaves` and the sibling nodes in `proof`, * consuming from one or the other at each step according to the instructions given by * `proofFlags`. * * _Available since v4.7._ */ function processMultiProof( bytes32[] memory proof, bool[] memory proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @dev Calldata version of {processMultiProof} * * _Available since v4.7._ */ function processMultiProofCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { return a < b ? _efficientHash(a, b) : _efficientHash(b, a); } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { /// @solidity memory-safe-assembly assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721A.sol'; /** * @dev Interface of ERC721 token receiver. */ interface ERC721A__IERC721Receiver { function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } /** * @title ERC721A * * @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721) * Non-Fungible Token Standard, including the Metadata extension. * Optimized for lower gas during batch mints. * * Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...) * starting from `_startTokenId()`. * * Assumptions: * * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721A is IERC721A { // Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364). struct TokenApprovalRef { address value; } // ============================================================= // CONSTANTS // ============================================================= // Mask of an entry in packed address data. uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1; // The bit position of `numberMinted` in packed address data. uint256 private constant _BITPOS_NUMBER_MINTED = 64; // The bit position of `numberBurned` in packed address data. uint256 private constant _BITPOS_NUMBER_BURNED = 128; // The bit position of `aux` in packed address data. uint256 private constant _BITPOS_AUX = 192; // Mask of all 256 bits in packed address data except the 64 bits for `aux`. uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1; // The bit position of `startTimestamp` in packed ownership. uint256 private constant _BITPOS_START_TIMESTAMP = 160; // The bit mask of the `burned` bit in packed ownership. uint256 private constant _BITMASK_BURNED = 1 << 224; // The bit position of the `nextInitialized` bit in packed ownership. uint256 private constant _BITPOS_NEXT_INITIALIZED = 225; // The bit mask of the `nextInitialized` bit in packed ownership. uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225; // The bit position of `extraData` in packed ownership. uint256 private constant _BITPOS_EXTRA_DATA = 232; // Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`. uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1; // The mask of the lower 160 bits for addresses. uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1; // The maximum `quantity` that can be minted with {_mintERC2309}. // This limit is to prevent overflows on the address data entries. // For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309} // is required to cause an overflow, which is unrealistic. uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000; // The `Transfer` event signature is given by: // `keccak256(bytes("Transfer(address,address,uint256)"))`. bytes32 private constant _TRANSFER_EVENT_SIGNATURE = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef; // ============================================================= // STORAGE // ============================================================= // The next token ID to be minted. uint256 private _currentIndex; // The number of tokens burned. uint256 private _burnCounter; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. // See {_packedOwnershipOf} implementation for details. // // Bits Layout: // - [0..159] `addr` // - [160..223] `startTimestamp` // - [224] `burned` // - [225] `nextInitialized` // - [232..255] `extraData` mapping(uint256 => uint256) private _packedOwnerships; // Mapping owner address to address data. // // Bits Layout: // - [0..63] `balance` // - [64..127] `numberMinted` // - [128..191] `numberBurned` // - [192..255] `aux` mapping(address => uint256) private _packedAddressData; // Mapping from token ID to approved address. mapping(uint256 => TokenApprovalRef) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // ============================================================= // CONSTRUCTOR // ============================================================= constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; _currentIndex = _startTokenId(); } // ============================================================= // TOKEN COUNTING OPERATIONS // ============================================================= /** * @dev Returns the starting token ID. * To change the starting token ID, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { return 0; } /** * @dev Returns the next token ID to be minted. */ function _nextTokenId() internal view virtual returns (uint256) { return _currentIndex; } /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() public view virtual override returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than `_currentIndex - _startTokenId()` times. unchecked { return _currentIndex - _burnCounter - _startTokenId(); } } /** * @dev Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view virtual returns (uint256) { // Counter underflow is impossible as `_currentIndex` does not decrement, // and it is initialized to `_startTokenId()`. unchecked { return _currentIndex - _startTokenId(); } } /** * @dev Returns the total number of tokens burned. */ function _totalBurned() internal view virtual returns (uint256) { return _burnCounter; } // ============================================================= // ADDRESS DATA OPERATIONS // ============================================================= /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) public view virtual override returns (uint256) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return _packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { return uint64(_packedAddressData[owner] >> _BITPOS_AUX); } /** * Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal virtual { uint256 packed = _packedAddressData[owner]; uint256 auxCasted; // Cast `aux` with assembly to avoid redundant masking. assembly { auxCasted := aux } packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX); _packedAddressData[owner] = packed; } // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { // The interface IDs are constants representing the first 4 bytes // of the XOR of all function selectors in the interface. // See: [ERC165](https://eips.ethereum.org/EIPS/eip-165) // (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`) return interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165. interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721. interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata. } // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the token collection symbol. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); string memory baseURI = _baseURI(); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : ''; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, it can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ''; } // ============================================================= // OWNERSHIPS OPERATIONS // ============================================================= /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { return address(uint160(_packedOwnershipOf(tokenId))); } /** * @dev Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around over time. */ function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnershipOf(tokenId)); } /** * @dev Returns the unpacked `TokenOwnership` struct at `index`. */ function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnerships[index]); } /** * @dev Initializes the ownership slot minted at `index` for efficiency purposes. */ function _initializeOwnershipAt(uint256 index) internal virtual { if (_packedOwnerships[index] == 0) { _packedOwnerships[index] = _packedOwnershipOf(index); } } /** * Returns the packed ownership data of `tokenId`. */ function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) { uint256 curr = tokenId; unchecked { if (_startTokenId() <= curr) if (curr < _currentIndex) { uint256 packed = _packedOwnerships[curr]; // If not burned. if (packed & _BITMASK_BURNED == 0) { // Invariant: // There will always be an initialized ownership slot // (i.e. `ownership.addr != address(0) && ownership.burned == false`) // before an unintialized ownership slot // (i.e. `ownership.addr == address(0) && ownership.burned == false`) // Hence, `curr` will not underflow. // // We can directly compare the packed value. // If the address is zero, packed will be zero. while (packed == 0) { packed = _packedOwnerships[--curr]; } return packed; } } } revert OwnerQueryForNonexistentToken(); } /** * @dev Returns the unpacked `TokenOwnership` struct from `packed`. */ function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) { ownership.addr = address(uint160(packed)); ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP); ownership.burned = packed & _BITMASK_BURNED != 0; ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA); } /** * @dev Packs ownership data into a single uint256. */ function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // `owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags`. result := or(owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags)) } } /** * @dev Returns the `nextInitialized` flag set if `quantity` equals 1. */ function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) { // For branchless setting of the `nextInitialized` flag. assembly { // `(quantity == 1) << _BITPOS_NEXT_INITIALIZED`. result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1)) } } // ============================================================= // APPROVAL OPERATIONS // ============================================================= /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the * zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) public payable virtual override { address owner = ownerOf(tokenId); if (_msgSenderERC721A() != owner) if (!isApprovedForAll(owner, _msgSenderERC721A())) { revert ApprovalCallerNotOwnerNorApproved(); } _tokenApprovals[tokenId].value = to; emit Approval(owner, to, tokenId); } /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId].value; } /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} * for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool approved) public virtual override { _operatorApprovals[_msgSenderERC721A()][operator] = approved; emit ApprovalForAll(_msgSenderERC721A(), operator, approved); } /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted. See {_mint}. */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _startTokenId() <= tokenId && tokenId < _currentIndex && // If within bounds, _packedOwnerships[tokenId] & _BITMASK_BURNED == 0; // and not burned. } /** * @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`. */ function _isSenderApprovedOrOwner( address approvedAddress, address owner, address msgSender ) private pure returns (bool result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean. msgSender := and(msgSender, _BITMASK_ADDRESS) // `msgSender == owner || msgSender == approvedAddress`. result := or(eq(msgSender, owner), eq(msgSender, approvedAddress)) } } /** * @dev Returns the storage slot and value for the approved address of `tokenId`. */ function _getApprovedSlotAndAddress(uint256 tokenId) private view returns (uint256 approvedAddressSlot, address approvedAddress) { TokenApprovalRef storage tokenApproval = _tokenApprovals[tokenId]; // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId].value`. assembly { approvedAddressSlot := tokenApproval.slot approvedAddress := sload(approvedAddressSlot) } } // ============================================================= // TRANSFER OPERATIONS // ============================================================= /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) public payable virtual override { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner(); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // We can directly increment and decrement the balances. --_packedAddressData[from]; // Updates: `balance -= 1`. ++_packedAddressData[to]; // Updates: `balance += 1`. // Updates: // - `address` to the next owner. // - `startTimestamp` to the timestamp of transfering. // - `burned` to `false`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( to, _BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public payable virtual override { safeTransferFrom(from, to, tokenId, ''); } /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public payable virtual override { transferFrom(from, to, tokenId); if (to.code.length != 0) if (!_checkContractOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @dev Hook that is called before a set of serially-ordered token IDs * are about to be transferred. This includes minting. * And also called before burning one token. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token IDs * have been transferred. This includes minting. * And also called after one token has been burned. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract. * * `from` - Previous owner of the given token ID. * `to` - Target address that will receive the token. * `tokenId` - Token ID to be transferred. * `_data` - Optional data to send along with the call. * * Returns whether the call correctly returned the expected magic value. */ function _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { try ERC721A__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns ( bytes4 retval ) { return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } // ============================================================= // MINT OPERATIONS // ============================================================= /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event for each mint. */ function _mint(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // `balance` and `numberMinted` have a maximum limit of 2**64. // `tokenId` has a maximum limit of 2**256. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); uint256 toMasked; uint256 end = startTokenId + quantity; // Use assembly to loop and emit the `Transfer` event for gas savings. // The duplicated `log4` removes an extra check and reduces stack juggling. // The assembly, together with the surrounding Solidity code, have been // delicately arranged to nudge the compiler into producing optimized opcodes. assembly { // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean. toMasked := and(to, _BITMASK_ADDRESS) // Emit the `Transfer` event. log4( 0, // Start of data (0, since no data). 0, // End of data (0, since no data). _TRANSFER_EVENT_SIGNATURE, // Signature. 0, // `address(0)`. toMasked, // `to`. startTokenId // `tokenId`. ) // The `iszero(eq(,))` check ensures that large values of `quantity` // that overflows uint256 will make the loop run out of gas. // The compiler will optimize the `iszero` away for performance. for { let tokenId := add(startTokenId, 1) } iszero(eq(tokenId, end)) { tokenId := add(tokenId, 1) } { // Emit the `Transfer` event. Similar to above. log4(0, 0, _TRANSFER_EVENT_SIGNATURE, 0, toMasked, tokenId) } } if (toMasked == 0) revert MintToZeroAddress(); _currentIndex = end; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * This function is intended for efficient minting only during contract creation. * * It emits only one {ConsecutiveTransfer} as defined in * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309), * instead of a sequence of {Transfer} event(s). * * Calling this function outside of contract creation WILL make your contract * non-compliant with the ERC721 standard. * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309 * {ConsecutiveTransfer} event is only permissible during contract creation. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {ConsecutiveTransfer} event. */ function _mintERC2309(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) revert MintERC2309QuantityExceedsLimit(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are unrealistic due to the above check for `quantity` to be below the limit. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to); _currentIndex = startTokenId + quantity; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * See {_mint}. * * Emits a {Transfer} event for each mint. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal virtual { _mint(to, quantity); unchecked { if (to.code.length != 0) { uint256 end = _currentIndex; uint256 index = end - quantity; do { if (!_checkContractOnERC721Received(address(0), to, index++, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } while (index < end); // Reentrancy protection. if (_currentIndex != end) revert(); } } } /** * @dev Equivalent to `_safeMint(to, quantity, '')`. */ function _safeMint(address to, uint256 quantity) internal virtual { _safeMint(to, quantity, ''); } // ============================================================= // BURN OPERATIONS // ============================================================= /** * @dev Equivalent to `_burn(tokenId, false)`. */ function _burn(uint256 tokenId) internal virtual { _burn(tokenId, false); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId, bool approvalCheck) internal virtual { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); address from = address(uint160(prevOwnershipPacked)); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); if (approvalCheck) { // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // Updates: // - `balance -= 1`. // - `numberBurned += 1`. // // We can directly decrement the balance, and increment the number burned. // This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`. _packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1; // Updates: // - `address` to the last owner. // - `startTimestamp` to the timestamp of burning. // - `burned` to `true`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( from, (_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } // ============================================================= // EXTRA DATA OPERATIONS // ============================================================= /** * @dev Directly sets the extra data for the ownership data `index`. */ function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual { uint256 packed = _packedOwnerships[index]; if (packed == 0) revert OwnershipNotInitializedForExtraData(); uint256 extraDataCasted; // Cast `extraData` with assembly to avoid redundant masking. assembly { extraDataCasted := extraData } packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA); _packedOwnerships[index] = packed; } /** * @dev Called during each token transfer to set the 24bit `extraData` field. * Intended to be overridden by the cosumer contract. * * `previousExtraData` - the value of `extraData` before transfer. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _extraData( address from, address to, uint24 previousExtraData ) internal view virtual returns (uint24) {} /** * @dev Returns the next extra data for the packed ownership data. * The returned result is shifted into position. */ function _nextExtraData( address from, address to, uint256 prevOwnershipPacked ) private view returns (uint256) { uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA); return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA; } // ============================================================= // OTHER OPERATIONS // ============================================================= /** * @dev Returns the message sender (defaults to `msg.sender`). * * If you are writing GSN compatible contracts, you need to override this function. */ function _msgSenderERC721A() internal view virtual returns (address) { return msg.sender; } /** * @dev Converts a uint256 to its ASCII string decimal representation. */ function _toString(uint256 value) internal pure virtual returns (string memory str) { assembly { // The maximum value of a uint256 contains 78 digits (1 byte per digit), but // we allocate 0xa0 bytes to keep the free memory pointer 32-byte word aligned. // We will need 1 word for the trailing zeros padding, 1 word for the length, // and 3 words for a maximum of 78 digits. Total: 5 * 0x20 = 0xa0. let m := add(mload(0x40), 0xa0) // Update the free memory pointer to allocate. mstore(0x40, m) // Assign the `str` to the end. str := sub(m, 0x20) // Zeroize the slot after the string. mstore(str, 0) // Cache the end of the memory to calculate the length later. let end := str // We write the string from rightmost digit to leftmost digit. // The following is essentially a do-while loop that also handles the zero case. // prettier-ignore for { let temp := value } 1 {} { str := sub(str, 1) // Write the character to the pointer. // The ASCII index of the '0' character is 48. mstore8(str, add(48, mod(temp, 10))) // Keep dividing `temp` until zero. temp := div(temp, 10) // prettier-ignore if iszero(temp) { break } } let length := sub(end, str) // Move the pointer 32 bytes leftwards to make room for the length. str := sub(str, 0x20) // Store the length. mstore(str, length) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.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 anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing 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 pragma solidity >=0.8.0; /// @title IERC721AntiScam /// @dev 詐欺防止機能付きコントラクトのインターフェース /// @author hayatti.eth interface IERC721AntiScam { enum LockStatus { UnSet, UnLock, CalLock, AllLock } /** * @dev 個別ロックが指定された場合のイベント */ event TokenLock(address indexed owner, address indexed from, uint lockStatus, uint256 indexed tokenId); /** * @dev 該当トークンIDにおけるロックレベルを return で返す。 */ function getLockStatus(uint256 tokenId) external view returns (LockStatus); /** * @dev 該当トークンIDにおいて、該当コントラクトの転送が許可されているかを返す */ function getTokenLocked(address to ,uint256 tokenId) external view returns (bool); /** * @dev 該当コントラクトの転送が拒否されているトークンを全て返す */ function getTokensUnderLock(address to) external view returns (uint256[] memory); /** * @dev 該当コントラクトの転送が拒否されているstartからstopまでのトークンIDを返す */ function getTokensUnderLock(address to, uint256 start, uint256 end) external view returns (uint256[] memory); /** * @dev holderが所有するトークンのうち、該当コントラクトの転送が拒否されているトークンを全て返す */ function getTokensUnderLock(address holder, address to) external view returns (uint256[] memory); /** * @dev holderが所有するトークンのうち、該当コントラクトの転送が拒否されているstartからstopまでのトークンIDを返す */ function getTokensUnderLock(address holder, address to, uint256 start, uint256 end) external view returns (uint256[] memory); /** * @dev 該当ウォレットアドレスにおいて、該当コントラクトの転送が許可されているかを返す */ function getLocked(address to ,address holder) external view returns (bool); /** * @dev CALのリストに無い独自の許可アドレスを追加する場合、こちらにアドレスを記載する。 */ function addLocalContractAllowList(address _contract) external; /** * @dev CALのリストにある独自の許可アドレスを削除する場合、こちらにアドレスを記載する。 */ function removeLocalContractAllowList(address _contract) external; /** * @dev CALを利用する場合のCALのレベルを設定する。レベルが高いほど、許可されるコントラクトの範囲が狭い。 */ function setContractAllowListLevel(uint256 level) external; /** * @dev デフォルトでのロックレベルを指定する。 */ function setContractLockStatus(LockStatus status) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol) pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. * * [WARNING] * ==== * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable. * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. * * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet. * ==== */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastValue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastValue; // Update the index for the moved value set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { return _values(set._inner); } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.7.0 <0.9.0; interface IContractAllowListProxy { function isAllowed(address _transferer, uint256 _level) external view returns (bool); }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; /** * @dev Interface of ERC721A. */ interface IERC721A { /** * The caller must own the token or be an approved operator. */ error ApprovalCallerNotOwnerNorApproved(); /** * The token does not exist. */ error ApprovalQueryForNonexistentToken(); /** * Cannot query the balance for the zero address. */ error BalanceQueryForZeroAddress(); /** * Cannot mint to the zero address. */ error MintToZeroAddress(); /** * The quantity of tokens minted must be more than zero. */ error MintZeroQuantity(); /** * The token does not exist. */ error OwnerQueryForNonexistentToken(); /** * The caller must own the token or be an approved operator. */ error TransferCallerNotOwnerNorApproved(); /** * The token must be owned by `from`. */ error TransferFromIncorrectOwner(); /** * Cannot safely transfer to a contract that does not implement the * ERC721Receiver interface. */ error TransferToNonERC721ReceiverImplementer(); /** * Cannot transfer to the zero address. */ error TransferToZeroAddress(); /** * The token does not exist. */ error URIQueryForNonexistentToken(); /** * The `quantity` minted with ERC2309 exceeds the safety limit. */ error MintERC2309QuantityExceedsLimit(); /** * The `extraData` cannot be set on an unintialized ownership slot. */ error OwnershipNotInitializedForExtraData(); // ============================================================= // STRUCTS // ============================================================= struct TokenOwnership { // The address of the owner. address addr; // Stores the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; // Arbitrary data similar to `startTimestamp` that can be set via {_extraData}. uint24 extraData; } // ============================================================= // TOKEN COUNTERS // ============================================================= /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() external view returns (uint256); // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); // ============================================================= // IERC721 // ============================================================= /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables * (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, * checking first that contract recipients are aware of the ERC721 protocol * to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move * this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external payable; /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external payable; /** * @dev Transfers `tokenId` from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} * whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external payable; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the * zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external payable; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} * for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) external view returns (bool); // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); // ============================================================= // IERC2309 // ============================================================= /** * @dev Emitted when tokens in `fromTokenId` to `toTokenId` * (inclusive) is transferred from `from` to `to`, as defined in the * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard. * * See {_mintERC2309} for more details. */ event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to); }
// 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 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
{ "metadata": { "bytecodeHash": "none" }, "optimizer": { "enabled": true, "runs": 800 }, "viaIR": true, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"lockStatus","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"TokenLock","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"ADMIN","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CAL","outputs":[{"internalType":"contract IContractAllowListProxy","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CALLevel","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PIEMENT","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_contract","type":"address"}],"name":"addLocalContractAllowList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_addresses","type":"address[]"},{"internalType":"uint256[]","name":"_amounts","type":"uint256[]"}],"name":"airdrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseExtension","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_allowedAmount","type":"uint256"},{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"}],"name":"claim","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"contractLockStatus","outputs":[{"internalType":"enum IERC721AntiScam.LockStatus","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getLockStatus","outputs":[{"internalType":"enum IERC721AntiScam.LockStatus","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"address","name":"holder","type":"address"}],"name":"getLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getTokenLocked","outputs":[{"internalType":"bool","name":"isLocked","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"getTokensUnderLock","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"holder","type":"address"},{"internalType":"address","name":"to","type":"address"}],"name":"getTokensUnderLock","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"end","type":"uint256"}],"name":"getTokensUnderLock","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"holder","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"end","type":"uint256"}],"name":"getTokensUnderLock","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_transferer","type":"address"}],"name":"isLocalAllowed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"isTokenOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"mintedAmountBySales","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_allowedAmount","type":"uint256"},{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"}],"name":"piementClaim","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_contract","type":"address"}],"name":"removeLocalContractAllowList","outputs":[],"stateMutability":"nonpayable","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":[],"name":"resetBaseExtension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"salesId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_value","type":"string"}],"name":"setBaseExtension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_value","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_cal","type":"address"}],"name":"setCAL","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"level","type":"uint256"}],"name":"setContractAllowListLevel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum IERC721AntiScam.LockStatus","name":"status","type":"uint8"}],"name":"setContractLockStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"setMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_value","type":"bytes32"}],"name":"setMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"setMintCost","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"setSalesId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_salesId","type":"uint256"},{"internalType":"uint256","name":"_maxSupply","type":"uint256"},{"internalType":"uint256","name":"_mintCost","type":"uint256"},{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"}],"name":"setSalesInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_value","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":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060409080825234620006c7576200001881620006cc565b600981526020686d696e69414e49535560b81b8183015282516200003c81620006cc565b60068152654d414e49535560d01b8282015282516001600160401b039390919084831162000371576002918254936001928386811c96168015620006bc575b87871014620005d1578190601f9687811162000666575b508790878311600114620005fe57600092620005f2575b5050600019600383901b1c191690831b1783555b805186811162000371576003918254908482811c92168015620005e7575b88831014620005d15781878493116200057b575b508790878311600114620005145760009262000508575b505060001982841b1c191690831b1790555b600081815560088054336001600160a01b03198216811790925590916001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a360ff199160109083825416178155601182815583601354166013556420a226a4a760d91b9384600052601287528860002033600052875260ff89600020541615620004bb575b5083600052601286528760002033600052865260ff88600020541615620001fa5760138054610100600160a81b0319163360081b610100600160a81b031617905587516136bb9081620007208239f35b908792913392845195606087018781108b82111762000371578652602a87528887019486368737875115620004195760308653875183101562000419576078602189015360295b8381116200046057506200042f5790855192608084018481108c8211176200037157875260428452898401946060368737845115620004195760308653845183101562000419579190607860218601536041925b828411620003b857505050506200038757918391606795936200031c98979551988993620002f18a8601977f416363657373436f6e74726f6c3a206163636f756e742000000000000000000089525180926037880190620006e8565b8401917001034b99036b4b9b9b4b733903937b6329607d1b60378401525180936048840190620006e8565b0103602881018752601f19948591011686019686881090881117620003715760449587958662000368935262461bcd60e51b8752600487015251809281602488015287870190620006e8565b01168101030190fd5b634e487b7160e01b600052604160045260246000fd5b60648785519062461bcd60e51b8252806004830152602482015260008051602062003ddb8339815191526044820152fd5b90919293600f81168281101562000419576f181899199a1a9b1b9c1cb0b131b232b360811b901a620003eb86886200070d565b5360041c93801562000404576000190192919062000295565b82634e487b7160e01b60005260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b60648987519062461bcd60e51b8252806004830152602482015260008051602062003ddb8339815191526044820152fd5b90600f81168681101562000419576f181899199a1a9b1b9c1cb0b131b232b360811b901a62000490838b6200070d565b5360041c908015620004a6576000190162000241565b84634e487b7160e01b60005260045260246000fd5b8460005260128752886000203360005287528389600020918254161790553333857f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d600080a438620001aa565b01519050388062000106565b90859350601f1983169185600052896000209260005b8b8282106200056457505084116200054b575b505050811b01905562000118565b015160001983861b60f8161c191690553880806200053d565b83850151865589979095019493840193016200052a565b90915083600052876000208780850160051c8201928a8610620005c7575b918791869594930160051c01915b828110620005b7575050620000ef565b60008155859450879101620005a7565b9250819262000599565b634e487b7160e01b600052602260045260246000fd5b91607f1691620000db565b015190503880620000a9565b90859350601f1983169187600052896000209260005b8b8282106200064f575050841162000635575b505050811b018355620000bd565b015160001960f88460031b161c1916905538808062000627565b838501518655899790950194938401930162000614565b90915085600052876000208780850160051c8201928a8610620006b2575b918791869594930160051c01915b828110620006a257505062000092565b6000815585945087910162000692565b9250819262000684565b95607f16956200007b565b600080fd5b604081019081106001600160401b038211176200037157604052565b60005b838110620006fc5750506000910152565b8181015183820152602001620006eb565b9081518110156200041957016020019056fe60806040526004361015610013575b600080fd5b60003560e01c8063018d9b501461053b57806301ffc9a714610532578063025e332e1461052957806306fdde0314610520578063081812fc14610517578063095ea7b31461050e5780630eda8f561461050557806310c395bf146104fc5780631581b600146104f357806318160ddd146104ea57806323b872dd146104e1578063248a9ca3146104d8578063285d47ea146104cf5780632a0acc6a146104c65780632b41a368146104bd5780632f2ff15d146104b457806336568abe146104ab578063396e8f53146104a25780633ab1a494146104995780633ccfd60b146104905780633f4ba83a1461048757806342842e0e1461047e5780634e4ab122146104755780634f3db3461461046c5780634f558e7914610463578063501c9be21461045a57806355f804b3146104515780635c975abb146104485780635f1b1b861461043f5780636352211e14610436578063672434821461042d5780636c0360eb146104245780636f8b44b01461041b57806370a0823114610412578063715018a61461040957806372b44d71146104005780637cb64759146103f75780638456cb59146103ee5780638545f4ea146103e55780638978b2da146103dc5780638da5cb5b146103d3578063914374dc146103ca57806391d14854146103c157806395d89b41146103b857806398f7ceab146103af578063a217fddf146103a6578063a22cb4651461039d578063a30dd98814610394578063a86e6ee41461038b578063ae0b51df14610382578063af99415114610379578063b88d4fde14610370578063bdb4b84814610367578063c66828621461035e578063c87b56dd14610355578063d0a966e71461034c578063d547741f14610343578063d5abeb011461033a578063da3ef23f14610331578063e985e9c514610328578063eabf719c1461031f578063f2fde38b14610316578063f678fbad1461030d578063f7510ba614610304578063fb684df6146102fb5763ff768212146102f357600080fd5b61000e6122ad565b5061000e612285565b5061000e6121db565b5061000e6121b9565b5061000e6120db565b5061000e6120be565b5061000e6120a4565b5061000e611f96565b5061000e611f77565b5061000e611f46565b5061000e611df1565b5061000e611cf9565b5061000e611c51565b5061000e611c32565b5061000e611bce565b5061000e611bb2565b5061000e611a32565b5061000e611a06565b5061000e6119c2565b5061000e6118ef565b5061000e6118c8565b5061000e611888565b5061000e6117e0565b5061000e611788565b5061000e611754565b5061000e61172c565b5061000e611674565b5061000e611652565b5061000e6115f7565b5061000e6115d5565b5061000e61159e565b5061000e611541565b5061000e6114e0565b5061000e6114be565b5061000e611416565b5061000e611204565b5061000e6111a3565b5061000e611127565b5061000e611103565b5061000e610ff5565b5061000e610ed3565b5061000e610eb4565b5061000e610e95565b5061000e610e69565b5061000e610e26565b5061000e610d88565b5061000e610d45565b5061000e610cd5565b5061000e610cad565b5061000e610c08565b5061000e610b3e565b5061000e610b18565b5061000e610af4565b5061000e610aa1565b5061000e610a71565b5061000e610a5c565b5061000e610a08565b5061000e6109dd565b5061000e6109b6565b5061000e61094f565b5061000e610860565b5061000e61080a565b5061000e610728565b5061000e610687565b5061000e6105b1565b5061000e610555565b6001600160a01b0381160361000e57565b503461000e57602036600319011261000e57602061057d60043561057881610544565b612816565b6040519015158152f35b7fffffffff0000000000000000000000000000000000000000000000000000000081160361000e57565b503461000e57602036600319011261000e5761061a6004356105d281610587565b63ffffffff60e01b166301ffc9a760e01b81149081908215610676575b8215610665575b828015610640575b50821561061e575b505060405190151581529081906020820190565b0390f35b637965db0b60e01b1491508115610638575b503880610606565b905038610630565b909250637aa3e02b60e11b831490811561065d575b5091386105fe565b905038610655565b635b5e139f60e01b811492506105f6565b6380ac58cd60e01b811492506105ef565b503461000e57602036600319011261000e576001600160a01b036004356106ad81610544565b6106b561237d565b166001600160a01b03196009541617600955600080f35b60005b8381106106df5750506000910152565b81810151838201526020016106cf565b90602091610708815180928185528580860191016106cc565b601f01601f1916010190565b9060206107259281815201906106ef565b90565b503461000e5760008060031936011261080757604051908060025461074c8161131e565b808552916001918083169081156107dd5750600114610782575b61061a8561077681870382610f35565b60405191829182610714565b9250600283527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace5b8284106107c55750505081016020016107768261061a610766565b805460208587018101919091529093019281016107aa565b86955061061a9693506020925061077694915060ff191682840152151560051b8201019293610766565b80fd5b503461000e57602036600319011261000e5760043561082881613201565b1561084e57600052600660205260206001600160a01b0360406000205416604051908152f35b6040516333d1c03960e21b8152600490fd5b50604036600319011261000e5760043561087981610544565b60243561088f61088982846123d5565b15612996565b6001600160a01b0391826108a283613189565b168033036108f4575b600093838552600660205260408520921691826001600160a01b03198254161790557f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258480a480f35b6108fe338261293c565b6108ab576040516367d9dca160e11b8152600490fd5b6020908160408183019282815285518094520193019160005b82811061093b575050505090565b83518552938101939281019260010161092d565b503461000e57602036600319011261000e5761096c600435610544565b61061a61097761243e565b60405191829182610914565b6004111561098d57565b634e487b7160e01b600052602160045260246000fd5b91906020830192600482101561098d5752565b503461000e57600036600319011261000e5761061a60ff60105416604051918291826109a3565b503461000e57600036600319011261000e5760206001600160a01b0360135460081c16604051908152f35b503461000e57600036600319011261000e576000546001546040519103600019018152602090f35b606090600319011261000e57600435610a4881610544565b90602435610a5581610544565b9060443590565b50610a6f610a6936610a30565b9161323c565b005b503461000e57602036600319011261000e5760043560005260126020526020600160406000200154604051908152f35b503461000e57604036600319011261000e576020610aeb602435610ac481610544565b600435600052601a83526040600020906001600160a01b0316600052602052604060002090565b54604051908152f35b503461000e57600036600319011261000e5760206040516420a226a4a760d91b8152f35b503461000e57600036600319011261000e576020604051661412515351539560ca1b8152f35b503461000e57604036600319011261000e57600435602435610b5f81610544565b610b6761237d565b600091808352601260205260ff610b948360408620906001600160a01b0316600052602052604060002090565b541615610b9f578280f35b8083526012602052610bc78260408520906001600160a01b0316600052602052604060002090565b805460ff1916600117905533916001600160a01b0316907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8480a438808280f35b503461000e57604036600319011261000e57602435610c2681610544565b336001600160a01b03821603610c4257610a6f906004356122e4565b60405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608490fd5b503461000e57600036600319011261000e5760206001600160a01b0360095416604051908152f35b503461000e57602036600319011261000e57600435610cf381610544565b610cfb612a3b565b7fffffffffffffffffffffff0000000000000000000000000000000000000000ff74ffffffffffffffffffffffffffffffffffffffff006013549260081b16911617601355600080f35b503461000e5760008060031936011261080757610d60612a3b565b808080806001600160a01b0360135460081c1647905af1610d7f613159565b50156108075780f35b503461000e57600036600319011261000e57610da2612a3b565b60135460ff811615610de15760ff19166013557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6020604051338152a1005b60405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606490fd5b50610a6f610e3336610a30565b90604051926020840184811067ffffffffffffffff821117610e5c575b60405260008452613488565b610e64610ef5565b610e50565b503461000e57604036600319011261000e57602061057d600435610e8c81610544565b602435906123d5565b503461000e57600036600319011261000e576020601154604051908152f35b503461000e57602036600319011261000e57602061057d600435613201565b503461000e57602036600319011261000e57610eed61237d565b600435601155005b50634e487b7160e01b600052604160045260246000fd5b6020810190811067ffffffffffffffff821117610f2857604052565b610f30610ef5565b604052565b90601f8019910116810190811067ffffffffffffffff821117610f2857604052565b60209067ffffffffffffffff8111610f75575b601f01601f19160190565b610f7d610ef5565b610f6a565b929192610f8e82610f57565b91610f9c6040519384610f35565b82948184528183011161000e578281602093846000960137010152565b602060031982011261000e576004359067ffffffffffffffff821161000e578060238301121561000e5781602461072593600401359101610f82565b503461000e5761100436610fb9565b61100c612a3b565b805167ffffffffffffffff81116110f6575b6110328161102d60145461131e565b6130a2565b602080601f831160011461106f57508192600092611064575b5050600019600383901b1c191660019190911b17601455005b01519050388061104b565b90601f198316936110a260146000527fce6d7b5282bd9a3661ae061feed1dbda4e52ab073b1f9285be6e155d9c38d4ec90565b926000905b8682106110de57505083600195106110c5575b505050811b01601455005b015160001960f88460031b161c191690553880806110ba565b806001859682949686015181550195019301906110a7565b6110fe610ef5565b61101e565b503461000e57600036600319011261000e57602060ff601354166040519015158152f35b503461000e5760008060031936011261080757611142612a3b565b61114d60155461131e565b601f811161115f575b50600060155580f35b601f7f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec475910160051c8101905b8181106111985750611156565b82815560010161118b565b503461000e57602036600319011261000e5760206001600160a01b036111ca600435613189565b16604051908152f35b9181601f8401121561000e5782359167ffffffffffffffff831161000e576020808501948460051b01011161000e57565b503461000e57604036600319011261000e5767ffffffffffffffff60043581811161000e576112379036906004016111d3565b909160243590811161000e576112519036906004016111d3565b91909261125c612a3b565b8282036112d957600080546001546000199103015b83821061127a57005b6112858286886129fe565b35906112918282612a1c565b601754106112ce57816112c2916112bd6112c8946112b86112b3888b8b6129fe565b612a31565b6135d1565b612a1c565b916129e2565b90611271565b916112c891506129e2565b60405162461bcd60e51b815260206004820152601160248201527f496e76616c696420417267756d656e74730000000000000000000000000000006044820152606490fd5b90600182811c9216801561134e575b602083101461133857565b634e487b7160e01b600052602260045260246000fd5b91607f169161132d565b604051906000826014549161136c8361131e565b808352926001908181169081156113f45750600114611395575b5061139392500383610f35565b565b6014600090815291507fce6d7b5282bd9a3661ae061feed1dbda4e52ab073b1f9285be6e155d9c38d4ec5b8483106113d95750611393935050810160200138611386565b81935090816020925483858a010152019101909185926113c0565b90506020925061139394915060ff191682840152151560051b82010138611386565b503461000e5760008060031936011261080757604051908060145461143a8161131e565b808552916001918083169081156107dd57506001146114635761061a8561077681870382610f35565b9250601483527fce6d7b5282bd9a3661ae061feed1dbda4e52ab073b1f9285be6e155d9c38d4ec5b8284106114a65750505081016020016107768261061a610766565b8054602085870181019190915290930192810161148b565b503461000e57602036600319011261000e576114d8612a3b565b600435601755005b503461000e57602036600319011261000e576001600160a01b0360043561150681610544565b16801561152f576000526005602052602067ffffffffffffffff60406000205416604051908152f35b6040516323d3ad8160e21b8152600490fd5b503461000e576000806003193601126108075761155c61237d565b806001600160a01b036008546001600160a01b03198116600855167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b503461000e57602036600319011261000e57610a6f6001600160a01b036004356115c781610544565b6115cf61237d565b1661274f565b503461000e57602036600319011261000e576115ef612a3b565b600435601955005b503461000e57600036600319011261000e57611611612a3b565b611619612f4d565b600160ff1960135416176013557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586020604051338152a1005b503461000e57602036600319011261000e5761166c612a3b565b600435601855005b503461000e57602036600319011261000e5760043561169281613201565b156116c1576116b5816001600160a01b036116af61061a94613189565b16612840565b604051918291826109a3565b60405162461bcd60e51b815260206004820152602d60248201527f416e74695363616d3a206c6f636b696e6720717565727920666f72206e6f6e6560448201527f78697374656e7420746f6b656e000000000000000000000000000000000000006064820152608490fd5b503461000e57600036600319011261000e5760206001600160a01b0360085416604051908152f35b503461000e57608036600319011261000e5761176e612a3b565b600435601655602435601755604435601855606435601955005b503461000e57604036600319011261000e57602060ff6117d46024356117ad81610544565b600435600052601284526040600020906001600160a01b0316600052602052604060002090565b54166040519015158152f35b503461000e576000806003193601126108075760405190806003546118048161131e565b808552916001918083169081156107dd575060011461182d5761061a8561077681870382610f35565b9250600383527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b8284106118705750505081016020016107768261061a610766565b80546020858701810191909152909301928101611855565b503461000e57604036600319011261000e5760206004356118a881610544565b6001600160a01b03806118bc602435613189565b16906040519216148152f35b503461000e57600036600319011261000e57602060405160008152f35b8015150361000e57565b503461000e57604036600319011261000e5760043561190d81610544565b6001600160a01b0360243591611922836118e5565b61193e61192e33612892565b61193733612912565b9083612478565b1580156119ba575b61194f90612996565b336000526007602052611979816040600020906001600160a01b0316600052602052604060002090565b9215159260ff1981541660ff851617905560405192835216907f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a3005b508215611946565b503461000e57600036600319011261000e576020601654604051908152f35b604090600319011261000e576004356119f981610544565b9060243561072581610544565b503461000e57602061057d611a1a366119e1565b611a2c611a2682612892565b91612912565b91612478565b50606036600319011261000e5760243560443560043567ffffffffffffffff821161000e57611b4792611b4c611a6f611b889436906004016111d3565b611a7a969196612f4d565b611a91611a8960185487612b7f565b341015612e1d565b600096611abb885460015490036000199081898201019182910111611ba5575b6017541015612e69565b60165494858952601a602052611afe81611aeb3360408d20906001600160a01b0316600052602052604060002090565b54898101809111611b98575b1115612eb5565b6040513360601b6bffffffffffffffffffffffff1916602082019081526034820192909252611b3a81605481015b03601f198101835282610f35565b5190209160195491612f9e565b612f01565b8352601a602052611b733360408520906001600160a01b0316600052602052604060002090565b805490828201809211611b8b575b55336135d1565b80f35b611b936126d0565b611b81565b611ba06126d0565b611af7565b611bad6126d0565b611ab1565b503461000e57611bc1366119e1565b505061061a61097761243e565b50608036600319011261000e57600435611be781610544565b602435611bf381610544565b6064359167ffffffffffffffff831161000e573660238401121561000e57611c28610a6f933690602481600401359101610f82565b9160443591613488565b503461000e57600036600319011261000e576020601854604051908152f35b503461000e57600080600319360112610807576040519080601554611c758161131e565b808552916001918083169081156107dd5750600114611c9e5761061a8561077681870382610f35565b9250601583527f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec4755b828410611ce15750505081016020016107768261061a610766565b80546020858701810191909152909301928101611cc6565b503461000e57602036600319011261000e57600435611d1781613201565b15611ddf57611d24611358565b805190919060009015611dbe57506040519060a08201604052608082019060008252905b6000190190600a906030828206018353049081611d48576107769150611da6611d949161061a95611d9a611db9966080601f199485810192030181526040519586936020850190612b6c565b90612b6c565b03908101835282610f35565b611b2c6040519384926020840190612b6c565b612ffc565b60405161061a9350611db9925061077691611dd882610f0c565b8152611da6565b604051630a14c4b560e41b8152600490fd5b50608036600319011261000e57600435611e0a81610544565b60243590604435916064359167ffffffffffffffff831161000e57611b4793611efe611e3d611b889536906004016111d3565b611e48979197612b17565b611e50612f4d565b611e5f611a8960185488612b7f565b6000978894611e8a8654600154900360001990818b8201019182910111611ba5576017541015612e69565b611ecb81611eb98960406016549a8b8152601a60205220906001600160a01b0316600052602052604060002090565b548a8101809111611b98571115612eb5565b604051606088901b6bffffffffffffffffffffffff1916602082019081526034820192909252611b3a8160548101611b2c565b8452601a602052611f258160408620906001600160a01b0316600052602052604060002090565b805490838201809211611f39575b556135d1565b611f416126d0565b611f33565b503461000e57604036600319011261000e57610a6f602435611f6781610544565b611f6f61237d565b6004356122e4565b503461000e57600036600319011261000e576020601754604051908152f35b503461000e57611fa536610fb9565b611fad612a3b565b805167ffffffffffffffff8111612097575b611fd381611fce60155461131e565b613103565b602080601f831160011461201057508192600092612005575b5050600019600383901b1c191660019190911b17601555005b015190503880611fec565b90601f1983169361204360156000527f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec47590565b926000905b86821061207f5750508360019510612066575b505050811b01601555005b015160001960f88460031b161c1916905538808061205b565b80600185968294968601518155019501930190612048565b61209f610ef5565b611fbf565b503461000e57602061057d6120b8366119e1565b9061293c565b503461000e57606036600319011261000e5761096c600435610544565b503461000e57602036600319011261000e576004356120f981610544565b61210161237d565b6001600160a01b0380911690811561214e57600854826001600160a01b0319821617600855167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b60405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608490fd5b503461000e57602036600319011261000e576121d3612a3b565b600435601655005b503461000e57602036600319011261000e57600435600481101561000e5761220161237d565b801561221a5760ff801960105416911617601055600080f35b60405162461bcd60e51b815260206004820152603060248201527f416e74695363616d3a20636f6e7472616374206c6f636b20737461747573206360448201527f616e206e6f742073657420554e534554000000000000000000000000000000006064820152608490fd5b503461000e57608036600319011261000e576122a2600435610544565b61096c602435610544565b503461000e57602036600319011261000e57610a6f6001600160a01b036004356122d681610544565b6122de61237d565b16612639565b600090808252601260205260ff6123118460408520906001600160a01b0316600052602052604060002090565b541661231c57505050565b80825260126020526123448360408420906001600160a01b0316600052602052604060002090565b60ff1981541690557ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b6001600160a01b033394169280a4565b6001600160a01b0360085416330361239157565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b600092916001600160a01b0391826123ec83613189565b16612401836123fb8184612840565b926128ec565b9161240b82610983565b6002820361242e5750505061241f90613189565b16331461242857565b60009150565b9193509150610725939450612478565b60405161244a81610f0c565b60008152906000368137565b9081602091031261000e5751610725816118e5565b506040513d6000823e3d90fd5b9061248281610983565b6001810361249257505050600090565b61249b81610983565b600381036124ab57505050600190565b806124b7600292610983565b03612594576124c581612816565b61258d576124ea6124de6009546001600160a01b031690565b6001600160a01b031690565b916001600160a01b0383161561258557604051630f8350ed60e41b81526001600160a01b03929092166004830152602482015290602090829060449082905afa908115612578575b60009161254a575b501561254557600090565b600190565b61256b915060203d8111612571575b6125638183610f35565b810190612456565b3861253a565b503d612559565b61258061246b565b612532565b505050600190565b5050600090565b60405162461bcd60e51b815260206004820152601560248201527f4c6f636b53746174757320697320696e76616c696400000000000000000000006044820152606490fd5b0390fd5b50634e487b7160e01b600052603260045260246000fd5b600a5481101561262c575b600a6000527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80190600090565b6126346125dd565b6125ff565b80600052600b602052604060002054156000146126ca5780600a54680100000000000000008110156126bd575b6001810180600a558110156126b0575b7fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80155600a5490600052600b602052604060002055600190565b6126b86125dd565b612676565b6126c5610ef5565b612666565b50600090565b50634e487b7160e01b600052601160045260246000fd5b600a5480156127395760007fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a781198301928084101561272c575b600a83520155600a55565b6127346125dd565b612721565b634e487b7160e01b600052603160045260246000fd5b6000818152600b6020526040902054801561258d576000916127aa91600019808201828111612809575b600a549182019182116127fc575b8082036127b0575b50505061279a6126e7565b600052600b602052604060002090565b55600190565b61279a6127d8916127d06127c66127f3956125f4565b90549060031b1c90565b9283916125f4565b90919082549060031b600019811b9283911b16911916179055565b5538808061278f565b6128046126d0565b612787565b6128116126d0565b612779565b6001600160a01b03600091168152600b6020526001604082205415151461283a5790565b50600190565b6000828152600c60205260ff604082205416600481101561287e5761286a57506107259150612892565b6040915060ff928152600c60205220541690565b634e487b7160e01b82526021600452602482fd5b6001600160a01b0316600090808252600e60205260ff60408320541660048110156128d8576128c657505060ff6010541690565b8152600e602052604090205460ff1690565b634e487b7160e01b83526021600452602483fd5b90600052600d6020526040600020546129085761072590612912565b5060406000205490565b6001600160a01b0316600052600f6020526040600020546129335760115490565b60406000205490565b61295861294882612892565b61295183612912565b9084612478565b61258d5760ff916001600160a01b03612991921660005260076020526040600020906001600160a01b0316600052602052604060002090565b541690565b1561299d57565b60405162461bcd60e51b815260206004820152601c60248201527f43616e206e6f7420617070726f7665206c6f636b656420746f6b656e000000006044820152606490fd5b60019060001981146129f2570190565b6129fa6126d0565b0190565b9190811015612a0f575b60051b0190565b612a176125dd565b612a08565b91908201809211612a2957565b6113936126d0565b3561072581610544565b3360009081527ff25fa152a2cec3795241fc005c1ba8b066331b693df021c34bd0b948e5100728602052604090205460ff1615612a7457565b6125d96048612aff612a8533612c78565b611b2c612a90612d2d565b6040519485937f416363657373436f6e74726f6c3a206163636f756e74200000000000000000006020860152612ad08151809260206037890191016106cc565b84017f206973206d697373696e6720726f6c652000000000000000000000000000000060378201520190612b6c565b60405162461bcd60e51b815291829160048301610714565b3360009081527f33d8624f6347f4f6ef8651118b58a6baa3d596b847d09698dde4312b59e2cf00602052604090205460ff1615612b5057565b6125d96048612aff612b6133612c78565b611b2c612a90612da4565b906129fa602092828151948592016106cc565b81810292918115918404141715612a2957565b604051906080820182811067ffffffffffffffff821117612bbf575b604052604282526060366020840137565b612bc7610ef5565b612bae565b602090805115612bda570190565b6129fa6125dd565b602190805160011015612bda570190565b906020918051821015612c0557010190565b612c0d6125dd565b010190565b8015612c20575b6000190190565b612c286126d0565b612c19565b15612c3457565b606460405162461bcd60e51b815260206004820152602060248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b604051906060820182811067ffffffffffffffff821117612d20575b604052602a825260403660208401376030612cae83612bcc565b536078612cba83612be2565b536029905b60018211612cd257610725915015612c2d565b806f181899199a1a9b1b9c1cb0b131b232b360811b600f612d0d93166010811015612d13575b1a612d038486612bf3565b5360041c91612c12565b90612cbf565b612d1b6125dd565b612cf8565b612d28610ef5565b612c94565b6420a226a4a760d91b612d3e612b92565b906030612d4a83612bcc565b536078612d5683612be2565b536041905b60018211612d6e57610725915015612c2d565b806f181899199a1a9b1b9c1cb0b131b232b360811b600f612d9e93166010811015612d13571a612d038486612bf3565b90612d5b565b661412515351539560ca1b612db7612b92565b906030612dc383612bcc565b536078612dcf83612be2565b536041905b60018211612de757610725915015612c2d565b806f181899199a1a9b1b9c1cb0b131b232b360811b600f612e1793166010811015612d13571a612d038486612bf3565b90612dd4565b15612e2457565b60405162461bcd60e51b815260206004820152600e60248201527f4e6f7420456e6f756768204574680000000000000000000000000000000000006044820152606490fd5b15612e7057565b60405162461bcd60e51b815260206004820152600f60248201527f4f766572204d617820537570706c7900000000000000000000000000000000006044820152606490fd5b15612ebc57565b60405162461bcd60e51b815260206004820152601b60248201527f4f766572204d617820416d6f756e7420506572204164647265737300000000006044820152606490fd5b15612f0857565b60405162461bcd60e51b815260206004820152600d60248201527f496e76616c69642070726f6f66000000000000000000000000000000000000006044820152606490fd5b60ff60135416612f5957565b60405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606490fd5b9192916000915b808310612fb3575050501490565b909192612fc18483856129fe565b3590600082821015612fea5750600052602052612fe360406000205b936129e2565b9190612fa5565b604091612fe393825260205220612fdd565b6015546000929161300c8261131e565b91600190818116908115613078575060011461302757505050565b909192935060156000527f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec475906000915b848310613065575050500190565b8181602092548587015201920191613057565b60ff191683525050811515909102019150565b818110613096575050565b6000815560010161308b565b90601f82116130af575050565b6113939160146000527fce6d7b5282bd9a3661ae061feed1dbda4e52ab073b1f9285be6e155d9c38d4ec906020601f840160051c830193106130f9575b601f0160051c019061308b565b90915081906130ec565b90601f8211613110575050565b6113939160156000527f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec475906020601f840160051c830193106130f957601f0160051c019061308b565b3d15613184573d9061316a82610f57565b916131786040519384610f35565b82523d6000602084013e565b606090565b60008180600111156131a8575b604051636f96cda160e11b8152600490fd5b81548110156131965781526004906020918083526040928383205494600160e01b8616156131d857505050613196565b93929190935b85156131ec57505050505090565b600019018083528185528383205495506131de565b80600111159081613230575b81613216575090565b90506000526004602052600160e01b604060002054161590565b6000548110915061320d565b91909161324882613189565b6001600160a01b039081831680838316036133dc5760008581526006602052604090208054909390929061328f6001600160a01b03871633908114908614171590565b1590565b6133b8575b87169283156133a6578787956132f6926132b2886113939c8b6133ed565b61339c575b506132d5876001600160a01b03166000526005602052604060002090565b80546000190190556001600160a01b03166000526005602052604060002090565b80546001019055600160e11b804260a01b85171761331e866000526004602052604060002090565b55811615613352575b507fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4613455565b6001840161336a816000526004602052604060002090565b5415613377575b50613327565b600054811461337157613394906000526004602052604060002090565b553880613371565b60009055386132b7565b604051633a954ecd60e21b8152600490fd5b6133c561328b338861293c565b1561329457604051632ce44b5f60e11b8152600490fd5b60405162a1148160e81b8152600490fd5b9091906001600160a01b0316613401575050565b61340a916123d5565b61341057565b60405162461bcd60e51b815260206004820152600660248201527f4c4f434b454400000000000000000000000000000000000000000000000000006044820152606490fd5b6001600160a01b03166134655750565b600052600c602052604060002060ff198154169055600d60205260006040812055565b92919061349682828661323c565b803b6134a3575b50505050565b6134ac93613510565b156134ba573880808061349d565b6040516368d2bf6b60e11b8152600490fd5b9081602091031261000e575161072581610587565b909261072594936080936001600160a01b038092168452166020830152604082015281606082015201906106ef565b926020916135419360006001600160a01b03604051809781968295630a85bd0160e11b9b8c855233600486016134e1565b0393165af1600091816135a1575b5061357b5761355c613159565b80519081613576576040516368d2bf6b60e11b8152600490fd5b602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000161490565b6135c391925060203d81116135ca575b6135bb8183610f35565b8101906134cc565b903861354f565b503d6135b1565b90600090815492811561369c576135fb816001600160a01b03166000526005602052604060002090565b68010000000000000001830281540190556001600160a01b03600191169181811460e11b4260a01b17831761363a866000526004602052604060002090565b55840193817fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91808587858180a4015b85810361368d575050501561367c5755565b604051622e076360e81b8152600490fd5b8083918587858180a40161366a565b60405163b562e8dd60e01b8152600490fdfea164736f6c6343000811000a537472696e67733a20686578206c656e67746820696e73756666696369656e74
Deployed Bytecode
0x60806040526004361015610013575b600080fd5b60003560e01c8063018d9b501461053b57806301ffc9a714610532578063025e332e1461052957806306fdde0314610520578063081812fc14610517578063095ea7b31461050e5780630eda8f561461050557806310c395bf146104fc5780631581b600146104f357806318160ddd146104ea57806323b872dd146104e1578063248a9ca3146104d8578063285d47ea146104cf5780632a0acc6a146104c65780632b41a368146104bd5780632f2ff15d146104b457806336568abe146104ab578063396e8f53146104a25780633ab1a494146104995780633ccfd60b146104905780633f4ba83a1461048757806342842e0e1461047e5780634e4ab122146104755780634f3db3461461046c5780634f558e7914610463578063501c9be21461045a57806355f804b3146104515780635c975abb146104485780635f1b1b861461043f5780636352211e14610436578063672434821461042d5780636c0360eb146104245780636f8b44b01461041b57806370a0823114610412578063715018a61461040957806372b44d71146104005780637cb64759146103f75780638456cb59146103ee5780638545f4ea146103e55780638978b2da146103dc5780638da5cb5b146103d3578063914374dc146103ca57806391d14854146103c157806395d89b41146103b857806398f7ceab146103af578063a217fddf146103a6578063a22cb4651461039d578063a30dd98814610394578063a86e6ee41461038b578063ae0b51df14610382578063af99415114610379578063b88d4fde14610370578063bdb4b84814610367578063c66828621461035e578063c87b56dd14610355578063d0a966e71461034c578063d547741f14610343578063d5abeb011461033a578063da3ef23f14610331578063e985e9c514610328578063eabf719c1461031f578063f2fde38b14610316578063f678fbad1461030d578063f7510ba614610304578063fb684df6146102fb5763ff768212146102f357600080fd5b61000e6122ad565b5061000e612285565b5061000e6121db565b5061000e6121b9565b5061000e6120db565b5061000e6120be565b5061000e6120a4565b5061000e611f96565b5061000e611f77565b5061000e611f46565b5061000e611df1565b5061000e611cf9565b5061000e611c51565b5061000e611c32565b5061000e611bce565b5061000e611bb2565b5061000e611a32565b5061000e611a06565b5061000e6119c2565b5061000e6118ef565b5061000e6118c8565b5061000e611888565b5061000e6117e0565b5061000e611788565b5061000e611754565b5061000e61172c565b5061000e611674565b5061000e611652565b5061000e6115f7565b5061000e6115d5565b5061000e61159e565b5061000e611541565b5061000e6114e0565b5061000e6114be565b5061000e611416565b5061000e611204565b5061000e6111a3565b5061000e611127565b5061000e611103565b5061000e610ff5565b5061000e610ed3565b5061000e610eb4565b5061000e610e95565b5061000e610e69565b5061000e610e26565b5061000e610d88565b5061000e610d45565b5061000e610cd5565b5061000e610cad565b5061000e610c08565b5061000e610b3e565b5061000e610b18565b5061000e610af4565b5061000e610aa1565b5061000e610a71565b5061000e610a5c565b5061000e610a08565b5061000e6109dd565b5061000e6109b6565b5061000e61094f565b5061000e610860565b5061000e61080a565b5061000e610728565b5061000e610687565b5061000e6105b1565b5061000e610555565b6001600160a01b0381160361000e57565b503461000e57602036600319011261000e57602061057d60043561057881610544565b612816565b6040519015158152f35b7fffffffff0000000000000000000000000000000000000000000000000000000081160361000e57565b503461000e57602036600319011261000e5761061a6004356105d281610587565b63ffffffff60e01b166301ffc9a760e01b81149081908215610676575b8215610665575b828015610640575b50821561061e575b505060405190151581529081906020820190565b0390f35b637965db0b60e01b1491508115610638575b503880610606565b905038610630565b909250637aa3e02b60e11b831490811561065d575b5091386105fe565b905038610655565b635b5e139f60e01b811492506105f6565b6380ac58cd60e01b811492506105ef565b503461000e57602036600319011261000e576001600160a01b036004356106ad81610544565b6106b561237d565b166001600160a01b03196009541617600955600080f35b60005b8381106106df5750506000910152565b81810151838201526020016106cf565b90602091610708815180928185528580860191016106cc565b601f01601f1916010190565b9060206107259281815201906106ef565b90565b503461000e5760008060031936011261080757604051908060025461074c8161131e565b808552916001918083169081156107dd5750600114610782575b61061a8561077681870382610f35565b60405191829182610714565b9250600283527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace5b8284106107c55750505081016020016107768261061a610766565b805460208587018101919091529093019281016107aa565b86955061061a9693506020925061077694915060ff191682840152151560051b8201019293610766565b80fd5b503461000e57602036600319011261000e5760043561082881613201565b1561084e57600052600660205260206001600160a01b0360406000205416604051908152f35b6040516333d1c03960e21b8152600490fd5b50604036600319011261000e5760043561087981610544565b60243561088f61088982846123d5565b15612996565b6001600160a01b0391826108a283613189565b168033036108f4575b600093838552600660205260408520921691826001600160a01b03198254161790557f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258480a480f35b6108fe338261293c565b6108ab576040516367d9dca160e11b8152600490fd5b6020908160408183019282815285518094520193019160005b82811061093b575050505090565b83518552938101939281019260010161092d565b503461000e57602036600319011261000e5761096c600435610544565b61061a61097761243e565b60405191829182610914565b6004111561098d57565b634e487b7160e01b600052602160045260246000fd5b91906020830192600482101561098d5752565b503461000e57600036600319011261000e5761061a60ff60105416604051918291826109a3565b503461000e57600036600319011261000e5760206001600160a01b0360135460081c16604051908152f35b503461000e57600036600319011261000e576000546001546040519103600019018152602090f35b606090600319011261000e57600435610a4881610544565b90602435610a5581610544565b9060443590565b50610a6f610a6936610a30565b9161323c565b005b503461000e57602036600319011261000e5760043560005260126020526020600160406000200154604051908152f35b503461000e57604036600319011261000e576020610aeb602435610ac481610544565b600435600052601a83526040600020906001600160a01b0316600052602052604060002090565b54604051908152f35b503461000e57600036600319011261000e5760206040516420a226a4a760d91b8152f35b503461000e57600036600319011261000e576020604051661412515351539560ca1b8152f35b503461000e57604036600319011261000e57600435602435610b5f81610544565b610b6761237d565b600091808352601260205260ff610b948360408620906001600160a01b0316600052602052604060002090565b541615610b9f578280f35b8083526012602052610bc78260408520906001600160a01b0316600052602052604060002090565b805460ff1916600117905533916001600160a01b0316907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8480a438808280f35b503461000e57604036600319011261000e57602435610c2681610544565b336001600160a01b03821603610c4257610a6f906004356122e4565b60405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608490fd5b503461000e57600036600319011261000e5760206001600160a01b0360095416604051908152f35b503461000e57602036600319011261000e57600435610cf381610544565b610cfb612a3b565b7fffffffffffffffffffffff0000000000000000000000000000000000000000ff74ffffffffffffffffffffffffffffffffffffffff006013549260081b16911617601355600080f35b503461000e5760008060031936011261080757610d60612a3b565b808080806001600160a01b0360135460081c1647905af1610d7f613159565b50156108075780f35b503461000e57600036600319011261000e57610da2612a3b565b60135460ff811615610de15760ff19166013557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6020604051338152a1005b60405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606490fd5b50610a6f610e3336610a30565b90604051926020840184811067ffffffffffffffff821117610e5c575b60405260008452613488565b610e64610ef5565b610e50565b503461000e57604036600319011261000e57602061057d600435610e8c81610544565b602435906123d5565b503461000e57600036600319011261000e576020601154604051908152f35b503461000e57602036600319011261000e57602061057d600435613201565b503461000e57602036600319011261000e57610eed61237d565b600435601155005b50634e487b7160e01b600052604160045260246000fd5b6020810190811067ffffffffffffffff821117610f2857604052565b610f30610ef5565b604052565b90601f8019910116810190811067ffffffffffffffff821117610f2857604052565b60209067ffffffffffffffff8111610f75575b601f01601f19160190565b610f7d610ef5565b610f6a565b929192610f8e82610f57565b91610f9c6040519384610f35565b82948184528183011161000e578281602093846000960137010152565b602060031982011261000e576004359067ffffffffffffffff821161000e578060238301121561000e5781602461072593600401359101610f82565b503461000e5761100436610fb9565b61100c612a3b565b805167ffffffffffffffff81116110f6575b6110328161102d60145461131e565b6130a2565b602080601f831160011461106f57508192600092611064575b5050600019600383901b1c191660019190911b17601455005b01519050388061104b565b90601f198316936110a260146000527fce6d7b5282bd9a3661ae061feed1dbda4e52ab073b1f9285be6e155d9c38d4ec90565b926000905b8682106110de57505083600195106110c5575b505050811b01601455005b015160001960f88460031b161c191690553880806110ba565b806001859682949686015181550195019301906110a7565b6110fe610ef5565b61101e565b503461000e57600036600319011261000e57602060ff601354166040519015158152f35b503461000e5760008060031936011261080757611142612a3b565b61114d60155461131e565b601f811161115f575b50600060155580f35b601f7f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec475910160051c8101905b8181106111985750611156565b82815560010161118b565b503461000e57602036600319011261000e5760206001600160a01b036111ca600435613189565b16604051908152f35b9181601f8401121561000e5782359167ffffffffffffffff831161000e576020808501948460051b01011161000e57565b503461000e57604036600319011261000e5767ffffffffffffffff60043581811161000e576112379036906004016111d3565b909160243590811161000e576112519036906004016111d3565b91909261125c612a3b565b8282036112d957600080546001546000199103015b83821061127a57005b6112858286886129fe565b35906112918282612a1c565b601754106112ce57816112c2916112bd6112c8946112b86112b3888b8b6129fe565b612a31565b6135d1565b612a1c565b916129e2565b90611271565b916112c891506129e2565b60405162461bcd60e51b815260206004820152601160248201527f496e76616c696420417267756d656e74730000000000000000000000000000006044820152606490fd5b90600182811c9216801561134e575b602083101461133857565b634e487b7160e01b600052602260045260246000fd5b91607f169161132d565b604051906000826014549161136c8361131e565b808352926001908181169081156113f45750600114611395575b5061139392500383610f35565b565b6014600090815291507fce6d7b5282bd9a3661ae061feed1dbda4e52ab073b1f9285be6e155d9c38d4ec5b8483106113d95750611393935050810160200138611386565b81935090816020925483858a010152019101909185926113c0565b90506020925061139394915060ff191682840152151560051b82010138611386565b503461000e5760008060031936011261080757604051908060145461143a8161131e565b808552916001918083169081156107dd57506001146114635761061a8561077681870382610f35565b9250601483527fce6d7b5282bd9a3661ae061feed1dbda4e52ab073b1f9285be6e155d9c38d4ec5b8284106114a65750505081016020016107768261061a610766565b8054602085870181019190915290930192810161148b565b503461000e57602036600319011261000e576114d8612a3b565b600435601755005b503461000e57602036600319011261000e576001600160a01b0360043561150681610544565b16801561152f576000526005602052602067ffffffffffffffff60406000205416604051908152f35b6040516323d3ad8160e21b8152600490fd5b503461000e576000806003193601126108075761155c61237d565b806001600160a01b036008546001600160a01b03198116600855167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b503461000e57602036600319011261000e57610a6f6001600160a01b036004356115c781610544565b6115cf61237d565b1661274f565b503461000e57602036600319011261000e576115ef612a3b565b600435601955005b503461000e57600036600319011261000e57611611612a3b565b611619612f4d565b600160ff1960135416176013557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586020604051338152a1005b503461000e57602036600319011261000e5761166c612a3b565b600435601855005b503461000e57602036600319011261000e5760043561169281613201565b156116c1576116b5816001600160a01b036116af61061a94613189565b16612840565b604051918291826109a3565b60405162461bcd60e51b815260206004820152602d60248201527f416e74695363616d3a206c6f636b696e6720717565727920666f72206e6f6e6560448201527f78697374656e7420746f6b656e000000000000000000000000000000000000006064820152608490fd5b503461000e57600036600319011261000e5760206001600160a01b0360085416604051908152f35b503461000e57608036600319011261000e5761176e612a3b565b600435601655602435601755604435601855606435601955005b503461000e57604036600319011261000e57602060ff6117d46024356117ad81610544565b600435600052601284526040600020906001600160a01b0316600052602052604060002090565b54166040519015158152f35b503461000e576000806003193601126108075760405190806003546118048161131e565b808552916001918083169081156107dd575060011461182d5761061a8561077681870382610f35565b9250600383527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b8284106118705750505081016020016107768261061a610766565b80546020858701810191909152909301928101611855565b503461000e57604036600319011261000e5760206004356118a881610544565b6001600160a01b03806118bc602435613189565b16906040519216148152f35b503461000e57600036600319011261000e57602060405160008152f35b8015150361000e57565b503461000e57604036600319011261000e5760043561190d81610544565b6001600160a01b0360243591611922836118e5565b61193e61192e33612892565b61193733612912565b9083612478565b1580156119ba575b61194f90612996565b336000526007602052611979816040600020906001600160a01b0316600052602052604060002090565b9215159260ff1981541660ff851617905560405192835216907f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a3005b508215611946565b503461000e57600036600319011261000e576020601654604051908152f35b604090600319011261000e576004356119f981610544565b9060243561072581610544565b503461000e57602061057d611a1a366119e1565b611a2c611a2682612892565b91612912565b91612478565b50606036600319011261000e5760243560443560043567ffffffffffffffff821161000e57611b4792611b4c611a6f611b889436906004016111d3565b611a7a969196612f4d565b611a91611a8960185487612b7f565b341015612e1d565b600096611abb885460015490036000199081898201019182910111611ba5575b6017541015612e69565b60165494858952601a602052611afe81611aeb3360408d20906001600160a01b0316600052602052604060002090565b54898101809111611b98575b1115612eb5565b6040513360601b6bffffffffffffffffffffffff1916602082019081526034820192909252611b3a81605481015b03601f198101835282610f35565b5190209160195491612f9e565b612f01565b8352601a602052611b733360408520906001600160a01b0316600052602052604060002090565b805490828201809211611b8b575b55336135d1565b80f35b611b936126d0565b611b81565b611ba06126d0565b611af7565b611bad6126d0565b611ab1565b503461000e57611bc1366119e1565b505061061a61097761243e565b50608036600319011261000e57600435611be781610544565b602435611bf381610544565b6064359167ffffffffffffffff831161000e573660238401121561000e57611c28610a6f933690602481600401359101610f82565b9160443591613488565b503461000e57600036600319011261000e576020601854604051908152f35b503461000e57600080600319360112610807576040519080601554611c758161131e565b808552916001918083169081156107dd5750600114611c9e5761061a8561077681870382610f35565b9250601583527f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec4755b828410611ce15750505081016020016107768261061a610766565b80546020858701810191909152909301928101611cc6565b503461000e57602036600319011261000e57600435611d1781613201565b15611ddf57611d24611358565b805190919060009015611dbe57506040519060a08201604052608082019060008252905b6000190190600a906030828206018353049081611d48576107769150611da6611d949161061a95611d9a611db9966080601f199485810192030181526040519586936020850190612b6c565b90612b6c565b03908101835282610f35565b611b2c6040519384926020840190612b6c565b612ffc565b60405161061a9350611db9925061077691611dd882610f0c565b8152611da6565b604051630a14c4b560e41b8152600490fd5b50608036600319011261000e57600435611e0a81610544565b60243590604435916064359167ffffffffffffffff831161000e57611b4793611efe611e3d611b889536906004016111d3565b611e48979197612b17565b611e50612f4d565b611e5f611a8960185488612b7f565b6000978894611e8a8654600154900360001990818b8201019182910111611ba5576017541015612e69565b611ecb81611eb98960406016549a8b8152601a60205220906001600160a01b0316600052602052604060002090565b548a8101809111611b98571115612eb5565b604051606088901b6bffffffffffffffffffffffff1916602082019081526034820192909252611b3a8160548101611b2c565b8452601a602052611f258160408620906001600160a01b0316600052602052604060002090565b805490838201809211611f39575b556135d1565b611f416126d0565b611f33565b503461000e57604036600319011261000e57610a6f602435611f6781610544565b611f6f61237d565b6004356122e4565b503461000e57600036600319011261000e576020601754604051908152f35b503461000e57611fa536610fb9565b611fad612a3b565b805167ffffffffffffffff8111612097575b611fd381611fce60155461131e565b613103565b602080601f831160011461201057508192600092612005575b5050600019600383901b1c191660019190911b17601555005b015190503880611fec565b90601f1983169361204360156000527f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec47590565b926000905b86821061207f5750508360019510612066575b505050811b01601555005b015160001960f88460031b161c1916905538808061205b565b80600185968294968601518155019501930190612048565b61209f610ef5565b611fbf565b503461000e57602061057d6120b8366119e1565b9061293c565b503461000e57606036600319011261000e5761096c600435610544565b503461000e57602036600319011261000e576004356120f981610544565b61210161237d565b6001600160a01b0380911690811561214e57600854826001600160a01b0319821617600855167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b60405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608490fd5b503461000e57602036600319011261000e576121d3612a3b565b600435601655005b503461000e57602036600319011261000e57600435600481101561000e5761220161237d565b801561221a5760ff801960105416911617601055600080f35b60405162461bcd60e51b815260206004820152603060248201527f416e74695363616d3a20636f6e7472616374206c6f636b20737461747573206360448201527f616e206e6f742073657420554e534554000000000000000000000000000000006064820152608490fd5b503461000e57608036600319011261000e576122a2600435610544565b61096c602435610544565b503461000e57602036600319011261000e57610a6f6001600160a01b036004356122d681610544565b6122de61237d565b16612639565b600090808252601260205260ff6123118460408520906001600160a01b0316600052602052604060002090565b541661231c57505050565b80825260126020526123448360408420906001600160a01b0316600052602052604060002090565b60ff1981541690557ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b6001600160a01b033394169280a4565b6001600160a01b0360085416330361239157565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b600092916001600160a01b0391826123ec83613189565b16612401836123fb8184612840565b926128ec565b9161240b82610983565b6002820361242e5750505061241f90613189565b16331461242857565b60009150565b9193509150610725939450612478565b60405161244a81610f0c565b60008152906000368137565b9081602091031261000e5751610725816118e5565b506040513d6000823e3d90fd5b9061248281610983565b6001810361249257505050600090565b61249b81610983565b600381036124ab57505050600190565b806124b7600292610983565b03612594576124c581612816565b61258d576124ea6124de6009546001600160a01b031690565b6001600160a01b031690565b916001600160a01b0383161561258557604051630f8350ed60e41b81526001600160a01b03929092166004830152602482015290602090829060449082905afa908115612578575b60009161254a575b501561254557600090565b600190565b61256b915060203d8111612571575b6125638183610f35565b810190612456565b3861253a565b503d612559565b61258061246b565b612532565b505050600190565b5050600090565b60405162461bcd60e51b815260206004820152601560248201527f4c6f636b53746174757320697320696e76616c696400000000000000000000006044820152606490fd5b0390fd5b50634e487b7160e01b600052603260045260246000fd5b600a5481101561262c575b600a6000527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80190600090565b6126346125dd565b6125ff565b80600052600b602052604060002054156000146126ca5780600a54680100000000000000008110156126bd575b6001810180600a558110156126b0575b7fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80155600a5490600052600b602052604060002055600190565b6126b86125dd565b612676565b6126c5610ef5565b612666565b50600090565b50634e487b7160e01b600052601160045260246000fd5b600a5480156127395760007fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a781198301928084101561272c575b600a83520155600a55565b6127346125dd565b612721565b634e487b7160e01b600052603160045260246000fd5b6000818152600b6020526040902054801561258d576000916127aa91600019808201828111612809575b600a549182019182116127fc575b8082036127b0575b50505061279a6126e7565b600052600b602052604060002090565b55600190565b61279a6127d8916127d06127c66127f3956125f4565b90549060031b1c90565b9283916125f4565b90919082549060031b600019811b9283911b16911916179055565b5538808061278f565b6128046126d0565b612787565b6128116126d0565b612779565b6001600160a01b03600091168152600b6020526001604082205415151461283a5790565b50600190565b6000828152600c60205260ff604082205416600481101561287e5761286a57506107259150612892565b6040915060ff928152600c60205220541690565b634e487b7160e01b82526021600452602482fd5b6001600160a01b0316600090808252600e60205260ff60408320541660048110156128d8576128c657505060ff6010541690565b8152600e602052604090205460ff1690565b634e487b7160e01b83526021600452602483fd5b90600052600d6020526040600020546129085761072590612912565b5060406000205490565b6001600160a01b0316600052600f6020526040600020546129335760115490565b60406000205490565b61295861294882612892565b61295183612912565b9084612478565b61258d5760ff916001600160a01b03612991921660005260076020526040600020906001600160a01b0316600052602052604060002090565b541690565b1561299d57565b60405162461bcd60e51b815260206004820152601c60248201527f43616e206e6f7420617070726f7665206c6f636b656420746f6b656e000000006044820152606490fd5b60019060001981146129f2570190565b6129fa6126d0565b0190565b9190811015612a0f575b60051b0190565b612a176125dd565b612a08565b91908201809211612a2957565b6113936126d0565b3561072581610544565b3360009081527ff25fa152a2cec3795241fc005c1ba8b066331b693df021c34bd0b948e5100728602052604090205460ff1615612a7457565b6125d96048612aff612a8533612c78565b611b2c612a90612d2d565b6040519485937f416363657373436f6e74726f6c3a206163636f756e74200000000000000000006020860152612ad08151809260206037890191016106cc565b84017f206973206d697373696e6720726f6c652000000000000000000000000000000060378201520190612b6c565b60405162461bcd60e51b815291829160048301610714565b3360009081527f33d8624f6347f4f6ef8651118b58a6baa3d596b847d09698dde4312b59e2cf00602052604090205460ff1615612b5057565b6125d96048612aff612b6133612c78565b611b2c612a90612da4565b906129fa602092828151948592016106cc565b81810292918115918404141715612a2957565b604051906080820182811067ffffffffffffffff821117612bbf575b604052604282526060366020840137565b612bc7610ef5565b612bae565b602090805115612bda570190565b6129fa6125dd565b602190805160011015612bda570190565b906020918051821015612c0557010190565b612c0d6125dd565b010190565b8015612c20575b6000190190565b612c286126d0565b612c19565b15612c3457565b606460405162461bcd60e51b815260206004820152602060248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b604051906060820182811067ffffffffffffffff821117612d20575b604052602a825260403660208401376030612cae83612bcc565b536078612cba83612be2565b536029905b60018211612cd257610725915015612c2d565b806f181899199a1a9b1b9c1cb0b131b232b360811b600f612d0d93166010811015612d13575b1a612d038486612bf3565b5360041c91612c12565b90612cbf565b612d1b6125dd565b612cf8565b612d28610ef5565b612c94565b6420a226a4a760d91b612d3e612b92565b906030612d4a83612bcc565b536078612d5683612be2565b536041905b60018211612d6e57610725915015612c2d565b806f181899199a1a9b1b9c1cb0b131b232b360811b600f612d9e93166010811015612d13571a612d038486612bf3565b90612d5b565b661412515351539560ca1b612db7612b92565b906030612dc383612bcc565b536078612dcf83612be2565b536041905b60018211612de757610725915015612c2d565b806f181899199a1a9b1b9c1cb0b131b232b360811b600f612e1793166010811015612d13571a612d038486612bf3565b90612dd4565b15612e2457565b60405162461bcd60e51b815260206004820152600e60248201527f4e6f7420456e6f756768204574680000000000000000000000000000000000006044820152606490fd5b15612e7057565b60405162461bcd60e51b815260206004820152600f60248201527f4f766572204d617820537570706c7900000000000000000000000000000000006044820152606490fd5b15612ebc57565b60405162461bcd60e51b815260206004820152601b60248201527f4f766572204d617820416d6f756e7420506572204164647265737300000000006044820152606490fd5b15612f0857565b60405162461bcd60e51b815260206004820152600d60248201527f496e76616c69642070726f6f66000000000000000000000000000000000000006044820152606490fd5b60ff60135416612f5957565b60405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606490fd5b9192916000915b808310612fb3575050501490565b909192612fc18483856129fe565b3590600082821015612fea5750600052602052612fe360406000205b936129e2565b9190612fa5565b604091612fe393825260205220612fdd565b6015546000929161300c8261131e565b91600190818116908115613078575060011461302757505050565b909192935060156000527f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec475906000915b848310613065575050500190565b8181602092548587015201920191613057565b60ff191683525050811515909102019150565b818110613096575050565b6000815560010161308b565b90601f82116130af575050565b6113939160146000527fce6d7b5282bd9a3661ae061feed1dbda4e52ab073b1f9285be6e155d9c38d4ec906020601f840160051c830193106130f9575b601f0160051c019061308b565b90915081906130ec565b90601f8211613110575050565b6113939160156000527f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec475906020601f840160051c830193106130f957601f0160051c019061308b565b3d15613184573d9061316a82610f57565b916131786040519384610f35565b82523d6000602084013e565b606090565b60008180600111156131a8575b604051636f96cda160e11b8152600490fd5b81548110156131965781526004906020918083526040928383205494600160e01b8616156131d857505050613196565b93929190935b85156131ec57505050505090565b600019018083528185528383205495506131de565b80600111159081613230575b81613216575090565b90506000526004602052600160e01b604060002054161590565b6000548110915061320d565b91909161324882613189565b6001600160a01b039081831680838316036133dc5760008581526006602052604090208054909390929061328f6001600160a01b03871633908114908614171590565b1590565b6133b8575b87169283156133a6578787956132f6926132b2886113939c8b6133ed565b61339c575b506132d5876001600160a01b03166000526005602052604060002090565b80546000190190556001600160a01b03166000526005602052604060002090565b80546001019055600160e11b804260a01b85171761331e866000526004602052604060002090565b55811615613352575b507fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4613455565b6001840161336a816000526004602052604060002090565b5415613377575b50613327565b600054811461337157613394906000526004602052604060002090565b553880613371565b60009055386132b7565b604051633a954ecd60e21b8152600490fd5b6133c561328b338861293c565b1561329457604051632ce44b5f60e11b8152600490fd5b60405162a1148160e81b8152600490fd5b9091906001600160a01b0316613401575050565b61340a916123d5565b61341057565b60405162461bcd60e51b815260206004820152600660248201527f4c4f434b454400000000000000000000000000000000000000000000000000006044820152606490fd5b6001600160a01b03166134655750565b600052600c602052604060002060ff198154169055600d60205260006040812055565b92919061349682828661323c565b803b6134a3575b50505050565b6134ac93613510565b156134ba573880808061349d565b6040516368d2bf6b60e11b8152600490fd5b9081602091031261000e575161072581610587565b909261072594936080936001600160a01b038092168452166020830152604082015281606082015201906106ef565b926020916135419360006001600160a01b03604051809781968295630a85bd0160e11b9b8c855233600486016134e1565b0393165af1600091816135a1575b5061357b5761355c613159565b80519081613576576040516368d2bf6b60e11b8152600490fd5b602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000161490565b6135c391925060203d81116135ca575b6135bb8183610f35565b8101906134cc565b903861354f565b503d6135b1565b90600090815492811561369c576135fb816001600160a01b03166000526005602052604060002090565b68010000000000000001830281540190556001600160a01b03600191169181811460e11b4260a01b17831761363a866000526004602052604060002090565b55840193817fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91808587858180a4015b85810361368d575050501561367c5755565b604051622e076360e81b8152600490fd5b8083918587858180a40161366a565b60405163b562e8dd60e01b8152600490fdfea164736f6c6343000811000a
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.