Overview
Max Total Supply
0 WMVG
Holders
57
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
1 WMVGLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
WhereMyVansGo
Compiler Version
v0.8.0+commit.c7dfd78e
Optimization Enabled:
Yes with 500 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; // @title: Where My Vans Go // @creator: Isaac Wright // @author: andrewjiang.eth, built on manifold.xyz creator core //////////////////////////////////////////////////////////////////////////////////////// // // // ··_·······____···················__··___·····_····__·················______····· // // ·| |·····/ / /_··___··________··/ |/ /_··_| |··/ /___·_____··_____/ ____/___·· // // ·| |·/|·/ / __ \/ _ \/ ___/ _ \/ /|_/ / /·/ / |·/ / __ `/ __ \/ ___/ /·__/ __ \· // // ·| |/ |/ / /·/ / __/ /··/ __/ /··/ / /_/ /| |/ / /_/ / / / (__ ) /_/ / /_/ /· // // ·|__/|__/_/·/_/\___/_/···\___/_/··/_/\__, / |___/\__,_/_/ /_/____/\____/\____/·· // // ····································/____/······································ // // ·····················-░░░░░░▓░···························----))))--············· // // ·····················)░░░░░░▓░···························░░░░░░░▓░░··----------- // // ·····················)░░░░░░▓░···························░░░▓▓░░▓░░-)░░░░░░░░▓░░ // // ·····················)░░░░░░▓░··········(················░░░▓░░░░▓▓░░░░░░░░░░▓▓░ // // ·····················)▓▓░░░▓▓░·······(▓███▓··············░░▓▓░░░▓░░░░░░░░░░▓▓▓▓░ // // ·····················)▓▓░░░▓▓░·······)███▓▓▓·············░░░▓▓░░░▓░░░▓▓░░░░▓▓▓░░ // // ········░░░░░··░--░▓▓▓▓▓░░░▓▓▓········)█████-············░░░▓░░░░░░░▓▓▓▓░░░▓▓▓▓░ // // ········░▓▓░░░-░░░░▓▓▓▓▓░░░▓▓▓·······-░░▓██▓▓░░░)-·······░░░░▓░░░░░░░░▓▓▓▓░···░░ // // )))))···░▓▓░░▓░░))▓░▓▓▓▓░░░▓▓░··░·░░░█▓▓▓▓▓▓▓▓▓▓▓▓▓--···-░░▓▓░▓░░░░░░░░▓▓▓░░░░░░ // // ▓▓▓▓▓▓░░░▓▓░░░░░▓▓▓▓▓▓▓▓░░░░▓░·)░░)░▓▓▓▓▓▓▓▓▓▓▓██▓▓▓░░░░░░░░░░░░░░░▓▓▓▓▓░░░░░░░░ // // ▓▓▓░░░░░▓▓▓░░░░░▓▓▓▓▓▓▓▓▓▓▓▓░░··░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░▓░░░░)░-░░░▓▓▓▓▓░░░░░░░ // // ▓▓▓▓░░░░░▓░░▓░░░▓▓▓▓▓▓▓▓(░░░░░░░░)▓▓░▓░░░▓▓▓▓▓▓▓▓░▓▓▓░░░)▓░░░░░░░░░░▓▓▓▓▓░░░░░░░ // // ▓▓▓▓▓▓▓▓▓▓▓▓▓░░░▓▓▓▓▓▓▓▓░░░░░░░░░▓▓▓░▓░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░*░░▓▓░░░░░░░░░░ // // ▓▓▓▓▓▓▓▓▓▓▓▓▓░░░▓▓▓▓▓▓▓░░░░░░░░░░▓█░░▓▓█████████▓▓▓▓▓▓▓▓▓░-----··--)▓▓▓▓▓▓▓▓▓░▓░ // // █▓▓▓▓▓▓▓▓▓▓▓▓░░░▓▓▓▓▓▓▓▓░░░░░░░░)██▓██████████████▓▓▓▓▓▓▓▓▓▓▓░▓▓▓░▓▓▓▓▓▓▓▓▓▓▓▓▓▓ // // ▓▓▓▓▓▓▓▓▓▓▓▓▓░░░▓▓░░░░(░░░░░░░░░░▓▓█████████████████▓▓▓▓░▓▓▓▓▓▓░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓ // // ░░(((░(░░░░░░░░░░░░░░((░░░░(░((-)▓███████████████████▓▓░░░░░░░░░░░░░░░░░░░░░·░░░ // // ███████████████████████████████▓▓█████████████████████████████████▓████████░▓███ // // █████████████▓████████████████████████████████████████████████████▓████▓███░████ // // ████████████▓████████████▓▓▓▓▓▓▓▓█████████████████████████████████▓████▓███░███▓ // // ███████████████████████████▓▓▓▓█▓█████████████████████████████████▓████▓███░███▓ // // ████▓▓▓▓▓▓▓█▓░░░░▓▓▓▓|·············████▓···||*▓░█████░░░▓░░░░░░░░░░░░░░░░░▓░░░▓▓ // // ███████▓▓▓██▓▓▓░░▓░░░·-············*▓███░)▓▓·░)░█████░░▓▓░░░░░░░░░░░░░▓▓▓░░░▓░▓░ // // █████▓██▓███▓░░▓▓▓·*░·(·░|*░)░))---·-░▓▓▓░░░░))░▓▓▓█░░░░░░░░▓▓▓▓▓░░▓░░░-░░░░▓░▓░ // // ██████▓█████▓▓▓░░▓·░░···░)░░)-)░·||·░█▓░░░░░░(··)(░▓░-······░░░░░-*░░░░░░░░░▓░▓░ // // ██████▓▓▓░░·|░░░░▓·░░·░·░)░░(░(░·*░·░·░░░▓░░░░·░▓▓▓▓░···(·····)░(░░░░░░░░░░░··░░ // // ███░░░-·····()░░░░·░░·░·░)░░)░(░·*░·░·░░░░▓░░)·░░░░░░···(·····)░░░░░░░░░░░░░░░░░ // // ███▓▓░▓▓▓▓▓░▓▓▓▓░░·*░·░·░)░░(░(░░)░·░·░░░▓▓░░)·░░▓▓░░*··)·····)*░░░░░░░░░░░░░░vF // // // //////////////////////////////////////////////////////////////////////////////////////// // From coast to coast, between borders and beyond, this series represents the journey that has forged the person and artist that I am today. // By following my vans on this vast journey through time, I hope you will feel every step and heartbeat, I hope you will rise above fears with me. // If this journey has taught me anything it is that everything is about our struggle and process, if you never climb, you never see the view. // // This is the climb. // In snow and fog, sunshine and rain, from the tops of skyscrapers and bridges and through incarceration, here I learned to do whatever it takes. // // These are the shoes that made me. // Welcome. import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@manifoldxyz/creator-core-solidity/contracts/ERC721Creator.sol"; interface ERC1155Partial { function isApprovedForAll(address account, address operator) external view returns (bool); function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata) external; } contract WhereMyVansGo is ERC721Creator { constructor() ERC721Creator("Where My Vans Go", "WMVG") {} // * CONSTANTS * // uint8 public constant collectionSize = 125; // Contract enforced collection size limit // * STORAGE * // address public purgatory = address(0); address public originalContract = address(0); bytes32 public merkleRoot; // Merkle root to verify original token IDs and new token IDs are valid bool public merkleRootLocked = false; // Lock merkle root to prevent tampering uint8[] public migrationRange; string public contractMetadataURI; mapping(uint256 => address) public originalTokenIdToAddress; function setMigrationParameters( address _purgatory, address _originalContract, uint8[] calldata _migrationRange, bytes32 _merkleRoot ) adminRequired public { purgatory = _purgatory; originalContract = _originalContract; migrationRange = _migrationRange; if(merkleRootLocked == false) { merkleRoot = _merkleRoot; } } function lockMerkleRoot() adminRequired public { require(merkleRoot != 0, "Merkle root has not yet been set"); merkleRootLocked = true; } function setContractURI(string calldata _contractURI) adminRequired public { contractMetadataURI = _contractURI; } function contractURI() public view returns (string memory) { return contractMetadataURI; } // * MAIN FUNCTIONS * // function sendTokenToPurgatory( uint256 originalTokenId, uint256 newTokenId, bytes32[] calldata merkleProof, string calldata uri ) external { require(purgatory != address(0), "Purgatory address cannot be the 0x0 address"); require(originalContract != address(0), "Original contract address cannot be the 0x0 address"); ERC1155Partial baseContract = ERC1155Partial(originalContract); require(baseContract.isApprovedForAll(msg.sender, address(this)), "Contract not yet approved for all transfers from original contract"); bytes32 leaf = generateLeaf(originalTokenId, newTokenId); require(verifyMerkleProof(merkleProof, merkleRoot, leaf),"Invalid proof"); // Ensures original and new tokenIds are valid baseContract.safeTransferFrom(msg.sender, purgatory, originalTokenId, 1, ""); originalTokenIdToAddress[originalTokenId] = msg.sender; resurrect(msg.sender, newTokenId, uri); } function resurrect( address owner, uint256 newTokenId, string calldata uri ) internal virtual nonReentrant { require(bytes(uri).length > 0, "URI cannot be empty"); _tokensExtension[newTokenId] = address(this); _safeMint(owner, newTokenId); _tokenURIs[newTokenId] = uri; } function mint(address to, uint8 tokenId, string calldata uri) public virtual nonReentrant adminRequired returns(uint256) { require(tokenId < collectionSize, "Token ID must be less than max collection size"); require(tokenId < migrationRange[0] || tokenId > migrationRange[1], "Token ID must be outside of migration range"); require(bytes(uri).length > 0, "URI cannot be empty"); _tokensExtension[tokenId] = address(this); _safeMint(to, tokenId); _tokenURIs[tokenId] = uri; } // * UTILITY FUNCTIONS * // function verifyMerkleProof(bytes32[] memory proof, bytes32 root, bytes32 leaf) public view returns (bool) { return MerkleProof.verify(proof, root, leaf); } function generateLeaf(uint256 originalTokenId, uint256 newTokenId) public pure returns (bytes32){ string memory originalTokenStr = convertUintToString(originalTokenId); string memory newTokenStr = convertUintToString(newTokenId); string memory leaf = string(abi.encodePacked(originalTokenStr, " ", newTokenStr)); return keccak256(abi.encodePacked(leaf)); } function convertUintToString(uint _i) internal pure returns (string memory _uintAsString) { if (_i == 0) { return "0"; } uint j = _i; uint len; while (j != 0) { len++; j /= 10; } bytes memory bstr = new bytes(len); uint k = len; while (_i != 0) { k = k-1; uint8 temp = (48 + uint8(_i - _i / 10 * 10)); bytes1 b1 = bytes1(temp); bstr[k] = b1; _i /= 10; } return string(bstr); } // * DISABLING PARENT MINT FUNCTIONS * // function mintBase(address to) public virtual override nonReentrant adminRequired returns(uint256) {} function mintBase(address to, string calldata uri) public virtual override nonReentrant adminRequired returns(uint256) {} function mintBaseBatch(address to, uint16 count) public virtual override nonReentrant adminRequired returns(uint256[] memory tokenIds) {} function mintBaseBatch(address to, string[] calldata uris) public virtual override nonReentrant adminRequired returns(uint256[] memory tokenIds) {} function mintExtension(address to) public virtual override nonReentrant extensionRequired returns(uint256) {} function mintExtension(address to, string calldata uri) public virtual override nonReentrant extensionRequired returns(uint256) {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Trees proofs. * * The proofs can be generated using the JavaScript library * https://github.com/miguelmota/merkletreejs[merkletreejs]. * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled. * * See `test/utils/cryptography/MerkleProof.test.js` for some examples. */ 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 Returns the rebuilt hash obtained by traversing a Merklee 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++) { bytes32 proofElement = proof[i]; if (computedHash <= proofElement) { // Hash(current computed hash + current element of the proof) computedHash = keccak256(abi.encodePacked(computedHash, proofElement)); } else { // Hash(current element of the proof + current computed hash) computedHash = keccak256(abi.encodePacked(proofElement, computedHash)); } } return computedHash; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @author: manifold.xyz import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@manifoldxyz/libraries-solidity/contracts/access/AdminControl.sol"; import "./core/ERC721CreatorCore.sol"; /** * @dev ERC721Creator implementation */ contract ERC721Creator is AdminControl, ERC721, ERC721CreatorCore { constructor (string memory _name, string memory _symbol) ERC721(_name, _symbol) { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721CreatorCore, AdminControl) returns (bool) { return ERC721CreatorCore.supportsInterface(interfaceId) || ERC721.supportsInterface(interfaceId) || AdminControl.supportsInterface(interfaceId); } function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override { _approveTransfer(from, to, tokenId); } /** * @dev See {ICreatorCore-registerExtension}. */ function registerExtension(address extension, string calldata baseURI) external override adminRequired nonBlacklistRequired(extension) { _registerExtension(extension, baseURI, false); } /** * @dev See {ICreatorCore-registerExtension}. */ function registerExtension(address extension, string calldata baseURI, bool baseURIIdentical) external override adminRequired nonBlacklistRequired(extension) { _registerExtension(extension, baseURI, baseURIIdentical); } /** * @dev See {ICreatorCore-unregisterExtension}. */ function unregisterExtension(address extension) external override adminRequired { _unregisterExtension(extension); } /** * @dev See {ICreatorCore-blacklistExtension}. */ function blacklistExtension(address extension) external override adminRequired { _blacklistExtension(extension); } /** * @dev See {ICreatorCore-setBaseTokenURIExtension}. */ function setBaseTokenURIExtension(string calldata uri) external override extensionRequired { _setBaseTokenURIExtension(uri, false); } /** * @dev See {ICreatorCore-setBaseTokenURIExtension}. */ function setBaseTokenURIExtension(string calldata uri, bool identical) external override extensionRequired { _setBaseTokenURIExtension(uri, identical); } /** * @dev See {ICreatorCore-setTokenURIPrefixExtension}. */ function setTokenURIPrefixExtension(string calldata prefix) external override extensionRequired { _setTokenURIPrefixExtension(prefix); } /** * @dev See {ICreatorCore-setTokenURIExtension}. */ function setTokenURIExtension(uint256 tokenId, string calldata uri) external override extensionRequired { _setTokenURIExtension(tokenId, uri); } /** * @dev See {ICreatorCore-setTokenURIExtension}. */ function setTokenURIExtension(uint256[] memory tokenIds, string[] calldata uris) external override extensionRequired { require(tokenIds.length == uris.length, "Invalid input"); for (uint i = 0; i < tokenIds.length; i++) { _setTokenURIExtension(tokenIds[i], uris[i]); } } /** * @dev See {ICreatorCore-setBaseTokenURI}. */ function setBaseTokenURI(string calldata uri) external override adminRequired { _setBaseTokenURI(uri); } /** * @dev See {ICreatorCore-setTokenURIPrefix}. */ function setTokenURIPrefix(string calldata prefix) external override adminRequired { _setTokenURIPrefix(prefix); } /** * @dev See {ICreatorCore-setTokenURI}. */ function setTokenURI(uint256 tokenId, string calldata uri) external override adminRequired { _setTokenURI(tokenId, uri); } /** * @dev See {ICreatorCore-setTokenURI}. */ function setTokenURI(uint256[] memory tokenIds, string[] calldata uris) external override adminRequired { require(tokenIds.length == uris.length, "Invalid input"); for (uint i = 0; i < tokenIds.length; i++) { _setTokenURI(tokenIds[i], uris[i]); } } /** * @dev See {ICreatorCore-setMintPermissions}. */ function setMintPermissions(address extension, address permissions) external override adminRequired { _setMintPermissions(extension, permissions); } /** * @dev See {IERC721CreatorCore-mintBase}. */ function mintBase(address to) public virtual override nonReentrant adminRequired returns(uint256) { return _mintBase(to, ""); } /** * @dev See {IERC721CreatorCore-mintBase}. */ function mintBase(address to, string calldata uri) public virtual override nonReentrant adminRequired returns(uint256) { return _mintBase(to, uri); } /** * @dev See {IERC721CreatorCore-mintBaseBatch}. */ function mintBaseBatch(address to, uint16 count) public virtual override nonReentrant adminRequired returns(uint256[] memory tokenIds) { tokenIds = new uint256[](count); for (uint16 i = 0; i < count; i++) { tokenIds[i] = _mintBase(to, ""); } return tokenIds; } /** * @dev See {IERC721CreatorCore-mintBaseBatch}. */ function mintBaseBatch(address to, string[] calldata uris) public virtual override nonReentrant adminRequired returns(uint256[] memory tokenIds) { tokenIds = new uint256[](uris.length); for (uint i = 0; i < uris.length; i++) { tokenIds[i] = _mintBase(to, uris[i]); } return tokenIds; } /** * @dev Mint token with no extension */ function _mintBase(address to, string memory uri) internal virtual returns(uint256 tokenId) { _tokenCount++; tokenId = _tokenCount; // Track the extension that minted the token _tokensExtension[tokenId] = address(this); _safeMint(to, tokenId); if (bytes(uri).length > 0) { _tokenURIs[tokenId] = uri; } // Call post mint _postMintBase(to, tokenId); return tokenId; } /** * @dev See {IERC721CreatorCore-mintExtension}. */ function mintExtension(address to) public virtual override nonReentrant extensionRequired returns(uint256) { return _mintExtension(to, ""); } /** * @dev See {IERC721CreatorCore-mintExtension}. */ function mintExtension(address to, string calldata uri) public virtual override nonReentrant extensionRequired returns(uint256) { return _mintExtension(to, uri); } /** * @dev See {IERC721CreatorCore-mintExtensionBatch}. */ function mintExtensionBatch(address to, uint16 count) public virtual override nonReentrant extensionRequired returns(uint256[] memory tokenIds) { tokenIds = new uint256[](count); for (uint16 i = 0; i < count; i++) { tokenIds[i] = _mintExtension(to, ""); } return tokenIds; } /** * @dev See {IERC721CreatorCore-mintExtensionBatch}. */ function mintExtensionBatch(address to, string[] calldata uris) public virtual override nonReentrant extensionRequired returns(uint256[] memory tokenIds) { tokenIds = new uint256[](uris.length); for (uint i = 0; i < uris.length; i++) { tokenIds[i] = _mintExtension(to, uris[i]); } } /** * @dev Mint token via extension */ function _mintExtension(address to, string memory uri) internal virtual returns(uint256 tokenId) { _tokenCount++; tokenId = _tokenCount; _checkMintPermissions(to, tokenId); // Track the extension that minted the token _tokensExtension[tokenId] = msg.sender; _safeMint(to, tokenId); if (bytes(uri).length > 0) { _tokenURIs[tokenId] = uri; } // Call post mint _postMintExtension(to, tokenId); return tokenId; } /** * @dev See {IERC721CreatorCore-tokenExtension}. */ function tokenExtension(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "Nonexistent token"); return _tokenExtension(tokenId); } /** * @dev See {IERC721CreatorCore-burn}. */ function burn(uint256 tokenId) public virtual override nonReentrant { require(_isApprovedOrOwner(msg.sender, tokenId), "Caller is not owner nor approved"); address owner = ownerOf(tokenId); _burn(tokenId); _postBurn(owner, tokenId); } /** * @dev See {ICreatorCore-setRoyalties}. */ function setRoyalties(address payable[] calldata receivers, uint256[] calldata basisPoints) external override adminRequired { _setRoyaltiesExtension(address(this), receivers, basisPoints); } /** * @dev See {ICreatorCore-setRoyalties}. */ function setRoyalties(uint256 tokenId, address payable[] calldata receivers, uint256[] calldata basisPoints) external override adminRequired { require(_exists(tokenId), "Nonexistent token"); _setRoyalties(tokenId, receivers, basisPoints); } /** * @dev See {ICreatorCore-setRoyaltiesExtension}. */ function setRoyaltiesExtension(address extension, address payable[] calldata receivers, uint256[] calldata basisPoints) external override adminRequired { _setRoyaltiesExtension(extension, receivers, basisPoints); } /** * @dev {See ICreatorCore-getRoyalties}. */ function getRoyalties(uint256 tokenId) external view virtual override returns (address payable[] memory, uint256[] memory) { require(_exists(tokenId), "Nonexistent token"); return _getRoyalties(tokenId); } /** * @dev {See ICreatorCore-getFees}. */ function getFees(uint256 tokenId) external view virtual override returns (address payable[] memory, uint256[] memory) { require(_exists(tokenId), "Nonexistent token"); return _getRoyalties(tokenId); } /** * @dev {See ICreatorCore-getFeeRecipients}. */ function getFeeRecipients(uint256 tokenId) external view virtual override returns (address payable[] memory) { require(_exists(tokenId), "Nonexistent token"); return _getRoyaltyReceivers(tokenId); } /** * @dev {See ICreatorCore-getFeeBps}. */ function getFeeBps(uint256 tokenId) external view virtual override returns (uint[] memory) { require(_exists(tokenId), "Nonexistent token"); return _getRoyaltyBPS(tokenId); } /** * @dev {See ICreatorCore-royaltyInfo}. */ function royaltyInfo(uint256 tokenId, uint256 value) external view virtual override returns (address, uint256) { require(_exists(tokenId), "Nonexistent token"); return _getRoyaltyInfo(tokenId, value); } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "Nonexistent token"); return _tokenURI(tokenId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); 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) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); 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 overriden 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 owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); 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: transfer caller is not owner nor 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: transfer caller is not owner nor 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 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 _owners[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) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, 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); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); } /** * @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 of token that is not own"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {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 a {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 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 { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @author: manifold.xyz import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./IAdminControl.sol"; abstract contract AdminControl is Ownable, IAdminControl, ERC165 { using EnumerableSet for EnumerableSet.AddressSet; // Track registered admins EnumerableSet.AddressSet private _admins; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IAdminControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Only allows approved admins to call the specified function */ modifier adminRequired() { require(owner() == msg.sender || _admins.contains(msg.sender), "AdminControl: Must be owner or admin"); _; } /** * @dev See {IAdminControl-getAdmins}. */ function getAdmins() external view override returns (address[] memory admins) { admins = new address[](_admins.length()); for (uint i = 0; i < _admins.length(); i++) { admins[i] = _admins.at(i); } return admins; } /** * @dev See {IAdminControl-approveAdmin}. */ function approveAdmin(address admin) external override onlyOwner { if (!_admins.contains(admin)) { emit AdminApproved(admin, msg.sender); _admins.add(admin); } } /** * @dev See {IAdminControl-revokeAdmin}. */ function revokeAdmin(address admin) external override onlyOwner { if (_admins.contains(admin)) { emit AdminRevoked(admin, msg.sender); _admins.remove(admin); } } /** * @dev See {IAdminControl-isAdmin}. */ function isAdmin(address admin) public override view returns (bool) { return (owner() == admin || _admins.contains(admin)); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @author: manifold.xyz import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import "../extensions/ERC721/IERC721CreatorExtensionApproveTransfer.sol"; import "../extensions/ERC721/IERC721CreatorExtensionBurnable.sol"; import "../permissions/ERC721/IERC721CreatorMintPermissions.sol"; import "./IERC721CreatorCore.sol"; import "./CreatorCore.sol"; /** * @dev Core ERC721 creator implementation */ abstract contract ERC721CreatorCore is CreatorCore, IERC721CreatorCore { using EnumerableSet for EnumerableSet.AddressSet; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(CreatorCore, IERC165) returns (bool) { return interfaceId == type(IERC721CreatorCore).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {ICreatorCore-setApproveTransferExtension}. */ function setApproveTransferExtension(bool enabled) external override extensionRequired { require(!enabled || ERC165Checker.supportsInterface(msg.sender, type(IERC721CreatorExtensionApproveTransfer).interfaceId), "Extension must implement IERC721CreatorExtensionApproveTransfer"); if (_extensionApproveTransfers[msg.sender] != enabled) { _extensionApproveTransfers[msg.sender] = enabled; emit ExtensionApproveTransferUpdated(msg.sender, enabled); } } /** * @dev Set mint permissions for an extension */ function _setMintPermissions(address extension, address permissions) internal { require(_extensions.contains(extension), "CreatorCore: Invalid extension"); require(permissions == address(0x0) || ERC165Checker.supportsInterface(permissions, type(IERC721CreatorMintPermissions).interfaceId), "Invalid address"); if (_extensionPermissions[extension] != permissions) { _extensionPermissions[extension] = permissions; emit MintPermissionsUpdated(extension, permissions, msg.sender); } } /** * Check if an extension can mint */ function _checkMintPermissions(address to, uint256 tokenId) internal { if (_extensionPermissions[msg.sender] != address(0x0)) { IERC721CreatorMintPermissions(_extensionPermissions[msg.sender]).approveMint(msg.sender, to, tokenId); } } /** * Override for post mint actions */ function _postMintBase(address, uint256) internal virtual {} /** * Override for post mint actions */ function _postMintExtension(address, uint256) internal virtual {} /** * Post-burning callback and metadata cleanup */ function _postBurn(address owner, uint256 tokenId) internal virtual { // Callback to originating extension if needed if (_tokensExtension[tokenId] != address(this)) { if (ERC165Checker.supportsInterface(_tokensExtension[tokenId], type(IERC721CreatorExtensionBurnable).interfaceId)) { IERC721CreatorExtensionBurnable(_tokensExtension[tokenId]).onBurn(owner, tokenId); } } // Clear metadata (if any) if (bytes(_tokenURIs[tokenId]).length != 0) { delete _tokenURIs[tokenId]; } // Delete token origin extension tracking delete _tokensExtension[tokenId]; } /** * Approve a transfer */ function _approveTransfer(address from, address to, uint256 tokenId) internal { if (_extensionApproveTransfers[_tokensExtension[tokenId]]) { require(IERC721CreatorExtensionApproveTransfer(_tokensExtension[tokenId]).approveTransfer(from, to, tokenId), "ERC721Creator: Extension approval failure"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @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 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); /** * @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; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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 `IERC721.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 (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/Address.sol) pragma solidity ^0.8.0; /** * @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 * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/structs/EnumerableSet.sol) pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastvalue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastvalue; // Update the index for the moved value set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { return _values(set._inner); } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; assembly { result := store } return result; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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 Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @author: manifold.xyz import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; /** * @dev Interface for admin control */ interface IAdminControl is IERC165 { event AdminApproved(address indexed account, address indexed sender); event AdminRevoked(address indexed account, address indexed sender); /** * @dev gets address of all admins */ function getAdmins() external view returns (address[] memory); /** * @dev add an admin. Can only be called by contract owner. */ function approveAdmin(address admin) external; /** * @dev remove an admin. Can only be called by contract owner. */ function revokeAdmin(address admin) external; /** * @dev checks whether or not given address is an admin * Returns True if they are */ function isAdmin(address admin) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @author: manifold.xyz import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; /** * Implement this if you want your extension to approve a transfer */ interface IERC721CreatorExtensionApproveTransfer is IERC165 { /** * @dev Set whether or not the creator will check the extension for approval of token transfer */ function setApproveTransfer(address creator, bool enabled) external; /** * @dev Called by creator contract to approve a transfer */ function approveTransfer(address from, address to, uint256 tokenId) external returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @author: manifold.xyz import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; /** * @dev Your extension is required to implement this interface if it wishes * to receive the onBurn callback whenever a token the extension created is * burned */ interface IERC721CreatorExtensionBurnable is IERC165 { /** * @dev callback handler for burn events */ function onBurn(address owner, uint256 tokenId) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @author: manifold.xyz import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721Creator compliant extension contracts. */ interface IERC721CreatorMintPermissions is IERC165 { /** * @dev get approval to mint */ function approveMint(address extension, address to, uint256 tokenId) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @author: manifold.xyz import "./ICreatorCore.sol"; /** * @dev Core ERC721 creator interface */ interface IERC721CreatorCore is ICreatorCore { /** * @dev mint a token with no extension. Can only be called by an admin. * Returns tokenId minted */ function mintBase(address to) external returns (uint256); /** * @dev mint a token with no extension. Can only be called by an admin. * Returns tokenId minted */ function mintBase(address to, string calldata uri) external returns (uint256); /** * @dev batch mint a token with no extension. Can only be called by an admin. * Returns tokenId minted */ function mintBaseBatch(address to, uint16 count) external returns (uint256[] memory); /** * @dev batch mint a token with no extension. Can only be called by an admin. * Returns tokenId minted */ function mintBaseBatch(address to, string[] calldata uris) external returns (uint256[] memory); /** * @dev mint a token. Can only be called by a registered extension. * Returns tokenId minted */ function mintExtension(address to) external returns (uint256); /** * @dev mint a token. Can only be called by a registered extension. * Returns tokenId minted */ function mintExtension(address to, string calldata uri) external returns (uint256); /** * @dev batch mint a token. Can only be called by a registered extension. * Returns tokenIds minted */ function mintExtensionBatch(address to, uint16 count) external returns (uint256[] memory); /** * @dev batch mint a token. Can only be called by a registered extension. * Returns tokenId minted */ function mintExtensionBatch(address to, string[] calldata uris) external returns (uint256[] memory); /** * @dev burn a token. Can only be called by token owner or approved address. * On burn, calls back to the registered extension's onBurn method */ function burn(uint256 tokenId) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @author: manifold.xyz import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165Checker.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol"; import "../extensions/ICreatorExtensionTokenURI.sol"; import "./ICreatorCore.sol"; /** * @dev Core creator implementation */ abstract contract CreatorCore is ReentrancyGuard, ICreatorCore, ERC165 { using Strings for uint256; using EnumerableSet for EnumerableSet.AddressSet; using AddressUpgradeable for address; uint256 _tokenCount = 0; // Track registered extensions data EnumerableSet.AddressSet internal _extensions; EnumerableSet.AddressSet internal _blacklistedExtensions; mapping (address => address) internal _extensionPermissions; mapping (address => bool) internal _extensionApproveTransfers; // For tracking which extension a token was minted by mapping (uint256 => address) internal _tokensExtension; // The baseURI for a given extension mapping (address => string) private _extensionBaseURI; mapping (address => bool) private _extensionBaseURIIdentical; // The prefix for any tokens with a uri configured mapping (address => string) private _extensionURIPrefix; // Mapping for individual token URIs mapping (uint256 => string) internal _tokenURIs; // Royalty configurations mapping (address => address payable[]) internal _extensionRoyaltyReceivers; mapping (address => uint256[]) internal _extensionRoyaltyBPS; mapping (uint256 => address payable[]) internal _tokenRoyaltyReceivers; mapping (uint256 => uint256[]) internal _tokenRoyaltyBPS; /** * External interface identifiers for royalties */ /** * @dev CreatorCore * * bytes4(keccak256('getRoyalties(uint256)')) == 0xbb3bafd6 * * => 0xbb3bafd6 = 0xbb3bafd6 */ bytes4 private constant _INTERFACE_ID_ROYALTIES_CREATORCORE = 0xbb3bafd6; /** * @dev Rarible: RoyaltiesV1 * * bytes4(keccak256('getFeeRecipients(uint256)')) == 0xb9c4d9fb * bytes4(keccak256('getFeeBps(uint256)')) == 0x0ebd4c7f * * => 0xb9c4d9fb ^ 0x0ebd4c7f = 0xb7799584 */ bytes4 private constant _INTERFACE_ID_ROYALTIES_RARIBLE = 0xb7799584; /** * @dev Foundation * * bytes4(keccak256('getFees(uint256)')) == 0xd5a06d4c * * => 0xd5a06d4c = 0xd5a06d4c */ bytes4 private constant _INTERFACE_ID_ROYALTIES_FOUNDATION = 0xd5a06d4c; /** * @dev EIP-2981 * * bytes4(keccak256("royaltyInfo(uint256,uint256)")) == 0x2a55205a * * => 0x2a55205a = 0x2a55205a */ bytes4 private constant _INTERFACE_ID_ROYALTIES_EIP2981 = 0x2a55205a; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(ICreatorCore).interfaceId || super.supportsInterface(interfaceId) || interfaceId == _INTERFACE_ID_ROYALTIES_CREATORCORE || interfaceId == _INTERFACE_ID_ROYALTIES_RARIBLE || interfaceId == _INTERFACE_ID_ROYALTIES_FOUNDATION || interfaceId == _INTERFACE_ID_ROYALTIES_EIP2981; } /** * @dev Only allows registered extensions to call the specified function */ modifier extensionRequired() { require(_extensions.contains(msg.sender), "Must be registered extension"); _; } /** * @dev Only allows non-blacklisted extensions */ modifier nonBlacklistRequired(address extension) { require(!_blacklistedExtensions.contains(extension), "Extension blacklisted"); _; } /** * @dev See {ICreatorCore-getExtensions}. */ function getExtensions() external view override returns (address[] memory extensions) { extensions = new address[](_extensions.length()); for (uint i = 0; i < _extensions.length(); i++) { extensions[i] = _extensions.at(i); } return extensions; } /** * @dev Register an extension */ function _registerExtension(address extension, string calldata baseURI, bool baseURIIdentical) internal { require(extension != address(this), "Creator: Invalid"); require(extension.isContract(), "Creator: Extension must be a contract"); if (!_extensions.contains(extension)) { _extensionBaseURI[extension] = baseURI; _extensionBaseURIIdentical[extension] = baseURIIdentical; emit ExtensionRegistered(extension, msg.sender); _extensions.add(extension); } } /** * @dev Unregister an extension */ function _unregisterExtension(address extension) internal { if (_extensions.contains(extension)) { emit ExtensionUnregistered(extension, msg.sender); _extensions.remove(extension); } } /** * @dev Blacklist an extension */ function _blacklistExtension(address extension) internal { require(extension != address(this), "Cannot blacklist yourself"); if (_extensions.contains(extension)) { emit ExtensionUnregistered(extension, msg.sender); _extensions.remove(extension); } if (!_blacklistedExtensions.contains(extension)) { emit ExtensionBlacklisted(extension, msg.sender); _blacklistedExtensions.add(extension); } } /** * @dev Set base token uri for an extension */ function _setBaseTokenURIExtension(string calldata uri, bool identical) internal { _extensionBaseURI[msg.sender] = uri; _extensionBaseURIIdentical[msg.sender] = identical; } /** * @dev Set token uri prefix for an extension */ function _setTokenURIPrefixExtension(string calldata prefix) internal { _extensionURIPrefix[msg.sender] = prefix; } /** * @dev Set token uri for a token of an extension */ function _setTokenURIExtension(uint256 tokenId, string calldata uri) internal { require(_tokensExtension[tokenId] == msg.sender, "Invalid token"); _tokenURIs[tokenId] = uri; } /** * @dev Set base token uri for tokens with no extension */ function _setBaseTokenURI(string memory uri) internal { _extensionBaseURI[address(this)] = uri; } /** * @dev Set token uri prefix for tokens with no extension */ function _setTokenURIPrefix(string calldata prefix) internal { _extensionURIPrefix[address(this)] = prefix; } /** * @dev Set token uri for a token with no extension */ function _setTokenURI(uint256 tokenId, string calldata uri) internal { require(_tokensExtension[tokenId] == address(this), "Invalid token"); _tokenURIs[tokenId] = uri; } /** * @dev Retrieve a token's URI */ function _tokenURI(uint256 tokenId) internal view returns (string memory) { address extension = _tokensExtension[tokenId]; require(!_blacklistedExtensions.contains(extension), "Extension blacklisted"); if (bytes(_tokenURIs[tokenId]).length != 0) { if (bytes(_extensionURIPrefix[extension]).length != 0) { return string(abi.encodePacked(_extensionURIPrefix[extension],_tokenURIs[tokenId])); } return _tokenURIs[tokenId]; } if (ERC165Checker.supportsInterface(extension, type(ICreatorExtensionTokenURI).interfaceId)) { return ICreatorExtensionTokenURI(extension).tokenURI(address(this), tokenId); } if (!_extensionBaseURIIdentical[extension]) { return string(abi.encodePacked(_extensionBaseURI[extension], tokenId.toString())); } else { return _extensionBaseURI[extension]; } } /** * Get token extension */ function _tokenExtension(uint256 tokenId) internal view returns (address extension) { extension = _tokensExtension[tokenId]; require(extension != address(this), "No extension for token"); require(!_blacklistedExtensions.contains(extension), "Extension blacklisted"); return extension; } /** * Helper to get royalties for a token */ function _getRoyalties(uint256 tokenId) view internal returns (address payable[] storage, uint256[] storage) { return (_getRoyaltyReceivers(tokenId), _getRoyaltyBPS(tokenId)); } /** * Helper to get royalty receivers for a token */ function _getRoyaltyReceivers(uint256 tokenId) view internal returns (address payable[] storage) { if (_tokenRoyaltyReceivers[tokenId].length > 0) { return _tokenRoyaltyReceivers[tokenId]; } else if (_extensionRoyaltyReceivers[_tokensExtension[tokenId]].length > 0) { return _extensionRoyaltyReceivers[_tokensExtension[tokenId]]; } return _extensionRoyaltyReceivers[address(this)]; } /** * Helper to get royalty basis points for a token */ function _getRoyaltyBPS(uint256 tokenId) view internal returns (uint256[] storage) { if (_tokenRoyaltyBPS[tokenId].length > 0) { return _tokenRoyaltyBPS[tokenId]; } else if (_extensionRoyaltyBPS[_tokensExtension[tokenId]].length > 0) { return _extensionRoyaltyBPS[_tokensExtension[tokenId]]; } return _extensionRoyaltyBPS[address(this)]; } function _getRoyaltyInfo(uint256 tokenId, uint256 value) view internal returns (address receiver, uint256 amount){ address payable[] storage receivers = _getRoyaltyReceivers(tokenId); require(receivers.length <= 1, "More than 1 royalty receiver"); if (receivers.length == 0) { return (address(this), 0); } return (receivers[0], _getRoyaltyBPS(tokenId)[0]*value/10000); } /** * Set royalties for a token */ function _setRoyalties(uint256 tokenId, address payable[] calldata receivers, uint256[] calldata basisPoints) internal { require(receivers.length == basisPoints.length, "Invalid input"); uint256 totalBasisPoints; for (uint i = 0; i < basisPoints.length; i++) { totalBasisPoints += basisPoints[i]; } require(totalBasisPoints < 10000, "Invalid total royalties"); _tokenRoyaltyReceivers[tokenId] = receivers; _tokenRoyaltyBPS[tokenId] = basisPoints; emit RoyaltiesUpdated(tokenId, receivers, basisPoints); } /** * Set royalties for all tokens of an extension */ function _setRoyaltiesExtension(address extension, address payable[] calldata receivers, uint256[] calldata basisPoints) internal { require(receivers.length == basisPoints.length, "Invalid input"); uint256 totalBasisPoints; for (uint i = 0; i < basisPoints.length; i++) { totalBasisPoints += basisPoints[i]; } require(totalBasisPoints < 10000, "Invalid total royalties"); _extensionRoyaltyReceivers[extension] = receivers; _extensionRoyaltyBPS[extension] = basisPoints; if (extension == address(this)) { emit DefaultRoyaltiesUpdated(receivers, basisPoints); } else { emit ExtensionRoyaltiesUpdated(extension, receivers, basisPoints); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @author: manifold.xyz import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; /** * @dev Core creator interface */ interface ICreatorCore is IERC165 { event ExtensionRegistered(address indexed extension, address indexed sender); event ExtensionUnregistered(address indexed extension, address indexed sender); event ExtensionBlacklisted(address indexed extension, address indexed sender); event MintPermissionsUpdated(address indexed extension, address indexed permissions, address indexed sender); event RoyaltiesUpdated(uint256 indexed tokenId, address payable[] receivers, uint256[] basisPoints); event DefaultRoyaltiesUpdated(address payable[] receivers, uint256[] basisPoints); event ExtensionRoyaltiesUpdated(address indexed extension, address payable[] receivers, uint256[] basisPoints); event ExtensionApproveTransferUpdated(address indexed extension, bool enabled); /** * @dev gets address of all extensions */ function getExtensions() external view returns (address[] memory); /** * @dev add an extension. Can only be called by contract owner or admin. * extension address must point to a contract implementing ICreatorExtension. * Returns True if newly added, False if already added. */ function registerExtension(address extension, string calldata baseURI) external; /** * @dev add an extension. Can only be called by contract owner or admin. * extension address must point to a contract implementing ICreatorExtension. * Returns True if newly added, False if already added. */ function registerExtension(address extension, string calldata baseURI, bool baseURIIdentical) external; /** * @dev add an extension. Can only be called by contract owner or admin. * Returns True if removed, False if already removed. */ function unregisterExtension(address extension) external; /** * @dev blacklist an extension. Can only be called by contract owner or admin. * This function will destroy all ability to reference the metadata of any tokens created * by the specified extension. It will also unregister the extension if needed. * Returns True if removed, False if already removed. */ function blacklistExtension(address extension) external; /** * @dev set the baseTokenURI of an extension. Can only be called by extension. */ function setBaseTokenURIExtension(string calldata uri) external; /** * @dev set the baseTokenURI of an extension. Can only be called by extension. * For tokens with no uri configured, tokenURI will return "uri+tokenId" */ function setBaseTokenURIExtension(string calldata uri, bool identical) external; /** * @dev set the common prefix of an extension. Can only be called by extension. * If configured, and a token has a uri set, tokenURI will return "prefixURI+tokenURI" * Useful if you want to use ipfs/arweave */ function setTokenURIPrefixExtension(string calldata prefix) external; /** * @dev set the tokenURI of a token extension. Can only be called by extension that minted token. */ function setTokenURIExtension(uint256 tokenId, string calldata uri) external; /** * @dev set the tokenURI of a token extension for multiple tokens. Can only be called by extension that minted token. */ function setTokenURIExtension(uint256[] memory tokenId, string[] calldata uri) external; /** * @dev set the baseTokenURI for tokens with no extension. Can only be called by owner/admin. * For tokens with no uri configured, tokenURI will return "uri+tokenId" */ function setBaseTokenURI(string calldata uri) external; /** * @dev set the common prefix for tokens with no extension. Can only be called by owner/admin. * If configured, and a token has a uri set, tokenURI will return "prefixURI+tokenURI" * Useful if you want to use ipfs/arweave */ function setTokenURIPrefix(string calldata prefix) external; /** * @dev set the tokenURI of a token with no extension. Can only be called by owner/admin. */ function setTokenURI(uint256 tokenId, string calldata uri) external; /** * @dev set the tokenURI of multiple tokens with no extension. Can only be called by owner/admin. */ function setTokenURI(uint256[] memory tokenIds, string[] calldata uris) external; /** * @dev set a permissions contract for an extension. Used to control minting. */ function setMintPermissions(address extension, address permissions) external; /** * @dev Configure so transfers of tokens created by the caller (must be extension) gets approval * from the extension before transferring */ function setApproveTransferExtension(bool enabled) external; /** * @dev get the extension of a given token */ function tokenExtension(uint256 tokenId) external view returns (address); /** * @dev Set default royalties */ function setRoyalties(address payable[] calldata receivers, uint256[] calldata basisPoints) external; /** * @dev Set royalties of a token */ function setRoyalties(uint256 tokenId, address payable[] calldata receivers, uint256[] calldata basisPoints) external; /** * @dev Set royalties of an extension */ function setRoyaltiesExtension(address extension, address payable[] calldata receivers, uint256[] calldata basisPoints) external; /** * @dev Get royalites of a token. Returns list of receivers and basisPoints */ function getRoyalties(uint256 tokenId) external view returns (address payable[] memory, uint256[] memory); // Royalty support for various other standards function getFeeRecipients(uint256 tokenId) external view returns (address payable[] memory); function getFeeBps(uint256 tokenId) external view returns (uint[] memory); function getFees(uint256 tokenId) external view returns (address payable[] memory, uint256[] memory); function royaltyInfo(uint256 tokenId, uint256 value) external view returns (address, uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165Checker.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Library used to query support of an interface declared via {IERC165}. * * Note that these functions return the actual result of the query: they do not * `revert` if an interface is not supported. It is up to the caller to decide * what to do in these cases. */ library ERC165Checker { // As per the EIP-165 spec, no interface should ever match 0xffffffff bytes4 private constant _INTERFACE_ID_INVALID = 0xffffffff; /** * @dev Returns true if `account` supports the {IERC165} interface, */ function supportsERC165(address account) internal view returns (bool) { // Any contract that implements ERC165 must explicitly indicate support of // InterfaceId_ERC165 and explicitly indicate non-support of InterfaceId_Invalid return _supportsERC165Interface(account, type(IERC165).interfaceId) && !_supportsERC165Interface(account, _INTERFACE_ID_INVALID); } /** * @dev Returns true if `account` supports the interface defined by * `interfaceId`. Support for {IERC165} itself is queried automatically. * * See {IERC165-supportsInterface}. */ function supportsInterface(address account, bytes4 interfaceId) internal view returns (bool) { // query support of both ERC165 as per the spec and support of _interfaceId return supportsERC165(account) && _supportsERC165Interface(account, interfaceId); } /** * @dev Returns a boolean array where each value corresponds to the * interfaces passed in and whether they're supported or not. This allows * you to batch check interfaces for a contract where your expectation * is that some interfaces may not be supported. * * See {IERC165-supportsInterface}. * * _Available since v3.4._ */ function getSupportedInterfaces(address account, bytes4[] memory interfaceIds) internal view returns (bool[] memory) { // an array of booleans corresponding to interfaceIds and whether they're supported or not bool[] memory interfaceIdsSupported = new bool[](interfaceIds.length); // query support of ERC165 itself if (supportsERC165(account)) { // query support of each interface in interfaceIds for (uint256 i = 0; i < interfaceIds.length; i++) { interfaceIdsSupported[i] = _supportsERC165Interface(account, interfaceIds[i]); } } return interfaceIdsSupported; } /** * @dev Returns true if `account` supports all the interfaces defined in * `interfaceIds`. Support for {IERC165} itself is queried automatically. * * Batch-querying can lead to gas savings by skipping repeated checks for * {IERC165} support. * * See {IERC165-supportsInterface}. */ function supportsAllInterfaces(address account, bytes4[] memory interfaceIds) internal view returns (bool) { // query support of ERC165 itself if (!supportsERC165(account)) { return false; } // query support of each interface in _interfaceIds for (uint256 i = 0; i < interfaceIds.length; i++) { if (!_supportsERC165Interface(account, interfaceIds[i])) { return false; } } // all interfaces supported return true; } /** * @notice Query if a contract implements an interface, does not check ERC165 support * @param account The address of the contract to query for support of an interface * @param interfaceId The interface identifier, as specified in ERC-165 * @return true if the contract at account indicates support of the interface with * identifier interfaceId, false otherwise * @dev Assumes that account contains a contract that supports ERC165, otherwise * the behavior of this method is undefined. This precondition can be checked * with {supportsERC165}. * Interface identification is specified in ERC-165. */ function _supportsERC165Interface(address account, bytes4 interfaceId) private view returns (bool) { bytes memory encodedParams = abi.encodeWithSelector(IERC165.supportsInterface.selector, interfaceId); (bool success, bytes memory result) = account.staticcall{gas: 30000}(encodedParams); if (result.length < 32) return false; return success && abi.decode(result, (bool)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @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 * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @author: manifold.xyz import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; /** * @dev Implement this if you want your extension to have overloadable URI's */ interface ICreatorExtensionTokenURI is IERC165 { /** * Get the uri for a given creator/tokenId */ function tokenURI(address creator, uint256 tokenId) external view returns (string memory); }
{ "optimizer": { "enabled": true, "runs": 500 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"AdminApproved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"AdminRevoked","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":"address payable[]","name":"receivers","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"basisPoints","type":"uint256[]"}],"name":"DefaultRoyaltiesUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"extension","type":"address"},{"indexed":false,"internalType":"bool","name":"enabled","type":"bool"}],"name":"ExtensionApproveTransferUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"extension","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"ExtensionBlacklisted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"extension","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"ExtensionRegistered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"extension","type":"address"},{"indexed":false,"internalType":"address payable[]","name":"receivers","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"basisPoints","type":"uint256[]"}],"name":"ExtensionRoyaltiesUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"extension","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"ExtensionUnregistered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"extension","type":"address"},{"indexed":true,"internalType":"address","name":"permissions","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"MintPermissionsUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"address payable[]","name":"receivers","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"basisPoints","type":"uint256[]"}],"name":"RoyaltiesUpdated","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":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"approveAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"extension","type":"address"}],"name":"blacklistExtension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"collectionSize","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractMetadataURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"originalTokenId","type":"uint256"},{"internalType":"uint256","name":"newTokenId","type":"uint256"}],"name":"generateLeaf","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getAdmins","outputs":[{"internalType":"address[]","name":"admins","type":"address[]"}],"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":"getExtensions","outputs":[{"internalType":"address[]","name":"extensions","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getFeeBps","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getFeeRecipients","outputs":[{"internalType":"address payable[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getFees","outputs":[{"internalType":"address payable[]","name":"","type":"address[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getRoyalties","outputs":[{"internalType":"address payable[]","name":"","type":"address[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"isAdmin","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":"lockMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"merkleRootLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"migrationRange","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint8","name":"tokenId","type":"uint8"},{"internalType":"string","name":"uri","type":"string"}],"name":"mint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"mintBase","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"string","name":"uri","type":"string"}],"name":"mintBase","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"string[]","name":"uris","type":"string[]"}],"name":"mintBaseBatch","outputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint16","name":"count","type":"uint16"}],"name":"mintBaseBatch","outputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"mintExtension","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"string","name":"uri","type":"string"}],"name":"mintExtension","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"string[]","name":"uris","type":"string[]"}],"name":"mintExtensionBatch","outputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint16","name":"count","type":"uint16"}],"name":"mintExtensionBatch","outputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"originalContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"originalTokenIdToAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"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":"purgatory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"extension","type":"address"},{"internalType":"string","name":"baseURI","type":"string"}],"name":"registerExtension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"extension","type":"address"},{"internalType":"string","name":"baseURI","type":"string"},{"internalType":"bool","name":"baseURIIdentical","type":"bool"}],"name":"registerExtension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"revokeAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"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":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"originalTokenId","type":"uint256"},{"internalType":"uint256","name":"newTokenId","type":"uint256"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"},{"internalType":"string","name":"uri","type":"string"}],"name":"sendTokenToPurgatory","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"enabled","type":"bool"}],"name":"setApproveTransferExtension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri","type":"string"}],"name":"setBaseTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri","type":"string"}],"name":"setBaseTokenURIExtension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri","type":"string"},{"internalType":"bool","name":"identical","type":"bool"}],"name":"setBaseTokenURIExtension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_contractURI","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_purgatory","type":"address"},{"internalType":"address","name":"_originalContract","type":"address"},{"internalType":"uint8[]","name":"_migrationRange","type":"uint8[]"},{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"}],"name":"setMigrationParameters","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"extension","type":"address"},{"internalType":"address","name":"permissions","type":"address"}],"name":"setMintPermissions","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address payable[]","name":"receivers","type":"address[]"},{"internalType":"uint256[]","name":"basisPoints","type":"uint256[]"}],"name":"setRoyalties","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable[]","name":"receivers","type":"address[]"},{"internalType":"uint256[]","name":"basisPoints","type":"uint256[]"}],"name":"setRoyalties","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"extension","type":"address"},{"internalType":"address payable[]","name":"receivers","type":"address[]"},{"internalType":"uint256[]","name":"basisPoints","type":"uint256[]"}],"name":"setRoyaltiesExtension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"uri","type":"string"}],"name":"setTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"string[]","name":"uris","type":"string[]"}],"name":"setTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"string[]","name":"uris","type":"string[]"}],"name":"setTokenURIExtension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"uri","type":"string"}],"name":"setTokenURIExtension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"prefix","type":"string"}],"name":"setTokenURIPrefix","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"prefix","type":"string"}],"name":"setTokenURIPrefixExtension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenExtension","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"extension","type":"address"}],"name":"unregisterExtension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"},{"internalType":"bytes32","name":"root","type":"bytes32"},{"internalType":"bytes32","name":"leaf","type":"bytes32"}],"name":"verifyMerkleProof","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60806040526000600a55601a80546001600160a01b0319908116909155601b80549091169055601d805460ff191690553480156200003c57600080fd5b506040518060400160405280601081526020016f5768657265204d792056616e7320476f60801b81525060405180604001604052806004815260200163574d564760e01b81525081816200009f62000099620000d960201b60201c565b620000dd565b600180558151620000b89060049060208501906200012d565b508051620000ce9060059060208401906200012d565b505050505062000210565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b8280546200013b90620001d3565b90600052602060002090601f0160209004810192826200015f5760008555620001aa565b82601f106200017a57805160ff1916838001178555620001aa565b82800160010185558215620001aa579182015b82811115620001aa5782518255916020019190600101906200018d565b50620001b8929150620001bc565b5090565b5b80821115620001b85760008155600101620001bd565b600281046001821680620001e857607f821691505b602082108114156200020a57634e487b7160e01b600052602260045260246000fd5b50919050565b615f2d80620002206000396000f3fe608060405234801561001057600080fd5b50600436106104125760003560e01c806374aed3fd11610220578063b0fe87c911610130578063e00aab4b116100b8578063e985e9c511610087578063e985e9c5146108cc578063f0cdc499146108df578063f2fde38b146108f2578063fc1cc1d114610905578063fe2e1f581461091857610412565b8063e00aab4b14610896578063e2c345e2146108a9578063e8a3d485146108b1578063e92a89f6146108b957610412565b8063bb3bafd6116100ff578063bb3bafd61461083c578063c87b56dd1461085d578063cbebc00e14610870578063ce8aee9d14610883578063d5a06d4c1461083c57610412565b8063b0fe87c9146107e3578063b45a0531146107f6578063b88d4fde14610809578063b9c4d9fb1461081c57610412565b8063938e3d7b116101b3578063a37edeba11610182578063a37edeba1461078f578063aafb2d4414610797578063ac0c8cfa146107aa578063ad2d0ddd146107bd578063ada4fa18146107d057610412565b8063938e3d7b1461074e57806395d89b411461076157806399e0dd7c14610769578063a22cb4651461077c57610412565b806382dcc0c8116101ef57806382dcc0c81461071857806383b7db631461072b57806385b0e9dd146107335780638da5cb5b1461074657610412565b806374aed3fd146106e257806376ad2817146106ea5780637884af44146106f25780637aa15f161461070557610412565b80633071a0f91161032657806345c0f533116102ae5780636d73e6691161027d5780636d73e6691461069957806370a08231146106ac578063715018a6146106bf57806372ff03d3146106c757806373e92784146106da57610412565b806345c0f5331461064b57806361e5bc6b146106605780636352211e1461067357806366d1e9d01461068657610412565b806338e52e78116102f557806338e52e78146105ec5780633e6134b8146105ff5780633f0f37f61461061257806342842e0e1461062557806342966c681461063857610412565b80633071a0f91461059e578063313ed5d1146105b157806331ae450b146105c4578063332dd1ae146105d957610412565b806320e4afe2116103a95780632928ca58116103785780632928ca581461052f5780632a55205a1461054f5780632d345670146105705780632eb4a7ab1461058357806330176e131461058b57610412565b806320e4afe2146104e3578063239be317146104f657806323b872dd1461050957806324d7806c1461051c57610412565b8063095ea7b3116103e5578063095ea7b31461048a5780630ebd4c7f1461049d578063162094c4146104bd57806319819935146104d057610412565b806301ffc9a71461041757806302e7afb71461044057806306fdde0314610455578063081812fc1461046a575b600080fd5b61042a610425366004614b70565b61092b565b60405161043791906151aa565b60405180910390f35b61045361044e366004614574565b61095c565b005b61045d6109b1565b60405161043791906151d3565b61047d610478366004614cb0565b610a43565b6040516104379190614fa5565b6104536104983660046148f9565b610a86565b6104b06104ab366004614cb0565b610b1e565b6040516104379190615197565b6104536104cb366004614cfd565b610ba4565b6104536104de366004614d4f565b610bef565b6104536104f1366004614cc8565b610de9565b61047d610504366004614cb0565b610e62565b610453610517366004614633565b610e92565b61042a61052a366004614574565b610eca565b61054261053d366004614574565b610ef9565b60405161043791906151b5565b61056261055d366004614d2e565b610f53565b604051610437929190615061565b61045361057e366004614574565b610f91565b610542611025565b610453610599366004614ba8565b61102b565b6104536105ac36600461481a565b6110aa565b61047d6105bf366004614cb0565b611126565b6105cc611140565b604051610437919061507a565b6104536105e736600461498c565b61120b565b6104b06105fa36600461479a565b611258565b61045361060d366004614ba8565b6113c0565b610453610620366004614860565b6113f3565b610453610633366004614633565b611468565b610453610646366004614cb0565b611483565b6106536114f9565b6040516104379190615c6e565b61045361066e366004614a89565b6114fe565b61047d610681366004614cb0565b6115c5565b610453610694366004614ba8565b6115fa565b6104536106a7366004614574565b61162b565b6105426106ba366004614574565b6116ba565b6104536116fe565b6105426106d5366004614574565b611749565b61045d6117b3565b61047d611841565b610453611850565b61054261070036600461481a565b6118be565b6104b061071336600461479a565b611933565b610453610726366004614be8565b611958565b6105cc61198a565b610542610741366004614d2e565b611a51565b61047d611ac5565b61045361075c366004614ba8565b611ad4565b61045d611b20565b610453610777366004614ba8565b611b2f565b61045361078a3660046147ed565b611b79565b61042a611b8b565b6104536107a5366004614a89565b611b94565b6104536107b8366004614b38565b611c74565b6104b06107cb3660046148c6565b611d43565b61042a6107de3660046149e9565b611db7565b6104536107f136600461471a565b611dcc565b6104536108043660046145c8565b611e19565b610453610817366004614673565b611ea9565b61082f61082a366004614cb0565b611ee2565b604051610437919061515f565b61084f61084a366004614cb0565b611f71565b604051610437929190615172565b61045d61086b366004614cb0565b612055565b61065361087e366004614cb0565b612085565b610453610891366004614574565b6120b9565b6104b06108a43660046148c6565b612102565b61047d612222565b61045d612231565b6104536108c7366004614cfd565b612240565b61042a6108da366004614590565b612272565b6104536108ed366004614590565b6122a0565b610453610900366004614574565b6122ea565b610542610913366004614924565b612358565b61054261092636600461481a565b612510565b600061093682612561565b80610945575061094582612586565b806109545750610954826125c1565b90505b919050565b33610965611ac5565b6001600160a01b0316148061098057506109806002336125e6565b6109a55760405162461bcd60e51b815260040161099c90615aed565b60405180910390fd5b6109ae81612602565b50565b6060600480546109c090615df6565b80601f01602080910402602001604051908101604052809291908181526020018280546109ec90615df6565b8015610a395780601f10610a0e57610100808354040283529160200191610a39565b820191906000526020600020905b815481529060010190602001808311610a1c57829003601f168201915b5050505050905090565b6000610a4e826126ce565b610a6a5760405162461bcd60e51b815260040161099c90615876565b506000908152600860205260409020546001600160a01b031690565b6000610a91826115c5565b9050806001600160a01b0316836001600160a01b03161415610ac55760405162461bcd60e51b815260040161099c906159e3565b806001600160a01b0316610ad76126eb565b6001600160a01b03161480610af35750610af3816108da6126eb565b610b0f5760405162461bcd60e51b815260040161099c906155de565b610b1983836126ef565b505050565b6060610b29826126ce565b610b455760405162461bcd60e51b815260040161099c9061563b565b610b4e8261275d565b805480602002602001604051908101604052809291908181526020018280548015610b9857602002820191906000526020600020905b815481526020019060010190808311610b84575b50505050509050919050565b33610bad611ac5565b6001600160a01b03161480610bc85750610bc86002336125e6565b610be45760405162461bcd60e51b815260040161099c90615aed565b610b198383836127ed565b601a546001600160a01b0316610c175760405162461bcd60e51b815260040161099c90615799565b601b546001600160a01b0316610c3f5760405162461bcd60e51b815260040161099c906157e4565b601b5460405163e985e9c560e01b81526001600160a01b0390911690819063e985e9c590610c739033903090600401614fb9565b60206040518083038186803b158015610c8b57600080fd5b505afa158015610c9f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cc39190614b54565b610cdf5760405162461bcd60e51b815260040161099c9061539c565b6000610ceb8888611a51565b9050610d2e86868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050601c549150849050611db7565b610d4a5760405162461bcd60e51b815260040161099c90615bc5565b601a54604051637921219560e11b81526001600160a01b038085169263f242432a92610d8192339216908d90600190600401615029565b600060405180830381600087803b158015610d9b57600080fd5b505af1158015610daf573d6000803e3d6000fd5b5050506000898152602080526040902080546001600160a01b03191633908117909155610ddf915088868661283c565b5050505050505050565b33610df2611ac5565b6001600160a01b03161480610e0d5750610e0d6002336125e6565b610e295760405162461bcd60e51b815260040161099c90615aed565b610e32856126ce565b610e4e5760405162461bcd60e51b815260040161099c9061563b565b610e5b85858585856128cd565b5050505050565b6000610e6d826126ce565b610e895760405162461bcd60e51b815260040161099c9061563b565b610954826129da565b610ea3610e9d6126eb565b82612a3a565b610ebf5760405162461bcd60e51b815260040161099c90615a90565b610b19838383612ab7565b6000816001600160a01b0316610ede611ac5565b6001600160a01b0316148061095457506109546002836125e6565b600060026001541415610f1e5760405162461bcd60e51b815260040161099c90615c37565b6002600155610f2e600b336125e6565b610f4a5760405162461bcd60e51b815260040161099c906155a7565b60018055919050565b600080610f5f846126ce565b610f7b5760405162461bcd60e51b815260040161099c9061563b565b610f858484612be4565b915091505b9250929050565b610f996126eb565b6001600160a01b0316610faa611ac5565b6001600160a01b031614610fd05760405162461bcd60e51b815260040161099c90615907565b610fdb6002826125e6565b156109ae5760405133906001600160a01b038316907f7c0c3c84c67c85fcac635147348bfe374c24a1a93d0366d1cfe9d8853cbf89d590600090a3611021600282612cb8565b5050565b601c5481565b33611034611ac5565b6001600160a01b0316148061104f575061104f6002336125e6565b61106b5760405162461bcd60e51b815260040161099c90615aed565b61102182828080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612ccd92505050565b336110b3611ac5565b6001600160a01b031614806110ce57506110ce6002336125e6565b6110ea5760405162461bcd60e51b815260040161099c90615aed565b826110f6600d826125e6565b156111135760405162461bcd60e51b815260040161099c906154c8565b6111208484846000612ced565b50505050565b60208052600090815260409020546001600160a01b031681565b606061114c6002612dce565b67ffffffffffffffff81111561117257634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561119b578160200160208202803683370190505b50905060005b6111ab6002612dce565b811015611207576111bd600282612dd9565b8282815181106111dd57634e487b7160e01b600052603260045260246000fd5b6001600160a01b0390921660209283029190910190910152806111ff81615e4d565b9150506111a1565b5090565b33611214611ac5565b6001600160a01b0316148061122f575061122f6002336125e6565b61124b5760405162461bcd60e51b815260040161099c90615aed565b6111203085858585612de5565b60606002600154141561127d5760405162461bcd60e51b815260040161099c90615c37565b600260015561128d600b336125e6565b6112a95760405162461bcd60e51b815260040161099c906155a7565b8167ffffffffffffffff8111156112d057634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156112f9578160200160208202803683370190505b50905060005b828110156113b4576113778585858481811061132b57634e487b7160e01b600052603260045260246000fd5b905060200281019061133d9190615c7c565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612f5a92505050565b82828151811061139757634e487b7160e01b600052603260045260246000fd5b6020908102919091010152806113ac81615e4d565b9150506112ff565b50600180559392505050565b6113cb600b336125e6565b6113e75760405162461bcd60e51b815260040161099c906155a7565b61102182826000612fd9565b336113fc611ac5565b6001600160a01b0316148061141757506114176002336125e6565b6114335760405162461bcd60e51b815260040161099c90615aed565b8361143f600d826125e6565b1561145c5760405162461bcd60e51b815260040161099c906154c8565b610e5b85858585612ced565b610b1983838360405180602001604052806000815250611ea9565b600260015414156114a65760405162461bcd60e51b815260040161099c90615c37565b60026001556114b53382612a3a565b6114d15760405162461bcd60e51b815260040161099c90615a5b565b60006114dc826115c5565b90506114e782613016565b6114f181836130bd565b505060018055565b607d81565b611509600b336125e6565b6115255760405162461bcd60e51b815260040161099c906155a7565b825181146115455760405162461bcd60e51b815260040161099c906159bc565b60005b8351811015611120576115b384828151811061157457634e487b7160e01b600052603260045260246000fd5b602002602001015184848481811061159c57634e487b7160e01b600052603260045260246000fd5b90506020028101906115ae9190615c7c565b6131d1565b806115bd81615e4d565b915050611548565b6000818152600660205260408120546001600160a01b0316806109545760405162461bcd60e51b815260040161099c90615750565b611605600b336125e6565b6116215760405162461bcd60e51b815260040161099c906155a7565b6110218282613207565b6116336126eb565b6001600160a01b0316611644611ac5565b6001600160a01b03161461166a5760405162461bcd60e51b815260040161099c90615907565b6116756002826125e6565b6109ae5760405133906001600160a01b038316907f7e1a1a08d52e4ba0e21554733d66165fd5151f99460116223d9e3a608eec5cb190600090a3611021600282613221565b60006001600160a01b0382166116e25760405162461bcd60e51b815260040161099c906156cf565b506001600160a01b031660009081526007602052604090205490565b6117066126eb565b6001600160a01b0316611717611ac5565b6001600160a01b03161461173d5760405162461bcd60e51b815260040161099c90615907565b6117476000613236565b565b60006002600154141561176e5760405162461bcd60e51b815260040161099c90615c37565b60026001553361177c611ac5565b6001600160a01b0316148061179757506117976002336125e6565b610f4a5760405162461bcd60e51b815260040161099c90615aed565b601f80546117c090615df6565b80601f01602080910402602001604051908101604052809291908181526020018280546117ec90615df6565b80156118395780601f1061180e57610100808354040283529160200191611839565b820191906000526020600020905b81548152906001019060200180831161181c57829003601f168201915b505050505081565b601a546001600160a01b031681565b33611859611ac5565b6001600160a01b0316148061187457506118746002336125e6565b6118905760405162461bcd60e51b815260040161099c90615aed565b601c546118af5760405162461bcd60e51b815260040161099c90615572565b601d805460ff19166001179055565b6000600260015414156118e35760405162461bcd60e51b815260040161099c90615c37565b6002600155336118f1611ac5565b6001600160a01b0316148061190c575061190c6002336125e6565b6119285760405162461bcd60e51b815260040161099c90615aed565b600180559392505050565b6060600260015414156118e35760405162461bcd60e51b815260040161099c90615c37565b611963600b336125e6565b61197f5760405162461bcd60e51b815260040161099c906155a7565b610b19838383612fd9565b6060611996600b612dce565b67ffffffffffffffff8111156119bc57634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156119e5578160200160208202803683370190505b50905060005b6119f5600b612dce565b81101561120757611a07600b82612dd9565b828281518110611a2757634e487b7160e01b600052603260045260246000fd5b6001600160a01b039092166020928302919091019091015280611a4981615e4d565b9150506119eb565b600080611a5d84613286565b90506000611a6a84613286565b905060008282604051602001611a81929190614f2f565b604051602081830303815290604052905080604051602001611aa39190614f13565b6040516020818303038152906040528051906020012093505050505b92915050565b6000546001600160a01b031690565b33611add611ac5565b6001600160a01b03161480611af85750611af86002336125e6565b611b145760405162461bcd60e51b815260040161099c90615aed565b610b19601f8383614280565b6060600580546109c090615df6565b33611b38611ac5565b6001600160a01b03161480611b535750611b536002336125e6565b611b6f5760405162461bcd60e51b815260040161099c90615aed565b61102182826133cc565b611021611b846126eb565b83836133e6565b601d5460ff1681565b33611b9d611ac5565b6001600160a01b03161480611bb85750611bb86002336125e6565b611bd45760405162461bcd60e51b815260040161099c90615aed565b82518114611bf45760405162461bcd60e51b815260040161099c906159bc565b60005b835181101561112057611c62848281518110611c2357634e487b7160e01b600052603260045260246000fd5b6020026020010151848484818110611c4b57634e487b7160e01b600052603260045260246000fd5b9050602002810190611c5d9190615c7c565b6127ed565b80611c6c81615e4d565b915050611bf7565b611c7f600b336125e6565b611c9b5760405162461bcd60e51b815260040161099c906155a7565b801580611cb45750611cb433634ce6d51160e11b613489565b611cd05760405162461bcd60e51b815260040161099c90615b31565b3360009081526010602052604090205460ff161515811515146109ae573360008181526010602052604090819020805460ff1916841515179055517f072a7592283e2c2d1d56d21517ff6013325e0f55483f4828373ff4d98b0a1a3690611d389084906151aa565b60405180910390a250565b606060026001541415611d685760405162461bcd60e51b815260040161099c90615c37565b600260015533611d76611ac5565b6001600160a01b03161480611d915750611d916002336125e6565b611dad5760405162461bcd60e51b815260040161099c90615aed565b6001805592915050565b6000611dc48484846134a5565b949350505050565b33611dd5611ac5565b6001600160a01b03161480611df05750611df06002336125e6565b611e0c5760405162461bcd60e51b815260040161099c90615aed565b610e5b8585858585612de5565b33611e22611ac5565b6001600160a01b03161480611e3d5750611e3d6002336125e6565b611e595760405162461bcd60e51b815260040161099c90615aed565b601a80546001600160a01b038088166001600160a01b031992831617909255601b805492871692909116919091179055611e95601e8484614300565b50601d5460ff16610e5b57601c5550505050565b611eba611eb46126eb565b83612a3a565b611ed65760405162461bcd60e51b815260040161099c90615a90565b611120848484846134bb565b6060611eed826126ce565b611f095760405162461bcd60e51b815260040161099c9061563b565b611f12826134ee565b805480602002602001604051908101604052809291908181526020018280548015610b9857602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611f485750505050509050919050565b606080611f7d836126ce565b611f995760405162461bcd60e51b815260040161099c9061563b565b611fa28361357e565b815460408051602080840282018101909252828152918491830182828015611ff357602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611fd5575b505050505091508080548060200260200160405190810160405280929190818152602001828054801561204557602002820191906000526020600020905b815481526020019060010190808311612031575b5050505050905091509150915091565b6060612060826126ce565b61207c5760405162461bcd60e51b815260040161099c9061563b565b6109548261359c565b601e818154811061209557600080fd5b9060005260206000209060209182820401919006915054906101000a900460ff1681565b336120c2611ac5565b6001600160a01b031614806120dd57506120dd6002336125e6565b6120f95760405162461bcd60e51b815260040161099c90615aed565b6109ae8161382d565b6060600260015414156121275760405162461bcd60e51b815260040161099c90615c37565b6002600155612137600b336125e6565b6121535760405162461bcd60e51b815260040161099c906155a7565b8161ffff1667ffffffffffffffff81111561217e57634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156121a7578160200160208202803683370190505b50905060005b8261ffff168161ffff161015612217576121d68460405180602001604052806000815250612f5a565b828261ffff16815181106121fa57634e487b7160e01b600052603260045260246000fd5b60209081029190910101528061220f81615e2b565b9150506121ad565b506001805592915050565b601b546001600160a01b031681565b6060601f80546109c090615df6565b61224b600b336125e6565b6122675760405162461bcd60e51b815260040161099c906155a7565b610b198383836131d1565b6001600160a01b03918216600090815260096020908152604080832093909416825291909152205460ff1690565b336122a9611ac5565b6001600160a01b031614806122c457506122c46002336125e6565b6122e05760405162461bcd60e51b815260040161099c90615aed565b611021828261387e565b6122f26126eb565b6001600160a01b0316612303611ac5565b6001600160a01b0316146123295760405162461bcd60e51b815260040161099c90615907565b6001600160a01b03811661234f5760405162461bcd60e51b815260040161099c906152e8565b6109ae81613236565b60006002600154141561237d5760405162461bcd60e51b815260040161099c90615c37565b60026001553361238b611ac5565b6001600160a01b031614806123a657506123a66002336125e6565b6123c25760405162461bcd60e51b815260040161099c90615aed565b607d60ff8516106123e55760405162461bcd60e51b815260040161099c90615672565b601e60008154811061240757634e487b7160e01b600052603260045260246000fd5b90600052602060002090602091828204019190069054906101000a900460ff1660ff168460ff1610806124805750601e60018154811061245757634e487b7160e01b600052603260045260246000fd5b90600052602060002090602091828204019190069054906101000a900460ff1660ff168460ff16115b61249c5760405162461bcd60e51b815260040161099c90615bec565b816124b95760405162461bcd60e51b815260040161099c906151e6565b60ff8416600081815260116020526040902080546001600160a01b031916301790556124e6908690613961565b60ff84166000908152601560205260409020612503908484614280565b5060018055949350505050565b6000600260015414156125355760405162461bcd60e51b815260040161099c90615c37565b6002600155612545600b336125e6565b6119285760405162461bcd60e51b815260040161099c906155a7565b60006001600160e01b03198216639088c20760e01b148061095457506109548261397b565b60006001600160e01b031982166380ac58cd60e01b148061094557506001600160e01b03198216635b5e139f60e01b14806109545750610954825b60006001600160e01b03198216632a9f3abf60e11b1480610954575061095482613a0e565b60006125fb836001600160a01b038416613a27565b9392505050565b6001600160a01b03811630141561262b5760405162461bcd60e51b815260040161099c9061521d565b612636600b826125e6565b1561267e5760405133906001600160a01b038316907fd19cf84cf0fec6bec9ddfa29c63adf83a55707c712f32c8285d6180a7890147990600090a361267c600b82612cb8565b505b612689600d826125e6565b6109ae5760405133906001600160a01b038316907f05ac7bc5a606cd92a63365f9fda244499b9add0526b22d99937b6bd88181059c90600090a3611021600d82613221565b6000908152600660205260409020546001600160a01b0316151590565b3390565b600081815260086020526040902080546001600160a01b0319166001600160a01b0384169081179091558190612724826115c5565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152601960205260408120541561278557506000818152601960205260409020610957565b6000828152601160209081526040808320546001600160a01b031683526017909152902054156127d957506000818152601160209081526040808320546001600160a01b0316835260179091529020610957565b505030600090815260176020526040902090565b6000838152601160205260409020546001600160a01b031630146128235760405162461bcd60e51b815260040161099c9061554b565b6000838152601560205260409020611120908383614280565b6002600154141561285f5760405162461bcd60e51b815260040161099c90615c37565b6002600155806128815760405162461bcd60e51b815260040161099c906151e6565b600083815260116020526040902080546001600160a01b031916301790556128a98484613961565b60008381526015602052604090206128c2908383614280565b505060018055505050565b8281146128ec5760405162461bcd60e51b815260040161099c906159bc565b6000805b8281101561293e5783838281811061291857634e487b7160e01b600052603260045260246000fd5b905060200201358261292a9190615d43565b91508061293681615e4d565b9150506128f0565b5061271081106129605760405162461bcd60e51b815260040161099c90615a24565b60008681526018602052604090206129799086866143a4565b5060008681526019602052604090206129939084846143f7565b50857fabb46fe0761d77584bde75697647804ffd8113abd4d8d06bc664150395eccdee868686866040516129ca94939291906150c7565b60405180910390a2505050505050565b6000818152601160205260409020546001600160a01b031630811415612a125760405162461bcd60e51b815260040161099c9061593c565b612a1d600d826125e6565b156109575760405162461bcd60e51b815260040161099c906154c8565b6000612a45826126ce565b612a615760405162461bcd60e51b815260040161099c906154ff565b6000612a6c836115c5565b9050806001600160a01b0316846001600160a01b03161480612aa75750836001600160a01b0316612a9c84610a43565b6001600160a01b0316145b80611dc45750611dc48185612272565b826001600160a01b0316612aca826115c5565b6001600160a01b031614612af05760405162461bcd60e51b815260040161099c90615973565b6001600160a01b038216612b165760405162461bcd60e51b815260040161099c9061544d565b612b21838383613a3f565b612b2c6000826126ef565b6001600160a01b0383166000908152600760205260408120805460019290612b55908490615db3565b90915550506001600160a01b0382166000908152600760205260408120805460019290612b83908490615d43565b909155505060008181526006602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6000806000612bf2856134ee565b805490915060011015612c175760405162461bcd60e51b815260040161099c90615719565b8054612c2a573060009250925050610f8a565b80600081548110612c4b57634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b031661271085612c6d8861275d565b600081548110612c8d57634e487b7160e01b600052603260045260246000fd5b9060005260206000200154612ca29190615d94565b612cac9190615d80565b92509250509250929050565b60006125fb836001600160a01b038416613a4a565b306000908152601260209081526040909120825161102192840190614431565b6001600160a01b038416301415612d165760405162461bcd60e51b815260040161099c90615b8e565b612d28846001600160a01b0316613b67565b612d445760405162461bcd60e51b815260040161099c906158c2565b612d4f600b856125e6565b611120576001600160a01b0384166000908152601260205260409020612d76908484614280565b506001600160a01b038416600081815260136020526040808220805460ff1916851515179055513392917fd8cb8ba4086944eabf43c5535b7712015e4d4c714b24bf812c040ea5b7a3e42a91a3610e5b600b85613221565b600061095482613b6d565b60006125fb8383613b71565b828114612e045760405162461bcd60e51b815260040161099c906159bc565b6000805b82811015612e5657838382818110612e3057634e487b7160e01b600052603260045260246000fd5b9050602002013582612e429190615d43565b915080612e4e81615e4d565b915050612e08565b506127108110612e785760405162461bcd60e51b815260040161099c90615a24565b6001600160a01b0386166000908152601660205260409020612e9b9086866143a4565b506001600160a01b0386166000908152601760205260409020612ebf9084846143f7565b506001600160a01b038616301415612f13577f2b6849d5976d799a5b0ca4dfd6b40a3d7afe9ea72c091fa01a958594f9a2659b85858585604051612f0694939291906150c7565b60405180910390a1612f52565b856001600160a01b03167f535a93d2cb000582c0ebeaa9be4890ec6a287f98eb2df00c54c300612fd78d8f868686866040516129ca94939291906150c7565b505050505050565b600a805460009182612f6b83615e4d565b9190505550600a549050612f7f8382613ba9565b600081815260116020526040902080546001600160a01b03191633179055612fa78382613961565b815115612fcf5760008181526015602090815260409091208351612fcd92850190614431565b505b611abf8382611021565b336000908152601260205260409020612ff3908484614280565b50336000908152601360205260409020805460ff19169115159190911790555050565b6000613021826115c5565b905061302f81600084613a3f565b61303a6000836126ef565b6001600160a01b0381166000908152600760205260408120805460019290613063908490615db3565b909155505060008281526006602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6000818152601160205260409020546001600160a01b0316301461317b57600081815260116020526040902054613104906001600160a01b03166311686e4b60e21b613489565b1561317b57600081815260116020526040908190205490516311686e4b60e21b81526001600160a01b03909116906345a1b92c906131489085908590600401615061565b600060405180830381600087803b15801561316257600080fd5b505af1158015613176573d6000803e3d6000fd5b505050505b6000818152601560205260409020805461319490615df6565b1590506131b25760008181526015602052604081206131b2916144a5565b600090815260116020526040902080546001600160a01b031916905550565b6000838152601160205260409020546001600160a01b031633146128235760405162461bcd60e51b815260040161099c9061554b565b336000908152601460205260409020610b19908383614280565b60006125fb836001600160a01b038416613c36565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6060816132ab57506040805180820190915260018152600360fc1b6020820152610957565b8160005b81156132d557806132bf81615e4d565b91506132ce9050600a83615d80565b91506132af565b60008167ffffffffffffffff8111156132fe57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015613328576020820181803683370190505b509050815b85156133c35761333e600182615db3565b9050600061334d600a88615d80565b61335890600a615d94565b6133629088615db3565b61336d906030615d5b565b905060008160f81b90508084848151811061339857634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506133ba600a89615d80565b9750505061332d565b50949350505050565b306000908152601460205260409020610b19908383614280565b816001600160a01b0316836001600160a01b031614156134185760405162461bcd60e51b815260040161099c90615491565b6001600160a01b0383811660008181526009602090815260408083209487168084529490915290819020805460ff1916851515179055517f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c319061347c9085906151aa565b60405180910390a3505050565b600061349483613c80565b80156125fb57506125fb8383613cb3565b6000826134b28584613da4565b14949350505050565b6134c6848484612ab7565b6134d284848484613e5c565b6111205760405162461bcd60e51b815260040161099c9061528b565b6000818152601860205260408120541561351657506000818152601860205260409020610957565b6000828152601160209081526040808320546001600160a01b0316835260169091529020541561356a57506000818152601160209081526040808320546001600160a01b0316835260169091529020610957565b505030600090815260166020526040902090565b60008061358a836134ee565b6135938461275d565b91509150915091565b6000818152601160205260409020546060906001600160a01b03166135c2600d826125e6565b156135df5760405162461bcd60e51b815260040161099c906154c8565b600083815260156020526040902080546135f890615df6565b159050613712576001600160a01b0381166000908152601460205260409020805461362290615df6565b159050613673576001600160a01b03811660009081526014602090815260408083208684526015835292819020905161365c939201614f90565b604051602081830303815290604052915050610957565b6000838152601560205260409020805461368c90615df6565b80601f01602080910402602001604051908101604052809291908181526020018280546136b890615df6565b80156137055780601f106136da57610100808354040283529160200191613705565b820191906000526020600020905b8154815290600101906020018083116136e857829003601f168201915b5050505050915050610957565b6137238163e9dc637560e01b613489565b156137b25760405163e9dc637560e01b81526001600160a01b0382169063e9dc6375906137569030908790600401615061565b60006040518083038186803b15801561376e57600080fd5b505afa158015613782573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526137aa9190810190614c3d565b915050610957565b6001600160a01b03811660009081526013602052604090205460ff16613804576001600160a01b03811660009081526012602052604090206137f384613f77565b60405160200161365c929190614f6b565b6001600160a01b0381166000908152601260205260409020805461368c90615df6565b50919050565b613838600b826125e6565b156109ae5760405133906001600160a01b038316907fd19cf84cf0fec6bec9ddfa29c63adf83a55707c712f32c8285d6180a7890147990600090a3611021600b82612cb8565b613889600b836125e6565b6138a55760405162461bcd60e51b815260040161099c90615365565b6001600160a01b03811615806138c757506138c781631e05385b60e31b613489565b6138e35760405162461bcd60e51b815260040161099c90615254565b6001600160a01b038281166000908152600f6020526040902054811690821614611021576001600160a01b038281166000818152600f602052604080822080546001600160a01b031916948616948517905551339392917f6a835c4fcf7e0d398db3762332fdaa1471814ad39f1e2d6d0b3fdabf8efee3e091a45050565b611021828260405180602001604052806000815250614092565b60006001600160e01b031982166328f10a2160e01b14806139a057506139a082612586565b806139bb57506001600160e01b03198216635d9dd7eb60e11b145b806139d657506001600160e01b03198216632dde656160e21b145b806139f157506001600160e01b031982166335681b5360e21b145b806109545750506001600160e01b03191663152a902d60e11b1490565b6001600160e01b031981166301ffc9a760e01b14919050565b60009081526001919091016020526040902054151590565b610b198383836140c5565b60008181526001830160205260408120548015613b5d576000613a6e600183615db3565b8554909150600090613a8290600190615db3565b9050818114613b03576000866000018281548110613ab057634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905080876000018481548110613ae157634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613b2257634e487b7160e01b600052603160045260246000fd5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050611abf565b6000915050611abf565b3b151590565b5490565b6000826000018281548110613b9657634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905092915050565b336000908152600f60205260409020546001600160a01b03161561102157336000818152600f602052604090819020549051631e05385b60e31b81526001600160a01b039091169163f029c2d891613c08919086908690600401614fd3565b600060405180830381600087803b158015613c2257600080fd5b505af1158015612f52573d6000803e3d6000fd5b6000613c428383613a27565b613c7857508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155611abf565b506000611abf565b6000613c93826301ffc9a760e01b613cb3565b80156109545750613cac826001600160e01b0319613cb3565b1592915050565b6000806301ffc9a760e01b83604051602401613ccf91906151be565b604051602081830303815290604052906001600160e01b0319166020820180516001600160e01b0383818316178352505050509050600080856001600160a01b031661753084604051613d229190614f13565b6000604051808303818686fa925050503d8060008114613d5e576040519150601f19603f3d011682016040523d82523d6000602084013e613d63565b606091505b5091509150602081511015613d7e5760009350505050611abf565b818015613d9a575080806020019051810190613d9a9190614b54565b9695505050505050565b600081815b8451811015613e54576000858281518110613dd457634e487b7160e01b600052603260045260246000fd5b60200260200101519050808311613e15578281604051602001613df8929190614f05565b604051602081830303815290604052805190602001209250613e41565b8083604051602001613e28929190614f05565b6040516020818303038152906040528051906020012092505b5080613e4c81615e4d565b915050613da9565b509392505050565b6000613e70846001600160a01b0316613b67565b15613f6c57836001600160a01b031663150b7a02613e8c6126eb565b8786866040518563ffffffff1660e01b8152600401613eae9493929190614ff7565b602060405180830381600087803b158015613ec857600080fd5b505af1925050508015613ef8575060408051601f3d908101601f19168201909252613ef591810190614b8c565b60015b613f52573d808015613f26576040519150601f19603f3d011682016040523d82523d6000602084013e613f2b565b606091505b508051613f4a5760405162461bcd60e51b815260040161099c9061528b565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611dc4565b506001949350505050565b606081613f9c57506040805180820190915260018152600360fc1b6020820152610957565b8160005b8115613fc65780613fb081615e4d565b9150613fbf9050600a83615d80565b9150613fa0565b60008167ffffffffffffffff811115613fef57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015614019576020820181803683370190505b5090505b8415611dc45761402e600183615db3565b915061403b600a86615e68565b614046906030615d43565b60f81b81838151811061406957634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535061408b600a86615d80565b945061401d565b61409c83836141a1565b6140a96000848484613e5c565b610b195760405162461bcd60e51b815260040161099c9061528b565b6000818152601160209081526040808320546001600160a01b03168352601090915290205460ff1615610b195760008181526011602052604090819020549051638258080560e01b81526001600160a01b039091169063825808059061413390869086908690600401614fd3565b602060405180830381600087803b15801561414d57600080fd5b505af1158015614161573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141859190614b54565b610b195760405162461bcd60e51b815260040161099c90615404565b6001600160a01b0382166141c75760405162461bcd60e51b815260040161099c90615841565b6141d0816126ce565b156141ed5760405162461bcd60e51b815260040161099c9061532e565b6141f960008383613a3f565b6001600160a01b0382166000908152600760205260408120805460019290614222908490615d43565b909155505060008181526006602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b82805461428c90615df6565b90600052602060002090601f0160209004810192826142ae57600085556142f4565b82601f106142c75782800160ff198235161785556142f4565b828001600101855582156142f4579182015b828111156142f45782358255916020019190600101906142d9565b506112079291506144dd565b82805482825590600052602060002090601f016020900481019282156142f45791602002820160005b8382111561436a57833560ff1683826101000a81548160ff021916908360ff1602179055509260200192600101602081600001049283019260010302614329565b80156143975782816101000a81549060ff021916905560010160208160000104928301926001030261436a565b50506112079291506144dd565b8280548282559060005260206000209081019282156142f4579160200282015b828111156142f45781546001600160a01b0319166001600160a01b038435161782556020909201916001909101906143c4565b8280548282559060005260206000209081019282156142f457916020028201828111156142f45782358255916020019190600101906142d9565b82805461443d90615df6565b90600052602060002090601f01602090048101928261445f57600085556142f4565b82601f1061447857805160ff19168380011785556142f4565b828001600101855582156142f4579182015b828111156142f457825182559160200191906001019061448a565b5080546144b190615df6565b6000825580601f106144c357506109ae565b601f0160209004906000526020600020908101906109ae91905b5b8082111561120757600081556001016144de565b60008083601f840112614503578182fd5b50813567ffffffffffffffff81111561451a578182fd5b6020830191508360208083028501011115610f8a57600080fd5b60008083601f840112614545578182fd5b50813567ffffffffffffffff81111561455c578182fd5b602083019150836020828501011115610f8a57600080fd5b600060208284031215614585578081fd5b81356125fb81615ebe565b600080604083850312156145a2578081fd5b82356145ad81615ebe565b915060208301356145bd81615ebe565b809150509250929050565b6000806000806000608086880312156145df578081fd5b85356145ea81615ebe565b945060208601356145fa81615ebe565b9350604086013567ffffffffffffffff811115614615578182fd5b614621888289016144f2565b96999598509660600135949350505050565b600080600060608486031215614647578081fd5b833561465281615ebe565b9250602084013561466281615ebe565b929592945050506040919091013590565b60008060008060808587031215614688578182fd5b843561469381615ebe565b935060208501356146a381615ebe565b925060408501359150606085013567ffffffffffffffff8111156146c5578182fd5b8501601f810187136146d5578182fd5b80356146e86146e382615d0f565b615cc1565b8181528860208385010111156146fc578384fd5b81602084016020830137908101602001929092525092959194509250565b600080600080600060608688031215614731578283fd5b853561473c81615ebe565b9450602086013567ffffffffffffffff80821115614758578485fd5b61476489838a016144f2565b9096509450604088013591508082111561477c578283fd5b50614789888289016144f2565b969995985093965092949392505050565b6000806000604084860312156147ae578081fd5b83356147b981615ebe565b9250602084013567ffffffffffffffff8111156147d4578182fd5b6147e0868287016144f2565b9497909650939450505050565b600080604083850312156147ff578182fd5b823561480a81615ebe565b915060208301356145bd81615ed3565b60008060006040848603121561482e578081fd5b833561483981615ebe565b9250602084013567ffffffffffffffff811115614854578182fd5b6147e086828701614534565b60008060008060608587031215614875578182fd5b843561488081615ebe565b9350602085013567ffffffffffffffff81111561489b578283fd5b6148a787828801614534565b90945092505060408501356148bb81615ed3565b939692955090935050565b600080604083850312156148d8578182fd5b82356148e381615ebe565b9150602083013561ffff811681146145bd578182fd5b6000806040838503121561490b578182fd5b823561491681615ebe565b946020939093013593505050565b60008060008060608587031215614939578182fd5b843561494481615ebe565b9350602085013560ff81168114614959578283fd5b9250604085013567ffffffffffffffff811115614974578283fd5b61498087828801614534565b95989497509550505050565b600080600080604085870312156149a1578182fd5b843567ffffffffffffffff808211156149b8578384fd5b6149c4888389016144f2565b909650945060208701359150808211156149dc578384fd5b50614980878288016144f2565b6000806000606084860312156149fd578081fd5b833567ffffffffffffffff811115614a13578182fd5b8401601f81018613614a23578182fd5b80356020614a336146e383615ceb565b82815281810190848301838502860184018b1015614a4f578687fd5b8695505b84861015614a71578035835260019590950194918301918301614a53565b50999188013598505060409096013595945050505050565b600080600060408486031215614a9d578081fd5b833567ffffffffffffffff80821115614ab4578283fd5b818601915086601f830112614ac7578283fd5b81356020614ad76146e383615ceb565b82815281810190858301838502870184018c1015614af3578788fd5b8796505b84871015614b15578035835260019690960195918301918301614af7565b5097505087013592505080821115614b2b578283fd5b506147e0868287016144f2565b600060208284031215614b49578081fd5b81356125fb81615ed3565b600060208284031215614b65578081fd5b81516125fb81615ed3565b600060208284031215614b81578081fd5b81356125fb81615ee1565b600060208284031215614b9d578081fd5b81516125fb81615ee1565b60008060208385031215614bba578182fd5b823567ffffffffffffffff811115614bd0578283fd5b614bdc85828601614534565b90969095509350505050565b600080600060408486031215614bfc578081fd5b833567ffffffffffffffff811115614c12578182fd5b614c1e86828701614534565b9094509250506020840135614c3281615ed3565b809150509250925092565b600060208284031215614c4e578081fd5b815167ffffffffffffffff811115614c64578182fd5b8201601f81018413614c74578182fd5b8051614c826146e382615d0f565b818152856020838501011115614c96578384fd5b614ca7826020830160208601615dca565b95945050505050565b600060208284031215614cc1578081fd5b5035919050565b600080600080600060608688031215614cdf578283fd5b85359450602086013567ffffffffffffffff80821115614758578485fd5b600080600060408486031215614d11578081fd5b83359250602084013567ffffffffffffffff811115614854578182fd5b60008060408385031215614d40578182fd5b50508035926020909101359150565b60008060008060008060808789031215614d67578384fd5b8635955060208701359450604087013567ffffffffffffffff80821115614d8c578586fd5b614d988a838b016144f2565b90965094506060890135915080821115614db0578283fd5b50614dbd89828a01614534565b979a9699509497509295939492505050565b6000815180845260208085019450808401835b83811015614e075781516001600160a01b031687529582019590820190600101614de2565b509495945050505050565b6000815180845260208085019450808401835b83811015614e0757815187529582019590820190600101614e25565b60008151808452614e59816020860160208601615dca565b601f01601f19169290920160200192915050565b805460009060028104600180831680614e8757607f831692505b6020808410821415614ea757634e487b7160e01b86526022600452602486fd5b818015614ebb5760018114614ecc57614ef9565b60ff19861689528489019650614ef9565b614ed588615d37565b60005b86811015614ef15781548b820152908501908301614ed8565b505084890196505b50505050505092915050565b918252602082015260400190565b60008251614f25818460208701615dca565b9190910192915050565b60008351614f41818460208801615dca565b600160fd1b9083019081528351614f5f816001840160208801615dca565b01600101949350505050565b6000614f778285614e6d565b8351614f87818360208801615dca565b01949350505050565b6000611dc4614f9f8386614e6d565b84614e6d565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b60006001600160a01b03808716835280861660208401525083604083015260806060830152613d9a6080830184614e41565b6001600160a01b0394851681529290931660208301526040820152606081019190915260a06080820181905260009082015260c00190565b6001600160a01b03929092168252602082015260400190565b6020808252825182820181905260009190848201906040850190845b818110156150bb5783516001600160a01b031683529284019291840191600101615096565b50909695505050505050565b6040808252810184905260008560608301825b8781101561510a5782356150ed81615ebe565b6001600160a01b03168252602092830192909101906001016150da565b5083810360208501528481527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff851115615142578283fd5b602085029150818660208301370160200190815295945050505050565b6000602082526125fb6020830184614dcf565b6000604082526151856040830185614dcf565b8281036020840152614ca78185614e12565b6000602082526125fb6020830184614e12565b901515815260200190565b90815260200190565b6001600160e01b031991909116815260200190565b6000602082526125fb6020830184614e41565b60208082526013908201527f5552492063616e6e6f7420626520656d70747900000000000000000000000000604082015260600190565b60208082526019908201527f43616e6e6f7420626c61636b6c69737420796f757273656c6600000000000000604082015260600190565b6020808252600f908201527f496e76616c696420616464726573730000000000000000000000000000000000604082015260600190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527f63656976657220696d706c656d656e7465720000000000000000000000000000606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252601c908201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604082015260600190565b6020808252601e908201527f43726561746f72436f72653a20496e76616c696420657874656e73696f6e0000604082015260600190565b60208082526042908201527f436f6e7472616374206e6f742079657420617070726f76656420666f7220616c60408201527f6c207472616e73666572732066726f6d206f726967696e616c20636f6e74726160608201526118dd60f21b608082015260a00190565b60208082526029908201527f45524337323143726561746f723a20457874656e73696f6e20617070726f76616040820152686c206661696c75726560b81b606082015260800190565b60208082526024908201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646040820152637265737360e01b606082015260800190565b60208082526019908201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604082015260600190565b60208082526015908201527f457874656e73696f6e20626c61636b6c69737465640000000000000000000000604082015260600190565b6020808252602c908201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b6020808252600d908201526c24b73b30b634b2103a37b5b2b760991b604082015260600190565b6020808252818101527f4d65726b6c6520726f6f7420686173206e6f7420796574206265656e20736574604082015260600190565b6020808252601c908201527f4d757374206265207265676973746572656420657874656e73696f6e00000000604082015260600190565b60208082526038908201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760408201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606082015260800190565b60208082526011908201527f4e6f6e6578697374656e7420746f6b656e000000000000000000000000000000604082015260600190565b6020808252602e908201527f546f6b656e204944206d757374206265206c657373207468616e206d6178206360408201527f6f6c6c656374696f6e2073697a65000000000000000000000000000000000000606082015260800190565b6020808252602a908201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604082015269726f206164647265737360b01b606082015260800190565b6020808252601c908201527f4d6f7265207468616e203120726f79616c747920726563656976657200000000604082015260600190565b60208082526029908201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460408201526832b73a103a37b5b2b760b91b606082015260800190565b6020808252602b908201527f5075726761746f727920616464726573732063616e6e6f74206265207468652060408201526a307830206164647265737360a81b606082015260800190565b60208082526033908201527f4f726967696e616c20636f6e747261637420616464726573732063616e6e6f7460408201527f2062652074686520307830206164647265737300000000000000000000000000606082015260800190565b6020808252818101527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604082015260600190565b6020808252602c908201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b60208082526025908201527f43726561746f723a20457874656e73696f6e206d757374206265206120636f6e6040820152641d1c9858dd60da1b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526016908201527f4e6f20657874656e73696f6e20666f7220746f6b656e00000000000000000000604082015260600190565b60208082526029908201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960408201526839903737ba1037bbb760b91b606082015260800190565b6020808252600d908201526c125b9d985b1a59081a5b9c1d5d609a1b604082015260600190565b60208082526021908201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656040820152603960f91b606082015260800190565b60208082526017908201527f496e76616c696420746f74616c20726f79616c74696573000000000000000000604082015260600190565b6020808252818101527f43616c6c6572206973206e6f74206f776e6572206e6f7220617070726f766564604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60408201527f776e6572206e6f7220617070726f766564000000000000000000000000000000606082015260800190565b60208082526024908201527f41646d696e436f6e74726f6c3a204d757374206265206f776e6572206f7220616040820152633236b4b760e11b606082015260800190565b6020808252603f908201527f457874656e73696f6e206d75737420696d706c656d656e74204945524337323160408201527f43726561746f72457874656e73696f6e417070726f76655472616e7366657200606082015260800190565b60208082526010908201527f43726561746f723a20496e76616c696400000000000000000000000000000000604082015260600190565b6020808252600d908201526c24b73b30b634b210383937b7b360991b604082015260600190565b6020808252602b908201527f546f6b656e204944206d757374206265206f757473696465206f66206d69677260408201526a6174696f6e2072616e676560a81b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60ff91909116815260200190565b6000808335601e19843603018112615c92578283fd5b83018035915067ffffffffffffffff821115615cac578283fd5b602001915036819003821315610f8a57600080fd5b60405181810167ffffffffffffffff81118282101715615ce357615ce3615ea8565b604052919050565b600067ffffffffffffffff821115615d0557615d05615ea8565b5060209081020190565b600067ffffffffffffffff821115615d2957615d29615ea8565b50601f01601f191660200190565b60009081526020902090565b60008219821115615d5657615d56615e7c565b500190565b600060ff821660ff84168060ff03821115615d7857615d78615e7c565b019392505050565b600082615d8f57615d8f615e92565b500490565b6000816000190483118215151615615dae57615dae615e7c565b500290565b600082821015615dc557615dc5615e7c565b500390565b60005b83811015615de5578181015183820152602001615dcd565b838111156111205750506000910152565b600281046001821680615e0a57607f821691505b6020821081141561382757634e487b7160e01b600052602260045260246000fd5b600061ffff80831681811415615e4357615e43615e7c565b6001019392505050565b6000600019821415615e6157615e61615e7c565b5060010190565b600082615e7757615e77615e92565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146109ae57600080fd5b80151581146109ae57600080fd5b6001600160e01b0319811681146109ae57600080fdfea26469706673582212205e985fb70c1c5287e57f69966ff45f2e493b4a2145b66bd97a535d8dfc6cd8cc64736f6c63430008000033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106104125760003560e01c806374aed3fd11610220578063b0fe87c911610130578063e00aab4b116100b8578063e985e9c511610087578063e985e9c5146108cc578063f0cdc499146108df578063f2fde38b146108f2578063fc1cc1d114610905578063fe2e1f581461091857610412565b8063e00aab4b14610896578063e2c345e2146108a9578063e8a3d485146108b1578063e92a89f6146108b957610412565b8063bb3bafd6116100ff578063bb3bafd61461083c578063c87b56dd1461085d578063cbebc00e14610870578063ce8aee9d14610883578063d5a06d4c1461083c57610412565b8063b0fe87c9146107e3578063b45a0531146107f6578063b88d4fde14610809578063b9c4d9fb1461081c57610412565b8063938e3d7b116101b3578063a37edeba11610182578063a37edeba1461078f578063aafb2d4414610797578063ac0c8cfa146107aa578063ad2d0ddd146107bd578063ada4fa18146107d057610412565b8063938e3d7b1461074e57806395d89b411461076157806399e0dd7c14610769578063a22cb4651461077c57610412565b806382dcc0c8116101ef57806382dcc0c81461071857806383b7db631461072b57806385b0e9dd146107335780638da5cb5b1461074657610412565b806374aed3fd146106e257806376ad2817146106ea5780637884af44146106f25780637aa15f161461070557610412565b80633071a0f91161032657806345c0f533116102ae5780636d73e6691161027d5780636d73e6691461069957806370a08231146106ac578063715018a6146106bf57806372ff03d3146106c757806373e92784146106da57610412565b806345c0f5331461064b57806361e5bc6b146106605780636352211e1461067357806366d1e9d01461068657610412565b806338e52e78116102f557806338e52e78146105ec5780633e6134b8146105ff5780633f0f37f61461061257806342842e0e1461062557806342966c681461063857610412565b80633071a0f91461059e578063313ed5d1146105b157806331ae450b146105c4578063332dd1ae146105d957610412565b806320e4afe2116103a95780632928ca58116103785780632928ca581461052f5780632a55205a1461054f5780632d345670146105705780632eb4a7ab1461058357806330176e131461058b57610412565b806320e4afe2146104e3578063239be317146104f657806323b872dd1461050957806324d7806c1461051c57610412565b8063095ea7b3116103e5578063095ea7b31461048a5780630ebd4c7f1461049d578063162094c4146104bd57806319819935146104d057610412565b806301ffc9a71461041757806302e7afb71461044057806306fdde0314610455578063081812fc1461046a575b600080fd5b61042a610425366004614b70565b61092b565b60405161043791906151aa565b60405180910390f35b61045361044e366004614574565b61095c565b005b61045d6109b1565b60405161043791906151d3565b61047d610478366004614cb0565b610a43565b6040516104379190614fa5565b6104536104983660046148f9565b610a86565b6104b06104ab366004614cb0565b610b1e565b6040516104379190615197565b6104536104cb366004614cfd565b610ba4565b6104536104de366004614d4f565b610bef565b6104536104f1366004614cc8565b610de9565b61047d610504366004614cb0565b610e62565b610453610517366004614633565b610e92565b61042a61052a366004614574565b610eca565b61054261053d366004614574565b610ef9565b60405161043791906151b5565b61056261055d366004614d2e565b610f53565b604051610437929190615061565b61045361057e366004614574565b610f91565b610542611025565b610453610599366004614ba8565b61102b565b6104536105ac36600461481a565b6110aa565b61047d6105bf366004614cb0565b611126565b6105cc611140565b604051610437919061507a565b6104536105e736600461498c565b61120b565b6104b06105fa36600461479a565b611258565b61045361060d366004614ba8565b6113c0565b610453610620366004614860565b6113f3565b610453610633366004614633565b611468565b610453610646366004614cb0565b611483565b6106536114f9565b6040516104379190615c6e565b61045361066e366004614a89565b6114fe565b61047d610681366004614cb0565b6115c5565b610453610694366004614ba8565b6115fa565b6104536106a7366004614574565b61162b565b6105426106ba366004614574565b6116ba565b6104536116fe565b6105426106d5366004614574565b611749565b61045d6117b3565b61047d611841565b610453611850565b61054261070036600461481a565b6118be565b6104b061071336600461479a565b611933565b610453610726366004614be8565b611958565b6105cc61198a565b610542610741366004614d2e565b611a51565b61047d611ac5565b61045361075c366004614ba8565b611ad4565b61045d611b20565b610453610777366004614ba8565b611b2f565b61045361078a3660046147ed565b611b79565b61042a611b8b565b6104536107a5366004614a89565b611b94565b6104536107b8366004614b38565b611c74565b6104b06107cb3660046148c6565b611d43565b61042a6107de3660046149e9565b611db7565b6104536107f136600461471a565b611dcc565b6104536108043660046145c8565b611e19565b610453610817366004614673565b611ea9565b61082f61082a366004614cb0565b611ee2565b604051610437919061515f565b61084f61084a366004614cb0565b611f71565b604051610437929190615172565b61045d61086b366004614cb0565b612055565b61065361087e366004614cb0565b612085565b610453610891366004614574565b6120b9565b6104b06108a43660046148c6565b612102565b61047d612222565b61045d612231565b6104536108c7366004614cfd565b612240565b61042a6108da366004614590565b612272565b6104536108ed366004614590565b6122a0565b610453610900366004614574565b6122ea565b610542610913366004614924565b612358565b61054261092636600461481a565b612510565b600061093682612561565b80610945575061094582612586565b806109545750610954826125c1565b90505b919050565b33610965611ac5565b6001600160a01b0316148061098057506109806002336125e6565b6109a55760405162461bcd60e51b815260040161099c90615aed565b60405180910390fd5b6109ae81612602565b50565b6060600480546109c090615df6565b80601f01602080910402602001604051908101604052809291908181526020018280546109ec90615df6565b8015610a395780601f10610a0e57610100808354040283529160200191610a39565b820191906000526020600020905b815481529060010190602001808311610a1c57829003601f168201915b5050505050905090565b6000610a4e826126ce565b610a6a5760405162461bcd60e51b815260040161099c90615876565b506000908152600860205260409020546001600160a01b031690565b6000610a91826115c5565b9050806001600160a01b0316836001600160a01b03161415610ac55760405162461bcd60e51b815260040161099c906159e3565b806001600160a01b0316610ad76126eb565b6001600160a01b03161480610af35750610af3816108da6126eb565b610b0f5760405162461bcd60e51b815260040161099c906155de565b610b1983836126ef565b505050565b6060610b29826126ce565b610b455760405162461bcd60e51b815260040161099c9061563b565b610b4e8261275d565b805480602002602001604051908101604052809291908181526020018280548015610b9857602002820191906000526020600020905b815481526020019060010190808311610b84575b50505050509050919050565b33610bad611ac5565b6001600160a01b03161480610bc85750610bc86002336125e6565b610be45760405162461bcd60e51b815260040161099c90615aed565b610b198383836127ed565b601a546001600160a01b0316610c175760405162461bcd60e51b815260040161099c90615799565b601b546001600160a01b0316610c3f5760405162461bcd60e51b815260040161099c906157e4565b601b5460405163e985e9c560e01b81526001600160a01b0390911690819063e985e9c590610c739033903090600401614fb9565b60206040518083038186803b158015610c8b57600080fd5b505afa158015610c9f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cc39190614b54565b610cdf5760405162461bcd60e51b815260040161099c9061539c565b6000610ceb8888611a51565b9050610d2e86868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050601c549150849050611db7565b610d4a5760405162461bcd60e51b815260040161099c90615bc5565b601a54604051637921219560e11b81526001600160a01b038085169263f242432a92610d8192339216908d90600190600401615029565b600060405180830381600087803b158015610d9b57600080fd5b505af1158015610daf573d6000803e3d6000fd5b5050506000898152602080526040902080546001600160a01b03191633908117909155610ddf915088868661283c565b5050505050505050565b33610df2611ac5565b6001600160a01b03161480610e0d5750610e0d6002336125e6565b610e295760405162461bcd60e51b815260040161099c90615aed565b610e32856126ce565b610e4e5760405162461bcd60e51b815260040161099c9061563b565b610e5b85858585856128cd565b5050505050565b6000610e6d826126ce565b610e895760405162461bcd60e51b815260040161099c9061563b565b610954826129da565b610ea3610e9d6126eb565b82612a3a565b610ebf5760405162461bcd60e51b815260040161099c90615a90565b610b19838383612ab7565b6000816001600160a01b0316610ede611ac5565b6001600160a01b0316148061095457506109546002836125e6565b600060026001541415610f1e5760405162461bcd60e51b815260040161099c90615c37565b6002600155610f2e600b336125e6565b610f4a5760405162461bcd60e51b815260040161099c906155a7565b60018055919050565b600080610f5f846126ce565b610f7b5760405162461bcd60e51b815260040161099c9061563b565b610f858484612be4565b915091505b9250929050565b610f996126eb565b6001600160a01b0316610faa611ac5565b6001600160a01b031614610fd05760405162461bcd60e51b815260040161099c90615907565b610fdb6002826125e6565b156109ae5760405133906001600160a01b038316907f7c0c3c84c67c85fcac635147348bfe374c24a1a93d0366d1cfe9d8853cbf89d590600090a3611021600282612cb8565b5050565b601c5481565b33611034611ac5565b6001600160a01b0316148061104f575061104f6002336125e6565b61106b5760405162461bcd60e51b815260040161099c90615aed565b61102182828080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612ccd92505050565b336110b3611ac5565b6001600160a01b031614806110ce57506110ce6002336125e6565b6110ea5760405162461bcd60e51b815260040161099c90615aed565b826110f6600d826125e6565b156111135760405162461bcd60e51b815260040161099c906154c8565b6111208484846000612ced565b50505050565b60208052600090815260409020546001600160a01b031681565b606061114c6002612dce565b67ffffffffffffffff81111561117257634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561119b578160200160208202803683370190505b50905060005b6111ab6002612dce565b811015611207576111bd600282612dd9565b8282815181106111dd57634e487b7160e01b600052603260045260246000fd5b6001600160a01b0390921660209283029190910190910152806111ff81615e4d565b9150506111a1565b5090565b33611214611ac5565b6001600160a01b0316148061122f575061122f6002336125e6565b61124b5760405162461bcd60e51b815260040161099c90615aed565b6111203085858585612de5565b60606002600154141561127d5760405162461bcd60e51b815260040161099c90615c37565b600260015561128d600b336125e6565b6112a95760405162461bcd60e51b815260040161099c906155a7565b8167ffffffffffffffff8111156112d057634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156112f9578160200160208202803683370190505b50905060005b828110156113b4576113778585858481811061132b57634e487b7160e01b600052603260045260246000fd5b905060200281019061133d9190615c7c565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612f5a92505050565b82828151811061139757634e487b7160e01b600052603260045260246000fd5b6020908102919091010152806113ac81615e4d565b9150506112ff565b50600180559392505050565b6113cb600b336125e6565b6113e75760405162461bcd60e51b815260040161099c906155a7565b61102182826000612fd9565b336113fc611ac5565b6001600160a01b0316148061141757506114176002336125e6565b6114335760405162461bcd60e51b815260040161099c90615aed565b8361143f600d826125e6565b1561145c5760405162461bcd60e51b815260040161099c906154c8565b610e5b85858585612ced565b610b1983838360405180602001604052806000815250611ea9565b600260015414156114a65760405162461bcd60e51b815260040161099c90615c37565b60026001556114b53382612a3a565b6114d15760405162461bcd60e51b815260040161099c90615a5b565b60006114dc826115c5565b90506114e782613016565b6114f181836130bd565b505060018055565b607d81565b611509600b336125e6565b6115255760405162461bcd60e51b815260040161099c906155a7565b825181146115455760405162461bcd60e51b815260040161099c906159bc565b60005b8351811015611120576115b384828151811061157457634e487b7160e01b600052603260045260246000fd5b602002602001015184848481811061159c57634e487b7160e01b600052603260045260246000fd5b90506020028101906115ae9190615c7c565b6131d1565b806115bd81615e4d565b915050611548565b6000818152600660205260408120546001600160a01b0316806109545760405162461bcd60e51b815260040161099c90615750565b611605600b336125e6565b6116215760405162461bcd60e51b815260040161099c906155a7565b6110218282613207565b6116336126eb565b6001600160a01b0316611644611ac5565b6001600160a01b03161461166a5760405162461bcd60e51b815260040161099c90615907565b6116756002826125e6565b6109ae5760405133906001600160a01b038316907f7e1a1a08d52e4ba0e21554733d66165fd5151f99460116223d9e3a608eec5cb190600090a3611021600282613221565b60006001600160a01b0382166116e25760405162461bcd60e51b815260040161099c906156cf565b506001600160a01b031660009081526007602052604090205490565b6117066126eb565b6001600160a01b0316611717611ac5565b6001600160a01b03161461173d5760405162461bcd60e51b815260040161099c90615907565b6117476000613236565b565b60006002600154141561176e5760405162461bcd60e51b815260040161099c90615c37565b60026001553361177c611ac5565b6001600160a01b0316148061179757506117976002336125e6565b610f4a5760405162461bcd60e51b815260040161099c90615aed565b601f80546117c090615df6565b80601f01602080910402602001604051908101604052809291908181526020018280546117ec90615df6565b80156118395780601f1061180e57610100808354040283529160200191611839565b820191906000526020600020905b81548152906001019060200180831161181c57829003601f168201915b505050505081565b601a546001600160a01b031681565b33611859611ac5565b6001600160a01b0316148061187457506118746002336125e6565b6118905760405162461bcd60e51b815260040161099c90615aed565b601c546118af5760405162461bcd60e51b815260040161099c90615572565b601d805460ff19166001179055565b6000600260015414156118e35760405162461bcd60e51b815260040161099c90615c37565b6002600155336118f1611ac5565b6001600160a01b0316148061190c575061190c6002336125e6565b6119285760405162461bcd60e51b815260040161099c90615aed565b600180559392505050565b6060600260015414156118e35760405162461bcd60e51b815260040161099c90615c37565b611963600b336125e6565b61197f5760405162461bcd60e51b815260040161099c906155a7565b610b19838383612fd9565b6060611996600b612dce565b67ffffffffffffffff8111156119bc57634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156119e5578160200160208202803683370190505b50905060005b6119f5600b612dce565b81101561120757611a07600b82612dd9565b828281518110611a2757634e487b7160e01b600052603260045260246000fd5b6001600160a01b039092166020928302919091019091015280611a4981615e4d565b9150506119eb565b600080611a5d84613286565b90506000611a6a84613286565b905060008282604051602001611a81929190614f2f565b604051602081830303815290604052905080604051602001611aa39190614f13565b6040516020818303038152906040528051906020012093505050505b92915050565b6000546001600160a01b031690565b33611add611ac5565b6001600160a01b03161480611af85750611af86002336125e6565b611b145760405162461bcd60e51b815260040161099c90615aed565b610b19601f8383614280565b6060600580546109c090615df6565b33611b38611ac5565b6001600160a01b03161480611b535750611b536002336125e6565b611b6f5760405162461bcd60e51b815260040161099c90615aed565b61102182826133cc565b611021611b846126eb565b83836133e6565b601d5460ff1681565b33611b9d611ac5565b6001600160a01b03161480611bb85750611bb86002336125e6565b611bd45760405162461bcd60e51b815260040161099c90615aed565b82518114611bf45760405162461bcd60e51b815260040161099c906159bc565b60005b835181101561112057611c62848281518110611c2357634e487b7160e01b600052603260045260246000fd5b6020026020010151848484818110611c4b57634e487b7160e01b600052603260045260246000fd5b9050602002810190611c5d9190615c7c565b6127ed565b80611c6c81615e4d565b915050611bf7565b611c7f600b336125e6565b611c9b5760405162461bcd60e51b815260040161099c906155a7565b801580611cb45750611cb433634ce6d51160e11b613489565b611cd05760405162461bcd60e51b815260040161099c90615b31565b3360009081526010602052604090205460ff161515811515146109ae573360008181526010602052604090819020805460ff1916841515179055517f072a7592283e2c2d1d56d21517ff6013325e0f55483f4828373ff4d98b0a1a3690611d389084906151aa565b60405180910390a250565b606060026001541415611d685760405162461bcd60e51b815260040161099c90615c37565b600260015533611d76611ac5565b6001600160a01b03161480611d915750611d916002336125e6565b611dad5760405162461bcd60e51b815260040161099c90615aed565b6001805592915050565b6000611dc48484846134a5565b949350505050565b33611dd5611ac5565b6001600160a01b03161480611df05750611df06002336125e6565b611e0c5760405162461bcd60e51b815260040161099c90615aed565b610e5b8585858585612de5565b33611e22611ac5565b6001600160a01b03161480611e3d5750611e3d6002336125e6565b611e595760405162461bcd60e51b815260040161099c90615aed565b601a80546001600160a01b038088166001600160a01b031992831617909255601b805492871692909116919091179055611e95601e8484614300565b50601d5460ff16610e5b57601c5550505050565b611eba611eb46126eb565b83612a3a565b611ed65760405162461bcd60e51b815260040161099c90615a90565b611120848484846134bb565b6060611eed826126ce565b611f095760405162461bcd60e51b815260040161099c9061563b565b611f12826134ee565b805480602002602001604051908101604052809291908181526020018280548015610b9857602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611f485750505050509050919050565b606080611f7d836126ce565b611f995760405162461bcd60e51b815260040161099c9061563b565b611fa28361357e565b815460408051602080840282018101909252828152918491830182828015611ff357602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611fd5575b505050505091508080548060200260200160405190810160405280929190818152602001828054801561204557602002820191906000526020600020905b815481526020019060010190808311612031575b5050505050905091509150915091565b6060612060826126ce565b61207c5760405162461bcd60e51b815260040161099c9061563b565b6109548261359c565b601e818154811061209557600080fd5b9060005260206000209060209182820401919006915054906101000a900460ff1681565b336120c2611ac5565b6001600160a01b031614806120dd57506120dd6002336125e6565b6120f95760405162461bcd60e51b815260040161099c90615aed565b6109ae8161382d565b6060600260015414156121275760405162461bcd60e51b815260040161099c90615c37565b6002600155612137600b336125e6565b6121535760405162461bcd60e51b815260040161099c906155a7565b8161ffff1667ffffffffffffffff81111561217e57634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156121a7578160200160208202803683370190505b50905060005b8261ffff168161ffff161015612217576121d68460405180602001604052806000815250612f5a565b828261ffff16815181106121fa57634e487b7160e01b600052603260045260246000fd5b60209081029190910101528061220f81615e2b565b9150506121ad565b506001805592915050565b601b546001600160a01b031681565b6060601f80546109c090615df6565b61224b600b336125e6565b6122675760405162461bcd60e51b815260040161099c906155a7565b610b198383836131d1565b6001600160a01b03918216600090815260096020908152604080832093909416825291909152205460ff1690565b336122a9611ac5565b6001600160a01b031614806122c457506122c46002336125e6565b6122e05760405162461bcd60e51b815260040161099c90615aed565b611021828261387e565b6122f26126eb565b6001600160a01b0316612303611ac5565b6001600160a01b0316146123295760405162461bcd60e51b815260040161099c90615907565b6001600160a01b03811661234f5760405162461bcd60e51b815260040161099c906152e8565b6109ae81613236565b60006002600154141561237d5760405162461bcd60e51b815260040161099c90615c37565b60026001553361238b611ac5565b6001600160a01b031614806123a657506123a66002336125e6565b6123c25760405162461bcd60e51b815260040161099c90615aed565b607d60ff8516106123e55760405162461bcd60e51b815260040161099c90615672565b601e60008154811061240757634e487b7160e01b600052603260045260246000fd5b90600052602060002090602091828204019190069054906101000a900460ff1660ff168460ff1610806124805750601e60018154811061245757634e487b7160e01b600052603260045260246000fd5b90600052602060002090602091828204019190069054906101000a900460ff1660ff168460ff16115b61249c5760405162461bcd60e51b815260040161099c90615bec565b816124b95760405162461bcd60e51b815260040161099c906151e6565b60ff8416600081815260116020526040902080546001600160a01b031916301790556124e6908690613961565b60ff84166000908152601560205260409020612503908484614280565b5060018055949350505050565b6000600260015414156125355760405162461bcd60e51b815260040161099c90615c37565b6002600155612545600b336125e6565b6119285760405162461bcd60e51b815260040161099c906155a7565b60006001600160e01b03198216639088c20760e01b148061095457506109548261397b565b60006001600160e01b031982166380ac58cd60e01b148061094557506001600160e01b03198216635b5e139f60e01b14806109545750610954825b60006001600160e01b03198216632a9f3abf60e11b1480610954575061095482613a0e565b60006125fb836001600160a01b038416613a27565b9392505050565b6001600160a01b03811630141561262b5760405162461bcd60e51b815260040161099c9061521d565b612636600b826125e6565b1561267e5760405133906001600160a01b038316907fd19cf84cf0fec6bec9ddfa29c63adf83a55707c712f32c8285d6180a7890147990600090a361267c600b82612cb8565b505b612689600d826125e6565b6109ae5760405133906001600160a01b038316907f05ac7bc5a606cd92a63365f9fda244499b9add0526b22d99937b6bd88181059c90600090a3611021600d82613221565b6000908152600660205260409020546001600160a01b0316151590565b3390565b600081815260086020526040902080546001600160a01b0319166001600160a01b0384169081179091558190612724826115c5565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152601960205260408120541561278557506000818152601960205260409020610957565b6000828152601160209081526040808320546001600160a01b031683526017909152902054156127d957506000818152601160209081526040808320546001600160a01b0316835260179091529020610957565b505030600090815260176020526040902090565b6000838152601160205260409020546001600160a01b031630146128235760405162461bcd60e51b815260040161099c9061554b565b6000838152601560205260409020611120908383614280565b6002600154141561285f5760405162461bcd60e51b815260040161099c90615c37565b6002600155806128815760405162461bcd60e51b815260040161099c906151e6565b600083815260116020526040902080546001600160a01b031916301790556128a98484613961565b60008381526015602052604090206128c2908383614280565b505060018055505050565b8281146128ec5760405162461bcd60e51b815260040161099c906159bc565b6000805b8281101561293e5783838281811061291857634e487b7160e01b600052603260045260246000fd5b905060200201358261292a9190615d43565b91508061293681615e4d565b9150506128f0565b5061271081106129605760405162461bcd60e51b815260040161099c90615a24565b60008681526018602052604090206129799086866143a4565b5060008681526019602052604090206129939084846143f7565b50857fabb46fe0761d77584bde75697647804ffd8113abd4d8d06bc664150395eccdee868686866040516129ca94939291906150c7565b60405180910390a2505050505050565b6000818152601160205260409020546001600160a01b031630811415612a125760405162461bcd60e51b815260040161099c9061593c565b612a1d600d826125e6565b156109575760405162461bcd60e51b815260040161099c906154c8565b6000612a45826126ce565b612a615760405162461bcd60e51b815260040161099c906154ff565b6000612a6c836115c5565b9050806001600160a01b0316846001600160a01b03161480612aa75750836001600160a01b0316612a9c84610a43565b6001600160a01b0316145b80611dc45750611dc48185612272565b826001600160a01b0316612aca826115c5565b6001600160a01b031614612af05760405162461bcd60e51b815260040161099c90615973565b6001600160a01b038216612b165760405162461bcd60e51b815260040161099c9061544d565b612b21838383613a3f565b612b2c6000826126ef565b6001600160a01b0383166000908152600760205260408120805460019290612b55908490615db3565b90915550506001600160a01b0382166000908152600760205260408120805460019290612b83908490615d43565b909155505060008181526006602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6000806000612bf2856134ee565b805490915060011015612c175760405162461bcd60e51b815260040161099c90615719565b8054612c2a573060009250925050610f8a565b80600081548110612c4b57634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b031661271085612c6d8861275d565b600081548110612c8d57634e487b7160e01b600052603260045260246000fd5b9060005260206000200154612ca29190615d94565b612cac9190615d80565b92509250509250929050565b60006125fb836001600160a01b038416613a4a565b306000908152601260209081526040909120825161102192840190614431565b6001600160a01b038416301415612d165760405162461bcd60e51b815260040161099c90615b8e565b612d28846001600160a01b0316613b67565b612d445760405162461bcd60e51b815260040161099c906158c2565b612d4f600b856125e6565b611120576001600160a01b0384166000908152601260205260409020612d76908484614280565b506001600160a01b038416600081815260136020526040808220805460ff1916851515179055513392917fd8cb8ba4086944eabf43c5535b7712015e4d4c714b24bf812c040ea5b7a3e42a91a3610e5b600b85613221565b600061095482613b6d565b60006125fb8383613b71565b828114612e045760405162461bcd60e51b815260040161099c906159bc565b6000805b82811015612e5657838382818110612e3057634e487b7160e01b600052603260045260246000fd5b9050602002013582612e429190615d43565b915080612e4e81615e4d565b915050612e08565b506127108110612e785760405162461bcd60e51b815260040161099c90615a24565b6001600160a01b0386166000908152601660205260409020612e9b9086866143a4565b506001600160a01b0386166000908152601760205260409020612ebf9084846143f7565b506001600160a01b038616301415612f13577f2b6849d5976d799a5b0ca4dfd6b40a3d7afe9ea72c091fa01a958594f9a2659b85858585604051612f0694939291906150c7565b60405180910390a1612f52565b856001600160a01b03167f535a93d2cb000582c0ebeaa9be4890ec6a287f98eb2df00c54c300612fd78d8f868686866040516129ca94939291906150c7565b505050505050565b600a805460009182612f6b83615e4d565b9190505550600a549050612f7f8382613ba9565b600081815260116020526040902080546001600160a01b03191633179055612fa78382613961565b815115612fcf5760008181526015602090815260409091208351612fcd92850190614431565b505b611abf8382611021565b336000908152601260205260409020612ff3908484614280565b50336000908152601360205260409020805460ff19169115159190911790555050565b6000613021826115c5565b905061302f81600084613a3f565b61303a6000836126ef565b6001600160a01b0381166000908152600760205260408120805460019290613063908490615db3565b909155505060008281526006602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6000818152601160205260409020546001600160a01b0316301461317b57600081815260116020526040902054613104906001600160a01b03166311686e4b60e21b613489565b1561317b57600081815260116020526040908190205490516311686e4b60e21b81526001600160a01b03909116906345a1b92c906131489085908590600401615061565b600060405180830381600087803b15801561316257600080fd5b505af1158015613176573d6000803e3d6000fd5b505050505b6000818152601560205260409020805461319490615df6565b1590506131b25760008181526015602052604081206131b2916144a5565b600090815260116020526040902080546001600160a01b031916905550565b6000838152601160205260409020546001600160a01b031633146128235760405162461bcd60e51b815260040161099c9061554b565b336000908152601460205260409020610b19908383614280565b60006125fb836001600160a01b038416613c36565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6060816132ab57506040805180820190915260018152600360fc1b6020820152610957565b8160005b81156132d557806132bf81615e4d565b91506132ce9050600a83615d80565b91506132af565b60008167ffffffffffffffff8111156132fe57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015613328576020820181803683370190505b509050815b85156133c35761333e600182615db3565b9050600061334d600a88615d80565b61335890600a615d94565b6133629088615db3565b61336d906030615d5b565b905060008160f81b90508084848151811061339857634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506133ba600a89615d80565b9750505061332d565b50949350505050565b306000908152601460205260409020610b19908383614280565b816001600160a01b0316836001600160a01b031614156134185760405162461bcd60e51b815260040161099c90615491565b6001600160a01b0383811660008181526009602090815260408083209487168084529490915290819020805460ff1916851515179055517f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c319061347c9085906151aa565b60405180910390a3505050565b600061349483613c80565b80156125fb57506125fb8383613cb3565b6000826134b28584613da4565b14949350505050565b6134c6848484612ab7565b6134d284848484613e5c565b6111205760405162461bcd60e51b815260040161099c9061528b565b6000818152601860205260408120541561351657506000818152601860205260409020610957565b6000828152601160209081526040808320546001600160a01b0316835260169091529020541561356a57506000818152601160209081526040808320546001600160a01b0316835260169091529020610957565b505030600090815260166020526040902090565b60008061358a836134ee565b6135938461275d565b91509150915091565b6000818152601160205260409020546060906001600160a01b03166135c2600d826125e6565b156135df5760405162461bcd60e51b815260040161099c906154c8565b600083815260156020526040902080546135f890615df6565b159050613712576001600160a01b0381166000908152601460205260409020805461362290615df6565b159050613673576001600160a01b03811660009081526014602090815260408083208684526015835292819020905161365c939201614f90565b604051602081830303815290604052915050610957565b6000838152601560205260409020805461368c90615df6565b80601f01602080910402602001604051908101604052809291908181526020018280546136b890615df6565b80156137055780601f106136da57610100808354040283529160200191613705565b820191906000526020600020905b8154815290600101906020018083116136e857829003601f168201915b5050505050915050610957565b6137238163e9dc637560e01b613489565b156137b25760405163e9dc637560e01b81526001600160a01b0382169063e9dc6375906137569030908790600401615061565b60006040518083038186803b15801561376e57600080fd5b505afa158015613782573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526137aa9190810190614c3d565b915050610957565b6001600160a01b03811660009081526013602052604090205460ff16613804576001600160a01b03811660009081526012602052604090206137f384613f77565b60405160200161365c929190614f6b565b6001600160a01b0381166000908152601260205260409020805461368c90615df6565b50919050565b613838600b826125e6565b156109ae5760405133906001600160a01b038316907fd19cf84cf0fec6bec9ddfa29c63adf83a55707c712f32c8285d6180a7890147990600090a3611021600b82612cb8565b613889600b836125e6565b6138a55760405162461bcd60e51b815260040161099c90615365565b6001600160a01b03811615806138c757506138c781631e05385b60e31b613489565b6138e35760405162461bcd60e51b815260040161099c90615254565b6001600160a01b038281166000908152600f6020526040902054811690821614611021576001600160a01b038281166000818152600f602052604080822080546001600160a01b031916948616948517905551339392917f6a835c4fcf7e0d398db3762332fdaa1471814ad39f1e2d6d0b3fdabf8efee3e091a45050565b611021828260405180602001604052806000815250614092565b60006001600160e01b031982166328f10a2160e01b14806139a057506139a082612586565b806139bb57506001600160e01b03198216635d9dd7eb60e11b145b806139d657506001600160e01b03198216632dde656160e21b145b806139f157506001600160e01b031982166335681b5360e21b145b806109545750506001600160e01b03191663152a902d60e11b1490565b6001600160e01b031981166301ffc9a760e01b14919050565b60009081526001919091016020526040902054151590565b610b198383836140c5565b60008181526001830160205260408120548015613b5d576000613a6e600183615db3565b8554909150600090613a8290600190615db3565b9050818114613b03576000866000018281548110613ab057634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905080876000018481548110613ae157634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613b2257634e487b7160e01b600052603160045260246000fd5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050611abf565b6000915050611abf565b3b151590565b5490565b6000826000018281548110613b9657634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905092915050565b336000908152600f60205260409020546001600160a01b03161561102157336000818152600f602052604090819020549051631e05385b60e31b81526001600160a01b039091169163f029c2d891613c08919086908690600401614fd3565b600060405180830381600087803b158015613c2257600080fd5b505af1158015612f52573d6000803e3d6000fd5b6000613c428383613a27565b613c7857508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155611abf565b506000611abf565b6000613c93826301ffc9a760e01b613cb3565b80156109545750613cac826001600160e01b0319613cb3565b1592915050565b6000806301ffc9a760e01b83604051602401613ccf91906151be565b604051602081830303815290604052906001600160e01b0319166020820180516001600160e01b0383818316178352505050509050600080856001600160a01b031661753084604051613d229190614f13565b6000604051808303818686fa925050503d8060008114613d5e576040519150601f19603f3d011682016040523d82523d6000602084013e613d63565b606091505b5091509150602081511015613d7e5760009350505050611abf565b818015613d9a575080806020019051810190613d9a9190614b54565b9695505050505050565b600081815b8451811015613e54576000858281518110613dd457634e487b7160e01b600052603260045260246000fd5b60200260200101519050808311613e15578281604051602001613df8929190614f05565b604051602081830303815290604052805190602001209250613e41565b8083604051602001613e28929190614f05565b6040516020818303038152906040528051906020012092505b5080613e4c81615e4d565b915050613da9565b509392505050565b6000613e70846001600160a01b0316613b67565b15613f6c57836001600160a01b031663150b7a02613e8c6126eb565b8786866040518563ffffffff1660e01b8152600401613eae9493929190614ff7565b602060405180830381600087803b158015613ec857600080fd5b505af1925050508015613ef8575060408051601f3d908101601f19168201909252613ef591810190614b8c565b60015b613f52573d808015613f26576040519150601f19603f3d011682016040523d82523d6000602084013e613f2b565b606091505b508051613f4a5760405162461bcd60e51b815260040161099c9061528b565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611dc4565b506001949350505050565b606081613f9c57506040805180820190915260018152600360fc1b6020820152610957565b8160005b8115613fc65780613fb081615e4d565b9150613fbf9050600a83615d80565b9150613fa0565b60008167ffffffffffffffff811115613fef57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015614019576020820181803683370190505b5090505b8415611dc45761402e600183615db3565b915061403b600a86615e68565b614046906030615d43565b60f81b81838151811061406957634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535061408b600a86615d80565b945061401d565b61409c83836141a1565b6140a96000848484613e5c565b610b195760405162461bcd60e51b815260040161099c9061528b565b6000818152601160209081526040808320546001600160a01b03168352601090915290205460ff1615610b195760008181526011602052604090819020549051638258080560e01b81526001600160a01b039091169063825808059061413390869086908690600401614fd3565b602060405180830381600087803b15801561414d57600080fd5b505af1158015614161573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141859190614b54565b610b195760405162461bcd60e51b815260040161099c90615404565b6001600160a01b0382166141c75760405162461bcd60e51b815260040161099c90615841565b6141d0816126ce565b156141ed5760405162461bcd60e51b815260040161099c9061532e565b6141f960008383613a3f565b6001600160a01b0382166000908152600760205260408120805460019290614222908490615d43565b909155505060008181526006602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b82805461428c90615df6565b90600052602060002090601f0160209004810192826142ae57600085556142f4565b82601f106142c75782800160ff198235161785556142f4565b828001600101855582156142f4579182015b828111156142f45782358255916020019190600101906142d9565b506112079291506144dd565b82805482825590600052602060002090601f016020900481019282156142f45791602002820160005b8382111561436a57833560ff1683826101000a81548160ff021916908360ff1602179055509260200192600101602081600001049283019260010302614329565b80156143975782816101000a81549060ff021916905560010160208160000104928301926001030261436a565b50506112079291506144dd565b8280548282559060005260206000209081019282156142f4579160200282015b828111156142f45781546001600160a01b0319166001600160a01b038435161782556020909201916001909101906143c4565b8280548282559060005260206000209081019282156142f457916020028201828111156142f45782358255916020019190600101906142d9565b82805461443d90615df6565b90600052602060002090601f01602090048101928261445f57600085556142f4565b82601f1061447857805160ff19168380011785556142f4565b828001600101855582156142f4579182015b828111156142f457825182559160200191906001019061448a565b5080546144b190615df6565b6000825580601f106144c357506109ae565b601f0160209004906000526020600020908101906109ae91905b5b8082111561120757600081556001016144de565b60008083601f840112614503578182fd5b50813567ffffffffffffffff81111561451a578182fd5b6020830191508360208083028501011115610f8a57600080fd5b60008083601f840112614545578182fd5b50813567ffffffffffffffff81111561455c578182fd5b602083019150836020828501011115610f8a57600080fd5b600060208284031215614585578081fd5b81356125fb81615ebe565b600080604083850312156145a2578081fd5b82356145ad81615ebe565b915060208301356145bd81615ebe565b809150509250929050565b6000806000806000608086880312156145df578081fd5b85356145ea81615ebe565b945060208601356145fa81615ebe565b9350604086013567ffffffffffffffff811115614615578182fd5b614621888289016144f2565b96999598509660600135949350505050565b600080600060608486031215614647578081fd5b833561465281615ebe565b9250602084013561466281615ebe565b929592945050506040919091013590565b60008060008060808587031215614688578182fd5b843561469381615ebe565b935060208501356146a381615ebe565b925060408501359150606085013567ffffffffffffffff8111156146c5578182fd5b8501601f810187136146d5578182fd5b80356146e86146e382615d0f565b615cc1565b8181528860208385010111156146fc578384fd5b81602084016020830137908101602001929092525092959194509250565b600080600080600060608688031215614731578283fd5b853561473c81615ebe565b9450602086013567ffffffffffffffff80821115614758578485fd5b61476489838a016144f2565b9096509450604088013591508082111561477c578283fd5b50614789888289016144f2565b969995985093965092949392505050565b6000806000604084860312156147ae578081fd5b83356147b981615ebe565b9250602084013567ffffffffffffffff8111156147d4578182fd5b6147e0868287016144f2565b9497909650939450505050565b600080604083850312156147ff578182fd5b823561480a81615ebe565b915060208301356145bd81615ed3565b60008060006040848603121561482e578081fd5b833561483981615ebe565b9250602084013567ffffffffffffffff811115614854578182fd5b6147e086828701614534565b60008060008060608587031215614875578182fd5b843561488081615ebe565b9350602085013567ffffffffffffffff81111561489b578283fd5b6148a787828801614534565b90945092505060408501356148bb81615ed3565b939692955090935050565b600080604083850312156148d8578182fd5b82356148e381615ebe565b9150602083013561ffff811681146145bd578182fd5b6000806040838503121561490b578182fd5b823561491681615ebe565b946020939093013593505050565b60008060008060608587031215614939578182fd5b843561494481615ebe565b9350602085013560ff81168114614959578283fd5b9250604085013567ffffffffffffffff811115614974578283fd5b61498087828801614534565b95989497509550505050565b600080600080604085870312156149a1578182fd5b843567ffffffffffffffff808211156149b8578384fd5b6149c4888389016144f2565b909650945060208701359150808211156149dc578384fd5b50614980878288016144f2565b6000806000606084860312156149fd578081fd5b833567ffffffffffffffff811115614a13578182fd5b8401601f81018613614a23578182fd5b80356020614a336146e383615ceb565b82815281810190848301838502860184018b1015614a4f578687fd5b8695505b84861015614a71578035835260019590950194918301918301614a53565b50999188013598505060409096013595945050505050565b600080600060408486031215614a9d578081fd5b833567ffffffffffffffff80821115614ab4578283fd5b818601915086601f830112614ac7578283fd5b81356020614ad76146e383615ceb565b82815281810190858301838502870184018c1015614af3578788fd5b8796505b84871015614b15578035835260019690960195918301918301614af7565b5097505087013592505080821115614b2b578283fd5b506147e0868287016144f2565b600060208284031215614b49578081fd5b81356125fb81615ed3565b600060208284031215614b65578081fd5b81516125fb81615ed3565b600060208284031215614b81578081fd5b81356125fb81615ee1565b600060208284031215614b9d578081fd5b81516125fb81615ee1565b60008060208385031215614bba578182fd5b823567ffffffffffffffff811115614bd0578283fd5b614bdc85828601614534565b90969095509350505050565b600080600060408486031215614bfc578081fd5b833567ffffffffffffffff811115614c12578182fd5b614c1e86828701614534565b9094509250506020840135614c3281615ed3565b809150509250925092565b600060208284031215614c4e578081fd5b815167ffffffffffffffff811115614c64578182fd5b8201601f81018413614c74578182fd5b8051614c826146e382615d0f565b818152856020838501011115614c96578384fd5b614ca7826020830160208601615dca565b95945050505050565b600060208284031215614cc1578081fd5b5035919050565b600080600080600060608688031215614cdf578283fd5b85359450602086013567ffffffffffffffff80821115614758578485fd5b600080600060408486031215614d11578081fd5b83359250602084013567ffffffffffffffff811115614854578182fd5b60008060408385031215614d40578182fd5b50508035926020909101359150565b60008060008060008060808789031215614d67578384fd5b8635955060208701359450604087013567ffffffffffffffff80821115614d8c578586fd5b614d988a838b016144f2565b90965094506060890135915080821115614db0578283fd5b50614dbd89828a01614534565b979a9699509497509295939492505050565b6000815180845260208085019450808401835b83811015614e075781516001600160a01b031687529582019590820190600101614de2565b509495945050505050565b6000815180845260208085019450808401835b83811015614e0757815187529582019590820190600101614e25565b60008151808452614e59816020860160208601615dca565b601f01601f19169290920160200192915050565b805460009060028104600180831680614e8757607f831692505b6020808410821415614ea757634e487b7160e01b86526022600452602486fd5b818015614ebb5760018114614ecc57614ef9565b60ff19861689528489019650614ef9565b614ed588615d37565b60005b86811015614ef15781548b820152908501908301614ed8565b505084890196505b50505050505092915050565b918252602082015260400190565b60008251614f25818460208701615dca565b9190910192915050565b60008351614f41818460208801615dca565b600160fd1b9083019081528351614f5f816001840160208801615dca565b01600101949350505050565b6000614f778285614e6d565b8351614f87818360208801615dca565b01949350505050565b6000611dc4614f9f8386614e6d565b84614e6d565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b60006001600160a01b03808716835280861660208401525083604083015260806060830152613d9a6080830184614e41565b6001600160a01b0394851681529290931660208301526040820152606081019190915260a06080820181905260009082015260c00190565b6001600160a01b03929092168252602082015260400190565b6020808252825182820181905260009190848201906040850190845b818110156150bb5783516001600160a01b031683529284019291840191600101615096565b50909695505050505050565b6040808252810184905260008560608301825b8781101561510a5782356150ed81615ebe565b6001600160a01b03168252602092830192909101906001016150da565b5083810360208501528481527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff851115615142578283fd5b602085029150818660208301370160200190815295945050505050565b6000602082526125fb6020830184614dcf565b6000604082526151856040830185614dcf565b8281036020840152614ca78185614e12565b6000602082526125fb6020830184614e12565b901515815260200190565b90815260200190565b6001600160e01b031991909116815260200190565b6000602082526125fb6020830184614e41565b60208082526013908201527f5552492063616e6e6f7420626520656d70747900000000000000000000000000604082015260600190565b60208082526019908201527f43616e6e6f7420626c61636b6c69737420796f757273656c6600000000000000604082015260600190565b6020808252600f908201527f496e76616c696420616464726573730000000000000000000000000000000000604082015260600190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527f63656976657220696d706c656d656e7465720000000000000000000000000000606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252601c908201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604082015260600190565b6020808252601e908201527f43726561746f72436f72653a20496e76616c696420657874656e73696f6e0000604082015260600190565b60208082526042908201527f436f6e7472616374206e6f742079657420617070726f76656420666f7220616c60408201527f6c207472616e73666572732066726f6d206f726967696e616c20636f6e74726160608201526118dd60f21b608082015260a00190565b60208082526029908201527f45524337323143726561746f723a20457874656e73696f6e20617070726f76616040820152686c206661696c75726560b81b606082015260800190565b60208082526024908201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646040820152637265737360e01b606082015260800190565b60208082526019908201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604082015260600190565b60208082526015908201527f457874656e73696f6e20626c61636b6c69737465640000000000000000000000604082015260600190565b6020808252602c908201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b6020808252600d908201526c24b73b30b634b2103a37b5b2b760991b604082015260600190565b6020808252818101527f4d65726b6c6520726f6f7420686173206e6f7420796574206265656e20736574604082015260600190565b6020808252601c908201527f4d757374206265207265676973746572656420657874656e73696f6e00000000604082015260600190565b60208082526038908201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760408201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606082015260800190565b60208082526011908201527f4e6f6e6578697374656e7420746f6b656e000000000000000000000000000000604082015260600190565b6020808252602e908201527f546f6b656e204944206d757374206265206c657373207468616e206d6178206360408201527f6f6c6c656374696f6e2073697a65000000000000000000000000000000000000606082015260800190565b6020808252602a908201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604082015269726f206164647265737360b01b606082015260800190565b6020808252601c908201527f4d6f7265207468616e203120726f79616c747920726563656976657200000000604082015260600190565b60208082526029908201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460408201526832b73a103a37b5b2b760b91b606082015260800190565b6020808252602b908201527f5075726761746f727920616464726573732063616e6e6f74206265207468652060408201526a307830206164647265737360a81b606082015260800190565b60208082526033908201527f4f726967696e616c20636f6e747261637420616464726573732063616e6e6f7460408201527f2062652074686520307830206164647265737300000000000000000000000000606082015260800190565b6020808252818101527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604082015260600190565b6020808252602c908201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b60208082526025908201527f43726561746f723a20457874656e73696f6e206d757374206265206120636f6e6040820152641d1c9858dd60da1b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526016908201527f4e6f20657874656e73696f6e20666f7220746f6b656e00000000000000000000604082015260600190565b60208082526029908201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960408201526839903737ba1037bbb760b91b606082015260800190565b6020808252600d908201526c125b9d985b1a59081a5b9c1d5d609a1b604082015260600190565b60208082526021908201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656040820152603960f91b606082015260800190565b60208082526017908201527f496e76616c696420746f74616c20726f79616c74696573000000000000000000604082015260600190565b6020808252818101527f43616c6c6572206973206e6f74206f776e6572206e6f7220617070726f766564604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60408201527f776e6572206e6f7220617070726f766564000000000000000000000000000000606082015260800190565b60208082526024908201527f41646d696e436f6e74726f6c3a204d757374206265206f776e6572206f7220616040820152633236b4b760e11b606082015260800190565b6020808252603f908201527f457874656e73696f6e206d75737420696d706c656d656e74204945524337323160408201527f43726561746f72457874656e73696f6e417070726f76655472616e7366657200606082015260800190565b60208082526010908201527f43726561746f723a20496e76616c696400000000000000000000000000000000604082015260600190565b6020808252600d908201526c24b73b30b634b210383937b7b360991b604082015260600190565b6020808252602b908201527f546f6b656e204944206d757374206265206f757473696465206f66206d69677260408201526a6174696f6e2072616e676560a81b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60ff91909116815260200190565b6000808335601e19843603018112615c92578283fd5b83018035915067ffffffffffffffff821115615cac578283fd5b602001915036819003821315610f8a57600080fd5b60405181810167ffffffffffffffff81118282101715615ce357615ce3615ea8565b604052919050565b600067ffffffffffffffff821115615d0557615d05615ea8565b5060209081020190565b600067ffffffffffffffff821115615d2957615d29615ea8565b50601f01601f191660200190565b60009081526020902090565b60008219821115615d5657615d56615e7c565b500190565b600060ff821660ff84168060ff03821115615d7857615d78615e7c565b019392505050565b600082615d8f57615d8f615e92565b500490565b6000816000190483118215151615615dae57615dae615e7c565b500290565b600082821015615dc557615dc5615e7c565b500390565b60005b83811015615de5578181015183820152602001615dcd565b838111156111205750506000910152565b600281046001821680615e0a57607f821691505b6020821081141561382757634e487b7160e01b600052602260045260246000fd5b600061ffff80831681811415615e4357615e43615e7c565b6001019392505050565b6000600019821415615e6157615e61615e7c565b5060010190565b600082615e7757615e77615e92565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146109ae57600080fd5b80151581146109ae57600080fd5b6001600160e01b0319811681146109ae57600080fdfea26469706673582212205e985fb70c1c5287e57f69966ff45f2e493b4a2145b66bd97a535d8dfc6cd8cc64736f6c63430008000033
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.