Feature Tip: Add private address tag to any address under My Name Tag !
ERC-721
Overview
Max Total Supply
218 TF
Holders
60
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
2 TFLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
ThousandFacesDAO
Compiler Version
v0.8.15+commit.e14f2714
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.15; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Royalty.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; // /$$$$$$$$ /$$ /$$ /$$$$$$$$ // |__ $$__/| $$ | $$ | $$_____/ // | $$ | $$$$$$$ /$$$$$$ /$$ /$$ /$$$$$$$ /$$$$$$ /$$$$$$$ /$$$$$$$ | $$ /$$$$$$ /$$$$$$$ /$$$$$$ /$$$$$$$ // | $$ | $$__ $$ /$$__ $$| $$ | $$ /$$_____/ |____ $$| $$__ $$ /$$__ $$ | $$$$$|____ $$ /$$_____/ /$$__ $$ /$$_____/ // | $$ | $$ \ $$| $$ \ $$| $$ | $$| $$$$$$ /$$$$$$$| $$ \ $$| $$ | $$ | $$__/ /$$$$$$$| $$ | $$$$$$$$| $$$$$$ // | $$ | $$ | $$| $$ | $$| $$ | $$ \____ $$ /$$__ $$| $$ | $$| $$ | $$ | $$ /$$__ $$| $$ | $$_____/ \____ $$ // | $$ | $$ | $$| $$$$$$/| $$$$$$/ /$$$$$$$/| $$$$$$$| $$ | $$| $$$$$$$ | $$ | $$$$$$$| $$$$$$$| $$$$$$$ /$$$$$$$/ // |__/ |__/ |__/ \______/ \______/ |_______/ \_______/|__/ |__/ \_______/ |__/ \_______/ \_______/ \_______/|_______/ /** * @title Thousand Faces Contract * @notice This contract handles minting and distribution of Thousand Faces NFT tokens. */ contract ThousandFacesDAO is ERC721, ERC721Enumerable, ERC721Royalty, Ownable, ReentrancyGuard { using Strings for uint256; string[] private _provenanceHashes; uint256 private _nextProvenanceHashIndex; mapping(uint256 => string) private _ipfsURI; uint256 private _ipfsURIIndex; mapping(uint256 => string) private _arweaveURI; uint256 private _arweaveURIIndex; string public contractURI; uint256 private _tokenIndex = 0; uint256 private _availablesupply; bool public isBurningAllowed = false; bool public isAllowlistActive = false; bool public isSaleActive = false; uint256 public allowlistStartTime; uint256 public saleStartTime; uint256 public pricePerToken; string public baseURI; uint96 public royaltyFee; address public royaltyRecipient; address public withdrawAddress; uint256 public MAX_SUPPLY = 9999; uint256 public maxAllowlistTokens = 10; uint256 public maxPublicTokens = 20; bytes32 public merkleRoot; mapping(address => uint256) private _allowlistMinted; event BaseURISet(string baseUri); event ContractURISet(string contractUri); event ProvenanceHashAdded(string provenanceHash); event ToggleSale(bool saleState, uint256 startTime); event ToggleAllowlistSale(bool saleState, uint256 startTime); event MerkleRootAdded(bytes32 merkleRoot); event AllowlistMinted(address allowlistedAddress, uint256 numberOfTokens); event PublicMinted(address publicAddress, uint256 numberOfTokens); event Airdrop(address[] publicAddresses); event TokenBurnt(uint256 tokenId); // support eth transactions to the contract event Received(address, uint256); receive() external payable { emit Received(msg.sender, msg.value); } /** * @notice Construct a Thousand Faces contract instance * @param _name Token name * @param _symbol Token symbol * @param _baseTokenURI Base URI for all tokens * @param _royaltyRecipient Royalty Fees Recepient * @param _royaltyFee Royalty Fees * @param _initialContractURI Initial Contract URI */ constructor( string memory _name, string memory _symbol, string memory _baseTokenURI, address _royaltyRecipient, uint96 _royaltyFee, string memory _initialContractURI ) ERC721(_name, _symbol) { baseURI = _baseTokenURI; royaltyRecipient = _royaltyRecipient; royaltyFee = _royaltyFee; contractURI = _initialContractURI; _setDefaultRoyalty(royaltyRecipient, royaltyFee); withdrawAddress = msg.sender; } /** * @notice Read the base token URI */ function _baseURI() internal view override returns (string memory) { return baseURI; } /** * @notice Update the base token URI */ function setBaseURI(string calldata _newBaseURI) external onlyOwner { require(bytes(_newBaseURI).length != 0, "Base URI cannot be empty"); baseURI = _newBaseURI; emit BaseURISet(_newBaseURI); } /** * @notice Update the contract URI */ function setContractURI(string calldata _newContractURI) external onlyOwner { require( bytes(_newContractURI).length != 0, "Contract URI cannot be empty" ); contractURI = _newContractURI; emit ContractURISet(_newContractURI); } /** * @notice Update the maximum tokens allowed for allowlist mint */ function setMaxAllowlistTokens(uint256 _count) external onlyOwner { require(_count != 0, "Max Allowlist tokens cannot be zero"); maxAllowlistTokens = _count; } /** * @notice Update the maximum tokens allowed for public mint */ function setMaxPublicTokens(uint256 _count) external onlyOwner { require(_count != 0, "Max Public tokens cannot be zero"); maxPublicTokens = _count; } /** * @notice Update the royalty fee for the collection */ function setRoyaltyFee(uint96 _feeNumerator) external onlyOwner { royaltyFee = _feeNumerator; _setDefaultRoyalty(royaltyRecipient, royaltyFee); } /** * @notice Update the royalty address where royalty payouts are sent */ function setRoyaltyRecipient(address _royaltyRecipient) external onlyOwner { require( _royaltyRecipient != address(0), "Royalty recepient cannot be address zero" ); royaltyRecipient = _royaltyRecipient; _setDefaultRoyalty(royaltyRecipient, royaltyFee); } /** * @notice Allow the owner to start/stop the public sale */ function toggleAllowlistState() external onlyOwner { isAllowlistActive = !isAllowlistActive; if (allowlistStartTime == 0) { allowlistStartTime = block.timestamp; } else { allowlistStartTime = 0; } emit ToggleAllowlistSale(isAllowlistActive, allowlistStartTime); } /** * @notice Allow the owner to start/stop the public sale */ function toggleSaleState() external onlyOwner { isSaleActive = !isSaleActive; if (saleStartTime == 0) { saleStartTime = block.timestamp; } else { saleStartTime = 0; } emit ToggleSale(isSaleActive, saleStartTime); } /** * @notice Allow the owner to start/stop the public sale */ function toggleBurningState() external onlyOwner { isBurningAllowed = !isBurningAllowed; } /** * @notice Add Provenance hash for the batch */ function addProvenanceHash(string calldata _provenanceHash) external onlyOwner { require( bytes(_provenanceHash).length > 0, "Provenance Hash cannot be empty" ); _provenanceHashes.push(_provenanceHash); _nextProvenanceHashIndex++; emit ProvenanceHashAdded(_provenanceHash); } /** * @notice Get last Provenance Hash for the batch */ function getLastProvenance() external view returns (string memory) { return _provenanceHashes[_nextProvenanceHashIndex - 1]; } /** * @notice Read all Provenance Hashes */ function getAllProvenanceHashes() external view returns (string[] memory) { return _provenanceHashes; } /** * @notice Update the IPFS Token URI */ function setIpfsTokenURI(string[] calldata _cids) external onlyOwner { require(_cids.length != 0, "TokenURI input cannot be empty"); for (uint256 i = 0; i < _cids.length; ) { _ipfsURI[_ipfsURIIndex + i] = _cids[i]; unchecked { i++; } } _ipfsURIIndex += _cids.length; } /** * @notice Reverts with the IPFS Token URI */ function ipfsTokenURI(uint256 _tokenId) external view virtual returns (string memory) { require( _exists(_tokenId), "ERC721Metadata: URI query for nonexistent token" ); return string(abi.encodePacked("ipfs://", _ipfsURI[_tokenId])); } /** * @notice Update the IPFS Token URI */ function setArweaveTokenURI(string[] calldata _dataURIs) public onlyOwner { require(_dataURIs.length != 0, "TokenURI input cannot be empty"); for (uint256 i = 0; i < _dataURIs.length; ) { _arweaveURI[_arweaveURIIndex + i] = _dataURIs[i]; unchecked { i++; } } _arweaveURIIndex += _dataURIs.length; } /** * @notice Reverts with the IPFS Token URI */ function arweaveTokenURI(uint256 _tokenId) external view virtual returns (string memory) { require( _exists(_tokenId), "ERC721Metadata: URI query for nonexistent token" ); return string( abi.encodePacked("https://arweave.net/", _arweaveURI[_tokenId]) ); } /** * @notice Read the available token supply */ function getAvailableSupply() external view returns (uint256) { return _availablesupply; } /** * @notice Update the available token supply */ function setAvailableSupply(uint256 _supply) external onlyOwner { require( _supply <= MAX_SUPPLY, "Supply cannot exceed the total supply limit of 10k tokens" ); require( _supply > _availablesupply, "Supply cannot be lesser than or equal to the existing supply" ); _availablesupply = _supply; } /** * @notice Update the token index for the new batch */ function setTokenIndex(uint256 _newIndex) external onlyOwner { require( _newIndex > _tokenIndex, "New index cannot be lesser than or equal to the current token index" ); _tokenIndex = _newIndex; } /** * @notice Update the price per token */ function setTokenPrice(uint256 _newPrice) external onlyOwner { require(_newPrice > 0 ether, "Cannot set price to zero"); pricePerToken = _newPrice; } /** * @notice Update the merkle root for the allowlist */ function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner { require(_merkleRoot.length != 0, "Merkle Root cannot be empty"); merkleRoot = _merkleRoot; emit MerkleRootAdded(_merkleRoot); } /** * @notice Verify address eligibility for the allow list mint */ function isAllowListEligible(address addr, bytes32[] calldata _merkleProof) public view returns (bool) { bytes32 leaf = keccak256(abi.encodePacked(addr)); return MerkleProof.verify(_merkleProof, merkleRoot, leaf); } /** * @notice Allow minting for allowlisted addresses */ function mintAllowlist( bytes32[] calldata _merkleProof, uint256 _numberOfTokens ) external payable nonReentrant { address sender = _msgSender(); require(isSaleActive, "Sale must be active to mint tokens"); require(isAllowlistActive, "Allowlist must be active to mint tokens"); require( (_numberOfTokens + balanceOf(sender)) <= maxAllowlistTokens, "Number of tokens exceeds the max allowed tokens" ); require( isAllowListEligible(msg.sender, _merkleProof), "Address not eligible for the allowlist" ); require( msg.value == pricePerToken * _numberOfTokens, "Incorrect payable amount" ); _allowlistMinted[sender] += _numberOfTokens; _internalMint(sender, _numberOfTokens); emit AllowlistMinted(sender, _numberOfTokens); } /** * @notice Allow minting for public addresses */ function mintPublic(uint256 _numberOfTokens) external payable nonReentrant { address sender = _msgSender(); uint256 ts = totalSupply(); require(isSaleActive, "Sale must be active to mint tokens"); require( !isAllowlistActive, "Public sale must be active to mint tokens" ); require( (_numberOfTokens + balanceOf(sender)) <= maxPublicTokens, "Number of tokens exceeds the max allowed tokens" ); // require(numberOfTokens <= MAX_PUBLIC_MINT, "Exceeded max token purchase"); require( ts + _numberOfTokens <= _availablesupply, "Purchase would exceed max tokens" ); require( pricePerToken * _numberOfTokens <= msg.value, "Incorrect payable amount" ); _internalMint(sender, _numberOfTokens); emit PublicMinted(sender, _numberOfTokens); } /** * @notice Private Internal Mint function */ function _internalMint(address _to, uint256 _numberOfTokens) private { require( _tokenIndex + _numberOfTokens <= _availablesupply, "Purchase would exceed max tokens" ); for (uint256 i = 0; i < _numberOfTokens; ) { _safeMint(_to, _tokenIndex + i); unchecked { i++; } } _tokenIndex += _numberOfTokens; } /** * @notice Reserve tokens for the team */ function reserve(uint256 _numberOfTokens) external onlyOwner { require( _numberOfTokens != 0, "Number of tokens should be more than zero" ); _internalMint(msg.sender, _numberOfTokens); } /** * @notice Allow the owner to gift tokens to an arbitrary number of addresses */ function airdrop(address[] calldata _receivers) external onlyOwner { require( _tokenIndex + _receivers.length <= _availablesupply, "Not enough tokens available" ); for (uint256 i; i < _receivers.length; ) { _safeMint(_receivers[i], _tokenIndex + i); unchecked { i++; } } _tokenIndex += _receivers.length; emit Airdrop(_receivers); } /** * @notice Burn the NFT tokens */ function burnNFT(uint256 _tokenId) external { require(isBurningAllowed, "Burning is disbled at present"); require( ownerOf(_tokenId) == msg.sender, "Only token owner can burn thier NFTs" ); _burn(_tokenId); emit TokenBurnt(_tokenId); } /** * @notice Private internal burn function */ function _burn(uint256 tokenId) internal virtual override(ERC721, ERC721Royalty) { super._burn(tokenId); _resetTokenRoyalty(tokenId); } /** * @notice Allow withdrawing funds to the withdrawAddress */ function withdraw() external onlyOwner { require( msg.sender != address(0), "Address set to 0x0, set the recepient address" ); uint256 balance = address(this).balance; require(balance > 0, "NOTHING_TO_WITHDRAW"); require(payable(withdrawAddress).send(balance)); } /** * @notice Change the withdraw address for the collection */ function setWithdrawAddress(address _address) external onlyOwner { require(_address != address(0), "input cannot be address zero"); withdrawAddress = _address; } // Utils /** * @notice Allow external checks for token existence */ function tokenExists(uint256 _tokenId) external view returns (bool) { return _exists(_tokenId); } /** * @notice Returns a list of NFT token IDs owned by a given address */ function tokensOfOwner(address _owner) external view returns (uint256[] memory) { uint256 tokenCount = balanceOf(_owner); uint256[] memory tokensId = new uint256[](tokenCount); for (uint256 i; i < tokenCount; ) { tokensId[i] = tokenOfOwnerByIndex(_owner, i); unchecked { i++; } } return tokensId; } function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable, ERC721Royalty) returns (bool) { return super.supportsInterface(interfaceId); } function _beforeTokenTransfer( address from, address to, uint256 tokenId, uint256 batchSize ) internal override(ERC721, ERC721Enumerable) { super._beforeTokenTransfer(from, to, tokenId, batchSize); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Enumerable.sol) pragma solidity ^0.8.0; import "../ERC721.sol"; import "./IERC721Enumerable.sol"; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @dev See {ERC721-_beforeTokenTransfer}. */ function _beforeTokenTransfer( address from, address to, uint256 firstTokenId, uint256 batchSize ) internal virtual override { super._beforeTokenTransfer(from, to, firstTokenId, batchSize); if (batchSize > 1) { // Will only trigger during construction. Batch transferring (minting) is not available afterwards. revert("ERC721Enumerable: consecutive transfers not supported"); } uint256 tokenId = firstTokenId; if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Tree proofs. * * The tree and the proofs can be generated using our * https://github.com/OpenZeppelin/merkle-tree[JavaScript library]. * You will find a quickstart guide in the readme. * * WARNING: You should avoid using leaf values that are 64 bytes long prior to * hashing, or use a hash function other than keccak256 for hashing leaves. * This is because the concatenation of a sorted pair of internal nodes in * the merkle tree could be reinterpreted as a leaf value. * OpenZeppelin's JavaScript library generates merkle trees that are safe * against this attack out of the box. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Calldata version of {verify} * * _Available since v4.7._ */ function verifyCalldata( bytes32[] calldata proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProofCalldata(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Calldata version of {processProof} * * _Available since v4.7._ */ function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a merkle tree defined by * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function multiProofVerify( bytes32[] memory proof, bool[] memory proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProof(proof, proofFlags, leaves) == root; } /** * @dev Calldata version of {multiProofVerify} * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function multiProofVerifyCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProofCalldata(proof, proofFlags, leaves) == root; } /** * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false * respectively. * * CAUTION: Not all merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer). * * _Available since v4.7._ */ function processMultiProof( bytes32[] memory proof, bool[] memory proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function 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}. * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function processMultiProofCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { return a < b ? _efficientHash(a, b) : _efficientHash(b, a); } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { /// @solidity memory-safe-assembly assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (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() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // 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; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @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 virtual override returns (uint256) { require(owner != address(0), "ERC721: address zero is not a valid owner"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _ownerOf(tokenId); require(owner != address(0), "ERC721: invalid token ID"); return owner; } /** * @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) { _requireMinted(tokenId); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @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 overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not token owner or approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { _requireMinted(tokenId); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_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 { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved"); _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 { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved"); _safeTransfer(from, to, tokenId, data); } /** * @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. * * `data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist */ function _ownerOf(uint256 tokenId) internal view virtual returns (address) { return _owners[tokenId]; } /** * @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`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _ownerOf(tokenId) != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { address owner = ERC721.ownerOf(tokenId); return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId, 1); // Check that tokenId was not minted by `_beforeTokenTransfer` hook require(!_exists(tokenId), "ERC721: token already minted"); unchecked { // Will not overflow unless all 2**256 token ids are minted to the same owner. // Given that tokens are minted one by one, it is impossible in practice that // this ever happens. Might change if we allow batch minting. // The ERC fails to describe this case. _balances[to] += 1; } _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId, 1); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * This is an internal function that does not check if the sender is authorized to operate on the token. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId, 1); // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook owner = ERC721.ownerOf(tokenId); // Clear approvals delete _tokenApprovals[tokenId]; unchecked { // Cannot overflow, as that would require more tokens to be burned/transferred // out than the owner initially received through minting and transferring in. _balances[owner] -= 1; } delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId, 1); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * 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 ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId, 1); // Check that tokenId was not transferred by `_beforeTokenTransfer` hook require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); // Clear approvals from the previous owner delete _tokenApprovals[tokenId]; unchecked { // `_balances[from]` cannot overflow for the same reason as described in `_burn`: // `from`'s balance is the number of token held, which is at least one before the current // transfer. // `_balances[to]` could overflow in the conditions described in `_mint`. That would require // all 2**256 token ids to be minted, which in practice is impossible. _balances[from] -= 1; _balances[to] += 1; } _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId, 1); } /** * @dev Approve `to` to operate on `tokenId` * * Emits an {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits an {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Reverts if the `tokenId` has not been minted yet. */ function _requireMinted(uint256 tokenId) internal view virtual { require(_exists(tokenId), "ERC721: invalid token ID"); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a 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 _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { /// @solidity memory-safe-assembly assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`. * - When `from` is zero, the tokens will be minted for `to`. * - When `to` is zero, ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * - `batchSize` is non-zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256, /* firstTokenId */ uint256 batchSize ) internal virtual { if (batchSize > 1) { if (from != address(0)) { _balances[from] -= batchSize; } if (to != address(0)) { _balances[to] += batchSize; } } } /** * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`. * - When `from` is zero, the tokens were minted for `to`. * - When `to` is zero, ``from``'s tokens were burned. * - `from` and `to` are never both zero. * - `batchSize` is non-zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 firstTokenId, uint256 batchSize ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Royalty.sol) pragma solidity ^0.8.0; import "../ERC721.sol"; import "../../common/ERC2981.sol"; import "../../../utils/introspection/ERC165.sol"; /** * @dev Extension of ERC721 with the ERC2981 NFT Royalty Standard, a standardized way to retrieve royalty payment * information. * * Royalty information can be specified globally for all token ids via {ERC2981-_setDefaultRoyalty}, and/or individually for * specific token ids via {ERC2981-_setTokenRoyalty}. The latter takes precedence over the first. * * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. * * _Available since v4.5._ */ abstract contract ERC721Royalty is ERC2981, ERC721 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC2981) returns (bool) { return super.supportsInterface(interfaceId); } /** * @dev See {ERC721-_burn}. This override additionally clears the royalty information for the token. */ function _burn(uint256 tokenId) internal virtual override { super._burn(tokenId); _resetTokenRoyalty(tokenId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv( uint256 x, uint256 y, uint256 denominator, Rounding rounding ) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10**64) { value /= 10**64; result += 64; } if (value >= 10**32) { value /= 10**32; result += 32; } if (value >= 10**16) { value /= 10**16; result += 16; } if (value >= 10**8) { value /= 10**8; result += 8; } if (value >= 10**4) { value /= 10**4; result += 4; } if (value >= 10**2) { value /= 10**2; result += 2; } if (value >= 10**1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.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 functionCallWithValue(target, data, 0, "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"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, 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) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, 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) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or 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 { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // 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 /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/common/ERC2981.sol) pragma solidity ^0.8.0; import "../../interfaces/IERC2981.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information. * * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first. * * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the * fee is specified in basis points by default. * * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. * * _Available since v4.5._ */ abstract contract ERC2981 is IERC2981, ERC165 { struct RoyaltyInfo { address receiver; uint96 royaltyFraction; } RoyaltyInfo private _defaultRoyaltyInfo; mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) { return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId); } /** * @inheritdoc IERC2981 */ function royaltyInfo(uint256 _tokenId, uint256 _salePrice) public view virtual override returns (address, uint256) { RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId]; if (royalty.receiver == address(0)) { royalty = _defaultRoyaltyInfo; } uint256 royaltyAmount = (_salePrice * royalty.royaltyFraction) / _feeDenominator(); return (royalty.receiver, royaltyAmount); } /** * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an * override. */ function _feeDenominator() internal pure virtual returns (uint96) { return 10000; } /** * @dev Sets the royalty information that all ids in this contract will default to. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: invalid receiver"); _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Removes default royalty information. */ function _deleteDefaultRoyalty() internal virtual { delete _defaultRoyaltyInfo; } /** * @dev Sets the royalty information for a specific token id, overriding the global default. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setTokenRoyalty( uint256 tokenId, address receiver, uint96 feeNumerator ) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: Invalid parameters"); _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Resets royalty information for the token id back to the global default. */ function _resetTokenRoyalty(uint256 tokenId) internal virtual { delete _tokenRoyaltyInfo[tokenId]; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. * * _Available since v4.5._ */ interface IERC2981 is IERC165 { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be paid in that same unit of exchange. */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"string","name":"_baseTokenURI","type":"string"},{"internalType":"address","name":"_royaltyRecipient","type":"address"},{"internalType":"uint96","name":"_royaltyFee","type":"uint96"},{"internalType":"string","name":"_initialContractURI","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[]","name":"publicAddresses","type":"address[]"}],"name":"Airdrop","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"allowlistedAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"numberOfTokens","type":"uint256"}],"name":"AllowlistMinted","type":"event"},{"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":false,"internalType":"string","name":"baseUri","type":"string"}],"name":"BaseURISet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"contractUri","type":"string"}],"name":"ContractURISet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"merkleRoot","type":"bytes32"}],"name":"MerkleRootAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"provenanceHash","type":"string"}],"name":"ProvenanceHashAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"publicAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"numberOfTokens","type":"uint256"}],"name":"PublicMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"","type":"address"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"}],"name":"Received","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"saleState","type":"bool"},{"indexed":false,"internalType":"uint256","name":"startTime","type":"uint256"}],"name":"ToggleAllowlistSale","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"saleState","type":"bool"},{"indexed":false,"internalType":"uint256","name":"startTime","type":"uint256"}],"name":"ToggleSale","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"TokenBurnt","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":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_provenanceHash","type":"string"}],"name":"addProvenanceHash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_receivers","type":"address[]"}],"name":"airdrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"allowlistStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"uint256","name":"_tokenId","type":"uint256"}],"name":"arweaveTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"burnNFT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllProvenanceHashes","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":[],"name":"getAvailableSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLastProvenance","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"ipfsTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"}],"name":"isAllowListEligible","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isAllowlistActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isBurningAllowed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isSaleActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxAllowlistTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxPublicTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"},{"internalType":"uint256","name":"_numberOfTokens","type":"uint256"}],"name":"mintAllowlist","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_numberOfTokens","type":"uint256"}],"name":"mintPublic","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pricePerToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_numberOfTokens","type":"uint256"}],"name":"reserve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"royaltyFee","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"royaltyRecipient","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":[],"name":"saleStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string[]","name":"_dataURIs","type":"string[]"}],"name":"setArweaveTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_supply","type":"uint256"}],"name":"setAvailableSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newBaseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newContractURI","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string[]","name":"_cids","type":"string[]"}],"name":"setIpfsTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_count","type":"uint256"}],"name":"setMaxAllowlistTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_count","type":"uint256"}],"name":"setMaxPublicTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"}],"name":"setMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint96","name":"_feeNumerator","type":"uint96"}],"name":"setRoyaltyFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_royaltyRecipient","type":"address"}],"name":"setRoyaltyRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newIndex","type":"uint256"}],"name":"setTokenIndex","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newPrice","type":"uint256"}],"name":"setTokenPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setWithdrawAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"toggleAllowlistState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"toggleBurningState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"toggleSaleState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenExists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
608060405260006015556017805462ffffff1916905561270f601e55600a601f5560146020553480156200003257600080fd5b506040516200479338038062004793833981016040819052620000559162000392565b85856002620000658382620004fe565b506003620000748282620004fe565b505050620000916200008b6200013560201b60201c565b62000139565b6001600d55601b620000a48582620004fe565b506001600160601b0382166001600160a01b0384166c01000000000000000000000000026001600160601b03191617601c556014620000e48282620004fe565b50601c5462000116906001600160a01b036c01000000000000000000000000820416906001600160601b03166200018b565b5050601d80546001600160a01b0319163317905550620005ca92505050565b3390565b600c80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6127106001600160601b0382161115620001ff5760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b60648201526084015b60405180910390fd5b6001600160a01b038216620002575760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401620001f6565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600055565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620002b857600080fd5b81516001600160401b0380821115620002d557620002d562000290565b604051601f8301601f19908116603f0116810190828211818310171562000300576200030062000290565b816040528381526020925086838588010111156200031d57600080fd5b600091505b8382101562000341578582018301518183018401529082019062000322565b83821115620003535760008385830101525b9695505050505050565b80516001600160a01b03811681146200037557600080fd5b919050565b80516001600160601b03811681146200037557600080fd5b60008060008060008060c08789031215620003ac57600080fd5b86516001600160401b0380821115620003c457600080fd5b620003d28a838b01620002a6565b97506020890151915080821115620003e957600080fd5b620003f78a838b01620002a6565b965060408901519150808211156200040e57600080fd5b6200041c8a838b01620002a6565b95506200042c60608a016200035d565b94506200043c60808a016200037a565b935060a08901519150808211156200045357600080fd5b506200046289828a01620002a6565b9150509295509295509295565b600181811c908216806200048457607f821691505b602082108103620004a557634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620004f957600081815260208120601f850160051c81016020861015620004d45750805b601f850160051c820191505b81811015620004f557828155600101620004e0565b5050505b505050565b81516001600160401b038111156200051a576200051a62000290565b62000532816200052b84546200046f565b84620004ab565b602080601f8311600181146200056a5760008415620005515750858301515b600019600386901b1c1916600185901b178555620004f5565b600085815260208120601f198616915b828110156200059b578886015182559484019460019091019084016200057a565b5085821015620005ba5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6141b980620005da6000396000f3fe6080604052600436106103dc5760003560e01c80636c0360eb116101fd578063b6728e4b11610118578063e01d716f116100ab578063e985e9c51161007a578063e985e9c514610b80578063efd0cbf914610bc9578063f2fde38b14610bdc578063f6d8259914610bfc578063f970e4e814610c0f57600080fd5b8063e01d716f14610b11578063e590746414610b31578063e76af32e14610b51578063e8a3d48514610b6b57600080fd5b8063c87b56dd116100e7578063c87b56dd14610aa7578063d2d515cc14610ac7578063d447c75814610ae6578063daaeec8614610afc57600080fd5b8063b6728e4b14610a1a578063b88d4fde14610a3a578063b8997a9714610a5a578063c167d1cd14610a9257600080fd5b80638ab3ed801161019057806399fb2fed1161015f57806399fb2fed146109af578063a22cb465146109cf578063afed78e8146109ef578063b49fe73f14610a0557600080fd5b80638ab3ed801461093a5780638da5cb5b1461095c578063938e3d7b1461097a57806395d89b411461099a57600080fd5b80637b1b1de6116101cc5780637b1b1de6146108b75780637cb64759146108cd578063819b25ba146108ed5780638462151c1461090d57600080fd5b80636c0360eb1461084d57806370a0823114610862578063715018a614610882578063729ad39e1461089757600080fd5b80632f745c59116102f857806345b74abd1161028b57806355f804b31161025a57806355f804b3146107b7578063564566a8146107d757806359d7bc4d146107f75780636352211e1461080d5780636a61e5fc1461082d57600080fd5b806345b74abd1461073b5780634be8f05b1461075b5780634c00de82146107705780634f6ccce71461079757600080fd5b80633ccfd60b116102c75780633ccfd60b146106d157806341e42f30146106e657806342842e0e1461070657806344bd86f71461072657600080fd5b80632f745c591461065b57806331faafb41461067b57806332cb6b0c1461069b5780633ab1a494146106b157600080fd5b806318160ddd1161037057806323b872dd1161033f57806323b872dd146105c65780632890e0d7146105e65780632a55205a146106065780632eb4a7ab1461064557600080fd5b806318160ddd146105515780631c86b981146105705780631cbaee2d14610590578063213f3ea2146105a657600080fd5b8063095ea7b3116103ac578063095ea7b3146104cf5780630d5296af146104f15780631581b600146105115780631723934d1461053157600080fd5b8062923f9e1461042057806301ffc9a71461045557806306fdde0314610475578063081812fc1461049757600080fd5b3661041b57604080513381523460208201527f88a5966d370b9919b20f3e2c13ff65706f196a4e32cc2c12bf57088f88525874910160405180910390a1005b600080fd5b34801561042c57600080fd5b5061044061043b36600461366b565b610c2f565b60405190151581526020015b60405180910390f35b34801561046157600080fd5b5061044061047036600461369a565b610c40565b34801561048157600080fd5b5061048a610c4b565b60405161044c919061370f565b3480156104a357600080fd5b506104b76104b236600461366b565b610cdd565b6040516001600160a01b03909116815260200161044c565b3480156104db57600080fd5b506104ef6104ea36600461373e565b610d04565b005b3480156104fd57600080fd5b5061044061050c3660046137ad565b610e1e565b34801561051d57600080fd5b50601d546104b7906001600160a01b031681565b34801561053d57600080fd5b506104ef61054c36600461366b565b610ea4565b34801561055d57600080fd5b50600a545b60405190815260200161044c565b34801561057c57600080fd5b506104ef61058b366004613800565b610fa0565b34801561059c57600080fd5b5061056260195481565b3480156105b257600080fd5b506104ef6105c136600461366b565b611085565b3480156105d257600080fd5b506104ef6105e1366004613872565b6110e2565b3480156105f257600080fd5b506104ef61060136600461366b565b611113565b34801561061257600080fd5b506106266106213660046138ae565b611211565b604080516001600160a01b03909316835260208301919091520161044c565b34801561065157600080fd5b5061056260215481565b34801561066757600080fd5b5061056261067636600461373e565b6112bf565b34801561068757600080fd5b506104ef6106963660046138d0565b611355565b3480156106a757600080fd5b50610562601e5481565b3480156106bd57600080fd5b506104ef6106cc3660046138f9565b61139e565b3480156106dd57600080fd5b506104ef61141e565b3480156106f257600080fd5b506104ef6107013660046138f9565b6114ff565b34801561071257600080fd5b506104ef610721366004613872565b6115a7565b34801561073257600080fd5b506104ef6115c2565b34801561074757600080fd5b506104ef61075636600461366b565b61164b565b34801561076757600080fd5b5061048a6116db565b34801561077c57600080fd5b50601c546104b790600160601b90046001600160a01b031681565b3480156107a357600080fd5b506105626107b236600461366b565b611713565b3480156107c357600080fd5b506104ef6107d2366004613800565b6117a6565b3480156107e357600080fd5b506017546104409062010000900460ff1681565b34801561080357600080fd5b5061056260185481565b34801561081957600080fd5b506104b761082836600461366b565b61183e565b34801561083957600080fd5b506104ef61084836600461366b565b61189e565b34801561085957600080fd5b5061048a6118fb565b34801561086e57600080fd5b5061056261087d3660046138f9565b611989565b34801561088e57600080fd5b506104ef611a0f565b3480156108a357600080fd5b506104ef6108b2366004613914565b611a23565b3480156108c357600080fd5b50610562601a5481565b3480156108d957600080fd5b506104ef6108e836600461366b565b611b27565b3480156108f957600080fd5b506104ef61090836600461366b565b611b64565b34801561091957600080fd5b5061092d6109283660046138f9565b611bd8565b60405161044c9190613956565b34801561094657600080fd5b5061094f611c70565b60405161044c919061399a565b34801561096857600080fd5b50600c546001600160a01b03166104b7565b34801561098657600080fd5b506104ef610995366004613800565b611d49565b3480156109a657600080fd5b5061048a611de1565b3480156109bb57600080fd5b5061048a6109ca36600461366b565b611df0565b3480156109db57600080fd5b506104ef6109ea3660046139fc565b611e4c565b3480156109fb57600080fd5b50610562601f5481565b348015610a1157600080fd5b506104ef611e5b565b348015610a2657600080fd5b506104ef610a35366004613914565b611e77565b348015610a4657600080fd5b506104ef610a55366004613a4e565b611f54565b348015610a6657600080fd5b50601c54610a7a906001600160601b031681565b6040516001600160601b03909116815260200161044c565b348015610a9e57600080fd5b50601654610562565b348015610ab357600080fd5b5061048a610ac236600461366b565b611f8c565b348015610ad357600080fd5b5060175461044090610100900460ff1681565b348015610af257600080fd5b5061056260205481565b348015610b0857600080fd5b506104ef611ff3565b348015610b1d57600080fd5b5061048a610b2c36600461366b565b612079565b348015610b3d57600080fd5b506104ef610b4c36600461366b565b6120bf565b348015610b5d57600080fd5b506017546104409060ff1681565b348015610b7757600080fd5b5061048a612128565b348015610b8c57600080fd5b50610440610b9b366004613b2a565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b6104ef610bd736600461366b565b612135565b348015610be857600080fd5b506104ef610bf73660046138f9565b612314565b6104ef610c0a366004613b5d565b61238a565b348015610c1b57600080fd5b506104ef610c2a366004613914565b612599565b6000610c3a8261266d565b92915050565b6000610c3a8261268a565b606060028054610c5a90613ba9565b80601f0160208091040260200160405190810160405280929190818152602001828054610c8690613ba9565b8015610cd35780601f10610ca857610100808354040283529160200191610cd3565b820191906000526020600020905b815481529060010190602001808311610cb657829003601f168201915b5050505050905090565b6000610ce882612695565b506000908152600660205260409020546001600160a01b031690565b6000610d0f8261183e565b9050806001600160a01b0316836001600160a01b031603610d815760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b0382161480610d9d5750610d9d8133610b9b565b610e0f5760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610d78565b610e1983836126e5565b505050565b6040516bffffffffffffffffffffffff19606085901b1660208201526000908190603401604051602081830303815290604052805190602001209050610e9b848480806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506021549150849050612753565b95945050505050565b610eac612769565b601e54811115610f245760405162461bcd60e51b815260206004820152603960248201527f537570706c792063616e6e6f74206578636565642074686520746f74616c207360448201527f7570706c79206c696d6974206f662031306b20746f6b656e73000000000000006064820152608401610d78565b6016548111610f9b5760405162461bcd60e51b815260206004820152603c60248201527f537570706c792063616e6e6f74206265206c6573736572207468616e206f722060448201527f657175616c20746f20746865206578697374696e6720737570706c79000000006064820152608401610d78565b601655565b610fa8612769565b80610ff55760405162461bcd60e51b815260206004820152601f60248201527f50726f76656e616e636520486173682063616e6e6f7420626520656d707479006044820152606401610d78565b600e80546001810182556000919091527fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd01611032828483613c31565b50600f805490600061104383613d07565b91905055507fd860c15b3ab111ebc91e91357849bf44a894c4862bbdf59da7c0562652ef37528282604051611079929190613d20565b60405180910390a15050565b61108d612769565b806000036110dd5760405162461bcd60e51b815260206004820181905260248201527f4d6178205075626c696320746f6b656e732063616e6e6f74206265207a65726f6044820152606401610d78565b602055565b6110ec33826127c3565b6111085760405162461bcd60e51b8152600401610d7890613d4f565b610e19838383612842565b60175460ff166111655760405162461bcd60e51b815260206004820152601d60248201527f4275726e696e6720697320646973626c65642061742070726573656e740000006044820152606401610d78565b3361116f8261183e565b6001600160a01b0316146111d15760405162461bcd60e51b8152602060048201526024808201527f4f6e6c7920746f6b656e206f776e65722063616e206275726e207468696572206044820152634e46547360e01b6064820152608401610d78565b6111da816129b3565b6040518181527ff20b2822e5b23bbd8f6a8403d33b35d15c70c1b08311f66ab320995806ebbcf0906020015b60405180910390a150565b60008281526001602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b03169282019290925282916112865750604080518082019091526000546001600160a01b0381168252600160a01b90046001600160601b031660208201525b6020810151600090612710906112a5906001600160601b031687613d9c565b6112af9190613dbb565b91519350909150505b9250929050565b60006112ca83611989565b821061132c5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610d78565b506001600160a01b03919091166000908152600860209081526040808320938352929052205490565b61135d612769565b601c80546bffffffffffffffffffffffff19166001600160601b0383169081179182905561139b91600160601b90046001600160a01b0316906129cd565b50565b6113a6612769565b6001600160a01b0381166113fc5760405162461bcd60e51b815260206004820152601c60248201527f696e7075742063616e6e6f742062652061646472657373207a65726f000000006044820152606401610d78565b601d80546001600160a01b0319166001600160a01b0392909216919091179055565b611426612769565b336114895760405162461bcd60e51b815260206004820152602d60248201527f416464726573732073657420746f203078302c2073657420746865207265636560448201526c7069656e74206164647265737360981b6064820152608401610d78565b47806114cd5760405162461bcd60e51b81526020600482015260136024820152724e4f5448494e475f544f5f574954484452415760681b6044820152606401610d78565b601d546040516001600160a01b039091169082156108fc029083906000818181858888f1935050505061139b57600080fd5b611507612769565b6001600160a01b03811661156e5760405162461bcd60e51b815260206004820152602860248201527f526f79616c747920726563657069656e742063616e6e6f742062652061646472604482015267657373207a65726f60c01b6064820152608401610d78565b601c80546001600160601b03908116600160601b6001600160a01b0385811682028381179586905561139b9592909204169216176129cd565b610e1983838360405180602001604052806000815250611f54565b6115ca612769565b6017805461ff001981166101009182900460ff16159091021790556018546000036115f857426018556115fe565b60006018555b6017546018546040805161010090930460ff161515835260208301919091527f4b095420b879fd6e6ee4672377c2c1f4b6d1d08de2c152903538f44f413c151f91015b60405180910390a1565b611653612769565b60155481116116d65760405162461bcd60e51b815260206004820152604360248201527f4e657720696e6465782063616e6e6f74206265206c6573736572207468616e2060448201527f6f7220657175616c20746f207468652063757272656e7420746f6b656e20696e6064820152620c8caf60eb1b608482015260a401610d78565b601555565b6060600e6001600f546116ee9190613ddd565b815481106116fe576116fe613df4565b906000526020600020018054610c5a90613ba9565b600061171e600a5490565b82106117815760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610d78565b600a828154811061179457611794613df4565b90600052602060002001549050919050565b6117ae612769565b60008190036117ff5760405162461bcd60e51b815260206004820152601860248201527f42617365205552492063616e6e6f7420626520656d70747900000000000000006044820152606401610d78565b601b61180c828483613c31565b507ff9c7803e94e0d3c02900d8a90893a6d5e90dd04d32a4cfe825520f82bf9f32f68282604051611079929190613d20565b6000818152600460205260408120546001600160a01b031680610c3a5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610d78565b6118a6612769565b600081116118f65760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f742073657420707269636520746f207a65726f00000000000000006044820152606401610d78565b601a55565b601b805461190890613ba9565b80601f016020809104026020016040519081016040528092919081815260200182805461193490613ba9565b80156119815780601f1061195657610100808354040283529160200191611981565b820191906000526020600020905b81548152906001019060200180831161196457829003601f168201915b505050505081565b60006001600160a01b0382166119f35760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610d78565b506001600160a01b031660009081526005602052604090205490565b611a17612769565b611a216000612aca565b565b611a2b612769565b601654601554611a3c908390613e0a565b1115611a8a5760405162461bcd60e51b815260206004820152601b60248201527f4e6f7420656e6f75676820746f6b656e7320617661696c61626c6500000000006044820152606401610d78565b60005b81811015611ada57611ad2838383818110611aaa57611aaa613df4565b9050602002016020810190611abf91906138f9565b82601554611acd9190613e0a565b612b1c565b600101611a8d565b508181905060156000828254611af09190613e0a565b90915550506040517fece8c31c5c64526f221d74ba164c62faabbbbb347175b7e169a8e223290c45c5906110799084908490613e22565b611b2f612769565b60218190556040518181527fbdd203dd78bf49cf79e4db0ecdf7d27adc380fb1f33beef2667a50db9d2a0e0490602001611206565b611b6c612769565b80600003611bce5760405162461bcd60e51b815260206004820152602960248201527f4e756d626572206f6620746f6b656e732073686f756c64206265206d6f7265206044820152687468616e207a65726f60b81b6064820152608401610d78565b61139b3382612b36565b60606000611be583611989565b905060008167ffffffffffffffff811115611c0257611c02613a38565b604051908082528060200260200182016040528015611c2b578160200160208202803683370190505b50905060005b82811015611c6857611c4385826112bf565b828281518110611c5557611c55613df4565b6020908102919091010152600101611c31565b509392505050565b6060600e805480602002602001604051908101604052809291908181526020016000905b82821015611d40578382906000526020600020018054611cb390613ba9565b80601f0160208091040260200160405190810160405280929190818152602001828054611cdf90613ba9565b8015611d2c5780601f10611d0157610100808354040283529160200191611d2c565b820191906000526020600020905b815481529060010190602001808311611d0f57829003601f168201915b505050505081526020019060010190611c94565b50505050905090565b611d51612769565b6000819003611da25760405162461bcd60e51b815260206004820152601c60248201527f436f6e7472616374205552492063616e6e6f7420626520656d707479000000006044820152606401610d78565b6014611daf828483613c31565b507faf497693a87db12ca89131a31edbb3db4bb5702dfb284e8ae7427d185f09112d8282604051611079929190613d20565b606060038054610c5a90613ba9565b6060611dfb8261266d565b611e175760405162461bcd60e51b8152600401610d7890613e6e565b6000828152601260209081526040918290209151611e36929101613f30565b6040516020818303038152906040529050919050565b611e57338383612bcd565b5050565b611e63612769565b6017805460ff19811660ff90911615179055565b611e7f612769565b6000819003611ed05760405162461bcd60e51b815260206004820152601e60248201527f546f6b656e55524920696e7075742063616e6e6f7420626520656d70747900006044820152606401610d78565b60005b81811015611f3557828282818110611eed57611eed613df4565b9050602002810190611eff9190613f59565b6012600084601354611f119190613e0a565b81526020019081526020016000209182611f2c929190613c31565b50600101611ed3565b508181905060136000828254611f4b9190613e0a565b90915550505050565b611f5e33836127c3565b611f7a5760405162461bcd60e51b8152600401610d7890613d4f565b611f8684848484612c9b565b50505050565b6060611f9782612695565b6000611fa1612cce565b90506000815111611fc15760405180602001604052806000815250611fec565b80611fcb84612cdd565b604051602001611fdc929190613fa0565b6040516020818303038152906040525b9392505050565b611ffb612769565b6017805462ff0000198116620100009182900460ff161590910217905560195460000361202b5742601955612031565b60006019555b601754601954604080516201000090930460ff161515835260208301919091527f1249095c8ca9dacd913fe4d8e406007bf4ff54048c4cea756cdb6b9b7e67d7ae9101611641565b60606120848261266d565b6120a05760405162461bcd60e51b8152600401610d7890613e6e565b6000828152601060209081526040918290209151611e36929101613fcf565b6120c7612769565b806000036121235760405162461bcd60e51b815260206004820152602360248201527f4d617820416c6c6f776c69737420746f6b656e732063616e6e6f74206265207a60448201526265726f60e81b6064820152608401610d78565b601f55565b6014805461190890613ba9565b61213d612d70565b600a5460175433919062010000900460ff1661216b5760405162461bcd60e51b8152600401610d7890613feb565b601754610100900460ff16156121d55760405162461bcd60e51b815260206004820152602960248201527f5075626c69632073616c65206d7573742062652061637469766520746f206d696044820152686e7420746f6b656e7360b81b6064820152608401610d78565b6020546121e183611989565b6121eb9085613e0a565b11156122095760405162461bcd60e51b8152600401610d789061402d565b6016546122168483613e0a565b11156122645760405162461bcd60e51b815260206004820181905260248201527f507572636861736520776f756c6420657863656564206d617820746f6b656e736044820152606401610d78565b3483601a546122739190613d9c565b11156122bc5760405162461bcd60e51b8152602060048201526018602482015277125b98dbdc9c9958dd081c185e58589b1948185b5bdd5b9d60421b6044820152606401610d78565b6122c68284612b36565b604080516001600160a01b0384168152602081018590527fab9980fb1d2916bce9017edd1be458e3f56d0899b3367cb3a8be97483fbe069b910160405180910390a1505061139b6001600d55565b61231c612769565b6001600160a01b0381166123815760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610d78565b61139b81612aca565b612392612d70565b601754339062010000900460ff166123bc5760405162461bcd60e51b8152600401610d7890613feb565b601754610100900460ff166124235760405162461bcd60e51b815260206004820152602760248201527f416c6c6f776c697374206d7573742062652061637469766520746f206d696e7460448201526620746f6b656e7360c81b6064820152608401610d78565b601f5461242f82611989565b6124399084613e0a565b11156124575760405162461bcd60e51b8152600401610d789061402d565b612462338585610e1e565b6124bd5760405162461bcd60e51b815260206004820152602660248201527f41646472657373206e6f7420656c696769626c6520666f722074686520616c6c6044820152651bdddb1a5cdd60d21b6064820152608401610d78565b81601a546124cb9190613d9c565b34146125145760405162461bcd60e51b8152602060048201526018602482015277125b98dbdc9c9958dd081c185e58589b1948185b5bdd5b9d60421b6044820152606401610d78565b6001600160a01b0381166000908152602260205260408120805484929061253c908490613e0a565b9091555061254c90508183612b36565b604080516001600160a01b0383168152602081018490527f0926236569819f01608d964070a5640e67adaa5a3f1cd783ae86954e26007572910160405180910390a150610e196001600d55565b6125a1612769565b60008190036125f25760405162461bcd60e51b815260206004820152601e60248201527f546f6b656e55524920696e7075742063616e6e6f7420626520656d70747900006044820152606401610d78565b60005b818110156126575782828281811061260f5761260f613df4565b90506020028101906126219190613f59565b60106000846011546126339190613e0a565b8152602001908152602001600020918261264e929190613c31565b506001016125f5565b508181905060116000828254611f4b9190613e0a565b6000908152600460205260409020546001600160a01b0316151590565b6000610c3a82612dc9565b61269e8161266d565b61139b5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610d78565b600081815260066020526040902080546001600160a01b0319166001600160a01b038416908117909155819061271a8261183e565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000826127608584612dee565b14949350505050565b600c546001600160a01b03163314611a215760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610d78565b6000806127cf8361183e565b9050806001600160a01b0316846001600160a01b0316148061281657506001600160a01b0380821660009081526007602090815260408083209388168352929052205460ff165b8061283a5750836001600160a01b031661282f84610cdd565b6001600160a01b0316145b949350505050565b826001600160a01b03166128558261183e565b6001600160a01b03161461287b5760405162461bcd60e51b8152600401610d789061407c565b6001600160a01b0382166128dd5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610d78565b6128ea8383836001612e33565b826001600160a01b03166128fd8261183e565b6001600160a01b0316146129235760405162461bcd60e51b8152600401610d789061407c565b600081815260066020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260058552838620805460001901905590871680865283862080546001019055868652600490945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6129bc81612e3f565b600090815260016020526040812055565b6127106001600160601b0382161115612a3b5760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608401610d78565b6001600160a01b038216612a915760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610d78565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600055565b600c80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b611e57828260405180602001604052806000815250612e48565b60165481601554612b479190613e0a565b1115612b955760405162461bcd60e51b815260206004820181905260248201527f507572636861736520776f756c6420657863656564206d617820746f6b656e736044820152606401610d78565b60005b81811015612bba57612bb28382601554611acd9190613e0a565b600101612b98565b508060156000828254611f4b9190613e0a565b816001600160a01b0316836001600160a01b031603612c2e5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610d78565b6001600160a01b03838116600081815260076020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612ca6848484612842565b612cb284848484612e7b565b611f865760405162461bcd60e51b8152600401610d78906140c1565b6060601b8054610c5a90613ba9565b60606000612cea83612f7c565b600101905060008167ffffffffffffffff811115612d0a57612d0a613a38565b6040519080825280601f01601f191660200182016040528015612d34576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084612d3e57509392505050565b6002600d5403612dc25760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610d78565b6002600d55565b60006001600160e01b0319821663780e9d6360e01b1480610c3a5750610c3a82613054565b600081815b8451811015611c6857612e1f82868381518110612e1257612e12613df4565b6020026020010151613094565b915080612e2b81613d07565b915050612df3565b611f86848484846130c0565b6129bc81613200565b612e5283836132a3565b612e5f6000848484612e7b565b610e195760405162461bcd60e51b8152600401610d78906140c1565b60006001600160a01b0384163b15612f7157604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612ebf903390899088908890600401614113565b6020604051808303816000875af1925050508015612efa575060408051601f3d908101601f19168201909252612ef791810190614150565b60015b612f57573d808015612f28576040519150601f19603f3d011682016040523d82523d6000602084013e612f2d565b606091505b508051600003612f4f5760405162461bcd60e51b8152600401610d78906140c1565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061283a565b506001949350505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310612fbb5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310612fe7576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061300557662386f26fc10000830492506010015b6305f5e100831061301d576305f5e100830492506008015b612710831061303157612710830492506004015b60648310613043576064830492506002015b600a8310610c3a5760010192915050565b60006001600160e01b031982166380ac58cd60e01b148061308557506001600160e01b03198216635b5e139f60e01b145b80610c3a5750610c3a8261341e565b60008183106130b0576000828152602084905260409020611fec565b5060009182526020526040902090565b6130cc84848484613453565b600181111561313b5760405162461bcd60e51b815260206004820152603560248201527f455243373231456e756d657261626c653a20636f6e7365637574697665207472604482015274185b9cd9995c9cc81b9bdd081cdd5c1c1bdc9d1959605a1b6064820152608401610d78565b816001600160a01b0385166131975761319281600a80546000838152600b60205260408120829055600182018355919091527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80155565b6131ba565b836001600160a01b0316856001600160a01b0316146131ba576131ba85826134db565b6001600160a01b0384166131d6576131d181613578565b6131f9565b846001600160a01b0316846001600160a01b0316146131f9576131f98482613627565b5050505050565b600061320b8261183e565b905061321b816000846001612e33565b6132248261183e565b600083815260066020908152604080832080546001600160a01b03199081169091556001600160a01b0385168085526005845282852080546000190190558785526004909352818420805490911690555192935084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6001600160a01b0382166132f95760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610d78565b6133028161266d565b1561334f5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610d78565b61335d600083836001612e33565b6133668161266d565b156133b35760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610d78565b6001600160a01b038216600081815260056020908152604080832080546001019055848352600490915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001600160e01b0319821663152a902d60e11b1480610c3a57506301ffc9a760e01b6001600160e01b0319831614610c3a565b6001811115611f86576001600160a01b03841615613499576001600160a01b03841660009081526005602052604081208054839290613493908490613ddd565b90915550505b6001600160a01b03831615611f86576001600160a01b038316600090815260056020526040812080548392906134d0908490613e0a565b909155505050505050565b600060016134e884611989565b6134f29190613ddd565b600083815260096020526040902054909150808214613545576001600160a01b03841660009081526008602090815260408083208584528252808320548484528184208190558352600990915290208190555b5060009182526009602090815260408084208490556001600160a01b039094168352600881528383209183525290812055565b600a5460009061358a90600190613ddd565b6000838152600b6020526040812054600a80549394509092849081106135b2576135b2613df4565b9060005260206000200154905080600a83815481106135d3576135d3613df4565b6000918252602080832090910192909255828152600b9091526040808220849055858252812055600a80548061360b5761360b61416d565b6001900381819060005260206000200160009055905550505050565b600061363283611989565b6001600160a01b039093166000908152600860209081526040808320868452825280832085905593825260099052919091209190915550565b60006020828403121561367d57600080fd5b5035919050565b6001600160e01b03198116811461139b57600080fd5b6000602082840312156136ac57600080fd5b8135611fec81613684565b60005b838110156136d25781810151838201526020016136ba565b83811115611f865750506000910152565b600081518084526136fb8160208601602086016136b7565b601f01601f19169290920160200192915050565b602081526000611fec60208301846136e3565b80356001600160a01b038116811461373957600080fd5b919050565b6000806040838503121561375157600080fd5b61375a83613722565b946020939093013593505050565b60008083601f84011261377a57600080fd5b50813567ffffffffffffffff81111561379257600080fd5b6020830191508360208260051b85010111156112b857600080fd5b6000806000604084860312156137c257600080fd5b6137cb84613722565b9250602084013567ffffffffffffffff8111156137e757600080fd5b6137f386828701613768565b9497909650939450505050565b6000806020838503121561381357600080fd5b823567ffffffffffffffff8082111561382b57600080fd5b818501915085601f83011261383f57600080fd5b81358181111561384e57600080fd5b86602082850101111561386057600080fd5b60209290920196919550909350505050565b60008060006060848603121561388757600080fd5b61389084613722565b925061389e60208501613722565b9150604084013590509250925092565b600080604083850312156138c157600080fd5b50508035926020909101359150565b6000602082840312156138e257600080fd5b81356001600160601b0381168114611fec57600080fd5b60006020828403121561390b57600080fd5b611fec82613722565b6000806020838503121561392757600080fd5b823567ffffffffffffffff81111561393e57600080fd5b61394a85828601613768565b90969095509350505050565b6020808252825182820181905260009190848201906040850190845b8181101561398e57835183529284019291840191600101613972565b50909695505050505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156139ef57603f198886030184526139dd8583516136e3565b945092850192908501906001016139c1565b5092979650505050505050565b60008060408385031215613a0f57600080fd5b613a1883613722565b915060208301358015158114613a2d57600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b60008060008060808587031215613a6457600080fd5b613a6d85613722565b9350613a7b60208601613722565b925060408501359150606085013567ffffffffffffffff80821115613a9f57600080fd5b818701915087601f830112613ab357600080fd5b813581811115613ac557613ac5613a38565b604051601f8201601f19908116603f01168101908382118183101715613aed57613aed613a38565b816040528281528a6020848701011115613b0657600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b60008060408385031215613b3d57600080fd5b613b4683613722565b9150613b5460208401613722565b90509250929050565b600080600060408486031215613b7257600080fd5b833567ffffffffffffffff811115613b8957600080fd5b613b9586828701613768565b909790965060209590950135949350505050565b600181811c90821680613bbd57607f821691505b602082108103613bdd57634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115610e1957600081815260208120601f850160051c81016020861015613c0a5750805b601f850160051c820191505b81811015613c2957828155600101613c16565b505050505050565b67ffffffffffffffff831115613c4957613c49613a38565b613c5d83613c578354613ba9565b83613be3565b6000601f841160018114613c915760008515613c795750838201355b600019600387901b1c1916600186901b1783556131f9565b600083815260209020601f19861690835b82811015613cc25786850135825560209485019460019092019101613ca2565b5086821015613cdf5760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b634e487b7160e01b600052601160045260246000fd5b600060018201613d1957613d19613cf1565b5060010190565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b6000816000190483118215151615613db657613db6613cf1565b500290565b600082613dd857634e487b7160e01b600052601260045260246000fd5b500490565b600082821015613def57613def613cf1565b500390565b634e487b7160e01b600052603260045260246000fd5b60008219821115613e1d57613e1d613cf1565b500190565b60208082528181018390526000908460408401835b86811015613e63576001600160a01b03613e5084613722565b1682529183019190830190600101613e37565b509695505050505050565b6020808252602f908201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60408201526e3732bc34b9ba32b73a103a37b5b2b760891b606082015260800190565b60008154613eca81613ba9565b60018281168015613ee25760018114613ef757613f26565b60ff1984168752821515830287019450613f26565b8560005260208060002060005b85811015613f1d5781548a820152908401908201613f04565b50505082870194505b5050505092915050565b7368747470733a2f2f617277656176652e6e65742f60601b81526000611fec6014830184613ebd565b6000808335601e19843603018112613f7057600080fd5b83018035915067ffffffffffffffff821115613f8b57600080fd5b6020019150368190038213156112b857600080fd5b60008351613fb28184602088016136b7565b835190830190613fc68183602088016136b7565b01949350505050565b66697066733a2f2f60c81b81526000611fec6007830184613ebd565b60208082526022908201527f53616c65206d7573742062652061637469766520746f206d696e7420746f6b656040820152616e7360f01b606082015260800190565b6020808252602f908201527f4e756d626572206f6620746f6b656e73206578636565647320746865206d617860408201526e20616c6c6f77656420746f6b656e7360881b606082015260800190565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090614146908301846136e3565b9695505050505050565b60006020828403121561416257600080fd5b8151611fec81613684565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220d80d509cfaa072b493125bc94a4bc1549b040f9fc06ff3a832e2776a232719f564736f6c634300080f003300000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000b33efa6203a18a3696509d98d29574dd07820a8100000000000000000000000000000000000000000000000000000000000003e800000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000000000000000000000000000000000000000001054686f7573616e64466163657344414f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000025446000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002168747470733a2f2f746f6b656e732e74686f7573616e6466616365732e6172742f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000035697066733a2f2f516d5734374a695546543533746d394b446472444658504d5557393461326874424365767842376134316d6575760000000000000000000000
Deployed Bytecode
0x6080604052600436106103dc5760003560e01c80636c0360eb116101fd578063b6728e4b11610118578063e01d716f116100ab578063e985e9c51161007a578063e985e9c514610b80578063efd0cbf914610bc9578063f2fde38b14610bdc578063f6d8259914610bfc578063f970e4e814610c0f57600080fd5b8063e01d716f14610b11578063e590746414610b31578063e76af32e14610b51578063e8a3d48514610b6b57600080fd5b8063c87b56dd116100e7578063c87b56dd14610aa7578063d2d515cc14610ac7578063d447c75814610ae6578063daaeec8614610afc57600080fd5b8063b6728e4b14610a1a578063b88d4fde14610a3a578063b8997a9714610a5a578063c167d1cd14610a9257600080fd5b80638ab3ed801161019057806399fb2fed1161015f57806399fb2fed146109af578063a22cb465146109cf578063afed78e8146109ef578063b49fe73f14610a0557600080fd5b80638ab3ed801461093a5780638da5cb5b1461095c578063938e3d7b1461097a57806395d89b411461099a57600080fd5b80637b1b1de6116101cc5780637b1b1de6146108b75780637cb64759146108cd578063819b25ba146108ed5780638462151c1461090d57600080fd5b80636c0360eb1461084d57806370a0823114610862578063715018a614610882578063729ad39e1461089757600080fd5b80632f745c59116102f857806345b74abd1161028b57806355f804b31161025a57806355f804b3146107b7578063564566a8146107d757806359d7bc4d146107f75780636352211e1461080d5780636a61e5fc1461082d57600080fd5b806345b74abd1461073b5780634be8f05b1461075b5780634c00de82146107705780634f6ccce71461079757600080fd5b80633ccfd60b116102c75780633ccfd60b146106d157806341e42f30146106e657806342842e0e1461070657806344bd86f71461072657600080fd5b80632f745c591461065b57806331faafb41461067b57806332cb6b0c1461069b5780633ab1a494146106b157600080fd5b806318160ddd1161037057806323b872dd1161033f57806323b872dd146105c65780632890e0d7146105e65780632a55205a146106065780632eb4a7ab1461064557600080fd5b806318160ddd146105515780631c86b981146105705780631cbaee2d14610590578063213f3ea2146105a657600080fd5b8063095ea7b3116103ac578063095ea7b3146104cf5780630d5296af146104f15780631581b600146105115780631723934d1461053157600080fd5b8062923f9e1461042057806301ffc9a71461045557806306fdde0314610475578063081812fc1461049757600080fd5b3661041b57604080513381523460208201527f88a5966d370b9919b20f3e2c13ff65706f196a4e32cc2c12bf57088f88525874910160405180910390a1005b600080fd5b34801561042c57600080fd5b5061044061043b36600461366b565b610c2f565b60405190151581526020015b60405180910390f35b34801561046157600080fd5b5061044061047036600461369a565b610c40565b34801561048157600080fd5b5061048a610c4b565b60405161044c919061370f565b3480156104a357600080fd5b506104b76104b236600461366b565b610cdd565b6040516001600160a01b03909116815260200161044c565b3480156104db57600080fd5b506104ef6104ea36600461373e565b610d04565b005b3480156104fd57600080fd5b5061044061050c3660046137ad565b610e1e565b34801561051d57600080fd5b50601d546104b7906001600160a01b031681565b34801561053d57600080fd5b506104ef61054c36600461366b565b610ea4565b34801561055d57600080fd5b50600a545b60405190815260200161044c565b34801561057c57600080fd5b506104ef61058b366004613800565b610fa0565b34801561059c57600080fd5b5061056260195481565b3480156105b257600080fd5b506104ef6105c136600461366b565b611085565b3480156105d257600080fd5b506104ef6105e1366004613872565b6110e2565b3480156105f257600080fd5b506104ef61060136600461366b565b611113565b34801561061257600080fd5b506106266106213660046138ae565b611211565b604080516001600160a01b03909316835260208301919091520161044c565b34801561065157600080fd5b5061056260215481565b34801561066757600080fd5b5061056261067636600461373e565b6112bf565b34801561068757600080fd5b506104ef6106963660046138d0565b611355565b3480156106a757600080fd5b50610562601e5481565b3480156106bd57600080fd5b506104ef6106cc3660046138f9565b61139e565b3480156106dd57600080fd5b506104ef61141e565b3480156106f257600080fd5b506104ef6107013660046138f9565b6114ff565b34801561071257600080fd5b506104ef610721366004613872565b6115a7565b34801561073257600080fd5b506104ef6115c2565b34801561074757600080fd5b506104ef61075636600461366b565b61164b565b34801561076757600080fd5b5061048a6116db565b34801561077c57600080fd5b50601c546104b790600160601b90046001600160a01b031681565b3480156107a357600080fd5b506105626107b236600461366b565b611713565b3480156107c357600080fd5b506104ef6107d2366004613800565b6117a6565b3480156107e357600080fd5b506017546104409062010000900460ff1681565b34801561080357600080fd5b5061056260185481565b34801561081957600080fd5b506104b761082836600461366b565b61183e565b34801561083957600080fd5b506104ef61084836600461366b565b61189e565b34801561085957600080fd5b5061048a6118fb565b34801561086e57600080fd5b5061056261087d3660046138f9565b611989565b34801561088e57600080fd5b506104ef611a0f565b3480156108a357600080fd5b506104ef6108b2366004613914565b611a23565b3480156108c357600080fd5b50610562601a5481565b3480156108d957600080fd5b506104ef6108e836600461366b565b611b27565b3480156108f957600080fd5b506104ef61090836600461366b565b611b64565b34801561091957600080fd5b5061092d6109283660046138f9565b611bd8565b60405161044c9190613956565b34801561094657600080fd5b5061094f611c70565b60405161044c919061399a565b34801561096857600080fd5b50600c546001600160a01b03166104b7565b34801561098657600080fd5b506104ef610995366004613800565b611d49565b3480156109a657600080fd5b5061048a611de1565b3480156109bb57600080fd5b5061048a6109ca36600461366b565b611df0565b3480156109db57600080fd5b506104ef6109ea3660046139fc565b611e4c565b3480156109fb57600080fd5b50610562601f5481565b348015610a1157600080fd5b506104ef611e5b565b348015610a2657600080fd5b506104ef610a35366004613914565b611e77565b348015610a4657600080fd5b506104ef610a55366004613a4e565b611f54565b348015610a6657600080fd5b50601c54610a7a906001600160601b031681565b6040516001600160601b03909116815260200161044c565b348015610a9e57600080fd5b50601654610562565b348015610ab357600080fd5b5061048a610ac236600461366b565b611f8c565b348015610ad357600080fd5b5060175461044090610100900460ff1681565b348015610af257600080fd5b5061056260205481565b348015610b0857600080fd5b506104ef611ff3565b348015610b1d57600080fd5b5061048a610b2c36600461366b565b612079565b348015610b3d57600080fd5b506104ef610b4c36600461366b565b6120bf565b348015610b5d57600080fd5b506017546104409060ff1681565b348015610b7757600080fd5b5061048a612128565b348015610b8c57600080fd5b50610440610b9b366004613b2a565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b6104ef610bd736600461366b565b612135565b348015610be857600080fd5b506104ef610bf73660046138f9565b612314565b6104ef610c0a366004613b5d565b61238a565b348015610c1b57600080fd5b506104ef610c2a366004613914565b612599565b6000610c3a8261266d565b92915050565b6000610c3a8261268a565b606060028054610c5a90613ba9565b80601f0160208091040260200160405190810160405280929190818152602001828054610c8690613ba9565b8015610cd35780601f10610ca857610100808354040283529160200191610cd3565b820191906000526020600020905b815481529060010190602001808311610cb657829003601f168201915b5050505050905090565b6000610ce882612695565b506000908152600660205260409020546001600160a01b031690565b6000610d0f8261183e565b9050806001600160a01b0316836001600160a01b031603610d815760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b0382161480610d9d5750610d9d8133610b9b565b610e0f5760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610d78565b610e1983836126e5565b505050565b6040516bffffffffffffffffffffffff19606085901b1660208201526000908190603401604051602081830303815290604052805190602001209050610e9b848480806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506021549150849050612753565b95945050505050565b610eac612769565b601e54811115610f245760405162461bcd60e51b815260206004820152603960248201527f537570706c792063616e6e6f74206578636565642074686520746f74616c207360448201527f7570706c79206c696d6974206f662031306b20746f6b656e73000000000000006064820152608401610d78565b6016548111610f9b5760405162461bcd60e51b815260206004820152603c60248201527f537570706c792063616e6e6f74206265206c6573736572207468616e206f722060448201527f657175616c20746f20746865206578697374696e6720737570706c79000000006064820152608401610d78565b601655565b610fa8612769565b80610ff55760405162461bcd60e51b815260206004820152601f60248201527f50726f76656e616e636520486173682063616e6e6f7420626520656d707479006044820152606401610d78565b600e80546001810182556000919091527fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd01611032828483613c31565b50600f805490600061104383613d07565b91905055507fd860c15b3ab111ebc91e91357849bf44a894c4862bbdf59da7c0562652ef37528282604051611079929190613d20565b60405180910390a15050565b61108d612769565b806000036110dd5760405162461bcd60e51b815260206004820181905260248201527f4d6178205075626c696320746f6b656e732063616e6e6f74206265207a65726f6044820152606401610d78565b602055565b6110ec33826127c3565b6111085760405162461bcd60e51b8152600401610d7890613d4f565b610e19838383612842565b60175460ff166111655760405162461bcd60e51b815260206004820152601d60248201527f4275726e696e6720697320646973626c65642061742070726573656e740000006044820152606401610d78565b3361116f8261183e565b6001600160a01b0316146111d15760405162461bcd60e51b8152602060048201526024808201527f4f6e6c7920746f6b656e206f776e65722063616e206275726e207468696572206044820152634e46547360e01b6064820152608401610d78565b6111da816129b3565b6040518181527ff20b2822e5b23bbd8f6a8403d33b35d15c70c1b08311f66ab320995806ebbcf0906020015b60405180910390a150565b60008281526001602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b03169282019290925282916112865750604080518082019091526000546001600160a01b0381168252600160a01b90046001600160601b031660208201525b6020810151600090612710906112a5906001600160601b031687613d9c565b6112af9190613dbb565b91519350909150505b9250929050565b60006112ca83611989565b821061132c5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610d78565b506001600160a01b03919091166000908152600860209081526040808320938352929052205490565b61135d612769565b601c80546bffffffffffffffffffffffff19166001600160601b0383169081179182905561139b91600160601b90046001600160a01b0316906129cd565b50565b6113a6612769565b6001600160a01b0381166113fc5760405162461bcd60e51b815260206004820152601c60248201527f696e7075742063616e6e6f742062652061646472657373207a65726f000000006044820152606401610d78565b601d80546001600160a01b0319166001600160a01b0392909216919091179055565b611426612769565b336114895760405162461bcd60e51b815260206004820152602d60248201527f416464726573732073657420746f203078302c2073657420746865207265636560448201526c7069656e74206164647265737360981b6064820152608401610d78565b47806114cd5760405162461bcd60e51b81526020600482015260136024820152724e4f5448494e475f544f5f574954484452415760681b6044820152606401610d78565b601d546040516001600160a01b039091169082156108fc029083906000818181858888f1935050505061139b57600080fd5b611507612769565b6001600160a01b03811661156e5760405162461bcd60e51b815260206004820152602860248201527f526f79616c747920726563657069656e742063616e6e6f742062652061646472604482015267657373207a65726f60c01b6064820152608401610d78565b601c80546001600160601b03908116600160601b6001600160a01b0385811682028381179586905561139b9592909204169216176129cd565b610e1983838360405180602001604052806000815250611f54565b6115ca612769565b6017805461ff001981166101009182900460ff16159091021790556018546000036115f857426018556115fe565b60006018555b6017546018546040805161010090930460ff161515835260208301919091527f4b095420b879fd6e6ee4672377c2c1f4b6d1d08de2c152903538f44f413c151f91015b60405180910390a1565b611653612769565b60155481116116d65760405162461bcd60e51b815260206004820152604360248201527f4e657720696e6465782063616e6e6f74206265206c6573736572207468616e2060448201527f6f7220657175616c20746f207468652063757272656e7420746f6b656e20696e6064820152620c8caf60eb1b608482015260a401610d78565b601555565b6060600e6001600f546116ee9190613ddd565b815481106116fe576116fe613df4565b906000526020600020018054610c5a90613ba9565b600061171e600a5490565b82106117815760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610d78565b600a828154811061179457611794613df4565b90600052602060002001549050919050565b6117ae612769565b60008190036117ff5760405162461bcd60e51b815260206004820152601860248201527f42617365205552492063616e6e6f7420626520656d70747900000000000000006044820152606401610d78565b601b61180c828483613c31565b507ff9c7803e94e0d3c02900d8a90893a6d5e90dd04d32a4cfe825520f82bf9f32f68282604051611079929190613d20565b6000818152600460205260408120546001600160a01b031680610c3a5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610d78565b6118a6612769565b600081116118f65760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f742073657420707269636520746f207a65726f00000000000000006044820152606401610d78565b601a55565b601b805461190890613ba9565b80601f016020809104026020016040519081016040528092919081815260200182805461193490613ba9565b80156119815780601f1061195657610100808354040283529160200191611981565b820191906000526020600020905b81548152906001019060200180831161196457829003601f168201915b505050505081565b60006001600160a01b0382166119f35760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610d78565b506001600160a01b031660009081526005602052604090205490565b611a17612769565b611a216000612aca565b565b611a2b612769565b601654601554611a3c908390613e0a565b1115611a8a5760405162461bcd60e51b815260206004820152601b60248201527f4e6f7420656e6f75676820746f6b656e7320617661696c61626c6500000000006044820152606401610d78565b60005b81811015611ada57611ad2838383818110611aaa57611aaa613df4565b9050602002016020810190611abf91906138f9565b82601554611acd9190613e0a565b612b1c565b600101611a8d565b508181905060156000828254611af09190613e0a565b90915550506040517fece8c31c5c64526f221d74ba164c62faabbbbb347175b7e169a8e223290c45c5906110799084908490613e22565b611b2f612769565b60218190556040518181527fbdd203dd78bf49cf79e4db0ecdf7d27adc380fb1f33beef2667a50db9d2a0e0490602001611206565b611b6c612769565b80600003611bce5760405162461bcd60e51b815260206004820152602960248201527f4e756d626572206f6620746f6b656e732073686f756c64206265206d6f7265206044820152687468616e207a65726f60b81b6064820152608401610d78565b61139b3382612b36565b60606000611be583611989565b905060008167ffffffffffffffff811115611c0257611c02613a38565b604051908082528060200260200182016040528015611c2b578160200160208202803683370190505b50905060005b82811015611c6857611c4385826112bf565b828281518110611c5557611c55613df4565b6020908102919091010152600101611c31565b509392505050565b6060600e805480602002602001604051908101604052809291908181526020016000905b82821015611d40578382906000526020600020018054611cb390613ba9565b80601f0160208091040260200160405190810160405280929190818152602001828054611cdf90613ba9565b8015611d2c5780601f10611d0157610100808354040283529160200191611d2c565b820191906000526020600020905b815481529060010190602001808311611d0f57829003601f168201915b505050505081526020019060010190611c94565b50505050905090565b611d51612769565b6000819003611da25760405162461bcd60e51b815260206004820152601c60248201527f436f6e7472616374205552492063616e6e6f7420626520656d707479000000006044820152606401610d78565b6014611daf828483613c31565b507faf497693a87db12ca89131a31edbb3db4bb5702dfb284e8ae7427d185f09112d8282604051611079929190613d20565b606060038054610c5a90613ba9565b6060611dfb8261266d565b611e175760405162461bcd60e51b8152600401610d7890613e6e565b6000828152601260209081526040918290209151611e36929101613f30565b6040516020818303038152906040529050919050565b611e57338383612bcd565b5050565b611e63612769565b6017805460ff19811660ff90911615179055565b611e7f612769565b6000819003611ed05760405162461bcd60e51b815260206004820152601e60248201527f546f6b656e55524920696e7075742063616e6e6f7420626520656d70747900006044820152606401610d78565b60005b81811015611f3557828282818110611eed57611eed613df4565b9050602002810190611eff9190613f59565b6012600084601354611f119190613e0a565b81526020019081526020016000209182611f2c929190613c31565b50600101611ed3565b508181905060136000828254611f4b9190613e0a565b90915550505050565b611f5e33836127c3565b611f7a5760405162461bcd60e51b8152600401610d7890613d4f565b611f8684848484612c9b565b50505050565b6060611f9782612695565b6000611fa1612cce565b90506000815111611fc15760405180602001604052806000815250611fec565b80611fcb84612cdd565b604051602001611fdc929190613fa0565b6040516020818303038152906040525b9392505050565b611ffb612769565b6017805462ff0000198116620100009182900460ff161590910217905560195460000361202b5742601955612031565b60006019555b601754601954604080516201000090930460ff161515835260208301919091527f1249095c8ca9dacd913fe4d8e406007bf4ff54048c4cea756cdb6b9b7e67d7ae9101611641565b60606120848261266d565b6120a05760405162461bcd60e51b8152600401610d7890613e6e565b6000828152601060209081526040918290209151611e36929101613fcf565b6120c7612769565b806000036121235760405162461bcd60e51b815260206004820152602360248201527f4d617820416c6c6f776c69737420746f6b656e732063616e6e6f74206265207a60448201526265726f60e81b6064820152608401610d78565b601f55565b6014805461190890613ba9565b61213d612d70565b600a5460175433919062010000900460ff1661216b5760405162461bcd60e51b8152600401610d7890613feb565b601754610100900460ff16156121d55760405162461bcd60e51b815260206004820152602960248201527f5075626c69632073616c65206d7573742062652061637469766520746f206d696044820152686e7420746f6b656e7360b81b6064820152608401610d78565b6020546121e183611989565b6121eb9085613e0a565b11156122095760405162461bcd60e51b8152600401610d789061402d565b6016546122168483613e0a565b11156122645760405162461bcd60e51b815260206004820181905260248201527f507572636861736520776f756c6420657863656564206d617820746f6b656e736044820152606401610d78565b3483601a546122739190613d9c565b11156122bc5760405162461bcd60e51b8152602060048201526018602482015277125b98dbdc9c9958dd081c185e58589b1948185b5bdd5b9d60421b6044820152606401610d78565b6122c68284612b36565b604080516001600160a01b0384168152602081018590527fab9980fb1d2916bce9017edd1be458e3f56d0899b3367cb3a8be97483fbe069b910160405180910390a1505061139b6001600d55565b61231c612769565b6001600160a01b0381166123815760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610d78565b61139b81612aca565b612392612d70565b601754339062010000900460ff166123bc5760405162461bcd60e51b8152600401610d7890613feb565b601754610100900460ff166124235760405162461bcd60e51b815260206004820152602760248201527f416c6c6f776c697374206d7573742062652061637469766520746f206d696e7460448201526620746f6b656e7360c81b6064820152608401610d78565b601f5461242f82611989565b6124399084613e0a565b11156124575760405162461bcd60e51b8152600401610d789061402d565b612462338585610e1e565b6124bd5760405162461bcd60e51b815260206004820152602660248201527f41646472657373206e6f7420656c696769626c6520666f722074686520616c6c6044820152651bdddb1a5cdd60d21b6064820152608401610d78565b81601a546124cb9190613d9c565b34146125145760405162461bcd60e51b8152602060048201526018602482015277125b98dbdc9c9958dd081c185e58589b1948185b5bdd5b9d60421b6044820152606401610d78565b6001600160a01b0381166000908152602260205260408120805484929061253c908490613e0a565b9091555061254c90508183612b36565b604080516001600160a01b0383168152602081018490527f0926236569819f01608d964070a5640e67adaa5a3f1cd783ae86954e26007572910160405180910390a150610e196001600d55565b6125a1612769565b60008190036125f25760405162461bcd60e51b815260206004820152601e60248201527f546f6b656e55524920696e7075742063616e6e6f7420626520656d70747900006044820152606401610d78565b60005b818110156126575782828281811061260f5761260f613df4565b90506020028101906126219190613f59565b60106000846011546126339190613e0a565b8152602001908152602001600020918261264e929190613c31565b506001016125f5565b508181905060116000828254611f4b9190613e0a565b6000908152600460205260409020546001600160a01b0316151590565b6000610c3a82612dc9565b61269e8161266d565b61139b5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610d78565b600081815260066020526040902080546001600160a01b0319166001600160a01b038416908117909155819061271a8261183e565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000826127608584612dee565b14949350505050565b600c546001600160a01b03163314611a215760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610d78565b6000806127cf8361183e565b9050806001600160a01b0316846001600160a01b0316148061281657506001600160a01b0380821660009081526007602090815260408083209388168352929052205460ff165b8061283a5750836001600160a01b031661282f84610cdd565b6001600160a01b0316145b949350505050565b826001600160a01b03166128558261183e565b6001600160a01b03161461287b5760405162461bcd60e51b8152600401610d789061407c565b6001600160a01b0382166128dd5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610d78565b6128ea8383836001612e33565b826001600160a01b03166128fd8261183e565b6001600160a01b0316146129235760405162461bcd60e51b8152600401610d789061407c565b600081815260066020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260058552838620805460001901905590871680865283862080546001019055868652600490945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6129bc81612e3f565b600090815260016020526040812055565b6127106001600160601b0382161115612a3b5760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608401610d78565b6001600160a01b038216612a915760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610d78565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600055565b600c80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b611e57828260405180602001604052806000815250612e48565b60165481601554612b479190613e0a565b1115612b955760405162461bcd60e51b815260206004820181905260248201527f507572636861736520776f756c6420657863656564206d617820746f6b656e736044820152606401610d78565b60005b81811015612bba57612bb28382601554611acd9190613e0a565b600101612b98565b508060156000828254611f4b9190613e0a565b816001600160a01b0316836001600160a01b031603612c2e5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610d78565b6001600160a01b03838116600081815260076020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612ca6848484612842565b612cb284848484612e7b565b611f865760405162461bcd60e51b8152600401610d78906140c1565b6060601b8054610c5a90613ba9565b60606000612cea83612f7c565b600101905060008167ffffffffffffffff811115612d0a57612d0a613a38565b6040519080825280601f01601f191660200182016040528015612d34576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084612d3e57509392505050565b6002600d5403612dc25760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610d78565b6002600d55565b60006001600160e01b0319821663780e9d6360e01b1480610c3a5750610c3a82613054565b600081815b8451811015611c6857612e1f82868381518110612e1257612e12613df4565b6020026020010151613094565b915080612e2b81613d07565b915050612df3565b611f86848484846130c0565b6129bc81613200565b612e5283836132a3565b612e5f6000848484612e7b565b610e195760405162461bcd60e51b8152600401610d78906140c1565b60006001600160a01b0384163b15612f7157604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612ebf903390899088908890600401614113565b6020604051808303816000875af1925050508015612efa575060408051601f3d908101601f19168201909252612ef791810190614150565b60015b612f57573d808015612f28576040519150601f19603f3d011682016040523d82523d6000602084013e612f2d565b606091505b508051600003612f4f5760405162461bcd60e51b8152600401610d78906140c1565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061283a565b506001949350505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310612fbb5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310612fe7576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061300557662386f26fc10000830492506010015b6305f5e100831061301d576305f5e100830492506008015b612710831061303157612710830492506004015b60648310613043576064830492506002015b600a8310610c3a5760010192915050565b60006001600160e01b031982166380ac58cd60e01b148061308557506001600160e01b03198216635b5e139f60e01b145b80610c3a5750610c3a8261341e565b60008183106130b0576000828152602084905260409020611fec565b5060009182526020526040902090565b6130cc84848484613453565b600181111561313b5760405162461bcd60e51b815260206004820152603560248201527f455243373231456e756d657261626c653a20636f6e7365637574697665207472604482015274185b9cd9995c9cc81b9bdd081cdd5c1c1bdc9d1959605a1b6064820152608401610d78565b816001600160a01b0385166131975761319281600a80546000838152600b60205260408120829055600182018355919091527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80155565b6131ba565b836001600160a01b0316856001600160a01b0316146131ba576131ba85826134db565b6001600160a01b0384166131d6576131d181613578565b6131f9565b846001600160a01b0316846001600160a01b0316146131f9576131f98482613627565b5050505050565b600061320b8261183e565b905061321b816000846001612e33565b6132248261183e565b600083815260066020908152604080832080546001600160a01b03199081169091556001600160a01b0385168085526005845282852080546000190190558785526004909352818420805490911690555192935084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6001600160a01b0382166132f95760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610d78565b6133028161266d565b1561334f5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610d78565b61335d600083836001612e33565b6133668161266d565b156133b35760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610d78565b6001600160a01b038216600081815260056020908152604080832080546001019055848352600490915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001600160e01b0319821663152a902d60e11b1480610c3a57506301ffc9a760e01b6001600160e01b0319831614610c3a565b6001811115611f86576001600160a01b03841615613499576001600160a01b03841660009081526005602052604081208054839290613493908490613ddd565b90915550505b6001600160a01b03831615611f86576001600160a01b038316600090815260056020526040812080548392906134d0908490613e0a565b909155505050505050565b600060016134e884611989565b6134f29190613ddd565b600083815260096020526040902054909150808214613545576001600160a01b03841660009081526008602090815260408083208584528252808320548484528184208190558352600990915290208190555b5060009182526009602090815260408084208490556001600160a01b039094168352600881528383209183525290812055565b600a5460009061358a90600190613ddd565b6000838152600b6020526040812054600a80549394509092849081106135b2576135b2613df4565b9060005260206000200154905080600a83815481106135d3576135d3613df4565b6000918252602080832090910192909255828152600b9091526040808220849055858252812055600a80548061360b5761360b61416d565b6001900381819060005260206000200160009055905550505050565b600061363283611989565b6001600160a01b039093166000908152600860209081526040808320868452825280832085905593825260099052919091209190915550565b60006020828403121561367d57600080fd5b5035919050565b6001600160e01b03198116811461139b57600080fd5b6000602082840312156136ac57600080fd5b8135611fec81613684565b60005b838110156136d25781810151838201526020016136ba565b83811115611f865750506000910152565b600081518084526136fb8160208601602086016136b7565b601f01601f19169290920160200192915050565b602081526000611fec60208301846136e3565b80356001600160a01b038116811461373957600080fd5b919050565b6000806040838503121561375157600080fd5b61375a83613722565b946020939093013593505050565b60008083601f84011261377a57600080fd5b50813567ffffffffffffffff81111561379257600080fd5b6020830191508360208260051b85010111156112b857600080fd5b6000806000604084860312156137c257600080fd5b6137cb84613722565b9250602084013567ffffffffffffffff8111156137e757600080fd5b6137f386828701613768565b9497909650939450505050565b6000806020838503121561381357600080fd5b823567ffffffffffffffff8082111561382b57600080fd5b818501915085601f83011261383f57600080fd5b81358181111561384e57600080fd5b86602082850101111561386057600080fd5b60209290920196919550909350505050565b60008060006060848603121561388757600080fd5b61389084613722565b925061389e60208501613722565b9150604084013590509250925092565b600080604083850312156138c157600080fd5b50508035926020909101359150565b6000602082840312156138e257600080fd5b81356001600160601b0381168114611fec57600080fd5b60006020828403121561390b57600080fd5b611fec82613722565b6000806020838503121561392757600080fd5b823567ffffffffffffffff81111561393e57600080fd5b61394a85828601613768565b90969095509350505050565b6020808252825182820181905260009190848201906040850190845b8181101561398e57835183529284019291840191600101613972565b50909695505050505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156139ef57603f198886030184526139dd8583516136e3565b945092850192908501906001016139c1565b5092979650505050505050565b60008060408385031215613a0f57600080fd5b613a1883613722565b915060208301358015158114613a2d57600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b60008060008060808587031215613a6457600080fd5b613a6d85613722565b9350613a7b60208601613722565b925060408501359150606085013567ffffffffffffffff80821115613a9f57600080fd5b818701915087601f830112613ab357600080fd5b813581811115613ac557613ac5613a38565b604051601f8201601f19908116603f01168101908382118183101715613aed57613aed613a38565b816040528281528a6020848701011115613b0657600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b60008060408385031215613b3d57600080fd5b613b4683613722565b9150613b5460208401613722565b90509250929050565b600080600060408486031215613b7257600080fd5b833567ffffffffffffffff811115613b8957600080fd5b613b9586828701613768565b909790965060209590950135949350505050565b600181811c90821680613bbd57607f821691505b602082108103613bdd57634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115610e1957600081815260208120601f850160051c81016020861015613c0a5750805b601f850160051c820191505b81811015613c2957828155600101613c16565b505050505050565b67ffffffffffffffff831115613c4957613c49613a38565b613c5d83613c578354613ba9565b83613be3565b6000601f841160018114613c915760008515613c795750838201355b600019600387901b1c1916600186901b1783556131f9565b600083815260209020601f19861690835b82811015613cc25786850135825560209485019460019092019101613ca2565b5086821015613cdf5760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b634e487b7160e01b600052601160045260246000fd5b600060018201613d1957613d19613cf1565b5060010190565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b6000816000190483118215151615613db657613db6613cf1565b500290565b600082613dd857634e487b7160e01b600052601260045260246000fd5b500490565b600082821015613def57613def613cf1565b500390565b634e487b7160e01b600052603260045260246000fd5b60008219821115613e1d57613e1d613cf1565b500190565b60208082528181018390526000908460408401835b86811015613e63576001600160a01b03613e5084613722565b1682529183019190830190600101613e37565b509695505050505050565b6020808252602f908201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60408201526e3732bc34b9ba32b73a103a37b5b2b760891b606082015260800190565b60008154613eca81613ba9565b60018281168015613ee25760018114613ef757613f26565b60ff1984168752821515830287019450613f26565b8560005260208060002060005b85811015613f1d5781548a820152908401908201613f04565b50505082870194505b5050505092915050565b7368747470733a2f2f617277656176652e6e65742f60601b81526000611fec6014830184613ebd565b6000808335601e19843603018112613f7057600080fd5b83018035915067ffffffffffffffff821115613f8b57600080fd5b6020019150368190038213156112b857600080fd5b60008351613fb28184602088016136b7565b835190830190613fc68183602088016136b7565b01949350505050565b66697066733a2f2f60c81b81526000611fec6007830184613ebd565b60208082526022908201527f53616c65206d7573742062652061637469766520746f206d696e7420746f6b656040820152616e7360f01b606082015260800190565b6020808252602f908201527f4e756d626572206f6620746f6b656e73206578636565647320746865206d617860408201526e20616c6c6f77656420746f6b656e7360881b606082015260800190565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090614146908301846136e3565b9695505050505050565b60006020828403121561416257600080fd5b8151611fec81613684565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220d80d509cfaa072b493125bc94a4bc1549b040f9fc06ff3a832e2776a232719f564736f6c634300080f0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000b33efa6203a18a3696509d98d29574dd07820a8100000000000000000000000000000000000000000000000000000000000003e800000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000000000000000000000000000000000000000001054686f7573616e64466163657344414f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000025446000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002168747470733a2f2f746f6b656e732e74686f7573616e6466616365732e6172742f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000035697066733a2f2f516d5734374a695546543533746d394b446472444658504d5557393461326874424365767842376134316d6575760000000000000000000000
-----Decoded View---------------
Arg [0] : _name (string): ThousandFacesDAO
Arg [1] : _symbol (string): TF
Arg [2] : _baseTokenURI (string): https://tokens.thousandfaces.art/
Arg [3] : _royaltyRecipient (address): 0xb33eFA6203A18A3696509d98D29574Dd07820a81
Arg [4] : _royaltyFee (uint96): 1000
Arg [5] : _initialContractURI (string): ipfs://QmW47JiUFT53tm9KDdrDFXPMUW94a2htBCevxB7a41meuv
-----Encoded View---------------
16 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [3] : 000000000000000000000000b33efa6203a18a3696509d98d29574dd07820a81
Arg [4] : 00000000000000000000000000000000000000000000000000000000000003e8
Arg [5] : 00000000000000000000000000000000000000000000000000000000000001a0
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000010
Arg [7] : 54686f7573616e64466163657344414f00000000000000000000000000000000
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [9] : 5446000000000000000000000000000000000000000000000000000000000000
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000021
Arg [11] : 68747470733a2f2f746f6b656e732e74686f7573616e6466616365732e617274
Arg [12] : 2f00000000000000000000000000000000000000000000000000000000000000
Arg [13] : 0000000000000000000000000000000000000000000000000000000000000035
Arg [14] : 697066733a2f2f516d5734374a695546543533746d394b446472444658504d55
Arg [15] : 57393461326874424365767842376134316d6575760000000000000000000000
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.