ERC-721
Overview
Max Total Supply
275 DARBOTZ
Holders
79
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
3 DARBOTZLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
Darbotz
Compiler Version
v0.8.16+commit.07a7930e
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.16; import "./ERC721ACustom.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; contract Darbotz is ERC721A, Pausable, ReentrancyGuard, Ownable { using Strings for uint256; bytes32 public ogMerkleRoot; bytes32 public wlMerkleRoot; bytes32 public teamMerkleRoot; bytes32 public team2MerkleRoot; IERC721 public token1; string public baseURI; address public treasury; mapping(address => walletMintData) public addressTokenMintData; mapping(address => bool) public adminAddresses; mapping(address => uint256) public teamMintsClaimed; modifier onlyAdminOrOwner() { bool isAdmin = false; if (adminAddresses[msg.sender] == true) { isAdmin = true; } if (msg.sender == owner()) { isAdmin = true; } require(isAdmin == true, "Not an admin"); _; } struct SaleConfig { bool sale; bool dtcPhase; uint256 teamPrice; uint256 ogPrice; uint256 whitelistPrice; uint256 price; uint256 maxSupply; uint256 publicReserve; uint256 maxPublicMint; uint256 publicSupply; } SaleConfig public saleConfig; struct walletMintData { uint256 team; uint256 free; uint256 og; uint256 whitelist; uint256 publ; uint256 maxFreeMint; uint256 maxTeamMint; uint256 maxOGMint; uint256 maxWhitelistMint; uint256 maxPublicMint; bool maxMintsUpdated; } constructor( IERC721 _token1, uint256 _maxSupply, uint256 _publicReserve, uint256 _publicSupply, uint256 _maxPublicMint, bool _sale, bool _dtcPhase, bytes32 _teamMerkleRoot, bytes32 _ogMerkleRoot, bytes32 _wlMerkleRoot, bytes32 _team2MerkleRoot, address _treasury ) payable ERC721A("Darbotz", "DARBOTZ") { token1 = IERC721(_token1); saleConfig.maxSupply = _maxSupply; saleConfig.price = 0.069 ether; saleConfig.ogPrice = 0.0621 ether; saleConfig.whitelistPrice = 0.0655 ether; saleConfig.teamPrice = 0 ether; saleConfig.sale = _sale; saleConfig.dtcPhase = _dtcPhase; saleConfig.maxPublicMint = _maxPublicMint; saleConfig.publicReserve = _publicReserve; saleConfig.publicSupply = _publicSupply; teamMerkleRoot = _teamMerkleRoot; team2MerkleRoot = _team2MerkleRoot; ogMerkleRoot = _ogMerkleRoot; wlMerkleRoot = _wlMerkleRoot; treasury = _treasury; _safeMint(treasury, 140); } function dtcMint(uint256 _amount, bytes32[] calldata _merkleProof) public payable nonReentrant whenNotPaused { bytes32 leaf = keccak256(abi.encodePacked(msg.sender)); SaleConfig memory _saleConfig = saleConfig; uint256 _totalPrice; uint256 _mints; uint256 _maxSupply = saleConfig.maxSupply; uint256 _publicSupply = saleConfig.publicSupply; uint256 _token1Amount = token1.balanceOf(msg.sender); bool _isTeam = MerkleProof.verify(_merkleProof, teamMerkleRoot, leaf); bool _isOG = MerkleProof.verify(_merkleProof, ogMerkleRoot, leaf); bool _isWhitelist = MerkleProof.verify( _merkleProof, wlMerkleRoot, leaf ); require(saleConfig.sale == true, "Minting has not sarted yet"); require(isDTC(msg.sender, _merkleProof) == true, "Not part of DTC"); require(saleConfig.dtcPhase == true, "DTC sale not live"); require( totalSupply() + _amount <= saleConfig.maxSupply, "Cannot mint more than max supply" ); require( tx.origin == msg.sender, "Cannot mint through a custom contract" ); require(_amount > 0, "Negative values not allowed"); if (addressTokenMintData[msg.sender].maxMintsUpdated == false) { if (_token1Amount > 0) { for (uint256 i = 0; i < _token1Amount; i++) { addressTokenMintData[msg.sender].maxOGMint += 3; addressTokenMintData[msg.sender].maxWhitelistMint += 2; } } if (_isOG == true && _token1Amount == 0) { addressTokenMintData[msg.sender].maxOGMint += 3; } if (_isWhitelist == true && _token1Amount == 0) { addressTokenMintData[msg.sender].maxWhitelistMint += 2; } addressTokenMintData[msg.sender].maxMintsUpdated = true; } while (_mints < _amount) { if (_mints + totalSupply() == _maxSupply) { break; } else if ( _isTeam == true && addressTokenMintData[msg.sender].team < addressTokenMintData[msg.sender].maxTeamMint ) { unchecked { addressTokenMintData[msg.sender].team++; addressTokenMintData[msg.sender].free++; _mints++; } } else if ( _token1Amount > 0 && addressTokenMintData[msg.sender].og < addressTokenMintData[msg.sender].maxOGMint ) { _totalPrice += _saleConfig.ogPrice; unchecked { addressTokenMintData[msg.sender].og++; _mints++; } } else if ( _token1Amount > 0 && addressTokenMintData[msg.sender].whitelist < addressTokenMintData[msg.sender].maxWhitelistMint ) { require( _publicSupply < saleConfig.publicReserve, "Public Supply Over Allocated" ); _totalPrice += _saleConfig.whitelistPrice; unchecked { addressTokenMintData[msg.sender].whitelist++; _mints++; _publicSupply++; } } else if ( _isOG == true && addressTokenMintData[msg.sender].og < addressTokenMintData[msg.sender].maxOGMint ) { _totalPrice += _saleConfig.ogPrice; unchecked { addressTokenMintData[msg.sender].og++; _mints++; } } else if ( _isWhitelist == true && addressTokenMintData[msg.sender].whitelist < addressTokenMintData[msg.sender].maxWhitelistMint ) { require( _publicSupply < saleConfig.publicReserve, "Public Supply Over Allocated" ); _totalPrice += _saleConfig.whitelistPrice; unchecked { addressTokenMintData[msg.sender].whitelist++; _mints++; _publicSupply++; } } else if ( addressTokenMintData[msg.sender].publ < saleConfig.maxPublicMint ) { require( _publicSupply < saleConfig.publicReserve, "Public Supply Over Allocated" ); _totalPrice += _saleConfig.price; unchecked { addressTokenMintData[msg.sender].publ++; _mints++; _publicSupply++; } } } require(msg.value >= _totalPrice, "insufficient funds"); payable(treasury).transfer(msg.value); saleConfig.publicSupply = _publicSupply; _safeMint(msg.sender, _amount); } function mint(uint256 _amount) external payable nonReentrant whenNotPaused { require(saleConfig.dtcPhase == false, "Public mint not started"); require( totalSupply() + _amount <= saleConfig.maxSupply, "Cannot mint more than max supply" ); require( msg.value >= (saleConfig.price * _amount), "Insufficient funds" ); require( addressTokenMintData[msg.sender].publ + _amount <= saleConfig.maxPublicMint, "Cannot mint more than 20 public per address" ); payable(treasury).transfer(msg.value); unchecked { addressTokenMintData[msg.sender].publ += _amount; } _safeMint(msg.sender, _amount); } function teamMint(uint32 _amount, bytes32[] calldata _merkleProof) external payable nonReentrant whenNotPaused { bytes32 leaf = keccak256(abi.encodePacked(msg.sender)); require( totalSupply() + _amount <= saleConfig.maxSupply, "Cannot mint more than max supply" ); require( MerkleProof.verify(_merkleProof, team2MerkleRoot, leaf) == true, "Incorrect merkleProof" ); require( addressTokenMintData[msg.sender].team < addressTokenMintData[msg.sender].maxTeamMint, "Max amount per wallet already minted" ); addressTokenMintData[msg.sender].team += _amount; _safeMint(msg.sender, _amount); } function isDTC(address _wallet, bytes32[] calldata _merkleProof) public view returns (bool result) { bytes32 leaf = keccak256(abi.encodePacked(_wallet)); bool _isTeam = MerkleProof.verify(_merkleProof, teamMerkleRoot, leaf); bool _isOG = MerkleProof.verify(_merkleProof, ogMerkleRoot, leaf); bool _isWhitelist = MerkleProof.verify( _merkleProof, wlMerkleRoot, leaf ); if ( _isTeam == true || _isOG == true || _isWhitelist == true || token1.balanceOf(_wallet) > 0 ) { return true; } } struct holderMaxMints { uint128 ogMints; uint256 wlMints; } function getHolderMaxMints(address _wallet) external view returns (holderMaxMints memory) { holderMaxMints memory _holderMaxMints; for (uint256 i = 0; i < token1.balanceOf(_wallet); i++) { _holderMaxMints.ogMints += 3; _holderMaxMints.wlMints += 2; } return _holderMaxMints; } function _baseURI() internal view virtual override returns (string memory) { return baseURI; } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require( _exists(tokenId), "ERC721Metadata: URI query for nonexistant token" ); string memory currentBaseURI = _baseURI(); return bytes(currentBaseURI).length > 0 ? string(abi.encodePacked(currentBaseURI, tokenId.toString())) : ""; } struct tokens { uint256 token1; } function getTotalTokens(address _wallet) public view returns (tokens memory) { tokens memory _tokens; if (token1.balanceOf(_wallet) > 0) { _tokens.token1 = token1.balanceOf(_wallet); } return _tokens; } function getBalance() public view returns (uint256) { return address(this).balance; } // ---------------------------------Admin functions------------------------------------- function setAdminAddresses(address[] calldata _wallets) external onlyAdminOrOwner { for (uint256 i = 0; i < _wallets.length; i++) { adminAddresses[_wallets[i]] = true; } } function removeAdminAddresses(address[] calldata _wallets) external onlyAdminOrOwner { for (uint256 i = 0; i < _wallets.length; i++) { adminAddresses[_wallets[i]] = false; } } function setBaseURI(string memory _newBaseURI) external onlyAdminOrOwner { baseURI = _newBaseURI; } function setPublicReserve(uint16 _newReserve) external onlyAdminOrOwner { require( _newReserve <= saleConfig.maxSupply, "Cannot set public reserve higher than max supply" ); saleConfig.publicReserve = _newReserve; } function toggleSale() public onlyAdminOrOwner { saleConfig.sale = !saleConfig.sale; } function burnToken(uint256 _tokenId) external onlyAdminOrOwner { address owner = ERC721A.ownerOf(_tokenId); require(owner == msg.sender, "Not the owner of this token"); super._burn(_tokenId); } function pauseContract() public onlyAdminOrOwner { _pause(); } function unpauseContract() public onlyAdminOrOwner { _unpause(); } function releaseDTCReserve() external onlyAdminOrOwner { saleConfig.publicReserve = 3333; saleConfig.dtcPhase = false; } function setMaxSupply(uint256 _newMaxSupply) external onlyAdminOrOwner { saleConfig.maxSupply = _newMaxSupply; } function setTeamMerkleRoot(bytes32 _newTeamMerkleRoot) external onlyAdminOrOwner { teamMerkleRoot = _newTeamMerkleRoot; } function setTeam2MerkleRoot(bytes32 _newTeam2MerkleRoot) external onlyAdminOrOwner { team2MerkleRoot = _newTeam2MerkleRoot; } function setOGMerkleRoot(bytes32 _newOGMerkleRoot) external onlyAdminOrOwner { ogMerkleRoot = _newOGMerkleRoot; } function setWhitelistMerkleRoot(bytes32 _newWhitelistMerkleRoot) external onlyAdminOrOwner { wlMerkleRoot = _newWhitelistMerkleRoot; } function setTreasuryAddress(address _treasury) external onlyAdminOrOwner { treasury = _treasury; } function setTeamMaxFreeMints( address[] calldata _wallets, uint8[] calldata _maxFreeMints ) external onlyAdminOrOwner { require( _wallets.length == _maxFreeMints.length, "Unmatching array lengths" ); for (uint256 i = 0; i < _wallets.length; i++) { addressTokenMintData[_wallets[i]].maxTeamMint = _maxFreeMints[i]; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Tree proofs. * * The proofs can be generated using the JavaScript library * https://github.com/miguelmota/merkletreejs[merkletreejs]. * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled. * * See `test/utils/cryptography/MerkleProof.test.js` for some examples. * * WARNING: You should avoid using leaf values that are 64 bytes long prior to * hashing, or use a hash function other than keccak256 for hashing leaves. * This is because the concatenation of a sorted pair of internal nodes in * the merkle tree could be reinterpreted as a leaf value. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Calldata version of {verify} * * _Available since v4.7._ */ function verifyCalldata( bytes32[] calldata proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProofCalldata(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Calldata version of {processProof} * * _Available since v4.7._ */ function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Returns true if the `leaves` can be proved to be a part of a Merkle tree defined by * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. * * _Available since v4.7._ */ function multiProofVerify( bytes32[] memory proof, bool[] memory proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProof(proof, proofFlags, leaves) == root; } /** * @dev Calldata version of {multiProofVerify} * * _Available since v4.7._ */ function multiProofVerifyCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProofCalldata(proof, proofFlags, leaves) == root; } /** * @dev Returns the root of a tree reconstructed from `leaves` and the sibling nodes in `proof`, * consuming from one or the other at each step according to the instructions given by * `proofFlags`. * * _Available since v4.7._ */ function processMultiProof( bytes32[] memory proof, bool[] memory proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @dev Calldata version of {processMultiProof} * * _Available since v4.7._ */ function processMultiProofCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { return a < b ? _efficientHash(a, b) : _efficientHash(b, a); } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { /// @solidity memory-safe-assembly assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (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 v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (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 // ERC721A Contracts v4.2.2 // 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 1; } /** * @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 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 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 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 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`. ) 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 // ERC721A Contracts v4.2.2 // 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; /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @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; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the * zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} * for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) external view returns (bool); // ============================================================= // 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/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts 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; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract IERC721","name":"_token1","type":"address"},{"internalType":"uint256","name":"_maxSupply","type":"uint256"},{"internalType":"uint256","name":"_publicReserve","type":"uint256"},{"internalType":"uint256","name":"_publicSupply","type":"uint256"},{"internalType":"uint256","name":"_maxPublicMint","type":"uint256"},{"internalType":"bool","name":"_sale","type":"bool"},{"internalType":"bool","name":"_dtcPhase","type":"bool"},{"internalType":"bytes32","name":"_teamMerkleRoot","type":"bytes32"},{"internalType":"bytes32","name":"_ogMerkleRoot","type":"bytes32"},{"internalType":"bytes32","name":"_wlMerkleRoot","type":"bytes32"},{"internalType":"bytes32","name":"_team2MerkleRoot","type":"bytes32"},{"internalType":"address","name":"_treasury","type":"address"}],"stateMutability":"payable","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":"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":[{"internalType":"address","name":"","type":"address"}],"name":"addressTokenMintData","outputs":[{"internalType":"uint256","name":"team","type":"uint256"},{"internalType":"uint256","name":"free","type":"uint256"},{"internalType":"uint256","name":"og","type":"uint256"},{"internalType":"uint256","name":"whitelist","type":"uint256"},{"internalType":"uint256","name":"publ","type":"uint256"},{"internalType":"uint256","name":"maxFreeMint","type":"uint256"},{"internalType":"uint256","name":"maxTeamMint","type":"uint256"},{"internalType":"uint256","name":"maxOGMint","type":"uint256"},{"internalType":"uint256","name":"maxWhitelistMint","type":"uint256"},{"internalType":"uint256","name":"maxPublicMint","type":"uint256"},{"internalType":"bool","name":"maxMintsUpdated","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"adminAddresses","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"burnToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"}],"name":"dtcMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_wallet","type":"address"}],"name":"getHolderMaxMints","outputs":[{"components":[{"internalType":"uint128","name":"ogMints","type":"uint128"},{"internalType":"uint256","name":"wlMints","type":"uint256"}],"internalType":"struct Darbotz.holderMaxMints","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_wallet","type":"address"}],"name":"getTotalTokens","outputs":[{"components":[{"internalType":"uint256","name":"token1","type":"uint256"}],"internalType":"struct Darbotz.tokens","name":"","type":"tuple"}],"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":"_wallet","type":"address"},{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"}],"name":"isDTC","outputs":[{"internalType":"bool","name":"result","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ogMerkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"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":"pauseContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"releaseDTCReserve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_wallets","type":"address[]"}],"name":"removeAdminAddresses","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","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":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"saleConfig","outputs":[{"internalType":"bool","name":"sale","type":"bool"},{"internalType":"bool","name":"dtcPhase","type":"bool"},{"internalType":"uint256","name":"teamPrice","type":"uint256"},{"internalType":"uint256","name":"ogPrice","type":"uint256"},{"internalType":"uint256","name":"whitelistPrice","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"maxSupply","type":"uint256"},{"internalType":"uint256","name":"publicReserve","type":"uint256"},{"internalType":"uint256","name":"maxPublicMint","type":"uint256"},{"internalType":"uint256","name":"publicSupply","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_wallets","type":"address[]"}],"name":"setAdminAddresses","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newBaseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newMaxSupply","type":"uint256"}],"name":"setMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_newOGMerkleRoot","type":"bytes32"}],"name":"setOGMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_newReserve","type":"uint16"}],"name":"setPublicReserve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_newTeam2MerkleRoot","type":"bytes32"}],"name":"setTeam2MerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_wallets","type":"address[]"},{"internalType":"uint8[]","name":"_maxFreeMints","type":"uint8[]"}],"name":"setTeamMaxFreeMints","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_newTeamMerkleRoot","type":"bytes32"}],"name":"setTeamMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasury","type":"address"}],"name":"setTreasuryAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_newWhitelistMerkleRoot","type":"bytes32"}],"name":"setWhitelistMerkleRoot","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":[],"name":"team2MerkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"teamMerkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_amount","type":"uint32"},{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"}],"name":"teamMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"teamMintsClaimed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"toggleSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token1","outputs":[{"internalType":"contract IERC721","name":"","type":"address"}],"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":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpauseContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"wlMerkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60806040526040516200416038038062004160833981016040819052620000269162000454565b604051806040016040528060078152602001662230b93137ba3d60c91b815250604051806040016040528060078152602001662220a92127aa2d60c91b8152508160029081620000779190620005ad565b506003620000868282620005ad565b50600160005550506008805460ff191690556001600955620000a83362000162565b600f80546001600160a01b03199081166001600160a01b038f811691909117909255601a8d905566f523226980800060195566dc9f9ef88d400060175566e8b3e728c9c00060185560006016556015805461ffff19168a151561ff001916176101008a151502179055601c8a9055601b8c9055601d8b9055600d879055600e849055600b869055600c8590556011805490911691831691821790556200015090608c620001b4565b5050505050505050505050506200071f565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b620001d6828260405180602001604052806000815250620001da60201b60201c565b5050565b620001e6838362000251565b6001600160a01b0383163b156200024c576000548281035b6001810190620002149060009087908662000331565b62000232576040516368d2bf6b60e11b815260040160405180910390fd5b818110620001fe5781600054146200024957600080fd5b50505b505050565b6000805490829003620002775760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b17831790558284019083908390600080516020620041408339815191528180a4600183015b81811462000306578083600060008051602062004140833981519152600080a4600101620002dd565b50816000036200032857604051622e076360e81b815260040160405180910390fd5b60005550505050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a02906200036890339089908890889060040162000679565b6020604051808303816000875af1925050508015620003a6575060408051601f3d908101601f19168201909252620003a391810190620006ec565b60015b62000408573d808015620003d7576040519150601f19603f3d011682016040523d82523d6000602084013e620003dc565b606091505b50805160000362000400576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b6001600160a01b03811681146200043b57600080fd5b50565b805180151581146200044f57600080fd5b919050565b6000806000806000806000806000806000806101808d8f0312156200047857600080fd5b8c51620004858162000425565b809c505060208d01519a5060408d0151995060608d0151985060808d01519750620004b360a08e016200043e565b9650620004c360c08e016200043e565b955060e08d015194506101008d015193506101208d015192506101408d015191506101608d0151620004f58162000425565b809150509295989b509295989b509295989b565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200053457607f821691505b6020821081036200055557634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200024c57600081815260208120601f850160051c81016020861015620005845750805b601f850160051c820191505b81811015620005a55782815560010162000590565b505050505050565b81516001600160401b03811115620005c957620005c962000509565b620005e181620005da84546200051f565b846200055b565b602080601f831160018114620006195760008415620006005750858301515b600019600386901b1c1916600185901b178555620005a5565b600085815260208120601f198616915b828110156200064a5788860151825594840194600190910190840162000629565b5085821015620006695787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600060018060a01b038087168352602081871681850152856040850152608060608501528451915081608085015260005b82811015620006c85785810182015185820160a001528101620006aa565b5050600060a0828501015260a0601f19601f83011684010191505095945050505050565b600060208284031215620006ff57600080fd5b81516001600160e01b0319811681146200071857600080fd5b9392505050565b613a11806200072f6000396000f3fe6080604052600436106102ff5760003560e01c80636f8b44b011610190578063aeadbe24116100dc578063d21220a711610095578063e985e9c51161006f578063e985e9c514610a00578063eca4a1f014610a20578063f2fde38b14610a36578063f845cb0f14610a5657600080fd5b8063d21220a7146109a0578063dc47dced146109c0578063e61ff671146109e057600080fd5b8063aeadbe24146108dc578063b33712c51461090b578063b5b7fde114610920578063b88d4fde14610940578063bd32fb6614610960578063c87b56dd1461098057600080fd5b80638da5cb5b1161014957806399a5c23f1161012357806399a5c23f146107bd578063a0712d68146107dd578063a22cb465146107f0578063a3626f821461081057600080fd5b80638da5cb5b146106f557806390aa0b0f1461071357806395d89b41146107a857600080fd5b80636f8b44b01461065857806370a0823114610678578063715018a6146106985780637b47ec1a146106ad5780637d8966e4146106cd578063815e2ac7146106e257600080fd5b806342842e0e1161024f5780635d676acc116102085780636352211e116101e25780636352211e146105f057806364882582146106105780636605bfda146106235780636c0360eb1461064357600080fd5b80635d676acc1461059b5780635f2c5ef6146105bb57806361d027b3146105d057600080fd5b806342842e0e146104e8578063439766ce146105085780634ed38faf1461051d57806354c06aee1461054d57806355f804b3146105635780635c975abb1461058357600080fd5b806318160ddd116102bc57806325c2c0201161029657806325c2c0201461044e578063291408191461046e5780633297e9c1146104845780633c2d8a0c146104a457600080fd5b806318160ddd146103ec5780631f3ef4471461040157806323b872dd1461042e57600080fd5b806301ffc9a71461030457806306fdde0314610339578063081812fc1461035b578063095ea7b3146103935780630a302530146103b557806312065fe0146103d9575b600080fd5b34801561031057600080fd5b5061032461031f366004613142565b610a76565b60405190151581526020015b60405180910390f35b34801561034557600080fd5b5061034e610ac8565b60405161033091906131af565b34801561036757600080fd5b5061037b6103763660046131c2565b610b5a565b6040516001600160a01b039091168152602001610330565b34801561039f57600080fd5b506103b36103ae3660046131f7565b610b9e565b005b3480156103c157600080fd5b506103cb600b5481565b604051908152602001610330565b3480156103e557600080fd5b50476103cb565b3480156103f857600080fd5b506103cb610c3e565b34801561040d57600080fd5b506103cb61041c366004613221565b60146020526000908152604090205481565b34801561043a57600080fd5b506103b361044936600461323c565b610c4c565b34801561045a57600080fd5b506103b36104693660046131c2565b610ddd565b34801561047a57600080fd5b506103cb600d5481565b34801561049057600080fd5b506103b361049f3660046132c4565b610e44565b3480156104b057600080fd5b506104c46104bf366004613221565b610f14565b6040805182516001600160801b031681526020928301519281019290925201610330565b3480156104f457600080fd5b506103b361050336600461323c565b611004565b34801561051457600080fd5b506103b3611024565b34801561052957600080fd5b50610324610538366004613221565b60136020526000908152604090205460ff1681565b34801561055957600080fd5b506103cb600c5481565b34801561056f57600080fd5b506103b361057e366004613392565b611087565b34801561058f57600080fd5b5060085460ff16610324565b3480156105a757600080fd5b506103246105b63660046133db565b6110eb565b3480156105c757600080fd5b506103b36112a6565b3480156105dc57600080fd5b5060115461037b906001600160a01b031681565b3480156105fc57600080fd5b5061037b61060b3660046131c2565b611312565b6103b361061e36600461342e565b61131d565b34801561062f57600080fd5b506103b361063e366004613221565b611b3f565b34801561064f57600080fd5b5061034e611bba565b34801561066457600080fd5b506103b36106733660046131c2565b611c48565b34801561068457600080fd5b506103cb610693366004613221565b611ca6565b3480156106a457600080fd5b506103b3611cf5565b3480156106b957600080fd5b506103b36106c83660046131c2565b611d09565b3480156106d957600080fd5b506103b3611dcf565b6103b36106f0366004613461565b611e3c565b34801561070157600080fd5b50600a546001600160a01b031661037b565b34801561071f57600080fd5b50601554601654601754601854601954601a54601b54601c54601d5461075c9860ff8082169961010090920416979096909590949093909290918a565b604080519a15158b5298151560208b0152978901969096526060880194909452608087019290925260a086015260c085015260e084015261010083015261012082015261014001610330565b3480156107b457600080fd5b5061034e61201b565b3480156107c957600080fd5b506103b36107d83660046132c4565b61202a565b6103b36107eb3660046131c2565b6120f4565b3480156107fc57600080fd5b506103b361080b36600461348a565b6122e8565b34801561081c57600080fd5b5061088761082b366004613221565b601260205260009081526040902080546001820154600283015460038401546004850154600586015460068701546007880154600889015460098a0154600a909a01549899979896979596949593949293919290919060ff168b565b604080519b8c5260208c019a909a52988a01979097526060890195909552608088019390935260a087019190915260c086015260e0850152610100840152610120830152151561014082015261016001610330565b3480156108e857600080fd5b506108fc6108f7366004613221565b612354565b60405190518152602001610330565b34801561091757600080fd5b506103b361245d565b34801561092c57600080fd5b506103b361093b3660046131c2565b6124bd565b34801561094c57600080fd5b506103b361095b3660046134c6565b61251b565b34801561096c57600080fd5b506103b361097b3660046131c2565b61255f565b34801561098c57600080fd5b5061034e61099b3660046131c2565b6125bd565b3480156109ac57600080fd5b50600f5461037b906001600160a01b031681565b3480156109cc57600080fd5b506103b36109db3660046131c2565b612687565b3480156109ec57600080fd5b506103b36109fb366004613542565b6126e5565b348015610a0c57600080fd5b50610324610a1b366004613566565b6127b6565b348015610a2c57600080fd5b506103cb600e5481565b348015610a4257600080fd5b506103b3610a51366004613221565b6127e4565b348015610a6257600080fd5b506103b3610a71366004613599565b61285a565b60006301ffc9a760e01b6001600160e01b031983161480610aa757506380ac58cd60e01b6001600160e01b03198316145b80610ac25750635b5e139f60e01b6001600160e01b03198316145b92915050565b606060028054610ad790613605565b80601f0160208091040260200160405190810160405280929190818152602001828054610b0390613605565b8015610b505780601f10610b2557610100808354040283529160200191610b50565b820191906000526020600020905b815481529060010190602001808311610b3357829003601f168201915b5050505050905090565b6000610b6582612990565b610b82576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b6000610ba982611312565b9050336001600160a01b03821614610be257610bc581336127b6565b610be2576040516367d9dca160e11b815260040160405180910390fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600154600054036000190190565b6000610c57826129c5565b9050836001600160a01b0316816001600160a01b031614610c8a5760405162a1148160e81b815260040160405180910390fd5b60008281526006602052604090208054610cb68187335b6001600160a01b039081169116811491141790565b610ce157610cc486336127b6565b610ce157604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038516610d0857604051633a954ecd60e21b815260040160405180910390fd5b8015610d1357600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040812091909155600160e11b84169003610da557600184016000818152600460205260408120549003610da3576000548114610da35760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03166000805160206139bc83398151915260405160405180910390a45b505050505050565b3360009081526013602052604081205460ff161515600103610dfd575060015b600a546001600160a01b03163303610e13575060015b600181151514610e3e5760405162461bcd60e51b8152600401610e359061363f565b60405180910390fd5b50600b55565b3360009081526013602052604081205460ff161515600103610e64575060015b600a546001600160a01b03163303610e7a575060015b600181151514610e9c5760405162461bcd60e51b8152600401610e359061363f565b60005b82811015610f0e57600160136000868685818110610ebf57610ebf613665565b9050602002016020810190610ed49190613221565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610f0681613691565b915050610e9f565b50505050565b6040805180820190915260008082526020820152604080518082019091526000808252602082015260005b600f546040516370a0823160e01b81526001600160a01b038681166004830152909116906370a0823190602401602060405180830381865afa158015610f89573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fad91906136aa565b811015610ffd57600382600001818151610fc791906136c3565b6001600160801b031690525060208201805160029190610fe89083906136e3565b90525080610ff581613691565b915050610f3f565b5092915050565b61101f8383836040518060200160405280600081525061251b565b505050565b3360009081526013602052604081205460ff161515600103611044575060015b600a546001600160a01b0316330361105a575060015b60018115151461107c5760405162461bcd60e51b8152600401610e359061363f565b611084612a34565b50565b3360009081526013602052604081205460ff1615156001036110a7575060015b600a546001600160a01b031633036110bd575060015b6001811515146110df5760405162461bcd60e51b8152600401610e359061363f565b601061101f838261373c565b6040516001600160601b0319606085901b1660208201526000908190603401604051602081830303815290604052805190602001209050600061116585858080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600d549150859050612a8e565b905060006111aa86868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600b549150869050612a8e565b905060006111ef87878080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600c549150879050612a8e565b90506001831515148061120457506001821515145b8061121157506001811515145b806112885750600f546040516370a0823160e01b81526001600160a01b038a8116600483015260009216906370a0823190602401602060405180830381865afa158015611262573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061128691906136aa565b115b1561129a57600194505050505061129f565b505050505b9392505050565b3360009081526013602052604081205460ff1615156001036112c6575060015b600a546001600160a01b031633036112dc575060015b6001811515146112fe5760405162461bcd60e51b8152600401610e359061363f565b50610d05601b556015805461ff0019169055565b6000610ac2826129c5565b60026009540361133f5760405162461bcd60e51b8152600401610e35906137fc565b600260095561134c612aa4565b6040516001600160601b03193360601b16602082015260009060340160408051808303601f1901815282825280516020918201206101408401835260155460ff808216151586526101009182900416151592850192909252601654848401526017546060850152601854608085015260195460a0850152601a5460c08501819052601b5460e0860152601c5492850192909252601d546101208501819052600f5493516370a0823160e01b815233600482015291955060009384939284916001600160a01b0316906370a0823190602401602060405180830381865afa15801561143a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061145e91906136aa565b905060006114a38a8a8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600d5491508b9050612a8e565b905060006114e88b8b8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600b5491508c9050612a8e565b9050600061152d8c8c8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600c5491508d9050612a8e565b60155490915060ff1615156001146115875760405162461bcd60e51b815260206004820152601a60248201527f4d696e74696e6720686173206e6f7420736172746564207965740000000000006044820152606401610e35565b611592338d8d6110eb565b15156001146115d55760405162461bcd60e51b815260206004820152600f60248201526e4e6f742070617274206f662044544360881b6044820152606401610e35565b60155460ff6101009091041615156001146116265760405162461bcd60e51b81526020600482015260116024820152704454432073616c65206e6f74206c69766560781b6044820152606401610e35565b601a548d611632610c3e565b61163c91906136e3565b111561165a5760405162461bcd60e51b8152600401610e3590613833565b3233146116b75760405162461bcd60e51b815260206004820152602560248201527f43616e6e6f74206d696e74207468726f756768206120637573746f6d20636f6e6044820152641d1c9858dd60da1b6064820152608401610e35565b60008d116117075760405162461bcd60e51b815260206004820152601b60248201527f4e656761746976652076616c756573206e6f7420616c6c6f77656400000000006044820152606401610e35565b336000908152601260205260408120600a015460ff161515900361183557831561179b5760005b84811015611799573360009081526012602052604081206007018054600392906117599084906136e3565b90915550503360009081526012602052604081206008018054600292906117819084906136e3565b9091555081905061179181613691565b91505061172e565b505b60018215151480156117ab575083155b156117d9573360009081526012602052604081206007018054600392906117d39084906136e3565b90915550505b60018115151480156117e9575083155b15611817573360009081526012602052604081206008018054600292906118119084906136e3565b90915550505b336000908152601260205260409020600a01805460ff191660011790555b8c871015611a9d5785611846610c3e565b61185090896136e3565b14611a9d57600183151514801561187a575033600090815260126020526040902060068101549054105b156118aa573360009081526012602052604090208054600190810182559081018054820190559690960195611835565b6000841180156118d157503360009081526012602052604090206007810154600290910154105b1561190e5760608901516118e590896136e3565b336000908152601260205260409020600201805460019081019091559098509690960195611835565b60008411801561193557503360009081526012602052604090206008810154600390910154105b1561199757601b54851061195b5760405162461bcd60e51b8152600401610e3590613868565b608089015161196a90896136e3565b33600090815260126020526040902060030180546001908101909155909850968701969490940193611835565b60018215151480156119c057503360009081526012602052604090206007810154600290910154105b156119d45760608901516118e590896136e3565b60018115151480156119fd57503360009081526012602052604090206008810154600390910154105b15611a2357601b54851061195b5760405162461bcd60e51b8152600401610e3590613868565b601c54336000908152601260205260409020600401541015611a9857601b548510611a605760405162461bcd60e51b8152600401610e3590613868565b60a0890151611a6f90896136e3565b336000908152601260205260409020600401805460019081019091559098509687019694909401935b611835565b87341015611ae25760405162461bcd60e51b8152602060048201526012602482015271696e73756666696369656e742066756e647360701b6044820152606401610e35565b6011546040516001600160a01b03909116903480156108fc02916000818181858888f19350505050158015611b1b573d6000803e3d6000fd5b50601d859055611b2b338e612aea565b505060016009555050505050505050505050565b3360009081526013602052604081205460ff161515600103611b5f575060015b600a546001600160a01b03163303611b75575060015b600181151514611b975760405162461bcd60e51b8152600401610e359061363f565b50601180546001600160a01b0319166001600160a01b0392909216919091179055565b60108054611bc790613605565b80601f0160208091040260200160405190810160405280929190818152602001828054611bf390613605565b8015611c405780601f10611c1557610100808354040283529160200191611c40565b820191906000526020600020905b815481529060010190602001808311611c2357829003601f168201915b505050505081565b3360009081526013602052604081205460ff161515600103611c68575060015b600a546001600160a01b03163303611c7e575060015b600181151514611ca05760405162461bcd60e51b8152600401610e359061363f565b50601a55565b60006001600160a01b038216611ccf576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b611cfd612b08565b611d076000612b62565b565b3360009081526013602052604081205460ff161515600103611d29575060015b600a546001600160a01b03163303611d3f575060015b600181151514611d615760405162461bcd60e51b8152600401610e359061363f565b6000611d6c83611312565b90506001600160a01b0381163314611dc65760405162461bcd60e51b815260206004820152601b60248201527f4e6f7420746865206f776e6572206f66207468697320746f6b656e00000000006044820152606401610e35565b61101f83612bb4565b3360009081526013602052604081205460ff161515600103611def575060015b600a546001600160a01b03163303611e05575060015b600181151514611e275760405162461bcd60e51b8152600401610e359061363f565b506015805460ff19811660ff90911615179055565b600260095403611e5e5760405162461bcd60e51b8152600401610e35906137fc565b6002600955611e6b612aa4565b6040516001600160601b03193360601b1660208201526000906034016040516020818303038152906040528051906020012090506015600501548463ffffffff16611eb4610c3e565b611ebe91906136e3565b1115611edc5760405162461bcd60e51b8152600401610e3590613833565b611f1d83838080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600e549150849050612a8e565b1515600114611f665760405162461bcd60e51b815260206004820152601560248201527424b731b7b93932b1ba1036b2b935b632a83937b7b360591b6044820152606401610e35565b3360009081526012602052604090206006810154905410611fd55760405162461bcd60e51b8152602060048201526024808201527f4d617820616d6f756e74207065722077616c6c657420616c7265616479206d696044820152631b9d195960e21b6064820152608401610e35565b336000908152601260205260408120805463ffffffff87169290611ffa9084906136e3565b9091555061201090503363ffffffff8616612aea565b505060016009555050565b606060038054610ad790613605565b3360009081526013602052604081205460ff16151560010361204a575060015b600a546001600160a01b03163303612060575060015b6001811515146120825760405162461bcd60e51b8152600401610e359061363f565b60005b82811015610f0e576000601360008686858181106120a5576120a5613665565b90506020020160208101906120ba9190613221565b6001600160a01b031681526020810191909152604001600020805460ff1916911515919091179055806120ec81613691565b915050612085565b6002600954036121165760405162461bcd60e51b8152600401610e35906137fc565b6002600955612123612aa4565b601554610100900460ff161561217b5760405162461bcd60e51b815260206004820152601760248201527f5075626c6963206d696e74206e6f7420737461727465640000000000000000006044820152606401610e35565b601a5481612187610c3e565b61219191906136e3565b11156121af5760405162461bcd60e51b8152600401610e3590613833565b6019546121bd90829061389f565b3410156122015760405162461bcd60e51b8152602060048201526012602482015271496e73756666696369656e742066756e647360701b6044820152606401610e35565b601c54336000908152601260205260409020600401546122229083906136e3565b11156122845760405162461bcd60e51b815260206004820152602b60248201527f43616e6e6f74206d696e74206d6f7265207468616e203230207075626c69632060448201526a706572206164647265737360a81b6064820152608401610e35565b6011546040516001600160a01b03909116903480156108fc02916000818181858888f193505050501580156122bd573d6000803e3d6000fd5b503360008181526012602052604090206004018054830190556122e09082612aea565b506001600955565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b604080516020810190915260008152604080516020810190915260008152600f546040516370a0823160e01b81526001600160a01b03858116600483015260009216906370a0823190602401602060405180830381865afa1580156123bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123e191906136aa565b1115610ac257600f546040516370a0823160e01b81526001600160a01b038581166004830152909116906370a0823190602401602060405180830381865afa158015612431573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061245591906136aa565b815292915050565b3360009081526013602052604081205460ff16151560010361247d575060015b600a546001600160a01b03163303612493575060015b6001811515146124b55760405162461bcd60e51b8152600401610e359061363f565b611084612bbf565b3360009081526013602052604081205460ff1615156001036124dd575060015b600a546001600160a01b031633036124f3575060015b6001811515146125155760405162461bcd60e51b8152600401610e359061363f565b50600e55565b612526848484610c4c565b6001600160a01b0383163b15610f0e5761254284848484612bf8565b610f0e576040516368d2bf6b60e11b815260040160405180910390fd5b3360009081526013602052604081205460ff16151560010361257f575060015b600a546001600160a01b03163303612595575060015b6001811515146125b75760405162461bcd60e51b8152600401610e359061363f565b50600c55565b60606125c882612990565b61262c5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba30b73a103a37b5b2b760891b6064820152608401610e35565b6000612636612ce4565b90506000815111612656576040518060200160405280600081525061129f565b8061266084612cf3565b6040516020016126719291906138be565b6040516020818303038152906040529392505050565b3360009081526013602052604081205460ff1615156001036126a7575060015b600a546001600160a01b031633036126bd575060015b6001811515146126df5760405162461bcd60e51b8152600401610e359061363f565b50600d55565b3360009081526013602052604081205460ff161515600103612705575060015b600a546001600160a01b0316330361271b575060015b60018115151461273d5760405162461bcd60e51b8152600401610e359061363f565b601a5461ffff831611156127ac5760405162461bcd60e51b815260206004820152603060248201527f43616e6e6f7420736574207075626c696320726573657276652068696768657260448201526f207468616e206d617820737570706c7960801b6064820152608401610e35565b5061ffff16601b55565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b6127ec612b08565b6001600160a01b0381166128515760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610e35565b61108481612b62565b3360009081526013602052604081205460ff16151560010361287a575060015b600a546001600160a01b03163303612890575060015b6001811515146128b25760405162461bcd60e51b8152600401610e359061363f565b8382146129015760405162461bcd60e51b815260206004820152601860248201527f556e6d61746368696e67206172726179206c656e6774687300000000000000006044820152606401610e35565b60005b84811015610dd55783838281811061291e5761291e613665565b905060200201602081019061293391906138ed565b60ff166012600088888581811061294c5761294c613665565b90506020020160208101906129619190613221565b6001600160a01b031681526020810191909152604001600020600601558061298881613691565b915050612904565b6000816001111580156129a4575060005482105b8015610ac2575050600090815260046020526040902054600160e01b161590565b60008180600111612a1b57600054811015612a1b5760008181526004602052604081205490600160e01b82169003612a19575b8060000361129f5750600019016000818152600460205260409020546129f8565b505b604051636f96cda160e11b815260040160405180910390fd5b612a3c612aa4565b6008805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612a713390565b6040516001600160a01b03909116815260200160405180910390a1565b600082612a9b8584612df4565b14949350505050565b60085460ff1615611d075760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610e35565b612b04828260405180602001604052806000815250612e41565b5050565b600a546001600160a01b03163314611d075760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e35565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b611084816000612eae565b612bc7612fdd565b6008805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33612a71565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290612c2d903390899088908890600401613910565b6020604051808303816000875af1925050508015612c68575060408051601f3d908101601f19168201909252612c659181019061394d565b60015b612cc6573d808015612c96576040519150601f19603f3d011682016040523d82523d6000602084013e612c9b565b606091505b508051600003612cbe576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b606060108054610ad790613605565b606081600003612d1a5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612d445780612d2e81613691565b9150612d3d9050600a83613980565b9150612d1e565b60008167ffffffffffffffff811115612d5f57612d5f613306565b6040519080825280601f01601f191660200182016040528015612d89576020820181803683370190505b5090505b8415612cdc57612d9e600183613994565b9150612dab600a866139a7565b612db69060306136e3565b60f81b818381518110612dcb57612dcb613665565b60200101906001600160f81b031916908160001a905350612ded600a86613980565b9450612d8d565b600081815b8451811015612e3957612e2582868381518110612e1857612e18613665565b6020026020010151613026565b915080612e3181613691565b915050612df9565b509392505050565b612e4b8383613052565b6001600160a01b0383163b1561101f576000548281035b612e756000868380600101945086612bf8565b612e92576040516368d2bf6b60e11b815260040160405180910390fd5b818110612e62578160005414612ea757600080fd5b5050505050565b6000612eb9836129c5565b905080600080612ed786600090815260066020526040902080549091565b915091508415612f1757612eec818433610ca1565b612f1757612efa83336127b6565b612f1757604051632ce44b5f60e11b815260040160405180910390fd5b8015612f2257600082555b6001600160a01b038316600081815260056020526040902080546001600160801b030190554260a01b17600360e01b17600087815260046020526040812091909155600160e11b85169003612fa757600186016000818152600460205260408120549003612fa5576000548114612fa55760008181526004602052604090208590555b505b60405186906000906001600160a01b038616906000805160206139bc833981519152908390a45050600180548101905550505050565b60085460ff16611d075760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610e35565b600081831061304257600082815260208490526040902061129f565b5060009182526020526040902090565b60008054908290036130775760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083906000805160206139bc8339815191528180a4600183015b81811461310257808360006000805160206139bc833981519152600080a46001016130dc565b508160000361312357604051622e076360e81b815260040160405180910390fd5b60005550505050565b6001600160e01b03198116811461108457600080fd5b60006020828403121561315457600080fd5b813561129f8161312c565b60005b8381101561317a578181015183820152602001613162565b50506000910152565b6000815180845261319b81602086016020860161315f565b601f01601f19169290920160200192915050565b60208152600061129f6020830184613183565b6000602082840312156131d457600080fd5b5035919050565b80356001600160a01b03811681146131f257600080fd5b919050565b6000806040838503121561320a57600080fd5b613213836131db565b946020939093013593505050565b60006020828403121561323357600080fd5b61129f826131db565b60008060006060848603121561325157600080fd5b61325a846131db565b9250613268602085016131db565b9150604084013590509250925092565b60008083601f84011261328a57600080fd5b50813567ffffffffffffffff8111156132a257600080fd5b6020830191508360208260051b85010111156132bd57600080fd5b9250929050565b600080602083850312156132d757600080fd5b823567ffffffffffffffff8111156132ee57600080fd5b6132fa85828601613278565b90969095509350505050565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff8084111561333757613337613306565b604051601f8501601f19908116603f0116810190828211818310171561335f5761335f613306565b8160405280935085815286868601111561337857600080fd5b858560208301376000602087830101525050509392505050565b6000602082840312156133a457600080fd5b813567ffffffffffffffff8111156133bb57600080fd5b8201601f810184136133cc57600080fd5b612cdc8482356020840161331c565b6000806000604084860312156133f057600080fd5b6133f9846131db565b9250602084013567ffffffffffffffff81111561341557600080fd5b61342186828701613278565b9497909650939450505050565b60008060006040848603121561344357600080fd5b83359250602084013567ffffffffffffffff81111561341557600080fd5b60008060006040848603121561347657600080fd5b833563ffffffff811681146133f957600080fd5b6000806040838503121561349d57600080fd5b6134a6836131db565b9150602083013580151581146134bb57600080fd5b809150509250929050565b600080600080608085870312156134dc57600080fd5b6134e5856131db565b93506134f3602086016131db565b925060408501359150606085013567ffffffffffffffff81111561351657600080fd5b8501601f8101871361352757600080fd5b6135368782356020840161331c565b91505092959194509250565b60006020828403121561355457600080fd5b813561ffff8116811461129f57600080fd5b6000806040838503121561357957600080fd5b613582836131db565b9150613590602084016131db565b90509250929050565b600080600080604085870312156135af57600080fd5b843567ffffffffffffffff808211156135c757600080fd5b6135d388838901613278565b909650945060208701359150808211156135ec57600080fd5b506135f987828801613278565b95989497509550505050565b600181811c9082168061361957607f821691505b60208210810361363957634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252600c908201526b2737ba1030b71030b236b4b760a11b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016136a3576136a361367b565b5060010190565b6000602082840312156136bc57600080fd5b5051919050565b6001600160801b03818116838216019080821115610ffd57610ffd61367b565b80820180821115610ac257610ac261367b565b601f82111561101f57600081815260208120601f850160051c8101602086101561371d5750805b601f850160051c820191505b81811015610dd557828155600101613729565b815167ffffffffffffffff81111561375657613756613306565b61376a816137648454613605565b846136f6565b602080601f83116001811461379f57600084156137875750858301515b600019600386901b1c1916600185901b178555610dd5565b600085815260208120601f198616915b828110156137ce578886015182559484019460019091019084016137af565b50858210156137ec5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6020808252818101527f43616e6e6f74206d696e74206d6f7265207468616e206d617820737570706c79604082015260600190565b6020808252601c908201527f5075626c696320537570706c79204f76657220416c6c6f636174656400000000604082015260600190565b60008160001904831182151516156138b9576138b961367b565b500290565b600083516138d081846020880161315f565b8351908301906138e481836020880161315f565b01949350505050565b6000602082840312156138ff57600080fd5b813560ff8116811461129f57600080fd5b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061394390830184613183565b9695505050505050565b60006020828403121561395f57600080fd5b815161129f8161312c565b634e487b7160e01b600052601260045260246000fd5b60008261398f5761398f61396a565b500490565b81810381811115610ac257610ac261367b565b6000826139b6576139b661396a565b50069056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa264697066735822122042e289c265a20c753f9fca70d60bb3d648540cda6645a7bb6122c426250a9d6064736f6c63430008100033ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef000000000000000000000000574031431be54f788d206f8ffedd750f1dda498e0000000000000000000000000000000000000000000000000000000000000d050000000000000000000000000000000000000000000000000000000000000a1700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012b4e4f3589f01056a88ca2899de3e228fb91f3af580efaa63e455faaa7d6c8a1a534682c4674b2bb6afd015cd47d6e007fdc10c0752d1e21dd793fbca0d866f69b49489bc698db59fd58ebc3194edd963674d18da4a696a286dc34eaec3b30125664199ea1528b193be48be9bdc2ab2c78496d228f221b4a75d49c1b052bba9a000000000000000000000000dcbbaf0c7e7a858ada5a2e0c3a6b012fad1d4de6
Deployed Bytecode
0x6080604052600436106102ff5760003560e01c80636f8b44b011610190578063aeadbe24116100dc578063d21220a711610095578063e985e9c51161006f578063e985e9c514610a00578063eca4a1f014610a20578063f2fde38b14610a36578063f845cb0f14610a5657600080fd5b8063d21220a7146109a0578063dc47dced146109c0578063e61ff671146109e057600080fd5b8063aeadbe24146108dc578063b33712c51461090b578063b5b7fde114610920578063b88d4fde14610940578063bd32fb6614610960578063c87b56dd1461098057600080fd5b80638da5cb5b1161014957806399a5c23f1161012357806399a5c23f146107bd578063a0712d68146107dd578063a22cb465146107f0578063a3626f821461081057600080fd5b80638da5cb5b146106f557806390aa0b0f1461071357806395d89b41146107a857600080fd5b80636f8b44b01461065857806370a0823114610678578063715018a6146106985780637b47ec1a146106ad5780637d8966e4146106cd578063815e2ac7146106e257600080fd5b806342842e0e1161024f5780635d676acc116102085780636352211e116101e25780636352211e146105f057806364882582146106105780636605bfda146106235780636c0360eb1461064357600080fd5b80635d676acc1461059b5780635f2c5ef6146105bb57806361d027b3146105d057600080fd5b806342842e0e146104e8578063439766ce146105085780634ed38faf1461051d57806354c06aee1461054d57806355f804b3146105635780635c975abb1461058357600080fd5b806318160ddd116102bc57806325c2c0201161029657806325c2c0201461044e578063291408191461046e5780633297e9c1146104845780633c2d8a0c146104a457600080fd5b806318160ddd146103ec5780631f3ef4471461040157806323b872dd1461042e57600080fd5b806301ffc9a71461030457806306fdde0314610339578063081812fc1461035b578063095ea7b3146103935780630a302530146103b557806312065fe0146103d9575b600080fd5b34801561031057600080fd5b5061032461031f366004613142565b610a76565b60405190151581526020015b60405180910390f35b34801561034557600080fd5b5061034e610ac8565b60405161033091906131af565b34801561036757600080fd5b5061037b6103763660046131c2565b610b5a565b6040516001600160a01b039091168152602001610330565b34801561039f57600080fd5b506103b36103ae3660046131f7565b610b9e565b005b3480156103c157600080fd5b506103cb600b5481565b604051908152602001610330565b3480156103e557600080fd5b50476103cb565b3480156103f857600080fd5b506103cb610c3e565b34801561040d57600080fd5b506103cb61041c366004613221565b60146020526000908152604090205481565b34801561043a57600080fd5b506103b361044936600461323c565b610c4c565b34801561045a57600080fd5b506103b36104693660046131c2565b610ddd565b34801561047a57600080fd5b506103cb600d5481565b34801561049057600080fd5b506103b361049f3660046132c4565b610e44565b3480156104b057600080fd5b506104c46104bf366004613221565b610f14565b6040805182516001600160801b031681526020928301519281019290925201610330565b3480156104f457600080fd5b506103b361050336600461323c565b611004565b34801561051457600080fd5b506103b3611024565b34801561052957600080fd5b50610324610538366004613221565b60136020526000908152604090205460ff1681565b34801561055957600080fd5b506103cb600c5481565b34801561056f57600080fd5b506103b361057e366004613392565b611087565b34801561058f57600080fd5b5060085460ff16610324565b3480156105a757600080fd5b506103246105b63660046133db565b6110eb565b3480156105c757600080fd5b506103b36112a6565b3480156105dc57600080fd5b5060115461037b906001600160a01b031681565b3480156105fc57600080fd5b5061037b61060b3660046131c2565b611312565b6103b361061e36600461342e565b61131d565b34801561062f57600080fd5b506103b361063e366004613221565b611b3f565b34801561064f57600080fd5b5061034e611bba565b34801561066457600080fd5b506103b36106733660046131c2565b611c48565b34801561068457600080fd5b506103cb610693366004613221565b611ca6565b3480156106a457600080fd5b506103b3611cf5565b3480156106b957600080fd5b506103b36106c83660046131c2565b611d09565b3480156106d957600080fd5b506103b3611dcf565b6103b36106f0366004613461565b611e3c565b34801561070157600080fd5b50600a546001600160a01b031661037b565b34801561071f57600080fd5b50601554601654601754601854601954601a54601b54601c54601d5461075c9860ff8082169961010090920416979096909590949093909290918a565b604080519a15158b5298151560208b0152978901969096526060880194909452608087019290925260a086015260c085015260e084015261010083015261012082015261014001610330565b3480156107b457600080fd5b5061034e61201b565b3480156107c957600080fd5b506103b36107d83660046132c4565b61202a565b6103b36107eb3660046131c2565b6120f4565b3480156107fc57600080fd5b506103b361080b36600461348a565b6122e8565b34801561081c57600080fd5b5061088761082b366004613221565b601260205260009081526040902080546001820154600283015460038401546004850154600586015460068701546007880154600889015460098a0154600a909a01549899979896979596949593949293919290919060ff168b565b604080519b8c5260208c019a909a52988a01979097526060890195909552608088019390935260a087019190915260c086015260e0850152610100840152610120830152151561014082015261016001610330565b3480156108e857600080fd5b506108fc6108f7366004613221565b612354565b60405190518152602001610330565b34801561091757600080fd5b506103b361245d565b34801561092c57600080fd5b506103b361093b3660046131c2565b6124bd565b34801561094c57600080fd5b506103b361095b3660046134c6565b61251b565b34801561096c57600080fd5b506103b361097b3660046131c2565b61255f565b34801561098c57600080fd5b5061034e61099b3660046131c2565b6125bd565b3480156109ac57600080fd5b50600f5461037b906001600160a01b031681565b3480156109cc57600080fd5b506103b36109db3660046131c2565b612687565b3480156109ec57600080fd5b506103b36109fb366004613542565b6126e5565b348015610a0c57600080fd5b50610324610a1b366004613566565b6127b6565b348015610a2c57600080fd5b506103cb600e5481565b348015610a4257600080fd5b506103b3610a51366004613221565b6127e4565b348015610a6257600080fd5b506103b3610a71366004613599565b61285a565b60006301ffc9a760e01b6001600160e01b031983161480610aa757506380ac58cd60e01b6001600160e01b03198316145b80610ac25750635b5e139f60e01b6001600160e01b03198316145b92915050565b606060028054610ad790613605565b80601f0160208091040260200160405190810160405280929190818152602001828054610b0390613605565b8015610b505780601f10610b2557610100808354040283529160200191610b50565b820191906000526020600020905b815481529060010190602001808311610b3357829003601f168201915b5050505050905090565b6000610b6582612990565b610b82576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b6000610ba982611312565b9050336001600160a01b03821614610be257610bc581336127b6565b610be2576040516367d9dca160e11b815260040160405180910390fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600154600054036000190190565b6000610c57826129c5565b9050836001600160a01b0316816001600160a01b031614610c8a5760405162a1148160e81b815260040160405180910390fd5b60008281526006602052604090208054610cb68187335b6001600160a01b039081169116811491141790565b610ce157610cc486336127b6565b610ce157604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038516610d0857604051633a954ecd60e21b815260040160405180910390fd5b8015610d1357600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040812091909155600160e11b84169003610da557600184016000818152600460205260408120549003610da3576000548114610da35760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03166000805160206139bc83398151915260405160405180910390a45b505050505050565b3360009081526013602052604081205460ff161515600103610dfd575060015b600a546001600160a01b03163303610e13575060015b600181151514610e3e5760405162461bcd60e51b8152600401610e359061363f565b60405180910390fd5b50600b55565b3360009081526013602052604081205460ff161515600103610e64575060015b600a546001600160a01b03163303610e7a575060015b600181151514610e9c5760405162461bcd60e51b8152600401610e359061363f565b60005b82811015610f0e57600160136000868685818110610ebf57610ebf613665565b9050602002016020810190610ed49190613221565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610f0681613691565b915050610e9f565b50505050565b6040805180820190915260008082526020820152604080518082019091526000808252602082015260005b600f546040516370a0823160e01b81526001600160a01b038681166004830152909116906370a0823190602401602060405180830381865afa158015610f89573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fad91906136aa565b811015610ffd57600382600001818151610fc791906136c3565b6001600160801b031690525060208201805160029190610fe89083906136e3565b90525080610ff581613691565b915050610f3f565b5092915050565b61101f8383836040518060200160405280600081525061251b565b505050565b3360009081526013602052604081205460ff161515600103611044575060015b600a546001600160a01b0316330361105a575060015b60018115151461107c5760405162461bcd60e51b8152600401610e359061363f565b611084612a34565b50565b3360009081526013602052604081205460ff1615156001036110a7575060015b600a546001600160a01b031633036110bd575060015b6001811515146110df5760405162461bcd60e51b8152600401610e359061363f565b601061101f838261373c565b6040516001600160601b0319606085901b1660208201526000908190603401604051602081830303815290604052805190602001209050600061116585858080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600d549150859050612a8e565b905060006111aa86868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600b549150869050612a8e565b905060006111ef87878080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600c549150879050612a8e565b90506001831515148061120457506001821515145b8061121157506001811515145b806112885750600f546040516370a0823160e01b81526001600160a01b038a8116600483015260009216906370a0823190602401602060405180830381865afa158015611262573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061128691906136aa565b115b1561129a57600194505050505061129f565b505050505b9392505050565b3360009081526013602052604081205460ff1615156001036112c6575060015b600a546001600160a01b031633036112dc575060015b6001811515146112fe5760405162461bcd60e51b8152600401610e359061363f565b50610d05601b556015805461ff0019169055565b6000610ac2826129c5565b60026009540361133f5760405162461bcd60e51b8152600401610e35906137fc565b600260095561134c612aa4565b6040516001600160601b03193360601b16602082015260009060340160408051808303601f1901815282825280516020918201206101408401835260155460ff808216151586526101009182900416151592850192909252601654848401526017546060850152601854608085015260195460a0850152601a5460c08501819052601b5460e0860152601c5492850192909252601d546101208501819052600f5493516370a0823160e01b815233600482015291955060009384939284916001600160a01b0316906370a0823190602401602060405180830381865afa15801561143a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061145e91906136aa565b905060006114a38a8a8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600d5491508b9050612a8e565b905060006114e88b8b8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600b5491508c9050612a8e565b9050600061152d8c8c8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600c5491508d9050612a8e565b60155490915060ff1615156001146115875760405162461bcd60e51b815260206004820152601a60248201527f4d696e74696e6720686173206e6f7420736172746564207965740000000000006044820152606401610e35565b611592338d8d6110eb565b15156001146115d55760405162461bcd60e51b815260206004820152600f60248201526e4e6f742070617274206f662044544360881b6044820152606401610e35565b60155460ff6101009091041615156001146116265760405162461bcd60e51b81526020600482015260116024820152704454432073616c65206e6f74206c69766560781b6044820152606401610e35565b601a548d611632610c3e565b61163c91906136e3565b111561165a5760405162461bcd60e51b8152600401610e3590613833565b3233146116b75760405162461bcd60e51b815260206004820152602560248201527f43616e6e6f74206d696e74207468726f756768206120637573746f6d20636f6e6044820152641d1c9858dd60da1b6064820152608401610e35565b60008d116117075760405162461bcd60e51b815260206004820152601b60248201527f4e656761746976652076616c756573206e6f7420616c6c6f77656400000000006044820152606401610e35565b336000908152601260205260408120600a015460ff161515900361183557831561179b5760005b84811015611799573360009081526012602052604081206007018054600392906117599084906136e3565b90915550503360009081526012602052604081206008018054600292906117819084906136e3565b9091555081905061179181613691565b91505061172e565b505b60018215151480156117ab575083155b156117d9573360009081526012602052604081206007018054600392906117d39084906136e3565b90915550505b60018115151480156117e9575083155b15611817573360009081526012602052604081206008018054600292906118119084906136e3565b90915550505b336000908152601260205260409020600a01805460ff191660011790555b8c871015611a9d5785611846610c3e565b61185090896136e3565b14611a9d57600183151514801561187a575033600090815260126020526040902060068101549054105b156118aa573360009081526012602052604090208054600190810182559081018054820190559690960195611835565b6000841180156118d157503360009081526012602052604090206007810154600290910154105b1561190e5760608901516118e590896136e3565b336000908152601260205260409020600201805460019081019091559098509690960195611835565b60008411801561193557503360009081526012602052604090206008810154600390910154105b1561199757601b54851061195b5760405162461bcd60e51b8152600401610e3590613868565b608089015161196a90896136e3565b33600090815260126020526040902060030180546001908101909155909850968701969490940193611835565b60018215151480156119c057503360009081526012602052604090206007810154600290910154105b156119d45760608901516118e590896136e3565b60018115151480156119fd57503360009081526012602052604090206008810154600390910154105b15611a2357601b54851061195b5760405162461bcd60e51b8152600401610e3590613868565b601c54336000908152601260205260409020600401541015611a9857601b548510611a605760405162461bcd60e51b8152600401610e3590613868565b60a0890151611a6f90896136e3565b336000908152601260205260409020600401805460019081019091559098509687019694909401935b611835565b87341015611ae25760405162461bcd60e51b8152602060048201526012602482015271696e73756666696369656e742066756e647360701b6044820152606401610e35565b6011546040516001600160a01b03909116903480156108fc02916000818181858888f19350505050158015611b1b573d6000803e3d6000fd5b50601d859055611b2b338e612aea565b505060016009555050505050505050505050565b3360009081526013602052604081205460ff161515600103611b5f575060015b600a546001600160a01b03163303611b75575060015b600181151514611b975760405162461bcd60e51b8152600401610e359061363f565b50601180546001600160a01b0319166001600160a01b0392909216919091179055565b60108054611bc790613605565b80601f0160208091040260200160405190810160405280929190818152602001828054611bf390613605565b8015611c405780601f10611c1557610100808354040283529160200191611c40565b820191906000526020600020905b815481529060010190602001808311611c2357829003601f168201915b505050505081565b3360009081526013602052604081205460ff161515600103611c68575060015b600a546001600160a01b03163303611c7e575060015b600181151514611ca05760405162461bcd60e51b8152600401610e359061363f565b50601a55565b60006001600160a01b038216611ccf576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b611cfd612b08565b611d076000612b62565b565b3360009081526013602052604081205460ff161515600103611d29575060015b600a546001600160a01b03163303611d3f575060015b600181151514611d615760405162461bcd60e51b8152600401610e359061363f565b6000611d6c83611312565b90506001600160a01b0381163314611dc65760405162461bcd60e51b815260206004820152601b60248201527f4e6f7420746865206f776e6572206f66207468697320746f6b656e00000000006044820152606401610e35565b61101f83612bb4565b3360009081526013602052604081205460ff161515600103611def575060015b600a546001600160a01b03163303611e05575060015b600181151514611e275760405162461bcd60e51b8152600401610e359061363f565b506015805460ff19811660ff90911615179055565b600260095403611e5e5760405162461bcd60e51b8152600401610e35906137fc565b6002600955611e6b612aa4565b6040516001600160601b03193360601b1660208201526000906034016040516020818303038152906040528051906020012090506015600501548463ffffffff16611eb4610c3e565b611ebe91906136e3565b1115611edc5760405162461bcd60e51b8152600401610e3590613833565b611f1d83838080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600e549150849050612a8e565b1515600114611f665760405162461bcd60e51b815260206004820152601560248201527424b731b7b93932b1ba1036b2b935b632a83937b7b360591b6044820152606401610e35565b3360009081526012602052604090206006810154905410611fd55760405162461bcd60e51b8152602060048201526024808201527f4d617820616d6f756e74207065722077616c6c657420616c7265616479206d696044820152631b9d195960e21b6064820152608401610e35565b336000908152601260205260408120805463ffffffff87169290611ffa9084906136e3565b9091555061201090503363ffffffff8616612aea565b505060016009555050565b606060038054610ad790613605565b3360009081526013602052604081205460ff16151560010361204a575060015b600a546001600160a01b03163303612060575060015b6001811515146120825760405162461bcd60e51b8152600401610e359061363f565b60005b82811015610f0e576000601360008686858181106120a5576120a5613665565b90506020020160208101906120ba9190613221565b6001600160a01b031681526020810191909152604001600020805460ff1916911515919091179055806120ec81613691565b915050612085565b6002600954036121165760405162461bcd60e51b8152600401610e35906137fc565b6002600955612123612aa4565b601554610100900460ff161561217b5760405162461bcd60e51b815260206004820152601760248201527f5075626c6963206d696e74206e6f7420737461727465640000000000000000006044820152606401610e35565b601a5481612187610c3e565b61219191906136e3565b11156121af5760405162461bcd60e51b8152600401610e3590613833565b6019546121bd90829061389f565b3410156122015760405162461bcd60e51b8152602060048201526012602482015271496e73756666696369656e742066756e647360701b6044820152606401610e35565b601c54336000908152601260205260409020600401546122229083906136e3565b11156122845760405162461bcd60e51b815260206004820152602b60248201527f43616e6e6f74206d696e74206d6f7265207468616e203230207075626c69632060448201526a706572206164647265737360a81b6064820152608401610e35565b6011546040516001600160a01b03909116903480156108fc02916000818181858888f193505050501580156122bd573d6000803e3d6000fd5b503360008181526012602052604090206004018054830190556122e09082612aea565b506001600955565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b604080516020810190915260008152604080516020810190915260008152600f546040516370a0823160e01b81526001600160a01b03858116600483015260009216906370a0823190602401602060405180830381865afa1580156123bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123e191906136aa565b1115610ac257600f546040516370a0823160e01b81526001600160a01b038581166004830152909116906370a0823190602401602060405180830381865afa158015612431573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061245591906136aa565b815292915050565b3360009081526013602052604081205460ff16151560010361247d575060015b600a546001600160a01b03163303612493575060015b6001811515146124b55760405162461bcd60e51b8152600401610e359061363f565b611084612bbf565b3360009081526013602052604081205460ff1615156001036124dd575060015b600a546001600160a01b031633036124f3575060015b6001811515146125155760405162461bcd60e51b8152600401610e359061363f565b50600e55565b612526848484610c4c565b6001600160a01b0383163b15610f0e5761254284848484612bf8565b610f0e576040516368d2bf6b60e11b815260040160405180910390fd5b3360009081526013602052604081205460ff16151560010361257f575060015b600a546001600160a01b03163303612595575060015b6001811515146125b75760405162461bcd60e51b8152600401610e359061363f565b50600c55565b60606125c882612990565b61262c5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba30b73a103a37b5b2b760891b6064820152608401610e35565b6000612636612ce4565b90506000815111612656576040518060200160405280600081525061129f565b8061266084612cf3565b6040516020016126719291906138be565b6040516020818303038152906040529392505050565b3360009081526013602052604081205460ff1615156001036126a7575060015b600a546001600160a01b031633036126bd575060015b6001811515146126df5760405162461bcd60e51b8152600401610e359061363f565b50600d55565b3360009081526013602052604081205460ff161515600103612705575060015b600a546001600160a01b0316330361271b575060015b60018115151461273d5760405162461bcd60e51b8152600401610e359061363f565b601a5461ffff831611156127ac5760405162461bcd60e51b815260206004820152603060248201527f43616e6e6f7420736574207075626c696320726573657276652068696768657260448201526f207468616e206d617820737570706c7960801b6064820152608401610e35565b5061ffff16601b55565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b6127ec612b08565b6001600160a01b0381166128515760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610e35565b61108481612b62565b3360009081526013602052604081205460ff16151560010361287a575060015b600a546001600160a01b03163303612890575060015b6001811515146128b25760405162461bcd60e51b8152600401610e359061363f565b8382146129015760405162461bcd60e51b815260206004820152601860248201527f556e6d61746368696e67206172726179206c656e6774687300000000000000006044820152606401610e35565b60005b84811015610dd55783838281811061291e5761291e613665565b905060200201602081019061293391906138ed565b60ff166012600088888581811061294c5761294c613665565b90506020020160208101906129619190613221565b6001600160a01b031681526020810191909152604001600020600601558061298881613691565b915050612904565b6000816001111580156129a4575060005482105b8015610ac2575050600090815260046020526040902054600160e01b161590565b60008180600111612a1b57600054811015612a1b5760008181526004602052604081205490600160e01b82169003612a19575b8060000361129f5750600019016000818152600460205260409020546129f8565b505b604051636f96cda160e11b815260040160405180910390fd5b612a3c612aa4565b6008805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258612a713390565b6040516001600160a01b03909116815260200160405180910390a1565b600082612a9b8584612df4565b14949350505050565b60085460ff1615611d075760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610e35565b612b04828260405180602001604052806000815250612e41565b5050565b600a546001600160a01b03163314611d075760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e35565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b611084816000612eae565b612bc7612fdd565b6008805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33612a71565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290612c2d903390899088908890600401613910565b6020604051808303816000875af1925050508015612c68575060408051601f3d908101601f19168201909252612c659181019061394d565b60015b612cc6573d808015612c96576040519150601f19603f3d011682016040523d82523d6000602084013e612c9b565b606091505b508051600003612cbe576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b606060108054610ad790613605565b606081600003612d1a5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612d445780612d2e81613691565b9150612d3d9050600a83613980565b9150612d1e565b60008167ffffffffffffffff811115612d5f57612d5f613306565b6040519080825280601f01601f191660200182016040528015612d89576020820181803683370190505b5090505b8415612cdc57612d9e600183613994565b9150612dab600a866139a7565b612db69060306136e3565b60f81b818381518110612dcb57612dcb613665565b60200101906001600160f81b031916908160001a905350612ded600a86613980565b9450612d8d565b600081815b8451811015612e3957612e2582868381518110612e1857612e18613665565b6020026020010151613026565b915080612e3181613691565b915050612df9565b509392505050565b612e4b8383613052565b6001600160a01b0383163b1561101f576000548281035b612e756000868380600101945086612bf8565b612e92576040516368d2bf6b60e11b815260040160405180910390fd5b818110612e62578160005414612ea757600080fd5b5050505050565b6000612eb9836129c5565b905080600080612ed786600090815260066020526040902080549091565b915091508415612f1757612eec818433610ca1565b612f1757612efa83336127b6565b612f1757604051632ce44b5f60e11b815260040160405180910390fd5b8015612f2257600082555b6001600160a01b038316600081815260056020526040902080546001600160801b030190554260a01b17600360e01b17600087815260046020526040812091909155600160e11b85169003612fa757600186016000818152600460205260408120549003612fa5576000548114612fa55760008181526004602052604090208590555b505b60405186906000906001600160a01b038616906000805160206139bc833981519152908390a45050600180548101905550505050565b60085460ff16611d075760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610e35565b600081831061304257600082815260208490526040902061129f565b5060009182526020526040902090565b60008054908290036130775760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083906000805160206139bc8339815191528180a4600183015b81811461310257808360006000805160206139bc833981519152600080a46001016130dc565b508160000361312357604051622e076360e81b815260040160405180910390fd5b60005550505050565b6001600160e01b03198116811461108457600080fd5b60006020828403121561315457600080fd5b813561129f8161312c565b60005b8381101561317a578181015183820152602001613162565b50506000910152565b6000815180845261319b81602086016020860161315f565b601f01601f19169290920160200192915050565b60208152600061129f6020830184613183565b6000602082840312156131d457600080fd5b5035919050565b80356001600160a01b03811681146131f257600080fd5b919050565b6000806040838503121561320a57600080fd5b613213836131db565b946020939093013593505050565b60006020828403121561323357600080fd5b61129f826131db565b60008060006060848603121561325157600080fd5b61325a846131db565b9250613268602085016131db565b9150604084013590509250925092565b60008083601f84011261328a57600080fd5b50813567ffffffffffffffff8111156132a257600080fd5b6020830191508360208260051b85010111156132bd57600080fd5b9250929050565b600080602083850312156132d757600080fd5b823567ffffffffffffffff8111156132ee57600080fd5b6132fa85828601613278565b90969095509350505050565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff8084111561333757613337613306565b604051601f8501601f19908116603f0116810190828211818310171561335f5761335f613306565b8160405280935085815286868601111561337857600080fd5b858560208301376000602087830101525050509392505050565b6000602082840312156133a457600080fd5b813567ffffffffffffffff8111156133bb57600080fd5b8201601f810184136133cc57600080fd5b612cdc8482356020840161331c565b6000806000604084860312156133f057600080fd5b6133f9846131db565b9250602084013567ffffffffffffffff81111561341557600080fd5b61342186828701613278565b9497909650939450505050565b60008060006040848603121561344357600080fd5b83359250602084013567ffffffffffffffff81111561341557600080fd5b60008060006040848603121561347657600080fd5b833563ffffffff811681146133f957600080fd5b6000806040838503121561349d57600080fd5b6134a6836131db565b9150602083013580151581146134bb57600080fd5b809150509250929050565b600080600080608085870312156134dc57600080fd5b6134e5856131db565b93506134f3602086016131db565b925060408501359150606085013567ffffffffffffffff81111561351657600080fd5b8501601f8101871361352757600080fd5b6135368782356020840161331c565b91505092959194509250565b60006020828403121561355457600080fd5b813561ffff8116811461129f57600080fd5b6000806040838503121561357957600080fd5b613582836131db565b9150613590602084016131db565b90509250929050565b600080600080604085870312156135af57600080fd5b843567ffffffffffffffff808211156135c757600080fd5b6135d388838901613278565b909650945060208701359150808211156135ec57600080fd5b506135f987828801613278565b95989497509550505050565b600181811c9082168061361957607f821691505b60208210810361363957634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252600c908201526b2737ba1030b71030b236b4b760a11b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016136a3576136a361367b565b5060010190565b6000602082840312156136bc57600080fd5b5051919050565b6001600160801b03818116838216019080821115610ffd57610ffd61367b565b80820180821115610ac257610ac261367b565b601f82111561101f57600081815260208120601f850160051c8101602086101561371d5750805b601f850160051c820191505b81811015610dd557828155600101613729565b815167ffffffffffffffff81111561375657613756613306565b61376a816137648454613605565b846136f6565b602080601f83116001811461379f57600084156137875750858301515b600019600386901b1c1916600185901b178555610dd5565b600085815260208120601f198616915b828110156137ce578886015182559484019460019091019084016137af565b50858210156137ec5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6020808252818101527f43616e6e6f74206d696e74206d6f7265207468616e206d617820737570706c79604082015260600190565b6020808252601c908201527f5075626c696320537570706c79204f76657220416c6c6f636174656400000000604082015260600190565b60008160001904831182151516156138b9576138b961367b565b500290565b600083516138d081846020880161315f565b8351908301906138e481836020880161315f565b01949350505050565b6000602082840312156138ff57600080fd5b813560ff8116811461129f57600080fd5b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061394390830184613183565b9695505050505050565b60006020828403121561395f57600080fd5b815161129f8161312c565b634e487b7160e01b600052601260045260246000fd5b60008261398f5761398f61396a565b500490565b81810381811115610ac257610ac261367b565b6000826139b6576139b661396a565b50069056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa264697066735822122042e289c265a20c753f9fca70d60bb3d648540cda6645a7bb6122c426250a9d6064736f6c63430008100033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000574031431be54f788d206f8ffedd750f1dda498e0000000000000000000000000000000000000000000000000000000000000d050000000000000000000000000000000000000000000000000000000000000a1700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012b4e4f3589f01056a88ca2899de3e228fb91f3af580efaa63e455faaa7d6c8a1a534682c4674b2bb6afd015cd47d6e007fdc10c0752d1e21dd793fbca0d866f69b49489bc698db59fd58ebc3194edd963674d18da4a696a286dc34eaec3b30125664199ea1528b193be48be9bdc2ab2c78496d228f221b4a75d49c1b052bba9a000000000000000000000000dcbbaf0c7e7a858ada5a2e0c3a6b012fad1d4de6
-----Decoded View---------------
Arg [0] : _token1 (address): 0x574031431Be54f788d206F8fFEdd750F1DdA498e
Arg [1] : _maxSupply (uint256): 3333
Arg [2] : _publicReserve (uint256): 2583
Arg [3] : _publicSupply (uint256): 0
Arg [4] : _maxPublicMint (uint256): 20
Arg [5] : _sale (bool): False
Arg [6] : _dtcPhase (bool): True
Arg [7] : _teamMerkleRoot (bytes32): 0x2b4e4f3589f01056a88ca2899de3e228fb91f3af580efaa63e455faaa7d6c8a1
Arg [8] : _ogMerkleRoot (bytes32): 0xa534682c4674b2bb6afd015cd47d6e007fdc10c0752d1e21dd793fbca0d866f6
Arg [9] : _wlMerkleRoot (bytes32): 0x9b49489bc698db59fd58ebc3194edd963674d18da4a696a286dc34eaec3b3012
Arg [10] : _team2MerkleRoot (bytes32): 0x5664199ea1528b193be48be9bdc2ab2c78496d228f221b4a75d49c1b052bba9a
Arg [11] : _treasury (address): 0xDCbBaf0C7e7a858aDA5A2e0c3A6B012fad1d4DE6
-----Encoded View---------------
12 Constructor Arguments found :
Arg [0] : 000000000000000000000000574031431be54f788d206f8ffedd750f1dda498e
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000d05
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000a17
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000014
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [7] : 2b4e4f3589f01056a88ca2899de3e228fb91f3af580efaa63e455faaa7d6c8a1
Arg [8] : a534682c4674b2bb6afd015cd47d6e007fdc10c0752d1e21dd793fbca0d866f6
Arg [9] : 9b49489bc698db59fd58ebc3194edd963674d18da4a696a286dc34eaec3b3012
Arg [10] : 5664199ea1528b193be48be9bdc2ab2c78496d228f221b4a75d49c1b052bba9a
Arg [11] : 000000000000000000000000dcbbaf0c7e7a858ada5a2e0c3a6b012fad1d4de6
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.