Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
ERC721CreatorImplementation
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @author: manifold.xyz import "../../openzeppelin-upgradeable/token/ERC721/ERC721Upgradeable.sol"; import "../../manifold/libraries-solidity/access/AdminControlUpgradeable.sol"; import "../../manifold/creator-core/core/ERC721CreatorCore.sol"; /** * @dev ERC721Creator implementation */ contract ERC721CreatorImplementation is AdminControlUpgradeable, ERC721Upgradeable, ERC721CreatorCore { /// @custom:oz-upgrades-unsafe-allow state-variable-assignment uint256 _totalSupply = 0; event TotalSupplyUpdated(uint256 oldTotalSupply, uint256 newTotalSupply); /** * Initializer */ function initialize(string memory _name, string memory _symbol, uint256 _totalsupply) public initializer { __ERC721_init(_name, _symbol); __Ownable_init(); _totalSupply = _totalsupply; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721Upgradeable, ERC721CreatorCore, AdminControlUpgradeable) returns (bool) { return ERC721CreatorCore.supportsInterface(interfaceId) || ERC721Upgradeable.supportsInterface(interfaceId) || AdminControlUpgradeable.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 (uint256 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 (uint256 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 (uint256 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; require(_tokenCount <= _totalSupply,"total supply reached"); // 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 (uint256 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; require(_tokenCount <= _totalSupply,"total supply reached"); _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); } function updateTotalSupply(uint256 _newTotalSupply) external { require(owner() == msg.sender,"only owner can update the total supply"); require(_newTotalSupply >= _tokenCount,"total supply should not be lesser than current supply"); emit TotalSupplyUpdated(_totalSupply,_newTotalSupply); _totalSupply = _newTotalSupply; } /** * @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 (uint256[] 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); } /** * @dev {See ICreatorCore-supply}. */ function totalSupply() external view virtual returns (uint256) { return _totalSupply; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @author: manifold.xyz import "../../../openzeppelin/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 pragma solidity ^0.8.0; /// @author: manifold.xyz import "../../../openzeppelin/utils/structs/EnumerableSet.sol"; import "../../../openzeppelin/utils/introspection/ERC165.sol"; import "../../../openzeppelin-upgradeable/access/OwnableUpgradeable.sol"; import "./IAdminControl.sol"; abstract contract AdminControlUpgradeable is OwnableUpgradeable, 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 (uint256 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 view override returns (bool) { return (owner() == admin || _admins.contains(admin)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721Upgradeable.sol"; import "./IERC721ReceiverUpgradeable.sol"; import "./extensions/IERC721MetadataUpgradeable.sol"; import "../../utils/AddressUpgradeable.sol"; import "../../utils/ContextUpgradeable.sol"; import "../../utils/StringsUpgradeable.sol"; import "../../utils/introspection/ERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.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 ERC721Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721Upgradeable, IERC721MetadataUpgradeable { using AddressUpgradeable for address; using StringsUpgradeable 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. */ function __ERC721_init(string memory name_, string memory symbol_) internal initializer { __Context_init_unchained(); __ERC165_init_unchained(); __ERC721_init_unchained(name_, symbol_); } function __ERC721_init_unchained(string memory name_, string memory symbol_) internal initializer { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) { return interfaceId == type(IERC721Upgradeable).interfaceId || interfaceId == type(IERC721MetadataUpgradeable).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 = ERC721Upgradeable.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 = ERC721Upgradeable.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 = ERC721Upgradeable.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(ERC721Upgradeable.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(ERC721Upgradeable.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 IERC721ReceiverUpgradeable(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721ReceiverUpgradeable.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 {} uint256[44] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (proxy/utils/Initializable.sol) pragma solidity ^0.8.0; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() initializer {} * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { require(_initializing || !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.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 ERC165Upgradeable is Initializable, IERC165Upgradeable { function __ERC165_init() internal initializer { __ERC165_init_unchained(); } function __ERC165_init_unchained() internal initializer { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165Upgradeable).interfaceId; } uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library StringsUpgradeable { 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.0 (utils/Context.sol) pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @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 ContextUpgradeable is Initializable { function __Context_init() internal initializer { __Context_init_unchained(); } function __Context_init_unchained() internal initializer { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (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 // OpenZeppelin Contracts v4.4.0 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721Upgradeable.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721MetadataUpgradeable is IERC721Upgradeable { /** * @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.0 (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721ReceiverUpgradeable { /** * @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.0 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165Upgradeable.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721Upgradeable is IERC165Upgradeable { /** * @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 pragma solidity ^0.8.0; /// @author: manifold.xyz import "../../../openzeppelin/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 // OpenZeppelin Contracts v4.4.0 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.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 OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal initializer { __Context_init_unchained(); __Ownable_init_unchained(); } function __Ownable_init_unchained() internal initializer { _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); } uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (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.0 (utils/structs/EnumerableSet.sol) pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. */ 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 pragma solidity ^0.8.0; /// @author: manifold.xyz import "../../../openzeppelin/security/ReentrancyGuard.sol"; import "../../../openzeppelin/utils/Strings.sol"; import "../../../openzeppelin/utils/introspection/ERC165.sol"; import "../../../openzeppelin/utils/introspection/ERC165Checker.sol"; import "../../../openzeppelin/utils/structs/EnumerableSet.sol"; import "../../../openzeppelin-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; /// @custom:oz-upgrades-unsafe-allow state-variable-assignment 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 (uint256 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 (bytes(_extensionBaseURI[extension]).length != 0) { if (!_extensionBaseURIIdentical[extension]) { return string( abi.encodePacked( _extensionBaseURI[extension], tokenId.toString() ) ); } else { return _extensionBaseURI[extension]; } } else { if (!_extensionBaseURIIdentical[address(this)]) { return string( abi.encodePacked( _extensionBaseURI[address(this)], tokenId.toString() ) ); }else{ return _extensionBaseURI[address(this)]; } } } /** * 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) internal view returns (address payable[] storage, uint256[] storage) { return (_getRoyaltyReceivers(tokenId), _getRoyaltyBPS(tokenId)); } /** * Helper to get royalty receivers for a token */ function _getRoyaltyReceivers(uint256 tokenId) internal view 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) internal view 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) internal view 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 (uint256 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 (uint256 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 "./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/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 "../../../../openzeppelin/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/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 // OpenZeppelin Contracts v4.4.0 (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.0 (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 IERC165Upgradeable { /** * @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 pragma solidity ^0.8.0; /// @author: manifold.xyz import "../../../openzeppelin/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 (uint256[] 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 pragma solidity ^0.8.0; /// @author: manifold.xyz import "../../../openzeppelin/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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (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.0 (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 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; /// @custom:oz-upgrades-unsafe-allow constructor 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 make 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; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"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":false,"internalType":"uint256","name":"oldTotalSupply","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newTotalSupply","type":"uint256"}],"name":"TotalSupplyUpdated","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":"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":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint256","name":"_totalsupply","type":"uint256"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","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":[{"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":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"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":"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":"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":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"extension","type":"address"}],"name":"unregisterExtension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newTotalSupply","type":"uint256"}],"name":"updateTotalSupply","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080604052600060cc55600060dc5534801561001a57600080fd5b5060016065556155c880620000306000396000f3fe608060405234801561001057600080fd5b50600436106103835760003560e01c80636d73e669116101de578063ad2d0ddd1161010f578063ce8aee9d116100ad578063e985e9c51161007c578063e985e9c5146107ba578063f0cdc499146107cd578063f2fde38b146107e0578063fe2e1f58146107f357600080fd5b8063ce8aee9d14610781578063d5a06d4c1461074d578063e00aab4b14610794578063e92a89f6146107a757600080fd5b8063b88d4fde116100e9578063b88d4fde1461071a578063b9c4d9fb1461072d578063bb3bafd61461074d578063c87b56dd1461076e57600080fd5b8063ad2d0ddd146106e1578063b0fe87c9146106f4578063b119490e1461070757600080fd5b806383b7db631161017c57806399e0dd7c1161015657806399e0dd7c14610695578063a22cb465146106a8578063aafb2d44146106bb578063ac0c8cfa146106ce57600080fd5b806383b7db63146106745780638da5cb5b1461067c57806395d89b411461068d57600080fd5b806372ff03d3116101b857806372ff03d3146106285780637884af441461063b5780637aa15f161461064e57806382dcc0c81461066157600080fd5b80636d73e669146105fa57806370a082311461060d578063715018a61461062057600080fd5b80632d345670116102b85780633f0f37f61161025657806361e5bc6b1161023057806361e5bc6b146105ae5780636352211e146105c157806366d1e9d0146105d457806366d49bab146105e757600080fd5b80633f0f37f61461057557806342842e0e1461058857806342966c681461059b57600080fd5b806331ae450b1161029257806331ae450b14610527578063332dd1ae1461053c57806338e52e781461054f5780633e6134b81461056257600080fd5b80632d345670146104ee57806330176e13146105015780633071a0f91461051457600080fd5b806318160ddd1161032557806323b872dd116102ff57806323b872dd1461048357806324d7806c146104965780632928ca58146104a95780632a55205a146104bc57600080fd5b806318160ddd1461044b57806320e4afe21461045d578063239be3171461047057600080fd5b8063081812fc11610361578063081812fc146103da578063095ea7b3146104055780630ebd4c7f14610418578063162094c41461043857600080fd5b806301ffc9a71461038857806302e7afb7146103b057806306fdde03146103c5575b600080fd5b61039b6103963660046144c5565b610806565b60405190151581526020015b60405180910390f35b6103c36103be3660046144f7565b610835565b005b6103cd610894565b6040516103a79190614564565b6103ed6103e8366004614577565b610926565b6040516001600160a01b0390911681526020016103a7565b6103c3610413366004614590565b6109ae565b61042b610426366004614577565b610ac3565b6040516103a791906145f7565b6103c361044636600461464b565b610b49565b60dc545b6040519081526020016103a7565b6103c361046b3660046146da565b610b9e565b6103ed61047e366004614577565b610c21565b6103c3610491366004614753565b610c51565b61039b6104a43660046144f7565b610c82565b61044f6104b73660046144f7565b610cbb565b6104cf6104ca366004614794565b610d2f565b604080516001600160a01b0390931683526020830191909152016103a7565b6103c36104fc3660046144f7565b610d6d565b6103c361050f3660046147b6565b610dec565b6103c36105223660046147f7565b610e75565b61052f610efb565b6040516103a79190614832565b6103c361054a36600461487f565b610fa9565b61042b61055d3660046148ea565b611000565b6103c36105703660046147b6565b61113d565b6103c361058336600461493f565b611170565b6103c3610596366004614753565b6111ef565b6103c36105a9366004614577565b61120a565b6103c36105bc3660046149ec565b6112b0565b6103ed6105cf366004614577565b61135b565b6103c36105e23660046147b6565b6113d2565b6103c36105f5366004614577565b611403565b6103c36106083660046144f7565b61152c565b61044f61061b3660046144f7565b6115a6565b6103c361162d565b61044f6106363660046144f7565b611663565b61044f6106493660046147f7565b6116ef565b61042b61065c3660046148ea565b6117af565b6103c361066f366004614aab565b611902565b61052f611934565b6033546001600160a01b03166103ed565b6103cd6119de565b6103c36106a33660046147b6565b6119ed565b6103c36106b6366004614b01565b611a41565b6103c36106c93660046149ec565b611a4c565b6103c36106dc366004614b3a565b611b1a565b61042b6106ef366004614b57565b611c3e565b6103c3610702366004614b8c565b611d64565b6103c3610715366004614c50565b611dbb565b6103c3610728366004614cbc565b611e40565b61074061073b366004614577565b611e72565b6040516103a79190614d74565b61076061075b366004614577565b611f01565b6040516103a7929190614d87565b6103cd61077c366004614577565b611fe5565b6103c361078f3660046144f7565b612015565b61042b6107a2366004614b57565b612068565b6103c36107b536600461464b565b61215f565b61039b6107c8366004614db5565b612191565b6103c36107db366004614db5565b6121bf565b6103c36107ee3660046144f7565b612213565b61044f6108013660046147f7565b6122ab565b60006108118261233b565b80610820575061082082612360565b8061082f575061082f826123a0565b92915050565b336108486033546001600160a01b031690565b6001600160a01b0316148061086357506108636066336123c5565b6108885760405162461bcd60e51b815260040161087f90614de3565b60405180910390fd5b610891816123ea565b50565b6060609a80546108a390614e27565b80601f01602080910402602001604051908101604052809291908181526020018280546108cf90614e27565b801561091c5780601f106108f15761010080835404028352916020019161091c565b820191906000526020600020905b8154815290600101906020018083116108ff57829003601f168201915b5050505050905090565b6000610931826124e5565b6109925760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161087f565b506000908152609e60205260409020546001600160a01b031690565b60006109b98261135b565b9050806001600160a01b0316836001600160a01b031603610a265760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b606482015260840161087f565b336001600160a01b0382161480610a425750610a428133612191565b610ab45760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606482015260840161087f565b610abe8383612502565b505050565b6060610ace826124e5565b610aea5760405162461bcd60e51b815260040161087f90614e5b565b610af382612570565b805480602002602001604051908101604052809291908181526020018280548015610b3d57602002820191906000526020600020905b815481526020019060010190808311610b29575b50505050509050919050565b33610b5c6033546001600160a01b031690565b6001600160a01b03161480610b775750610b776066336123c5565b610b935760405162461bcd60e51b815260040161087f90614de3565b610abe8383836125fc565b33610bb16033546001600160a01b031690565b6001600160a01b03161480610bcc5750610bcc6066336123c5565b610be85760405162461bcd60e51b815260040161087f90614de3565b610bf1856124e5565b610c0d5760405162461bcd60e51b815260040161087f90614e5b565b610c1a858585858561266b565b5050505050565b6000610c2c826124e5565b610c485760405162461bcd60e51b815260040161087f90614e5b565b61082f82612794565b610c5b3382612821565b610c775760405162461bcd60e51b815260040161087f90614e86565b610abe8383836128eb565b6000816001600160a01b0316610ca06033546001600160a01b031690565b6001600160a01b0316148061082f575061082f6066836123c5565b6000600260655403610cdf5760405162461bcd60e51b815260040161087f90614ed7565b6002606555610cef60cd336123c5565b610d0b5760405162461bcd60e51b815260040161087f90614f0e565b610d248260405180602001604052806000815250612a96565b600160655592915050565b600080610d3b846124e5565b610d575760405162461bcd60e51b815260040161087f90614e5b565b610d618484612b54565b915091505b9250929050565b6033546001600160a01b03163314610d975760405162461bcd60e51b815260040161087f90614f45565b610da26066826123c5565b156108915760405133906001600160a01b038316907f7c0c3c84c67c85fcac635147348bfe374c24a1a93d0366d1cfe9d8853cbf89d590600090a3610de8606682612c3f565b5050565b33610dff6033546001600160a01b031690565b6001600160a01b03161480610e1a5750610e1a6066336123c5565b610e365760405162461bcd60e51b815260040161087f90614de3565b610de882828080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612c5492505050565b33610e886033546001600160a01b031690565b6001600160a01b03161480610ea35750610ea36066336123c5565b610ebf5760405162461bcd60e51b815260040161087f90614de3565b82610ecb60cf826123c5565b15610ee85760405162461bcd60e51b815260040161087f90614f7a565b610ef58484846000612c6d565b50505050565b6060610f076066612da7565b6001600160401b03811115610f1e57610f1e6149a6565b604051908082528060200260200182016040528015610f47578160200160208202803683370190505b50905060005b610f576066612da7565b811015610fa557610f69606682612db1565b828281518110610f7b57610f7b614fa9565b6001600160a01b039092166020928302919091019091015280610f9d81614fd5565b915050610f4d565b5090565b33610fbc6033546001600160a01b031690565b6001600160a01b03161480610fd75750610fd76066336123c5565b610ff35760405162461bcd60e51b815260040161087f90614de3565b610ef53085858585612dbd565b60606002606554036110245760405162461bcd60e51b815260040161087f90614ed7565b600260655561103460cd336123c5565b6110505760405162461bcd60e51b815260040161087f90614f0e565b816001600160401b03811115611068576110686149a6565b604051908082528060200260200182016040528015611091578160200160208202803683370190505b50905060005b8281101561113057611101858585848181106110b5576110b5614fa9565b90506020028101906110c79190614fee565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612a9692505050565b82828151811061111357611113614fa9565b60209081029190910101528061112881614fd5565b915050611097565b5060016065559392505050565b61114860cd336123c5565b6111645760405162461bcd60e51b815260040161087f90614f0e565b610de882826000612f4d565b336111836033546001600160a01b031690565b6001600160a01b0316148061119e575061119e6066336123c5565b6111ba5760405162461bcd60e51b815260040161087f90614de3565b836111c660cf826123c5565b156111e35760405162461bcd60e51b815260040161087f90614f7a565b610c1a85858585612c6d565b610abe83838360405180602001604052806000815250611e40565b60026065540361122c5760405162461bcd60e51b815260040161087f90614ed7565b600260655561123b3382612821565b6112875760405162461bcd60e51b815260206004820181905260248201527f43616c6c6572206973206e6f74206f776e6572206e6f7220617070726f766564604482015260640161087f565b60006112928261135b565b905061129d82612f8a565b6112a78183613031565b50506001606555565b6112bb60cd336123c5565b6112d75760405162461bcd60e51b815260040161087f90614f0e565b825181146112f75760405162461bcd60e51b815260040161087f90615034565b60005b8351811015610ef55761134984828151811061131857611318614fa9565b602002602001015184848481811061133257611332614fa9565b90506020028101906113449190614fee565b613147565b8061135381614fd5565b9150506112fa565b6000818152609c60205260408120546001600160a01b03168061082f5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b606482015260840161087f565b6113dd60cd336123c5565b6113f95760405162461bcd60e51b815260040161087f90614f0e565b610de8828261319d565b336114166033546001600160a01b031690565b6001600160a01b03161461147b5760405162461bcd60e51b815260206004820152602660248201527f6f6e6c79206f776e65722063616e207570646174652074686520746f74616c20604482015265737570706c7960d01b606482015260840161087f565b60cc548110156114eb5760405162461bcd60e51b815260206004820152603560248201527f746f74616c20737570706c792073686f756c64206e6f74206265206c6573736560448201527472207468616e2063757272656e7420737570706c7960581b606482015260840161087f565b60dc5460408051918252602082018390527fd847752640337969f783ba291f56251d6165ba92dd3d27984ad0f81995aef0b6910160405180910390a160dc55565b6033546001600160a01b031633146115565760405162461bcd60e51b815260040161087f90614f45565b6115616066826123c5565b6108915760405133906001600160a01b038316907f7e1a1a08d52e4ba0e21554733d66165fd5151f99460116223d9e3a608eec5cb190600090a3610de86066826131b7565b60006001600160a01b0382166116115760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b606482015260840161087f565b506001600160a01b03166000908152609d602052604090205490565b6033546001600160a01b031633146116575760405162461bcd60e51b815260040161087f90614f45565b61166160006131cc565b565b60006002606554036116875760405162461bcd60e51b815260040161087f90614ed7565b60026065553361169f6033546001600160a01b031690565b6001600160a01b031614806116ba57506116ba6066336123c5565b6116d65760405162461bcd60e51b815260040161087f90614de3565b610d24826040518060200160405280600081525061321e565b60006002606554036117135760405162461bcd60e51b815260040161087f90614ed7565b60026065553361172b6033546001600160a01b031690565b6001600160a01b0316148061174657506117466066336123c5565b6117625760405162461bcd60e51b815260040161087f90614de3565b6117a28484848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061321e92505050565b6001606555949350505050565b60606002606554036117d35760405162461bcd60e51b815260040161087f90614ed7565b6002606555336117eb6033546001600160a01b031690565b6001600160a01b0316148061180657506118066066336123c5565b6118225760405162461bcd60e51b815260040161087f90614de3565b816001600160401b0381111561183a5761183a6149a6565b604051908082528060200260200182016040528015611863578160200160208202803683370190505b50905060005b82811015611130576118d38585858481811061188757611887614fa9565b90506020028101906118999190614fee565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061321e92505050565b8282815181106118e5576118e5614fa9565b6020908102919091010152806118fa81614fd5565b915050611869565b61190d60cd336123c5565b6119295760405162461bcd60e51b815260040161087f90614f0e565b610abe838383612f4d565b606061194060cd612da7565b6001600160401b03811115611957576119576149a6565b604051908082528060200260200182016040528015611980578160200160208202803683370190505b50905060005b61199060cd612da7565b811015610fa5576119a260cd82612db1565b8282815181106119b4576119b4614fa9565b6001600160a01b0390921660209283029190910190910152806119d681614fd5565b915050611986565b6060609b80546108a390614e27565b33611a006033546001600160a01b031690565b6001600160a01b03161480611a1b5750611a1b6066336123c5565b611a375760405162461bcd60e51b815260040161087f90614de3565b610de882826132ac565b610de83383836132c6565b33611a5f6033546001600160a01b031690565b6001600160a01b03161480611a7a5750611a7a6066336123c5565b611a965760405162461bcd60e51b815260040161087f90614de3565b82518114611ab65760405162461bcd60e51b815260040161087f90615034565b60005b8351811015610ef557611b08848281518110611ad757611ad7614fa9565b6020026020010151848484818110611af157611af1614fa9565b9050602002810190611b039190614fee565b6125fc565b80611b1281614fd5565b915050611ab9565b611b2560cd336123c5565b611b415760405162461bcd60e51b815260040161087f90614f0e565b801580611b5a5750611b5a33634ce6d51160e11b613394565b611bcc5760405162461bcd60e51b815260206004820152603f60248201527f457874656e73696f6e206d75737420696d706c656d656e74204945524337323160448201527f43726561746f72457874656e73696f6e417070726f76655472616e7366657200606482015260840161087f565b33600090815260d2602052604090205460ff161515811515146108915733600081815260d26020908152604091829020805460ff191685151590811790915591519182527f072a7592283e2c2d1d56d21517ff6013325e0f55483f4828373ff4d98b0a1a36910160405180910390a250565b6060600260655403611c625760405162461bcd60e51b815260040161087f90614ed7565b600260655533611c7a6033546001600160a01b031690565b6001600160a01b03161480611c955750611c956066336123c5565b611cb15760405162461bcd60e51b815260040161087f90614de3565b8161ffff166001600160401b03811115611ccd57611ccd6149a6565b604051908082528060200260200182016040528015611cf6578160200160208202803683370190505b50905060005b8261ffff168161ffff161015611d5857611d25846040518060200160405280600081525061321e565b828261ffff1681518110611d3b57611d3b614fa9565b602090810291909101015280611d508161505b565b915050611cfc565b50600160655592915050565b33611d776033546001600160a01b031690565b6001600160a01b03161480611d925750611d926066336123c5565b611dae5760405162461bcd60e51b815260040161087f90614de3565b610c1a8585858585612dbd565b600054610100900460ff1680611dd4575060005460ff16155b611df05760405162461bcd60e51b815260040161087f9061507c565b600054610100900460ff16158015611e12576000805461ffff19166101011790555b611e1c84846133b0565b611e24613437565b60dc8290558015610ef5576000805461ff001916905550505050565b611e4a3383612821565b611e665760405162461bcd60e51b815260040161087f90614e86565b610ef5848484846134b2565b6060611e7d826124e5565b611e995760405162461bcd60e51b815260040161087f90614e5b565b611ea2826134e5565b805480602002602001604051908101604052809291908181526020018280548015610b3d57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611ed85750505050509050919050565b606080611f0d836124e5565b611f295760405162461bcd60e51b815260040161087f90614e5b565b611f3283613571565b815460408051602080840282018101909252828152918491830182828015611f8357602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611f65575b5050505050915080805480602002602001604051908101604052809291908181526020018280548015611fd557602002820191906000526020600020905b815481526020019060010190808311611fc1575b5050505050905091509150915091565b6060611ff0826124e5565b61200c5760405162461bcd60e51b815260040161087f90614e5b565b61082f8261358f565b336120286033546001600160a01b031690565b6001600160a01b0316148061204357506120436066336123c5565b61205f5760405162461bcd60e51b815260040161087f90614de3565b6108918161387c565b606060026065540361208c5760405162461bcd60e51b815260040161087f90614ed7565b600260655561209c60cd336123c5565b6120b85760405162461bcd60e51b815260040161087f90614f0e565b8161ffff166001600160401b038111156120d4576120d46149a6565b6040519080825280602002602001820160405280156120fd578160200160208202803683370190505b50905060005b8261ffff168161ffff161015611d585761212c8460405180602001604052806000815250612a96565b828261ffff168151811061214257612142614fa9565b6020908102919091010152806121578161505b565b915050612103565b61216a60cd336123c5565b6121865760405162461bcd60e51b815260040161087f90614f0e565b610abe838383613147565b6001600160a01b039182166000908152609f6020908152604080832093909416825291909152205460ff1690565b336121d26033546001600160a01b031690565b6001600160a01b031614806121ed57506121ed6066336123c5565b6122095760405162461bcd60e51b815260040161087f90614de3565b610de882826138cd565b6033546001600160a01b0316331461223d5760405162461bcd60e51b815260040161087f90614f45565b6001600160a01b0381166122a25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161087f565b610891816131cc565b60006002606554036122cf5760405162461bcd60e51b815260040161087f90614ed7565b60026065556122df60cd336123c5565b6122fb5760405162461bcd60e51b815260040161087f90614f0e565b6117a28484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612a9692505050565b60006001600160e01b03198216639088c20760e01b148061082f575061082f82613a02565b60006001600160e01b031982166380ac58cd60e01b148061239157506001600160e01b03198216635b5e139f60e01b145b8061082f575061082f82613a98565b60006001600160e01b03198216632a9f3abf60e11b148061082f575061082f82613a98565b6001600160a01b038116600090815260018301602052604081205415155b9392505050565b306001600160a01b038216036124425760405162461bcd60e51b815260206004820152601960248201527f43616e6e6f7420626c61636b6c69737420796f757273656c6600000000000000604482015260640161087f565b61244d60cd826123c5565b156124955760405133906001600160a01b038316907fd19cf84cf0fec6bec9ddfa29c63adf83a55707c712f32c8285d6180a7890147990600090a361249360cd82612c3f565b505b6124a060cf826123c5565b6108915760405133906001600160a01b038316907f05ac7bc5a606cd92a63365f9fda244499b9add0526b22d99937b6bd88181059c90600090a3610de860cf826131b7565b6000908152609c60205260409020546001600160a01b0316151590565b6000818152609e6020526040902080546001600160a01b0319166001600160a01b03841690811790915581906125378261135b565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600081815260db6020526040812054156125965750600090815260db6020526040902090565b600082815260d360209081526040808320546001600160a01b0316835260d9909152902054156125e85750600090815260d360209081526040808320546001600160a01b0316835260d9909152902090565b505030600090815260d96020526040902090565b600083815260d360205260409020546001600160a01b031630146126525760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b2103a37b5b2b760991b604482015260640161087f565b600083815260d760205260409020610ef5828483615110565b82811461268a5760405162461bcd60e51b815260040161087f90615034565b6000805b828110156126ce578383828181106126a8576126a8614fa9565b90506020020135826126ba91906151cf565b9150806126c681614fd5565b91505061268e565b50612710811061271a5760405162461bcd60e51b8152602060048201526017602482015276496e76616c696420746f74616c20726f79616c7469657360481b604482015260640161087f565b600086815260da602052604090206127339086866143ca565b50600086815260db6020526040902061274d908484614429565b50857fabb46fe0761d77584bde75697647804ffd8113abd4d8d06bc664150395eccdee8686868660405161278494939291906151e2565b60405180910390a2505050505050565b600081815260d360205260409020546001600160a01b03163081036127f45760405162461bcd60e51b815260206004820152601660248201527527379032bc3a32b739b4b7b7103337b9103a37b5b2b760511b604482015260640161087f565b6127ff60cf826123c5565b1561281c5760405162461bcd60e51b815260040161087f90614f7a565b919050565b600061282c826124e5565b61288d5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161087f565b60006128988361135b565b9050806001600160a01b0316846001600160a01b031614806128d35750836001600160a01b03166128c884610926565b6001600160a01b0316145b806128e357506128e38185612191565b949350505050565b826001600160a01b03166128fe8261135b565b6001600160a01b0316146129665760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b606482015260840161087f565b6001600160a01b0382166129c85760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161087f565b6129d3838383613aae565b6129de600082612502565b6001600160a01b0383166000908152609d60205260408120805460019290612a07908490615260565b90915550506001600160a01b0382166000908152609d60205260408120805460019290612a359084906151cf565b90915550506000818152609c602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60cc805460009182612aa783614fd5565b919050555060cc54905060dc5460cc541115612afc5760405162461bcd60e51b81526020600482015260146024820152731d1bdd185b081cdd5c1c1b1e481c995858da195960621b604482015260640161087f565b612b068382613ab9565b600081815260d36020526040902080546001600160a01b03191633179055612b2e8382613b4d565b815115612b4f57600081815260d760205260409020612b4d8382615273565b505b61082f565b6000806000612b62856134e5565b805490915060011015612bb75760405162461bcd60e51b815260206004820152601c60248201527f4d6f7265207468616e203120726f79616c747920726563656976657200000000604482015260640161087f565b8054600003612bcd573060009250925050610d66565b80600081548110612be057612be0614fa9565b6000918252602090912001546001600160a01b031661271085612c0288612570565b600081548110612c1457612c14614fa9565b9060005260206000200154612c299190615332565b612c33919061535f565b92509250509250929050565b60006123e3836001600160a01b038416613b67565b30600090815260d460205260409020610de88282615273565b306001600160a01b03851603612cb85760405162461bcd60e51b815260206004820152601060248201526f10dc99585d1bdc8e88125b9d985b1a5960821b604482015260640161087f565b6001600160a01b0384163b612d1d5760405162461bcd60e51b815260206004820152602560248201527f43726561746f723a20457874656e73696f6e206d757374206265206120636f6e6044820152641d1c9858dd60da1b606482015260840161087f565b612d2860cd856123c5565b610ef5576001600160a01b038416600090815260d460205260409020612d4f838583615110565b506001600160a01b038416600081815260d56020526040808220805460ff1916851515179055513392917fd8cb8ba4086944eabf43c5535b7712015e4d4c714b24bf812c040ea5b7a3e42a91a3610c1a60cd856131b7565b600061082f825490565b60006123e38383613c5a565b828114612ddc5760405162461bcd60e51b815260040161087f90615034565b6000805b82811015612e2057838382818110612dfa57612dfa614fa9565b9050602002013582612e0c91906151cf565b915080612e1881614fd5565b915050612de0565b506127108110612e6c5760405162461bcd60e51b8152602060048201526017602482015276496e76616c696420746f74616c20726f79616c7469657360481b604482015260640161087f565b6001600160a01b038616600090815260d860205260409020612e8f9086866143ca565b506001600160a01b038616600090815260d960205260409020612eb3908484614429565b50306001600160a01b03871603612f06577f2b6849d5976d799a5b0ca4dfd6b40a3d7afe9ea72c091fa01a958594f9a2659b85858585604051612ef994939291906151e2565b60405180910390a1612f45565b856001600160a01b03167f535a93d2cb000582c0ebeaa9be4890ec6a287f98eb2df00c54c300612fd78d8f8686868660405161278494939291906151e2565b505050505050565b33600090815260d460205260409020612f67838583615110565b5033600090815260d560205260409020805460ff19169115159190911790555050565b6000612f958261135b565b9050612fa381600084613aae565b612fae600083612502565b6001600160a01b0381166000908152609d60205260408120805460019290612fd7908490615260565b90915550506000828152609c602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b600081815260d360205260409020546001600160a01b031630146130f157600081815260d36020526040902054613078906001600160a01b03166311686e4b60e21b613394565b156130f157600081815260d36020526040908190205490516311686e4b60e21b81526001600160a01b03848116600483015260248201849052909116906345a1b92c90604401600060405180830381600087803b1580156130d857600080fd5b505af11580156130ec573d6000803e3d6000fd5b505050505b600081815260d760205260409020805461310a90614e27565b15905061312857600081815260d76020526040812061312891614464565b600090815260d36020526040902080546001600160a01b031916905550565b600083815260d360205260409020546001600160a01b031633146126525760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b2103a37b5b2b760991b604482015260640161087f565b33600090815260d660205260409020610abe828483615110565b60006123e3836001600160a01b038416613c84565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60cc80546000918261322f83614fd5565b919050555060cc54905060dc5460cc5411156132845760405162461bcd60e51b81526020600482015260146024820152731d1bdd185b081cdd5c1c1b1e481c995858da195960621b604482015260640161087f565b600081815260d36020526040902080546001600160a01b03191630179055612b2e8382613b4d565b30600090815260d660205260409020610abe828483615110565b816001600160a01b0316836001600160a01b0316036133275760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161087f565b6001600160a01b038381166000818152609f6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b600061339f83613cd3565b80156123e357506123e38383613d06565b600054610100900460ff16806133c9575060005460ff16155b6133e55760405162461bcd60e51b815260040161087f9061507c565b600054610100900460ff16158015613407576000805461ffff19166101011790555b61340f613def565b613417613def565b6134218383613e59565b8015610abe576000805461ff0019169055505050565b600054610100900460ff1680613450575060005460ff16155b61346c5760405162461bcd60e51b815260040161087f9061507c565b600054610100900460ff1615801561348e576000805461ffff19166101011790555b613496613def565b61349e613ee0565b8015610891576000805461ff001916905550565b6134bd8484846128eb565b6134c984848484613f40565b610ef55760405162461bcd60e51b815260040161087f90615373565b600081815260da60205260408120541561350b5750600090815260da6020526040902090565b600082815260d360209081526040808320546001600160a01b0316835260d89091529020541561355d5750600090815260d360209081526040808320546001600160a01b0316835260d8909152902090565b505030600090815260d86020526040902090565b60008061357d836134e5565b61358684612570565b91509150915091565b600081815260d360205260409020546060906001600160a01b03166135b560cf826123c5565b156135d25760405162461bcd60e51b815260040161087f90614f7a565b600083815260d76020526040902080546135eb90614e27565b159050613705576001600160a01b038116600090815260d660205260409020805461361590614e27565b159050613666576001600160a01b038116600090815260d66020908152604080832086845260d7835292819020905161364f939201615438565b604051602081830303815290604052915050919050565b600083815260d760205260409020805461367f90614e27565b80601f01602080910402602001604051908101604052809291908181526020018280546136ab90614e27565b80156136f85780601f106136cd576101008083540402835291602001916136f8565b820191906000526020600020905b8154815290600101906020018083116136db57829003601f168201915b5050505050915050919050565b6137168163e9dc637560e01b613394565b1561378e5760405163e9dc637560e01b8152306004820152602481018490526001600160a01b0382169063e9dc637590604401600060405180830381865afa158015613766573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526123e3919081019061544d565b6001600160a01b038116600090815260d46020526040902080546137b190614e27565b15905061382d576001600160a01b038116600090815260d5602052604090205460ff1661380a576001600160a01b038116600090815260d4602052604090206137f984614041565b60405160200161364f9291906154ba565b6001600160a01b038116600090815260d460205260409020805461367f90614e27565b30600090815260d5602052604090205460ff1661385c5730600090815260d4602052604090206137f984614041565b30600090815260d460205260409020805461367f90614e27565b50919050565b61388760cd826123c5565b156108915760405133906001600160a01b038316907fd19cf84cf0fec6bec9ddfa29c63adf83a55707c712f32c8285d6180a7890147990600090a3610de860cd82612c3f565b6138d860cd836123c5565b6139245760405162461bcd60e51b815260206004820152601e60248201527f43726561746f72436f72653a20496e76616c696420657874656e73696f6e0000604482015260640161087f565b6001600160a01b0381161580613946575061394681631e05385b60e31b613394565b6139845760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b604482015260640161087f565b6001600160a01b03828116600090815260d16020526040902054811690821614610de8576001600160a01b03828116600081815260d1602052604080822080546001600160a01b031916948616948517905551339392917f6a835c4fcf7e0d398db3762332fdaa1471814ad39f1e2d6d0b3fdabf8efee3e091a45050565b60006001600160e01b031982166328f10a2160e01b1480613a275750613a2782612360565b80613a4257506001600160e01b03198216635d9dd7eb60e11b145b80613a5d57506001600160e01b03198216632dde656160e21b145b80613a7857506001600160e01b031982166335681b5360e21b145b8061082f57506001600160e01b0319821663152a902d60e11b1492915050565b6001600160e01b0319166301ffc9a760e01b1490565b610abe838383614141565b33600090815260d160205260409020546001600160a01b031615610de85733600081815260d1602052604090819020549051631e05385b60e31b815260048101929092526001600160a01b03848116602484015260448301849052169063f029c2d890606401600060405180830381600087803b158015613b3957600080fd5b505af1158015612f45573d6000803e3d6000fd5b610de8828260405180602001604052806000815250614258565b60008181526001830160205260408120548015613c50576000613b8b600183615260565b8554909150600090613b9f90600190615260565b9050818114613c04576000866000018281548110613bbf57613bbf614fa9565b9060005260206000200154905080876000018481548110613be257613be2614fa9565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613c1557613c156154df565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061082f565b600091505061082f565b6000826000018281548110613c7157613c71614fa9565b9060005260206000200154905092915050565b6000818152600183016020526040812054613ccb5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561082f565b50600061082f565b6000613ce6826301ffc9a760e01b613d06565b801561082f5750613cff826001600160e01b0319613d06565b1592915050565b604080516001600160e01b0319831660248083019190915282518083039091018152604490910182526020810180516001600160e01b03166301ffc9a760e01b179052905160009190829081906001600160a01b0387169061753090613d6d9086906154f5565b6000604051808303818686fa925050503d8060008114613da9576040519150601f19603f3d011682016040523d82523d6000602084013e613dae565b606091505b5091509150602081511015613dc9576000935050505061082f565b818015613de5575080806020019051810190613de59190615511565b9695505050505050565b600054610100900460ff1680613e08575060005460ff16155b613e245760405162461bcd60e51b815260040161087f9061507c565b600054610100900460ff1615801561349e576000805461ffff19166101011790558015610891576000805461ff001916905550565b600054610100900460ff1680613e72575060005460ff16155b613e8e5760405162461bcd60e51b815260040161087f9061507c565b600054610100900460ff16158015613eb0576000805461ffff19166101011790555b609a613ebc8482615273565b50609b613ec98382615273565b508015610abe576000805461ff0019169055505050565b600054610100900460ff1680613ef9575060005460ff16155b613f155760405162461bcd60e51b815260040161087f9061507c565b600054610100900460ff16158015613f37576000805461ffff19166101011790555b61349e336131cc565b60006001600160a01b0384163b1561403657604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290613f8490339089908890889060040161552e565b6020604051808303816000875af1925050508015613fbf575060408051601f3d908101601f19168201909252613fbc91810190615561565b60015b61401c573d808015613fed576040519150601f19603f3d011682016040523d82523d6000602084013e613ff2565b606091505b5080516000036140145760405162461bcd60e51b815260040161087f90615373565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506128e3565b506001949350505050565b6060816000036140685750506040805180820190915260018152600360fc1b602082015290565b8160005b8115614092578061407c81614fd5565b915061408b9050600a8361535f565b915061406c565b6000816001600160401b038111156140ac576140ac6149a6565b6040519080825280601f01601f1916602001820160405280156140d6576020820181803683370190505b5090505b84156128e3576140eb600183615260565b91506140f8600a8661557e565b6141039060306151cf565b60f81b81838151811061411857614118614fa9565b60200101906001600160f81b031916908160001a90535061413a600a8661535f565b94506140da565b600081815260d360209081526040808320546001600160a01b0316835260d290915290205460ff1615610abe57600081815260d3602052604090819020549051638258080560e01b81526001600160a01b038581166004830152848116602483015260448201849052909116906382580805906064016020604051808303816000875af11580156141d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141fa9190615511565b610abe5760405162461bcd60e51b815260206004820152602960248201527f45524337323143726561746f723a20457874656e73696f6e20617070726f76616044820152686c206661696c75726560b81b606482015260840161087f565b614262838361428b565b61426f6000848484613f40565b610abe5760405162461bcd60e51b815260040161087f90615373565b6001600160a01b0382166142e15760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161087f565b6142ea816124e5565b156143375760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161087f565b61434360008383613aae565b6001600160a01b0382166000908152609d6020526040812080546001929061436c9084906151cf565b90915550506000818152609c602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b82805482825590600052602060002090810192821561441d579160200282015b8281111561441d5781546001600160a01b0319166001600160a01b038435161782556020909201916001909101906143ea565b50610fa592915061449a565b82805482825590600052602060002090810192821561441d579160200282015b8281111561441d578235825591602001919060010190614449565b50805461447090614e27565b6000825580601f10614480575050565b601f01602090049060005260206000209081019061089191905b5b80821115610fa5576000815560010161449b565b6001600160e01b03198116811461089157600080fd5b6000602082840312156144d757600080fd5b81356123e3816144af565b6001600160a01b038116811461089157600080fd5b60006020828403121561450957600080fd5b81356123e3816144e2565b60005b8381101561452f578181015183820152602001614517565b50506000910152565b60008151808452614550816020860160208601614514565b601f01601f19169290920160200192915050565b6020815260006123e36020830184614538565b60006020828403121561458957600080fd5b5035919050565b600080604083850312156145a357600080fd5b82356145ae816144e2565b946020939093013593505050565b600081518084526020808501945080840160005b838110156145ec578151875295820195908201906001016145d0565b509495945050505050565b6020815260006123e360208301846145bc565b60008083601f84011261461c57600080fd5b5081356001600160401b0381111561463357600080fd5b602083019150836020828501011115610d6657600080fd5b60008060006040848603121561466057600080fd5b8335925060208401356001600160401b0381111561467d57600080fd5b6146898682870161460a565b9497909650939450505050565b60008083601f8401126146a857600080fd5b5081356001600160401b038111156146bf57600080fd5b6020830191508360208260051b8501011115610d6657600080fd5b6000806000806000606086880312156146f257600080fd5b8535945060208601356001600160401b038082111561471057600080fd5b61471c89838a01614696565b9096509450604088013591508082111561473557600080fd5b5061474288828901614696565b969995985093965092949392505050565b60008060006060848603121561476857600080fd5b8335614773816144e2565b92506020840135614783816144e2565b929592945050506040919091013590565b600080604083850312156147a757600080fd5b50508035926020909101359150565b600080602083850312156147c957600080fd5b82356001600160401b038111156147df57600080fd5b6147eb8582860161460a565b90969095509350505050565b60008060006040848603121561480c57600080fd5b8335614817816144e2565b925060208401356001600160401b0381111561467d57600080fd5b6020808252825182820181905260009190848201906040850190845b818110156148735783516001600160a01b03168352928401929184019160010161484e565b50909695505050505050565b6000806000806040858703121561489557600080fd5b84356001600160401b03808211156148ac57600080fd5b6148b888838901614696565b909650945060208701359150808211156148d157600080fd5b506148de87828801614696565b95989497509550505050565b6000806000604084860312156148ff57600080fd5b833561490a816144e2565b925060208401356001600160401b0381111561492557600080fd5b61468986828701614696565b801515811461089157600080fd5b6000806000806060858703121561495557600080fd5b8435614960816144e2565b935060208501356001600160401b0381111561497b57600080fd5b6149878782880161460a565b909450925050604085013561499b81614931565b939692955090935050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156149e4576149e46149a6565b604052919050565b600080600060408486031215614a0157600080fd5b83356001600160401b0380821115614a1857600080fd5b818601915086601f830112614a2c57600080fd5b8135602082821115614a4057614a406149a6565b8160051b614a4f8282016149bc565b928352848101820192828101908b851115614a6957600080fd5b958301955b84871015614a8757863582529583019590830190614a6e565b9850505087013592505080821115614a9e57600080fd5b5061468986828701614696565b600080600060408486031215614ac057600080fd5b83356001600160401b03811115614ad657600080fd5b614ae28682870161460a565b9094509250506020840135614af681614931565b809150509250925092565b60008060408385031215614b1457600080fd5b8235614b1f816144e2565b91506020830135614b2f81614931565b809150509250929050565b600060208284031215614b4c57600080fd5b81356123e381614931565b60008060408385031215614b6a57600080fd5b8235614b75816144e2565b9150602083013561ffff81168114614b2f57600080fd5b600080600080600060608688031215614ba457600080fd5b8535614baf816144e2565b945060208601356001600160401b038082111561471057600080fd5b60006001600160401b03821115614be457614be46149a6565b50601f01601f191660200190565b6000614c05614c0084614bcb565b6149bc565b9050828152838383011115614c1957600080fd5b828260208301376000602084830101529392505050565b600082601f830112614c4157600080fd5b6123e383833560208501614bf2565b600080600060608486031215614c6557600080fd5b83356001600160401b0380821115614c7c57600080fd5b614c8887838801614c30565b94506020860135915080821115614c9e57600080fd5b50614cab86828701614c30565b925050604084013590509250925092565b60008060008060808587031215614cd257600080fd5b8435614cdd816144e2565b93506020850135614ced816144e2565b92506040850135915060608501356001600160401b03811115614d0f57600080fd5b8501601f81018713614d2057600080fd5b614d2f87823560208401614bf2565b91505092959194509250565b600081518084526020808501945080840160005b838110156145ec5781516001600160a01b031687529582019590820190600101614d4f565b6020815260006123e36020830184614d3b565b604081526000614d9a6040830185614d3b565b8281036020840152614dac81856145bc565b95945050505050565b60008060408385031215614dc857600080fd5b8235614dd3816144e2565b91506020830135614b2f816144e2565b60208082526024908201527f41646d696e436f6e74726f6c3a204d757374206265206f776e6572206f7220616040820152633236b4b760e11b606082015260800190565b600181811c90821680614e3b57607f821691505b60208210810361387657634e487b7160e01b600052602260045260246000fd5b6020808252601190820152702737b732bc34b9ba32b73a103a37b5b2b760791b604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6020808252601c908201527f4d757374206265207265676973746572656420657874656e73696f6e00000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b602080825260159082015274115e1d195b9cda5bdb88189b1858dadb1a5cdd1959605a1b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201614fe757614fe7614fbf565b5060010190565b6000808335601e1984360301811261500557600080fd5b8301803591506001600160401b0382111561501f57600080fd5b602001915036819003821315610d6657600080fd5b6020808252600d908201526c125b9d985b1a59081a5b9c1d5d609a1b604082015260600190565b600061ffff80831681810361507257615072614fbf565b6001019392505050565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b601f821115610abe57600081815260208120601f850160051c810160208610156150f15750805b601f850160051c820191505b81811015612f45578281556001016150fd565b6001600160401b03831115615127576151276149a6565b61513b836151358354614e27565b836150ca565b6000601f84116001811461516f57600085156151575750838201355b600019600387901b1c1916600186901b178355610c1a565b600083815260209020601f19861690835b828110156151a05786850135825560209485019460019092019101615180565b50868210156151bd5760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b8082018082111561082f5761082f614fbf565b6040808252810184905260008560608301825b87811015615225578235615208816144e2565b6001600160a01b03168252602092830192909101906001016151f5565b5083810360208501528481526001600160fb1b0385111561524557600080fd5b8460051b915081866020830137016020019695505050505050565b8181038181111561082f5761082f614fbf565b81516001600160401b0381111561528c5761528c6149a6565b6152a08161529a8454614e27565b846150ca565b602080601f8311600181146152d557600084156152bd5750858301515b600019600386901b1c1916600185901b178555612f45565b600085815260208120601f198616915b82811015615304578886015182559484019460019091019084016152e5565b50858210156153225787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b808202811582820484141761082f5761082f614fbf565b634e487b7160e01b600052601260045260246000fd5b60008261536e5761536e615349565b500490565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b600081546153d281614e27565b600182811680156153ea57600181146153ff5761542e565b60ff198416875282151583028701945061542e565b8560005260208060002060005b858110156154255781548a82015290840190820161540c565b50505082870194505b5050505092915050565b60006128e361544783866153c5565b846153c5565b60006020828403121561545f57600080fd5b81516001600160401b0381111561547557600080fd5b8201601f8101841361548657600080fd5b8051615494614c0082614bcb565b8181528560208385010111156154a957600080fd5b614dac826020830160208601614514565b60006154c682856153c5565b83516154d6818360208801614514565b01949350505050565b634e487b7160e01b600052603160045260246000fd5b60008251615507818460208701614514565b9190910192915050565b60006020828403121561552357600080fd5b81516123e381614931565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613de590830184614538565b60006020828403121561557357600080fd5b81516123e3816144af565b60008261558d5761558d615349565b50069056fea2646970667358221220057ba845df08330440aafec1f4f9f9345229f2f77a1a94da535d2f98129a1afe64736f6c63430008110033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106103835760003560e01c80636d73e669116101de578063ad2d0ddd1161010f578063ce8aee9d116100ad578063e985e9c51161007c578063e985e9c5146107ba578063f0cdc499146107cd578063f2fde38b146107e0578063fe2e1f58146107f357600080fd5b8063ce8aee9d14610781578063d5a06d4c1461074d578063e00aab4b14610794578063e92a89f6146107a757600080fd5b8063b88d4fde116100e9578063b88d4fde1461071a578063b9c4d9fb1461072d578063bb3bafd61461074d578063c87b56dd1461076e57600080fd5b8063ad2d0ddd146106e1578063b0fe87c9146106f4578063b119490e1461070757600080fd5b806383b7db631161017c57806399e0dd7c1161015657806399e0dd7c14610695578063a22cb465146106a8578063aafb2d44146106bb578063ac0c8cfa146106ce57600080fd5b806383b7db63146106745780638da5cb5b1461067c57806395d89b411461068d57600080fd5b806372ff03d3116101b857806372ff03d3146106285780637884af441461063b5780637aa15f161461064e57806382dcc0c81461066157600080fd5b80636d73e669146105fa57806370a082311461060d578063715018a61461062057600080fd5b80632d345670116102b85780633f0f37f61161025657806361e5bc6b1161023057806361e5bc6b146105ae5780636352211e146105c157806366d1e9d0146105d457806366d49bab146105e757600080fd5b80633f0f37f61461057557806342842e0e1461058857806342966c681461059b57600080fd5b806331ae450b1161029257806331ae450b14610527578063332dd1ae1461053c57806338e52e781461054f5780633e6134b81461056257600080fd5b80632d345670146104ee57806330176e13146105015780633071a0f91461051457600080fd5b806318160ddd1161032557806323b872dd116102ff57806323b872dd1461048357806324d7806c146104965780632928ca58146104a95780632a55205a146104bc57600080fd5b806318160ddd1461044b57806320e4afe21461045d578063239be3171461047057600080fd5b8063081812fc11610361578063081812fc146103da578063095ea7b3146104055780630ebd4c7f14610418578063162094c41461043857600080fd5b806301ffc9a71461038857806302e7afb7146103b057806306fdde03146103c5575b600080fd5b61039b6103963660046144c5565b610806565b60405190151581526020015b60405180910390f35b6103c36103be3660046144f7565b610835565b005b6103cd610894565b6040516103a79190614564565b6103ed6103e8366004614577565b610926565b6040516001600160a01b0390911681526020016103a7565b6103c3610413366004614590565b6109ae565b61042b610426366004614577565b610ac3565b6040516103a791906145f7565b6103c361044636600461464b565b610b49565b60dc545b6040519081526020016103a7565b6103c361046b3660046146da565b610b9e565b6103ed61047e366004614577565b610c21565b6103c3610491366004614753565b610c51565b61039b6104a43660046144f7565b610c82565b61044f6104b73660046144f7565b610cbb565b6104cf6104ca366004614794565b610d2f565b604080516001600160a01b0390931683526020830191909152016103a7565b6103c36104fc3660046144f7565b610d6d565b6103c361050f3660046147b6565b610dec565b6103c36105223660046147f7565b610e75565b61052f610efb565b6040516103a79190614832565b6103c361054a36600461487f565b610fa9565b61042b61055d3660046148ea565b611000565b6103c36105703660046147b6565b61113d565b6103c361058336600461493f565b611170565b6103c3610596366004614753565b6111ef565b6103c36105a9366004614577565b61120a565b6103c36105bc3660046149ec565b6112b0565b6103ed6105cf366004614577565b61135b565b6103c36105e23660046147b6565b6113d2565b6103c36105f5366004614577565b611403565b6103c36106083660046144f7565b61152c565b61044f61061b3660046144f7565b6115a6565b6103c361162d565b61044f6106363660046144f7565b611663565b61044f6106493660046147f7565b6116ef565b61042b61065c3660046148ea565b6117af565b6103c361066f366004614aab565b611902565b61052f611934565b6033546001600160a01b03166103ed565b6103cd6119de565b6103c36106a33660046147b6565b6119ed565b6103c36106b6366004614b01565b611a41565b6103c36106c93660046149ec565b611a4c565b6103c36106dc366004614b3a565b611b1a565b61042b6106ef366004614b57565b611c3e565b6103c3610702366004614b8c565b611d64565b6103c3610715366004614c50565b611dbb565b6103c3610728366004614cbc565b611e40565b61074061073b366004614577565b611e72565b6040516103a79190614d74565b61076061075b366004614577565b611f01565b6040516103a7929190614d87565b6103cd61077c366004614577565b611fe5565b6103c361078f3660046144f7565b612015565b61042b6107a2366004614b57565b612068565b6103c36107b536600461464b565b61215f565b61039b6107c8366004614db5565b612191565b6103c36107db366004614db5565b6121bf565b6103c36107ee3660046144f7565b612213565b61044f6108013660046147f7565b6122ab565b60006108118261233b565b80610820575061082082612360565b8061082f575061082f826123a0565b92915050565b336108486033546001600160a01b031690565b6001600160a01b0316148061086357506108636066336123c5565b6108885760405162461bcd60e51b815260040161087f90614de3565b60405180910390fd5b610891816123ea565b50565b6060609a80546108a390614e27565b80601f01602080910402602001604051908101604052809291908181526020018280546108cf90614e27565b801561091c5780601f106108f15761010080835404028352916020019161091c565b820191906000526020600020905b8154815290600101906020018083116108ff57829003601f168201915b5050505050905090565b6000610931826124e5565b6109925760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161087f565b506000908152609e60205260409020546001600160a01b031690565b60006109b98261135b565b9050806001600160a01b0316836001600160a01b031603610a265760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b606482015260840161087f565b336001600160a01b0382161480610a425750610a428133612191565b610ab45760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606482015260840161087f565b610abe8383612502565b505050565b6060610ace826124e5565b610aea5760405162461bcd60e51b815260040161087f90614e5b565b610af382612570565b805480602002602001604051908101604052809291908181526020018280548015610b3d57602002820191906000526020600020905b815481526020019060010190808311610b29575b50505050509050919050565b33610b5c6033546001600160a01b031690565b6001600160a01b03161480610b775750610b776066336123c5565b610b935760405162461bcd60e51b815260040161087f90614de3565b610abe8383836125fc565b33610bb16033546001600160a01b031690565b6001600160a01b03161480610bcc5750610bcc6066336123c5565b610be85760405162461bcd60e51b815260040161087f90614de3565b610bf1856124e5565b610c0d5760405162461bcd60e51b815260040161087f90614e5b565b610c1a858585858561266b565b5050505050565b6000610c2c826124e5565b610c485760405162461bcd60e51b815260040161087f90614e5b565b61082f82612794565b610c5b3382612821565b610c775760405162461bcd60e51b815260040161087f90614e86565b610abe8383836128eb565b6000816001600160a01b0316610ca06033546001600160a01b031690565b6001600160a01b0316148061082f575061082f6066836123c5565b6000600260655403610cdf5760405162461bcd60e51b815260040161087f90614ed7565b6002606555610cef60cd336123c5565b610d0b5760405162461bcd60e51b815260040161087f90614f0e565b610d248260405180602001604052806000815250612a96565b600160655592915050565b600080610d3b846124e5565b610d575760405162461bcd60e51b815260040161087f90614e5b565b610d618484612b54565b915091505b9250929050565b6033546001600160a01b03163314610d975760405162461bcd60e51b815260040161087f90614f45565b610da26066826123c5565b156108915760405133906001600160a01b038316907f7c0c3c84c67c85fcac635147348bfe374c24a1a93d0366d1cfe9d8853cbf89d590600090a3610de8606682612c3f565b5050565b33610dff6033546001600160a01b031690565b6001600160a01b03161480610e1a5750610e1a6066336123c5565b610e365760405162461bcd60e51b815260040161087f90614de3565b610de882828080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612c5492505050565b33610e886033546001600160a01b031690565b6001600160a01b03161480610ea35750610ea36066336123c5565b610ebf5760405162461bcd60e51b815260040161087f90614de3565b82610ecb60cf826123c5565b15610ee85760405162461bcd60e51b815260040161087f90614f7a565b610ef58484846000612c6d565b50505050565b6060610f076066612da7565b6001600160401b03811115610f1e57610f1e6149a6565b604051908082528060200260200182016040528015610f47578160200160208202803683370190505b50905060005b610f576066612da7565b811015610fa557610f69606682612db1565b828281518110610f7b57610f7b614fa9565b6001600160a01b039092166020928302919091019091015280610f9d81614fd5565b915050610f4d565b5090565b33610fbc6033546001600160a01b031690565b6001600160a01b03161480610fd75750610fd76066336123c5565b610ff35760405162461bcd60e51b815260040161087f90614de3565b610ef53085858585612dbd565b60606002606554036110245760405162461bcd60e51b815260040161087f90614ed7565b600260655561103460cd336123c5565b6110505760405162461bcd60e51b815260040161087f90614f0e565b816001600160401b03811115611068576110686149a6565b604051908082528060200260200182016040528015611091578160200160208202803683370190505b50905060005b8281101561113057611101858585848181106110b5576110b5614fa9565b90506020028101906110c79190614fee565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612a9692505050565b82828151811061111357611113614fa9565b60209081029190910101528061112881614fd5565b915050611097565b5060016065559392505050565b61114860cd336123c5565b6111645760405162461bcd60e51b815260040161087f90614f0e565b610de882826000612f4d565b336111836033546001600160a01b031690565b6001600160a01b0316148061119e575061119e6066336123c5565b6111ba5760405162461bcd60e51b815260040161087f90614de3565b836111c660cf826123c5565b156111e35760405162461bcd60e51b815260040161087f90614f7a565b610c1a85858585612c6d565b610abe83838360405180602001604052806000815250611e40565b60026065540361122c5760405162461bcd60e51b815260040161087f90614ed7565b600260655561123b3382612821565b6112875760405162461bcd60e51b815260206004820181905260248201527f43616c6c6572206973206e6f74206f776e6572206e6f7220617070726f766564604482015260640161087f565b60006112928261135b565b905061129d82612f8a565b6112a78183613031565b50506001606555565b6112bb60cd336123c5565b6112d75760405162461bcd60e51b815260040161087f90614f0e565b825181146112f75760405162461bcd60e51b815260040161087f90615034565b60005b8351811015610ef55761134984828151811061131857611318614fa9565b602002602001015184848481811061133257611332614fa9565b90506020028101906113449190614fee565b613147565b8061135381614fd5565b9150506112fa565b6000818152609c60205260408120546001600160a01b03168061082f5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b606482015260840161087f565b6113dd60cd336123c5565b6113f95760405162461bcd60e51b815260040161087f90614f0e565b610de8828261319d565b336114166033546001600160a01b031690565b6001600160a01b03161461147b5760405162461bcd60e51b815260206004820152602660248201527f6f6e6c79206f776e65722063616e207570646174652074686520746f74616c20604482015265737570706c7960d01b606482015260840161087f565b60cc548110156114eb5760405162461bcd60e51b815260206004820152603560248201527f746f74616c20737570706c792073686f756c64206e6f74206265206c6573736560448201527472207468616e2063757272656e7420737570706c7960581b606482015260840161087f565b60dc5460408051918252602082018390527fd847752640337969f783ba291f56251d6165ba92dd3d27984ad0f81995aef0b6910160405180910390a160dc55565b6033546001600160a01b031633146115565760405162461bcd60e51b815260040161087f90614f45565b6115616066826123c5565b6108915760405133906001600160a01b038316907f7e1a1a08d52e4ba0e21554733d66165fd5151f99460116223d9e3a608eec5cb190600090a3610de86066826131b7565b60006001600160a01b0382166116115760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b606482015260840161087f565b506001600160a01b03166000908152609d602052604090205490565b6033546001600160a01b031633146116575760405162461bcd60e51b815260040161087f90614f45565b61166160006131cc565b565b60006002606554036116875760405162461bcd60e51b815260040161087f90614ed7565b60026065553361169f6033546001600160a01b031690565b6001600160a01b031614806116ba57506116ba6066336123c5565b6116d65760405162461bcd60e51b815260040161087f90614de3565b610d24826040518060200160405280600081525061321e565b60006002606554036117135760405162461bcd60e51b815260040161087f90614ed7565b60026065553361172b6033546001600160a01b031690565b6001600160a01b0316148061174657506117466066336123c5565b6117625760405162461bcd60e51b815260040161087f90614de3565b6117a28484848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061321e92505050565b6001606555949350505050565b60606002606554036117d35760405162461bcd60e51b815260040161087f90614ed7565b6002606555336117eb6033546001600160a01b031690565b6001600160a01b0316148061180657506118066066336123c5565b6118225760405162461bcd60e51b815260040161087f90614de3565b816001600160401b0381111561183a5761183a6149a6565b604051908082528060200260200182016040528015611863578160200160208202803683370190505b50905060005b82811015611130576118d38585858481811061188757611887614fa9565b90506020028101906118999190614fee565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061321e92505050565b8282815181106118e5576118e5614fa9565b6020908102919091010152806118fa81614fd5565b915050611869565b61190d60cd336123c5565b6119295760405162461bcd60e51b815260040161087f90614f0e565b610abe838383612f4d565b606061194060cd612da7565b6001600160401b03811115611957576119576149a6565b604051908082528060200260200182016040528015611980578160200160208202803683370190505b50905060005b61199060cd612da7565b811015610fa5576119a260cd82612db1565b8282815181106119b4576119b4614fa9565b6001600160a01b0390921660209283029190910190910152806119d681614fd5565b915050611986565b6060609b80546108a390614e27565b33611a006033546001600160a01b031690565b6001600160a01b03161480611a1b5750611a1b6066336123c5565b611a375760405162461bcd60e51b815260040161087f90614de3565b610de882826132ac565b610de83383836132c6565b33611a5f6033546001600160a01b031690565b6001600160a01b03161480611a7a5750611a7a6066336123c5565b611a965760405162461bcd60e51b815260040161087f90614de3565b82518114611ab65760405162461bcd60e51b815260040161087f90615034565b60005b8351811015610ef557611b08848281518110611ad757611ad7614fa9565b6020026020010151848484818110611af157611af1614fa9565b9050602002810190611b039190614fee565b6125fc565b80611b1281614fd5565b915050611ab9565b611b2560cd336123c5565b611b415760405162461bcd60e51b815260040161087f90614f0e565b801580611b5a5750611b5a33634ce6d51160e11b613394565b611bcc5760405162461bcd60e51b815260206004820152603f60248201527f457874656e73696f6e206d75737420696d706c656d656e74204945524337323160448201527f43726561746f72457874656e73696f6e417070726f76655472616e7366657200606482015260840161087f565b33600090815260d2602052604090205460ff161515811515146108915733600081815260d26020908152604091829020805460ff191685151590811790915591519182527f072a7592283e2c2d1d56d21517ff6013325e0f55483f4828373ff4d98b0a1a36910160405180910390a250565b6060600260655403611c625760405162461bcd60e51b815260040161087f90614ed7565b600260655533611c7a6033546001600160a01b031690565b6001600160a01b03161480611c955750611c956066336123c5565b611cb15760405162461bcd60e51b815260040161087f90614de3565b8161ffff166001600160401b03811115611ccd57611ccd6149a6565b604051908082528060200260200182016040528015611cf6578160200160208202803683370190505b50905060005b8261ffff168161ffff161015611d5857611d25846040518060200160405280600081525061321e565b828261ffff1681518110611d3b57611d3b614fa9565b602090810291909101015280611d508161505b565b915050611cfc565b50600160655592915050565b33611d776033546001600160a01b031690565b6001600160a01b03161480611d925750611d926066336123c5565b611dae5760405162461bcd60e51b815260040161087f90614de3565b610c1a8585858585612dbd565b600054610100900460ff1680611dd4575060005460ff16155b611df05760405162461bcd60e51b815260040161087f9061507c565b600054610100900460ff16158015611e12576000805461ffff19166101011790555b611e1c84846133b0565b611e24613437565b60dc8290558015610ef5576000805461ff001916905550505050565b611e4a3383612821565b611e665760405162461bcd60e51b815260040161087f90614e86565b610ef5848484846134b2565b6060611e7d826124e5565b611e995760405162461bcd60e51b815260040161087f90614e5b565b611ea2826134e5565b805480602002602001604051908101604052809291908181526020018280548015610b3d57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611ed85750505050509050919050565b606080611f0d836124e5565b611f295760405162461bcd60e51b815260040161087f90614e5b565b611f3283613571565b815460408051602080840282018101909252828152918491830182828015611f8357602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611f65575b5050505050915080805480602002602001604051908101604052809291908181526020018280548015611fd557602002820191906000526020600020905b815481526020019060010190808311611fc1575b5050505050905091509150915091565b6060611ff0826124e5565b61200c5760405162461bcd60e51b815260040161087f90614e5b565b61082f8261358f565b336120286033546001600160a01b031690565b6001600160a01b0316148061204357506120436066336123c5565b61205f5760405162461bcd60e51b815260040161087f90614de3565b6108918161387c565b606060026065540361208c5760405162461bcd60e51b815260040161087f90614ed7565b600260655561209c60cd336123c5565b6120b85760405162461bcd60e51b815260040161087f90614f0e565b8161ffff166001600160401b038111156120d4576120d46149a6565b6040519080825280602002602001820160405280156120fd578160200160208202803683370190505b50905060005b8261ffff168161ffff161015611d585761212c8460405180602001604052806000815250612a96565b828261ffff168151811061214257612142614fa9565b6020908102919091010152806121578161505b565b915050612103565b61216a60cd336123c5565b6121865760405162461bcd60e51b815260040161087f90614f0e565b610abe838383613147565b6001600160a01b039182166000908152609f6020908152604080832093909416825291909152205460ff1690565b336121d26033546001600160a01b031690565b6001600160a01b031614806121ed57506121ed6066336123c5565b6122095760405162461bcd60e51b815260040161087f90614de3565b610de882826138cd565b6033546001600160a01b0316331461223d5760405162461bcd60e51b815260040161087f90614f45565b6001600160a01b0381166122a25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161087f565b610891816131cc565b60006002606554036122cf5760405162461bcd60e51b815260040161087f90614ed7565b60026065556122df60cd336123c5565b6122fb5760405162461bcd60e51b815260040161087f90614f0e565b6117a28484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612a9692505050565b60006001600160e01b03198216639088c20760e01b148061082f575061082f82613a02565b60006001600160e01b031982166380ac58cd60e01b148061239157506001600160e01b03198216635b5e139f60e01b145b8061082f575061082f82613a98565b60006001600160e01b03198216632a9f3abf60e11b148061082f575061082f82613a98565b6001600160a01b038116600090815260018301602052604081205415155b9392505050565b306001600160a01b038216036124425760405162461bcd60e51b815260206004820152601960248201527f43616e6e6f7420626c61636b6c69737420796f757273656c6600000000000000604482015260640161087f565b61244d60cd826123c5565b156124955760405133906001600160a01b038316907fd19cf84cf0fec6bec9ddfa29c63adf83a55707c712f32c8285d6180a7890147990600090a361249360cd82612c3f565b505b6124a060cf826123c5565b6108915760405133906001600160a01b038316907f05ac7bc5a606cd92a63365f9fda244499b9add0526b22d99937b6bd88181059c90600090a3610de860cf826131b7565b6000908152609c60205260409020546001600160a01b0316151590565b6000818152609e6020526040902080546001600160a01b0319166001600160a01b03841690811790915581906125378261135b565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600081815260db6020526040812054156125965750600090815260db6020526040902090565b600082815260d360209081526040808320546001600160a01b0316835260d9909152902054156125e85750600090815260d360209081526040808320546001600160a01b0316835260d9909152902090565b505030600090815260d96020526040902090565b600083815260d360205260409020546001600160a01b031630146126525760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b2103a37b5b2b760991b604482015260640161087f565b600083815260d760205260409020610ef5828483615110565b82811461268a5760405162461bcd60e51b815260040161087f90615034565b6000805b828110156126ce578383828181106126a8576126a8614fa9565b90506020020135826126ba91906151cf565b9150806126c681614fd5565b91505061268e565b50612710811061271a5760405162461bcd60e51b8152602060048201526017602482015276496e76616c696420746f74616c20726f79616c7469657360481b604482015260640161087f565b600086815260da602052604090206127339086866143ca565b50600086815260db6020526040902061274d908484614429565b50857fabb46fe0761d77584bde75697647804ffd8113abd4d8d06bc664150395eccdee8686868660405161278494939291906151e2565b60405180910390a2505050505050565b600081815260d360205260409020546001600160a01b03163081036127f45760405162461bcd60e51b815260206004820152601660248201527527379032bc3a32b739b4b7b7103337b9103a37b5b2b760511b604482015260640161087f565b6127ff60cf826123c5565b1561281c5760405162461bcd60e51b815260040161087f90614f7a565b919050565b600061282c826124e5565b61288d5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161087f565b60006128988361135b565b9050806001600160a01b0316846001600160a01b031614806128d35750836001600160a01b03166128c884610926565b6001600160a01b0316145b806128e357506128e38185612191565b949350505050565b826001600160a01b03166128fe8261135b565b6001600160a01b0316146129665760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b606482015260840161087f565b6001600160a01b0382166129c85760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161087f565b6129d3838383613aae565b6129de600082612502565b6001600160a01b0383166000908152609d60205260408120805460019290612a07908490615260565b90915550506001600160a01b0382166000908152609d60205260408120805460019290612a359084906151cf565b90915550506000818152609c602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60cc805460009182612aa783614fd5565b919050555060cc54905060dc5460cc541115612afc5760405162461bcd60e51b81526020600482015260146024820152731d1bdd185b081cdd5c1c1b1e481c995858da195960621b604482015260640161087f565b612b068382613ab9565b600081815260d36020526040902080546001600160a01b03191633179055612b2e8382613b4d565b815115612b4f57600081815260d760205260409020612b4d8382615273565b505b61082f565b6000806000612b62856134e5565b805490915060011015612bb75760405162461bcd60e51b815260206004820152601c60248201527f4d6f7265207468616e203120726f79616c747920726563656976657200000000604482015260640161087f565b8054600003612bcd573060009250925050610d66565b80600081548110612be057612be0614fa9565b6000918252602090912001546001600160a01b031661271085612c0288612570565b600081548110612c1457612c14614fa9565b9060005260206000200154612c299190615332565b612c33919061535f565b92509250509250929050565b60006123e3836001600160a01b038416613b67565b30600090815260d460205260409020610de88282615273565b306001600160a01b03851603612cb85760405162461bcd60e51b815260206004820152601060248201526f10dc99585d1bdc8e88125b9d985b1a5960821b604482015260640161087f565b6001600160a01b0384163b612d1d5760405162461bcd60e51b815260206004820152602560248201527f43726561746f723a20457874656e73696f6e206d757374206265206120636f6e6044820152641d1c9858dd60da1b606482015260840161087f565b612d2860cd856123c5565b610ef5576001600160a01b038416600090815260d460205260409020612d4f838583615110565b506001600160a01b038416600081815260d56020526040808220805460ff1916851515179055513392917fd8cb8ba4086944eabf43c5535b7712015e4d4c714b24bf812c040ea5b7a3e42a91a3610c1a60cd856131b7565b600061082f825490565b60006123e38383613c5a565b828114612ddc5760405162461bcd60e51b815260040161087f90615034565b6000805b82811015612e2057838382818110612dfa57612dfa614fa9565b9050602002013582612e0c91906151cf565b915080612e1881614fd5565b915050612de0565b506127108110612e6c5760405162461bcd60e51b8152602060048201526017602482015276496e76616c696420746f74616c20726f79616c7469657360481b604482015260640161087f565b6001600160a01b038616600090815260d860205260409020612e8f9086866143ca565b506001600160a01b038616600090815260d960205260409020612eb3908484614429565b50306001600160a01b03871603612f06577f2b6849d5976d799a5b0ca4dfd6b40a3d7afe9ea72c091fa01a958594f9a2659b85858585604051612ef994939291906151e2565b60405180910390a1612f45565b856001600160a01b03167f535a93d2cb000582c0ebeaa9be4890ec6a287f98eb2df00c54c300612fd78d8f8686868660405161278494939291906151e2565b505050505050565b33600090815260d460205260409020612f67838583615110565b5033600090815260d560205260409020805460ff19169115159190911790555050565b6000612f958261135b565b9050612fa381600084613aae565b612fae600083612502565b6001600160a01b0381166000908152609d60205260408120805460019290612fd7908490615260565b90915550506000828152609c602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b600081815260d360205260409020546001600160a01b031630146130f157600081815260d36020526040902054613078906001600160a01b03166311686e4b60e21b613394565b156130f157600081815260d36020526040908190205490516311686e4b60e21b81526001600160a01b03848116600483015260248201849052909116906345a1b92c90604401600060405180830381600087803b1580156130d857600080fd5b505af11580156130ec573d6000803e3d6000fd5b505050505b600081815260d760205260409020805461310a90614e27565b15905061312857600081815260d76020526040812061312891614464565b600090815260d36020526040902080546001600160a01b031916905550565b600083815260d360205260409020546001600160a01b031633146126525760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b2103a37b5b2b760991b604482015260640161087f565b33600090815260d660205260409020610abe828483615110565b60006123e3836001600160a01b038416613c84565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60cc80546000918261322f83614fd5565b919050555060cc54905060dc5460cc5411156132845760405162461bcd60e51b81526020600482015260146024820152731d1bdd185b081cdd5c1c1b1e481c995858da195960621b604482015260640161087f565b600081815260d36020526040902080546001600160a01b03191630179055612b2e8382613b4d565b30600090815260d660205260409020610abe828483615110565b816001600160a01b0316836001600160a01b0316036133275760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161087f565b6001600160a01b038381166000818152609f6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b600061339f83613cd3565b80156123e357506123e38383613d06565b600054610100900460ff16806133c9575060005460ff16155b6133e55760405162461bcd60e51b815260040161087f9061507c565b600054610100900460ff16158015613407576000805461ffff19166101011790555b61340f613def565b613417613def565b6134218383613e59565b8015610abe576000805461ff0019169055505050565b600054610100900460ff1680613450575060005460ff16155b61346c5760405162461bcd60e51b815260040161087f9061507c565b600054610100900460ff1615801561348e576000805461ffff19166101011790555b613496613def565b61349e613ee0565b8015610891576000805461ff001916905550565b6134bd8484846128eb565b6134c984848484613f40565b610ef55760405162461bcd60e51b815260040161087f90615373565b600081815260da60205260408120541561350b5750600090815260da6020526040902090565b600082815260d360209081526040808320546001600160a01b0316835260d89091529020541561355d5750600090815260d360209081526040808320546001600160a01b0316835260d8909152902090565b505030600090815260d86020526040902090565b60008061357d836134e5565b61358684612570565b91509150915091565b600081815260d360205260409020546060906001600160a01b03166135b560cf826123c5565b156135d25760405162461bcd60e51b815260040161087f90614f7a565b600083815260d76020526040902080546135eb90614e27565b159050613705576001600160a01b038116600090815260d660205260409020805461361590614e27565b159050613666576001600160a01b038116600090815260d66020908152604080832086845260d7835292819020905161364f939201615438565b604051602081830303815290604052915050919050565b600083815260d760205260409020805461367f90614e27565b80601f01602080910402602001604051908101604052809291908181526020018280546136ab90614e27565b80156136f85780601f106136cd576101008083540402835291602001916136f8565b820191906000526020600020905b8154815290600101906020018083116136db57829003601f168201915b5050505050915050919050565b6137168163e9dc637560e01b613394565b1561378e5760405163e9dc637560e01b8152306004820152602481018490526001600160a01b0382169063e9dc637590604401600060405180830381865afa158015613766573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526123e3919081019061544d565b6001600160a01b038116600090815260d46020526040902080546137b190614e27565b15905061382d576001600160a01b038116600090815260d5602052604090205460ff1661380a576001600160a01b038116600090815260d4602052604090206137f984614041565b60405160200161364f9291906154ba565b6001600160a01b038116600090815260d460205260409020805461367f90614e27565b30600090815260d5602052604090205460ff1661385c5730600090815260d4602052604090206137f984614041565b30600090815260d460205260409020805461367f90614e27565b50919050565b61388760cd826123c5565b156108915760405133906001600160a01b038316907fd19cf84cf0fec6bec9ddfa29c63adf83a55707c712f32c8285d6180a7890147990600090a3610de860cd82612c3f565b6138d860cd836123c5565b6139245760405162461bcd60e51b815260206004820152601e60248201527f43726561746f72436f72653a20496e76616c696420657874656e73696f6e0000604482015260640161087f565b6001600160a01b0381161580613946575061394681631e05385b60e31b613394565b6139845760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b604482015260640161087f565b6001600160a01b03828116600090815260d16020526040902054811690821614610de8576001600160a01b03828116600081815260d1602052604080822080546001600160a01b031916948616948517905551339392917f6a835c4fcf7e0d398db3762332fdaa1471814ad39f1e2d6d0b3fdabf8efee3e091a45050565b60006001600160e01b031982166328f10a2160e01b1480613a275750613a2782612360565b80613a4257506001600160e01b03198216635d9dd7eb60e11b145b80613a5d57506001600160e01b03198216632dde656160e21b145b80613a7857506001600160e01b031982166335681b5360e21b145b8061082f57506001600160e01b0319821663152a902d60e11b1492915050565b6001600160e01b0319166301ffc9a760e01b1490565b610abe838383614141565b33600090815260d160205260409020546001600160a01b031615610de85733600081815260d1602052604090819020549051631e05385b60e31b815260048101929092526001600160a01b03848116602484015260448301849052169063f029c2d890606401600060405180830381600087803b158015613b3957600080fd5b505af1158015612f45573d6000803e3d6000fd5b610de8828260405180602001604052806000815250614258565b60008181526001830160205260408120548015613c50576000613b8b600183615260565b8554909150600090613b9f90600190615260565b9050818114613c04576000866000018281548110613bbf57613bbf614fa9565b9060005260206000200154905080876000018481548110613be257613be2614fa9565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613c1557613c156154df565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061082f565b600091505061082f565b6000826000018281548110613c7157613c71614fa9565b9060005260206000200154905092915050565b6000818152600183016020526040812054613ccb5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561082f565b50600061082f565b6000613ce6826301ffc9a760e01b613d06565b801561082f5750613cff826001600160e01b0319613d06565b1592915050565b604080516001600160e01b0319831660248083019190915282518083039091018152604490910182526020810180516001600160e01b03166301ffc9a760e01b179052905160009190829081906001600160a01b0387169061753090613d6d9086906154f5565b6000604051808303818686fa925050503d8060008114613da9576040519150601f19603f3d011682016040523d82523d6000602084013e613dae565b606091505b5091509150602081511015613dc9576000935050505061082f565b818015613de5575080806020019051810190613de59190615511565b9695505050505050565b600054610100900460ff1680613e08575060005460ff16155b613e245760405162461bcd60e51b815260040161087f9061507c565b600054610100900460ff1615801561349e576000805461ffff19166101011790558015610891576000805461ff001916905550565b600054610100900460ff1680613e72575060005460ff16155b613e8e5760405162461bcd60e51b815260040161087f9061507c565b600054610100900460ff16158015613eb0576000805461ffff19166101011790555b609a613ebc8482615273565b50609b613ec98382615273565b508015610abe576000805461ff0019169055505050565b600054610100900460ff1680613ef9575060005460ff16155b613f155760405162461bcd60e51b815260040161087f9061507c565b600054610100900460ff16158015613f37576000805461ffff19166101011790555b61349e336131cc565b60006001600160a01b0384163b1561403657604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290613f8490339089908890889060040161552e565b6020604051808303816000875af1925050508015613fbf575060408051601f3d908101601f19168201909252613fbc91810190615561565b60015b61401c573d808015613fed576040519150601f19603f3d011682016040523d82523d6000602084013e613ff2565b606091505b5080516000036140145760405162461bcd60e51b815260040161087f90615373565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506128e3565b506001949350505050565b6060816000036140685750506040805180820190915260018152600360fc1b602082015290565b8160005b8115614092578061407c81614fd5565b915061408b9050600a8361535f565b915061406c565b6000816001600160401b038111156140ac576140ac6149a6565b6040519080825280601f01601f1916602001820160405280156140d6576020820181803683370190505b5090505b84156128e3576140eb600183615260565b91506140f8600a8661557e565b6141039060306151cf565b60f81b81838151811061411857614118614fa9565b60200101906001600160f81b031916908160001a90535061413a600a8661535f565b94506140da565b600081815260d360209081526040808320546001600160a01b0316835260d290915290205460ff1615610abe57600081815260d3602052604090819020549051638258080560e01b81526001600160a01b038581166004830152848116602483015260448201849052909116906382580805906064016020604051808303816000875af11580156141d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141fa9190615511565b610abe5760405162461bcd60e51b815260206004820152602960248201527f45524337323143726561746f723a20457874656e73696f6e20617070726f76616044820152686c206661696c75726560b81b606482015260840161087f565b614262838361428b565b61426f6000848484613f40565b610abe5760405162461bcd60e51b815260040161087f90615373565b6001600160a01b0382166142e15760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161087f565b6142ea816124e5565b156143375760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161087f565b61434360008383613aae565b6001600160a01b0382166000908152609d6020526040812080546001929061436c9084906151cf565b90915550506000818152609c602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b82805482825590600052602060002090810192821561441d579160200282015b8281111561441d5781546001600160a01b0319166001600160a01b038435161782556020909201916001909101906143ea565b50610fa592915061449a565b82805482825590600052602060002090810192821561441d579160200282015b8281111561441d578235825591602001919060010190614449565b50805461447090614e27565b6000825580601f10614480575050565b601f01602090049060005260206000209081019061089191905b5b80821115610fa5576000815560010161449b565b6001600160e01b03198116811461089157600080fd5b6000602082840312156144d757600080fd5b81356123e3816144af565b6001600160a01b038116811461089157600080fd5b60006020828403121561450957600080fd5b81356123e3816144e2565b60005b8381101561452f578181015183820152602001614517565b50506000910152565b60008151808452614550816020860160208601614514565b601f01601f19169290920160200192915050565b6020815260006123e36020830184614538565b60006020828403121561458957600080fd5b5035919050565b600080604083850312156145a357600080fd5b82356145ae816144e2565b946020939093013593505050565b600081518084526020808501945080840160005b838110156145ec578151875295820195908201906001016145d0565b509495945050505050565b6020815260006123e360208301846145bc565b60008083601f84011261461c57600080fd5b5081356001600160401b0381111561463357600080fd5b602083019150836020828501011115610d6657600080fd5b60008060006040848603121561466057600080fd5b8335925060208401356001600160401b0381111561467d57600080fd5b6146898682870161460a565b9497909650939450505050565b60008083601f8401126146a857600080fd5b5081356001600160401b038111156146bf57600080fd5b6020830191508360208260051b8501011115610d6657600080fd5b6000806000806000606086880312156146f257600080fd5b8535945060208601356001600160401b038082111561471057600080fd5b61471c89838a01614696565b9096509450604088013591508082111561473557600080fd5b5061474288828901614696565b969995985093965092949392505050565b60008060006060848603121561476857600080fd5b8335614773816144e2565b92506020840135614783816144e2565b929592945050506040919091013590565b600080604083850312156147a757600080fd5b50508035926020909101359150565b600080602083850312156147c957600080fd5b82356001600160401b038111156147df57600080fd5b6147eb8582860161460a565b90969095509350505050565b60008060006040848603121561480c57600080fd5b8335614817816144e2565b925060208401356001600160401b0381111561467d57600080fd5b6020808252825182820181905260009190848201906040850190845b818110156148735783516001600160a01b03168352928401929184019160010161484e565b50909695505050505050565b6000806000806040858703121561489557600080fd5b84356001600160401b03808211156148ac57600080fd5b6148b888838901614696565b909650945060208701359150808211156148d157600080fd5b506148de87828801614696565b95989497509550505050565b6000806000604084860312156148ff57600080fd5b833561490a816144e2565b925060208401356001600160401b0381111561492557600080fd5b61468986828701614696565b801515811461089157600080fd5b6000806000806060858703121561495557600080fd5b8435614960816144e2565b935060208501356001600160401b0381111561497b57600080fd5b6149878782880161460a565b909450925050604085013561499b81614931565b939692955090935050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156149e4576149e46149a6565b604052919050565b600080600060408486031215614a0157600080fd5b83356001600160401b0380821115614a1857600080fd5b818601915086601f830112614a2c57600080fd5b8135602082821115614a4057614a406149a6565b8160051b614a4f8282016149bc565b928352848101820192828101908b851115614a6957600080fd5b958301955b84871015614a8757863582529583019590830190614a6e565b9850505087013592505080821115614a9e57600080fd5b5061468986828701614696565b600080600060408486031215614ac057600080fd5b83356001600160401b03811115614ad657600080fd5b614ae28682870161460a565b9094509250506020840135614af681614931565b809150509250925092565b60008060408385031215614b1457600080fd5b8235614b1f816144e2565b91506020830135614b2f81614931565b809150509250929050565b600060208284031215614b4c57600080fd5b81356123e381614931565b60008060408385031215614b6a57600080fd5b8235614b75816144e2565b9150602083013561ffff81168114614b2f57600080fd5b600080600080600060608688031215614ba457600080fd5b8535614baf816144e2565b945060208601356001600160401b038082111561471057600080fd5b60006001600160401b03821115614be457614be46149a6565b50601f01601f191660200190565b6000614c05614c0084614bcb565b6149bc565b9050828152838383011115614c1957600080fd5b828260208301376000602084830101529392505050565b600082601f830112614c4157600080fd5b6123e383833560208501614bf2565b600080600060608486031215614c6557600080fd5b83356001600160401b0380821115614c7c57600080fd5b614c8887838801614c30565b94506020860135915080821115614c9e57600080fd5b50614cab86828701614c30565b925050604084013590509250925092565b60008060008060808587031215614cd257600080fd5b8435614cdd816144e2565b93506020850135614ced816144e2565b92506040850135915060608501356001600160401b03811115614d0f57600080fd5b8501601f81018713614d2057600080fd5b614d2f87823560208401614bf2565b91505092959194509250565b600081518084526020808501945080840160005b838110156145ec5781516001600160a01b031687529582019590820190600101614d4f565b6020815260006123e36020830184614d3b565b604081526000614d9a6040830185614d3b565b8281036020840152614dac81856145bc565b95945050505050565b60008060408385031215614dc857600080fd5b8235614dd3816144e2565b91506020830135614b2f816144e2565b60208082526024908201527f41646d696e436f6e74726f6c3a204d757374206265206f776e6572206f7220616040820152633236b4b760e11b606082015260800190565b600181811c90821680614e3b57607f821691505b60208210810361387657634e487b7160e01b600052602260045260246000fd5b6020808252601190820152702737b732bc34b9ba32b73a103a37b5b2b760791b604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6020808252601c908201527f4d757374206265207265676973746572656420657874656e73696f6e00000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b602080825260159082015274115e1d195b9cda5bdb88189b1858dadb1a5cdd1959605a1b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201614fe757614fe7614fbf565b5060010190565b6000808335601e1984360301811261500557600080fd5b8301803591506001600160401b0382111561501f57600080fd5b602001915036819003821315610d6657600080fd5b6020808252600d908201526c125b9d985b1a59081a5b9c1d5d609a1b604082015260600190565b600061ffff80831681810361507257615072614fbf565b6001019392505050565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b601f821115610abe57600081815260208120601f850160051c810160208610156150f15750805b601f850160051c820191505b81811015612f45578281556001016150fd565b6001600160401b03831115615127576151276149a6565b61513b836151358354614e27565b836150ca565b6000601f84116001811461516f57600085156151575750838201355b600019600387901b1c1916600186901b178355610c1a565b600083815260209020601f19861690835b828110156151a05786850135825560209485019460019092019101615180565b50868210156151bd5760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b8082018082111561082f5761082f614fbf565b6040808252810184905260008560608301825b87811015615225578235615208816144e2565b6001600160a01b03168252602092830192909101906001016151f5565b5083810360208501528481526001600160fb1b0385111561524557600080fd5b8460051b915081866020830137016020019695505050505050565b8181038181111561082f5761082f614fbf565b81516001600160401b0381111561528c5761528c6149a6565b6152a08161529a8454614e27565b846150ca565b602080601f8311600181146152d557600084156152bd5750858301515b600019600386901b1c1916600185901b178555612f45565b600085815260208120601f198616915b82811015615304578886015182559484019460019091019084016152e5565b50858210156153225787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b808202811582820484141761082f5761082f614fbf565b634e487b7160e01b600052601260045260246000fd5b60008261536e5761536e615349565b500490565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b600081546153d281614e27565b600182811680156153ea57600181146153ff5761542e565b60ff198416875282151583028701945061542e565b8560005260208060002060005b858110156154255781548a82015290840190820161540c565b50505082870194505b5050505092915050565b60006128e361544783866153c5565b846153c5565b60006020828403121561545f57600080fd5b81516001600160401b0381111561547557600080fd5b8201601f8101841361548657600080fd5b8051615494614c0082614bcb565b8181528560208385010111156154a957600080fd5b614dac826020830160208601614514565b60006154c682856153c5565b83516154d6818360208801614514565b01949350505050565b634e487b7160e01b600052603160045260246000fd5b60008251615507818460208701614514565b9190910192915050565b60006020828403121561552357600080fd5b81516123e381614931565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613de590830184614538565b60006020828403121561557357600080fd5b81516123e3816144af565b60008261558d5761558d615349565b50069056fea2646970667358221220057ba845df08330440aafec1f4f9f9345229f2f77a1a94da535d2f98129a1afe64736f6c63430008110033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.