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 Name:
ERC1155CreatorImplementation
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 250 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/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol"; import "@manifoldxyz/libraries-solidity/contracts/access/AdminControlUpgradeable.sol"; import "./core/ERC1155CreatorCore.sol"; /** * @dev ERC1155Creator implementation */ contract ERC1155CreatorImplementation is AdminControlUpgradeable, ERC1155Upgradeable, ERC1155CreatorCore { mapping(uint256 => uint256) private _totalSupply; /** * Initializer */ function initialize() public initializer { __ERC1155_init(""); __Ownable_init(); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC1155Upgradeable, ERC1155CreatorCore, AdminControlUpgradeable) returns (bool) { return ERC1155CreatorCore.supportsInterface(interfaceId) || ERC1155Upgradeable.supportsInterface(interfaceId) || AdminControlUpgradeable.supportsInterface(interfaceId); } function _beforeTokenTransfer(address, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory) internal virtual override { _approveTransfer(from, to, ids, amounts); } /** * @dev See {ICreatorCore-registerExtension}. */ function registerExtension(address extension, string calldata baseURI) external override adminRequired nonBlacklistRequired(extension) { _registerExtension(extension, baseURI, false); } /** * @dev See {ICreatorCore-registerExtension}. */ function registerExtension(address extension, string calldata baseURI, bool baseURIIdentical) external override adminRequired nonBlacklistRequired(extension) { _registerExtension(extension, baseURI, baseURIIdentical); } /** * @dev See {ICreatorCore-unregisterExtension}. */ function unregisterExtension(address extension) external override adminRequired { _unregisterExtension(extension); } /** * @dev See {ICreatorCore-blacklistExtension}. */ function blacklistExtension(address extension) external override adminRequired { _blacklistExtension(extension); } /** * @dev See {ICreatorCore-setBaseTokenURIExtension}. */ function setBaseTokenURIExtension(string calldata uri_) external override extensionRequired { _setBaseTokenURIExtension(uri_, false); } /** * @dev See {ICreatorCore-setBaseTokenURIExtension}. */ function setBaseTokenURIExtension(string calldata uri_, bool identical) external override extensionRequired { _setBaseTokenURIExtension(uri_, identical); } /** * @dev See {ICreatorCore-setTokenURIPrefixExtension}. */ function setTokenURIPrefixExtension(string calldata prefix) external override extensionRequired { _setTokenURIPrefixExtension(prefix); } /** * @dev See {ICreatorCore-setTokenURIExtension}. */ function setTokenURIExtension(uint256 tokenId, string calldata uri_) external override extensionRequired { _setTokenURIExtension(tokenId, uri_); } /** * @dev See {ICreatorCore-setTokenURIExtension}. */ function setTokenURIExtension(uint256[] memory tokenIds, string[] calldata uris) external override extensionRequired { require(tokenIds.length == uris.length, "Invalid input"); for (uint i = 0; i < tokenIds.length; i++) { _setTokenURIExtension(tokenIds[i], uris[i]); } } /** * @dev See {ICreatorCore-setBaseTokenURI}. */ function setBaseTokenURI(string calldata uri_) external override adminRequired { _setBaseTokenURI(uri_); } /** * @dev See {ICreatorCore-setTokenURIPrefix}. */ function setTokenURIPrefix(string calldata prefix) external override adminRequired { _setTokenURIPrefix(prefix); } /** * @dev See {ICreatorCore-setTokenURI}. */ function setTokenURI(uint256 tokenId, string calldata uri_) external override adminRequired { _setTokenURI(tokenId, uri_); } /** * @dev See {ICreatorCore-setTokenURI}. */ function setTokenURI(uint256[] memory tokenIds, string[] calldata uris) external override adminRequired { require(tokenIds.length == uris.length, "Invalid input"); for (uint i = 0; i < tokenIds.length; i++) { _setTokenURI(tokenIds[i], uris[i]); } } /** * @dev See {ICreatorCore-setMintPermissions}. */ function setMintPermissions(address extension, address permissions) external override adminRequired { _setMintPermissions(extension, permissions); } /** * @dev See {IERC1155CreatorCore-mintBaseNew}. */ function mintBaseNew(address[] calldata to, uint256[] calldata amounts, string[] calldata uris) public virtual override nonReentrant adminRequired returns(uint256[] memory) { return _mintNew(address(this), to, amounts, uris); } /** * @dev See {IERC1155CreatorCore-mintBaseExisting}. */ function mintBaseExisting(address[] calldata to, uint256[] calldata tokenIds, uint256[] calldata amounts) public virtual override nonReentrant adminRequired { for (uint i = 0; i < tokenIds.length; i++) { require(_tokensExtension[tokenIds[i]] == address(this), "A token was created by an extension"); } _mintExisting(address(this), to, tokenIds, amounts); } /** * @dev See {IERC1155CreatorCore-mintExtensionNew}. */ function mintExtensionNew(address[] calldata to, uint256[] calldata amounts, string[] calldata uris) public virtual override nonReentrant extensionRequired returns(uint256[] memory tokenIds) { return _mintNew(msg.sender, to, amounts, uris); } /** * @dev See {IERC1155CreatorCore-mintExtensionExisting}. */ function mintExtensionExisting(address[] calldata to, uint256[] calldata tokenIds, uint256[] calldata amounts) public virtual override nonReentrant extensionRequired { for (uint i = 0; i < tokenIds.length; i++) { require(_tokensExtension[tokenIds[i]] == address(msg.sender), "A token was not created by this extension"); } _mintExisting(msg.sender, to, tokenIds, amounts); } /** * @dev Mint new tokens */ function _mintNew(address extension, address[] memory to, uint256[] memory amounts, string[] memory uris) internal returns(uint256[] memory tokenIds) { if (to.length > 1) { // Multiple receiver. Give every receiver the same new token tokenIds = new uint256[](1); require(uris.length <= 1 && (amounts.length == 1 || to.length == amounts.length), "Invalid input"); } else { // Single receiver. Generating multiple tokens tokenIds = new uint256[](amounts.length); require(uris.length == 0 || amounts.length == uris.length, "Invalid input"); } // Assign tokenIds for (uint i = 0; i < tokenIds.length; i++) { _tokenCount++; tokenIds[i] = _tokenCount; // Track the extension that minted the token _tokensExtension[_tokenCount] = extension; } if (extension != address(this)) { _checkMintPermissions(to, tokenIds, amounts); } if (to.length == 1 && tokenIds.length == 1) { // Single mint _mint(to[0], tokenIds[0], amounts[0], new bytes(0)); } else if (to.length > 1) { // Multiple receivers. Receiving the same token if (amounts.length == 1) { // Everyone receiving the same amount for (uint i = 0; i < to.length; i++) { _mint(to[i], tokenIds[0], amounts[0], new bytes(0)); } } else { // Everyone receiving different amounts for (uint i = 0; i < to.length; i++) { _mint(to[i], tokenIds[0], amounts[i], new bytes(0)); } } } else { _mintBatch(to[0], tokenIds, amounts, new bytes(0)); } for (uint i = 0; i < tokenIds.length; i++) { if (i < uris.length && bytes(uris[i]).length > 0) { _tokenURIs[tokenIds[i]] = uris[i]; } } return tokenIds; } /** * @dev Mint existing tokens */ function _mintExisting(address extension, address[] memory to, uint256[] memory tokenIds, uint256[] memory amounts) internal { if (extension != address(this)) { _checkMintPermissions(to, tokenIds, amounts); } if (to.length == 1 && tokenIds.length == 1 && amounts.length == 1) { // Single mint _mint(to[0], tokenIds[0], amounts[0], new bytes(0)); } else if (to.length == 1 && tokenIds.length == amounts.length) { // Batch mint to same receiver _mintBatch(to[0], tokenIds, amounts, new bytes(0)); } else if (tokenIds.length == 1 && amounts.length == 1) { // Mint of the same token/token amounts to various receivers for (uint i = 0; i < to.length; i++) { _mint(to[i], tokenIds[0], amounts[0], new bytes(0)); } } else if (tokenIds.length == 1 && to.length == amounts.length) { // Mint of the same token with different amounts to different receivers for (uint i = 0; i < to.length; i++) { _mint(to[i], tokenIds[0], amounts[i], new bytes(0)); } } else if (to.length == tokenIds.length && to.length == amounts.length) { // Mint of different tokens and different amounts to different receivers for (uint i = 0; i < to.length; i++) { _mint(to[i], tokenIds[i], amounts[i], new bytes(0)); } } else { revert("Invalid input"); } } /** * @dev See {IERC1155CreatorCore-tokenExtension}. */ function tokenExtension(uint256 tokenId) public view virtual override returns (address) { return _tokenExtension(tokenId); } /** * @dev See {IERC1155CreatorCore-burn}. */ function burn(address account, uint256[] memory tokenIds, uint256[] memory amounts) public virtual override nonReentrant { require(account == msg.sender || isApprovedForAll(account, msg.sender), "Caller is not owner nor approved"); require(tokenIds.length == amounts.length, "Invalid input"); if (tokenIds.length == 1) { _burn(account, tokenIds[0], amounts[0]); } else { _burnBatch(account, tokenIds, amounts); } _postBurn(account, tokenIds, amounts); } /** * @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 { _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) { return _getRoyalties(tokenId); } /** * @dev {See ICreatorCore-getFees}. */ function getFees(uint256 tokenId) external view virtual override returns (address payable[] memory, uint256[] memory) { return _getRoyalties(tokenId); } /** * @dev {See ICreatorCore-getFeeRecipients}. */ function getFeeRecipients(uint256 tokenId) external view virtual override returns (address payable[] memory) { return _getRoyaltyReceivers(tokenId); } /** * @dev {See ICreatorCore-getFeeBps}. */ function getFeeBps(uint256 tokenId) external view virtual override returns (uint[] memory) { return _getRoyaltyBPS(tokenId); } /** * @dev {See ICreatorCore-royaltyInfo}. */ function royaltyInfo(uint256 tokenId, uint256 value) external view virtual override returns (address, uint256) { return _getRoyaltyInfo(tokenId, value); } /** * @dev See {IERC721Metadata-tokenURI}. */ function uri(uint256 tokenId) public view virtual override returns (string memory) { return _tokenURI(tokenId); } /** * @dev Total amount of tokens in with a given id. */ function totalSupply(uint256 tokenId) external view virtual override returns (uint256) { return _totalSupply[tokenId]; } /** * @dev See {ERC1155-_mint}. */ function _mint(address account, uint256 id, uint256 amount, bytes memory data) internal virtual override { super._mint(account, id, amount, data); _totalSupply[id] += amount; } /** * @dev See {ERC1155-_mintBatch}. */ function _mintBatch(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) internal virtual override { super._mintBatch(to, ids, amounts, data); for (uint256 i = 0; i < ids.length; ++i) { _totalSupply[ids[i]] += amounts[i]; } } /** * @dev See {ERC1155-_burn}. */ function _burn(address account, uint256 id, uint256 amount) internal virtual override { super._burn(account, id, amount); _totalSupply[id] -= amount; } /** * @dev See {ERC1155-_burnBatch}. */ function _burnBatch(address account, uint256[] memory ids, uint256[] memory amounts) internal virtual override { super._burnBatch(account, ids, amounts); for (uint256 i = 0; i < ids.length; ++i) { _totalSupply[ids[i]] -= amounts[i]; } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC1155Upgradeable.sol"; import "./IERC1155ReceiverUpgradeable.sol"; import "./extensions/IERC1155MetadataURIUpgradeable.sol"; import "../../utils/AddressUpgradeable.sol"; import "../../utils/ContextUpgradeable.sol"; import "../../utils/introspection/ERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.sol"; /** * @dev Implementation of the basic standard multi-token. * See https://eips.ethereum.org/EIPS/eip-1155 * Originally based on code by Enjin: https://github.com/enjin/erc-1155 * * _Available since v3.1._ */ contract ERC1155Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC1155Upgradeable, IERC1155MetadataURIUpgradeable { using AddressUpgradeable for address; // Mapping from token ID to account balances mapping(uint256 => mapping(address => uint256)) private _balances; // Mapping from account to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json string private _uri; /** * @dev See {_setURI}. */ function __ERC1155_init(string memory uri_) internal initializer { __Context_init_unchained(); __ERC165_init_unchained(); __ERC1155_init_unchained(uri_); } function __ERC1155_init_unchained(string memory uri_) internal initializer { _setURI(uri_); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) { return interfaceId == type(IERC1155Upgradeable).interfaceId || interfaceId == type(IERC1155MetadataURIUpgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256) public view virtual override returns (string memory) { return _uri; } /** * @dev See {IERC1155-balanceOf}. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) public view virtual override returns (uint256) { require(account != address(0), "ERC1155: balance query for the zero address"); return _balances[id][account]; } /** * @dev See {IERC1155-balanceOfBatch}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] memory accounts, uint256[] memory ids) public view virtual override returns (uint256[] memory) { require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch"); uint256[] memory batchBalances = new uint256[](accounts.length); for (uint256 i = 0; i < accounts.length; ++i) { batchBalances[i] = balanceOf(accounts[i], ids[i]); } return batchBalances; } /** * @dev See {IERC1155-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { require(_msgSender() != operator, "ERC1155: setting approval status for self"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC1155-isApprovedForAll}. */ function isApprovedForAll(address account, address operator) public view virtual override returns (bool) { return _operatorApprovals[account][operator]; } /** * @dev See {IERC1155-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: caller is not owner nor approved" ); _safeTransferFrom(from, to, id, amount, data); } /** * @dev See {IERC1155-safeBatchTransferFrom}. */ function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: transfer caller is not owner nor approved" ); _safeBatchTransferFrom(from, to, ids, amounts, data); } /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, to, _asSingletonArray(id), _asSingletonArray(amount), data); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; emit TransferSingle(operator, from, to, id, amount); _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, to, ids, amounts, data); for (uint256 i = 0; i < ids.length; ++i) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; } emit TransferBatch(operator, from, to, ids, amounts); _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data); } /** * @dev Sets a new URI for all token types, by relying on the token type ID * substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * By this mechanism, any occurrence of the `\{id\}` substring in either the * URI or any of the amounts in the JSON file at said URI will be replaced by * clients with the token type ID. * * For example, the `https://token-cdn-domain/\{id\}.json` URI would be * interpreted by clients as * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json` * for token type ID 0x4cce0. * * See {uri}. * * Because these URIs cannot be meaningfully represented by the {URI} event, * this function emits no events. */ function _setURI(string memory newuri) internal virtual { _uri = newuri; } /** * @dev Creates `amount` tokens of token type `id`, and assigns them to `account`. * * Emits a {TransferSingle} event. * * Requirements: * * - `account` cannot be the zero address. * - If `account` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mint( address account, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(account != address(0), "ERC1155: mint to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, address(0), account, _asSingletonArray(id), _asSingletonArray(amount), data); _balances[id][account] += amount; emit TransferSingle(operator, address(0), account, id, amount); _doSafeTransferAcceptanceCheck(operator, address(0), account, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _mintBatch( address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); for (uint256 i = 0; i < ids.length; i++) { _balances[ids[i]][to] += amounts[i]; } emit TransferBatch(operator, address(0), to, ids, amounts); _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data); } /** * @dev Destroys `amount` tokens of token type `id` from `account` * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens of token type `id`. */ function _burn( address account, uint256 id, uint256 amount ) internal virtual { require(account != address(0), "ERC1155: burn from the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, account, address(0), _asSingletonArray(id), _asSingletonArray(amount), ""); uint256 accountBalance = _balances[id][account]; require(accountBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][account] = accountBalance - amount; } emit TransferSingle(operator, account, address(0), id, amount); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}. * * Requirements: * * - `ids` and `amounts` must have the same length. */ function _burnBatch( address account, uint256[] memory ids, uint256[] memory amounts ) internal virtual { require(account != address(0), "ERC1155: burn from the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, account, address(0), ids, amounts, ""); for (uint256 i = 0; i < ids.length; i++) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 accountBalance = _balances[id][account]; require(accountBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][account] = accountBalance - amount; } } emit TransferBatch(operator, account, address(0), ids, amounts); } /** * @dev Hook that is called before any token transfer. This includes minting * and burning, as well as batched variants. * * The same hook is called on both single and batched variants. For single * transfers, the length of the `id` and `amount` arrays will be 1. * * Calling conditions (for each `id` and `amount` pair): * * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens * of token type `id` will be transferred to `to`. * - When `from` is zero, `amount` tokens of token type `id` will be minted * for `to`. * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` * will be burned. * - `from` and `to` are never both zero. * - `ids` and `amounts` have the same, non-zero length. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual {} function _doSafeTransferAcceptanceCheck( address operator, address from, address to, uint256 id, uint256 amount, bytes memory data ) private { if (to.isContract()) { try IERC1155ReceiverUpgradeable(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) { if (response != IERC1155ReceiverUpgradeable(to).onERC1155Received.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non ERC1155Receiver implementer"); } } } function _doSafeBatchTransferAcceptanceCheck( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) private { if (to.isContract()) { try IERC1155ReceiverUpgradeable(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns ( bytes4 response ) { if (response != IERC1155ReceiverUpgradeable(to).onERC1155BatchReceived.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non ERC1155Receiver implementer"); } } } function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) { uint256[] memory array = new uint256[](1); array[0] = element; return array; } uint256[47] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @author: manifold.xyz import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; import "@openzeppelin/contracts-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 (uint i = 0; i < _admins.length(); i++) { admins[i] = _admins.at(i); } return admins; } /** * @dev See {IAdminControl-approveAdmin}. */ function approveAdmin(address admin) external override onlyOwner { if (!_admins.contains(admin)) { emit AdminApproved(admin, msg.sender); _admins.add(admin); } } /** * @dev See {IAdminControl-revokeAdmin}. */ function revokeAdmin(address admin) external override onlyOwner { if (_admins.contains(admin)) { emit AdminRevoked(admin, msg.sender); _admins.remove(admin); } } /** * @dev See {IAdminControl-isAdmin}. */ function isAdmin(address admin) public override view returns (bool) { return (owner() == admin || _admins.contains(admin)); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @author: manifold.xyz import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import "../extensions/ERC1155/IERC1155CreatorExtensionApproveTransfer.sol"; import "../extensions/ERC1155/IERC1155CreatorExtensionBurnable.sol"; import "../permissions/ERC1155/IERC1155CreatorMintPermissions.sol"; import "./IERC1155CreatorCore.sol"; import "./CreatorCore.sol"; /** * @dev Core ERC1155 creator implementation */ abstract contract ERC1155CreatorCore is CreatorCore, IERC1155CreatorCore { using EnumerableSet for EnumerableSet.AddressSet; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(CreatorCore, IERC165) returns (bool) { return interfaceId == type(IERC1155CreatorCore).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {ICreatorCore-setApproveTransferExtension}. */ function setApproveTransferExtension(bool enabled) external override extensionRequired { require(!enabled || ERC165Checker.supportsInterface(msg.sender, type(IERC1155CreatorExtensionApproveTransfer).interfaceId), "Extension must implement IERC1155CreatorExtensionApproveTransfer"); 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), "Invalid extension"); require(permissions == address(0x0) || ERC165Checker.supportsInterface(permissions, type(IERC1155CreatorMintPermissions).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[] memory to, uint256[] memory tokenIds, uint256[] memory amounts) internal { if (_extensionPermissions[msg.sender] != address(0x0)) { IERC1155CreatorMintPermissions(_extensionPermissions[msg.sender]).approveMint(msg.sender, to, tokenIds, amounts); } } /** * Post burn actions */ function _postBurn(address owner, uint256[] memory tokenIds, uint256[] memory amounts) internal virtual { require(tokenIds.length > 0, "Invalid input"); address extension = _tokensExtension[tokenIds[0]]; for (uint i = 0; i < tokenIds.length; i++) { require(_tokensExtension[tokenIds[i]] == extension, "Mismatched token originators"); } // Callback to originating extension if needed if (extension != address(this)) { if (ERC165Checker.supportsInterface(extension, type(IERC1155CreatorExtensionBurnable).interfaceId)) { IERC1155CreatorExtensionBurnable(extension).onBurn(owner, tokenIds, amounts); } } } /** * Approve a transfer */ function _approveTransfer(address from, address to, uint256[] memory tokenIds, uint256[] memory amounts) internal { require(tokenIds.length > 0, "Invalid input"); address extension = _tokensExtension[tokenIds[0]]; for (uint i = 0; i < tokenIds.length; i++) { require(_tokensExtension[tokenIds[i]] == extension, "Mismatched token originators"); } if (_extensionApproveTransfers[extension]) { require(IERC1155CreatorExtensionApproveTransfer(extension).approveTransfer(from, to, tokenIds, amounts), "Extension approval failure"); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../../utils/introspection/IERC165Upgradeable.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */ interface IERC1155Upgradeable is IERC165Upgradeable { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes calldata data ) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../../utils/introspection/IERC165Upgradeable.sol"; /** * @dev _Available since v3.1._ */ interface IERC1155ReceiverUpgradeable is IERC165Upgradeable { /** @dev Handles the receipt of a single ERC1155 token type. This function is called at the end of a `safeTransferFrom` after the balance has been updated. To accept the transfer, this must return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` (i.e. 0xf23a6e61, or its own function selector). @param operator The address which initiated the transfer (i.e. msg.sender) @param from The address which previously owned the token @param id The ID of the token being transferred @param value The amount of tokens being transferred @param data Additional data with no specified format @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed */ function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external returns (bytes4); /** @dev Handles the receipt of a multiple ERC1155 token types. This function is called at the end of a `safeBatchTransferFrom` after the balances have been updated. To accept the transfer(s), this must return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` (i.e. 0xbc197c81, or its own function selector). @param operator The address which initiated the batch transfer (i.e. msg.sender) @param from The address which previously owned the token @param ids An array containing ids of each token being transferred (order and length must match values array) @param values An array containing amounts of each token being transferred (order and length must match ids array) @param data Additional data with no specified format @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed */ function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC1155Upgradeable.sol"; /** * @dev Interface of the optional ERC1155MetadataExtension interface, as defined * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP]. * * _Available since v3.1._ */ interface IERC1155MetadataURIUpgradeable is IERC1155Upgradeable { /** * @dev Returns the URI for token type `id`. * * If the `\{id\}` substring is present in the URI, it must be replaced by * clients with the actual token type ID. */ function uri(uint256 id) external view returns (string memory); }
// SPDX-License-Identifier: MIT 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); } function _verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) private pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; 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 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 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 a proxied contract can't have 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. */ 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 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; /** * @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]; } // 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); } // 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)))); } // 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)); } }
// SPDX-License-Identifier: MIT 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 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 { _setOwner(_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 { _setOwner(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"); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } uint256[49] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @author: manifold.xyz import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; /** * @dev Interface for admin control */ interface IAdminControl is IERC165 { event AdminApproved(address indexed account, address indexed sender); event AdminRevoked(address indexed account, address indexed sender); /** * @dev gets address of all admins */ function getAdmins() external view returns (address[] memory); /** * @dev add an admin. Can only be called by contract owner. */ function approveAdmin(address admin) external; /** * @dev remove an admin. Can only be called by contract owner. */ function revokeAdmin(address admin) external; /** * @dev checks whether or not given address is an admin * Returns True if they are */ function isAdmin(address admin) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @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 pragma solidity ^0.8.0; /// @author: manifold.xyz import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; /** * Implement this if you want your extension to approve a transfer */ interface IERC1155CreatorExtensionApproveTransfer is IERC165 { /** * @dev Set whether or not the creator contract 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[] calldata tokenIds, uint256[] calldata amounts) external returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @author: manifold.xyz import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; /** * @dev Your extension is required to implement this interface if it wishes * to receive the onBurn callback whenever a token the extension created is * burned */ interface IERC1155CreatorExtensionBurnable is IERC165 { /** * @dev callback handler for burn events */ function onBurn(address owner, uint256[] calldata tokenIds, uint256[] calldata amounts) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @author: manifold.xyz import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC1155Creator compliant extension contracts. */ interface IERC1155CreatorMintPermissions is IERC165 { /** * @dev get approval to mint */ function approveMint(address extension, address[] calldata to, uint256[] calldata tokenIds, uint256[] calldata amounts) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @author: manifold.xyz import "./CreatorCore.sol"; /** * @dev Core ERC1155 creator interface */ interface IERC1155CreatorCore is ICreatorCore { /** * @dev mint a token with no extension. Can only be called by an admin. * * @param to - Can be a single element array (all tokens go to same address) or multi-element array (single token to many recipients) * @param amounts - Can be a single element array (all recipients get the same amount) or a multi-element array * @param uris - If no elements, all tokens use the default uri. * If any element is an empty string, the corresponding token uses the default uri. * * * Requirements: If to is a multi-element array, then uris must be empty or single element array * If to is a multi-element array, then amounts must be a single element array or a multi-element array of the same size * If to is a single element array, uris must be empty or the same length as amounts * * Examples: * mintBaseNew(['0x....1', '0x....2'], [1], []) * Mints a single new token, and gives 1 each to '0x....1' and '0x....2'. Token uses default uri. * * mintBaseNew(['0x....1', '0x....2'], [1, 2], []) * Mints a single new token, and gives 1 to '0x....1' and 2 to '0x....2'. Token uses default uri. * * mintBaseNew(['0x....1'], [1, 2], ["", "http://token2.com"]) * Mints two new tokens to '0x....1'. 1 of the first token, 2 of the second. 1st token uses default uri, second uses "http://token2.com". * * @return Returns list of tokenIds minted */ function mintBaseNew(address[] calldata to, uint256[] calldata amounts, string[] calldata uris) external returns (uint256[] memory); /** * @dev batch mint existing token with no extension. Can only be called by an admin. * * @param to - Can be a single element array (all tokens go to same address) or multi-element array (single token to many recipients) * @param tokenIds - Can be a single element array (all recipients get the same token) or a multi-element array * @param amounts - Can be a single element array (all recipients get the same amount) or a multi-element array * * Requirements: If any of the parameters are multi-element arrays, they need to be the same length as other multi-element arrays * * Examples: * mintBaseExisting(['0x....1', '0x....2'], [1], [10]) * Mints 10 of tokenId 1 to each of '0x....1' and '0x....2'. * * mintBaseExisting(['0x....1', '0x....2'], [1, 2], [10, 20]) * Mints 10 of tokenId 1 to '0x....1' and 20 of tokenId 2 to '0x....2'. * * mintBaseExisting(['0x....1'], [1, 2], [10, 20]) * Mints 10 of tokenId 1 and 20 of tokenId 2 to '0x....1'. * * mintBaseExisting(['0x....1', '0x....2'], [1], [10, 20]) * Mints 10 of tokenId 1 to '0x....1' and 20 of tokenId 1 to '0x....2'. * */ function mintBaseExisting(address[] calldata to, uint256[] calldata tokenIds, uint256[] calldata amounts) external; /** * @dev mint a token from an extension. Can only be called by a registered extension. * * @param to - Can be a single element array (all tokens go to same address) or multi-element array (single token to many recipients) * @param amounts - Can be a single element array (all recipients get the same amount) or a multi-element array * @param uris - If no elements, all tokens use the default uri. * If any element is an empty string, the corresponding token uses the default uri. * * * Requirements: If to is a multi-element array, then uris must be empty or single element array * If to is a multi-element array, then amounts must be a single element array or a multi-element array of the same size * If to is a single element array, uris must be empty or the same length as amounts * * Examples: * mintExtensionNew(['0x....1', '0x....2'], [1], []) * Mints a single new token, and gives 1 each to '0x....1' and '0x....2'. Token uses default uri. * * mintExtensionNew(['0x....1', '0x....2'], [1, 2], []) * Mints a single new token, and gives 1 to '0x....1' and 2 to '0x....2'. Token uses default uri. * * mintExtensionNew(['0x....1'], [1, 2], ["", "http://token2.com"]) * Mints two new tokens to '0x....1'. 1 of the first token, 2 of the second. 1st token uses default uri, second uses "http://token2.com". * * @return Returns list of tokenIds minted */ function mintExtensionNew(address[] calldata to, uint256[] calldata amounts, string[] calldata uris) external returns (uint256[] memory); /** * @dev batch mint existing token from extension. Can only be called by a registered extension. * * @param to - Can be a single element array (all tokens go to same address) or multi-element array (single token to many recipients) * @param tokenIds - Can be a single element array (all recipients get the same token) or a multi-element array * @param amounts - Can be a single element array (all recipients get the same amount) or a multi-element array * * Requirements: If any of the parameters are multi-element arrays, they need to be the same length as other multi-element arrays * * Examples: * mintExtensionExisting(['0x....1', '0x....2'], [1], [10]) * Mints 10 of tokenId 1 to each of '0x....1' and '0x....2'. * * mintExtensionExisting(['0x....1', '0x....2'], [1, 2], [10, 20]) * Mints 10 of tokenId 1 to '0x....1' and 20 of tokenId 2 to '0x....2'. * * mintExtensionExisting(['0x....1'], [1, 2], [10, 20]) * Mints 10 of tokenId 1 and 20 of tokenId 2 to '0x....1'. * * mintExtensionExisting(['0x....1', '0x....2'], [1], [10, 20]) * Mints 10 of tokenId 1 to '0x....1' and 20 of tokenId 1 to '0x....2'. * */ function mintExtensionExisting(address[] calldata to, uint256[] calldata tokenIds, uint256[] calldata amounts) external; /** * @dev burn tokens. Can only be called by token owner or approved address. * On burn, calls back to the registered extension's onBurn method */ function burn(address account, uint256[] calldata tokenIds, uint256[] calldata amounts) external; /** * @dev Total amount of tokens in with a given tokenId. */ function totalSupply(uint256 tokenId) external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @author: manifold.xyz import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165Checker.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol"; import "../extensions/ICreatorExtensionTokenURI.sol"; import "./ICreatorCore.sol"; /** * @dev Core creator implementation */ abstract contract CreatorCore is ReentrancyGuard, ICreatorCore, ERC165 { using Strings for uint256; using EnumerableSet for EnumerableSet.AddressSet; using AddressUpgradeable for address; uint256 _tokenCount = 0; // Track registered extensions data EnumerableSet.AddressSet internal _extensions; EnumerableSet.AddressSet internal _blacklistedExtensions; mapping (address => address) internal _extensionPermissions; mapping (address => bool) internal _extensionApproveTransfers; // For tracking which extension a token was minted by mapping (uint256 => address) internal _tokensExtension; // The baseURI for a given extension mapping (address => string) private _extensionBaseURI; mapping (address => bool) private _extensionBaseURIIdentical; // The prefix for any tokens with a uri configured mapping (address => string) private _extensionURIPrefix; // Mapping for individual token URIs mapping (uint256 => string) internal _tokenURIs; // Royalty configurations mapping (address => address payable[]) internal _extensionRoyaltyReceivers; mapping (address => uint256[]) internal _extensionRoyaltyBPS; mapping (uint256 => address payable[]) internal _tokenRoyaltyReceivers; mapping (uint256 => uint256[]) internal _tokenRoyaltyBPS; /** * External interface identifiers for royalties */ /** * @dev CreatorCore * * bytes4(keccak256('getRoyalties(uint256)')) == 0xbb3bafd6 * * => 0xbb3bafd6 = 0xbb3bafd6 */ bytes4 private constant _INTERFACE_ID_ROYALTIES_CREATORCORE = 0xbb3bafd6; /** * @dev Rarible: RoyaltiesV1 * * bytes4(keccak256('getFeeRecipients(uint256)')) == 0xb9c4d9fb * bytes4(keccak256('getFeeBps(uint256)')) == 0x0ebd4c7f * * => 0xb9c4d9fb ^ 0x0ebd4c7f = 0xb7799584 */ bytes4 private constant _INTERFACE_ID_ROYALTIES_RARIBLE = 0xb7799584; /** * @dev Foundation * * bytes4(keccak256('getFees(uint256)')) == 0xd5a06d4c * * => 0xd5a06d4c = 0xd5a06d4c */ bytes4 private constant _INTERFACE_ID_ROYALTIES_FOUNDATION = 0xd5a06d4c; /** * @dev EIP-2981 * * bytes4(keccak256("royaltyInfo(uint256,uint256)")) == 0x2a55205a * * => 0x2a55205a = 0x2a55205a */ bytes4 private constant _INTERFACE_ID_ROYALTIES_EIP2981 = 0x2a55205a; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(ICreatorCore).interfaceId || super.supportsInterface(interfaceId) || interfaceId == _INTERFACE_ID_ROYALTIES_CREATORCORE || interfaceId == _INTERFACE_ID_ROYALTIES_RARIBLE || interfaceId == _INTERFACE_ID_ROYALTIES_FOUNDATION || interfaceId == _INTERFACE_ID_ROYALTIES_EIP2981; } /** * @dev Only allows registered extensions to call the specified function */ modifier extensionRequired() { require(_extensions.contains(msg.sender), "Must be registered extension"); _; } /** * @dev Only allows non-blacklisted extensions */ modifier nonBlacklistRequired(address extension) { require(!_blacklistedExtensions.contains(extension), "Extension blacklisted"); _; } /** * @dev See {ICreatorCore-getExtensions}. */ function getExtensions() external view override returns (address[] memory extensions) { extensions = new address[](_extensions.length()); for (uint i = 0; i < _extensions.length(); i++) { extensions[i] = _extensions.at(i); } return extensions; } /** * @dev Register an extension */ function _registerExtension(address extension, string calldata baseURI, bool baseURIIdentical) internal { require(extension != address(this), "Creator: Invalid"); require(extension.isContract(), "Creator: Extension must be a contract"); if (!_extensions.contains(extension)) { _extensionBaseURI[extension] = baseURI; _extensionBaseURIIdentical[extension] = baseURIIdentical; emit ExtensionRegistered(extension, msg.sender); _extensions.add(extension); } } /** * @dev Unregister an extension */ function _unregisterExtension(address extension) internal { if (_extensions.contains(extension)) { emit ExtensionUnregistered(extension, msg.sender); _extensions.remove(extension); } } /** * @dev Blacklist an extension */ function _blacklistExtension(address extension) internal { require(extension != address(this), "Cannot blacklist yourself"); if (_extensions.contains(extension)) { emit ExtensionUnregistered(extension, msg.sender); _extensions.remove(extension); } if (!_blacklistedExtensions.contains(extension)) { emit ExtensionBlacklisted(extension, msg.sender); _blacklistedExtensions.add(extension); } } /** * @dev Set base token uri for an extension */ function _setBaseTokenURIExtension(string calldata uri, bool identical) internal { _extensionBaseURI[msg.sender] = uri; _extensionBaseURIIdentical[msg.sender] = identical; } /** * @dev Set token uri prefix for an extension */ function _setTokenURIPrefixExtension(string calldata prefix) internal { _extensionURIPrefix[msg.sender] = prefix; } /** * @dev Set token uri for a token of an extension */ function _setTokenURIExtension(uint256 tokenId, string calldata uri) internal { require(_tokensExtension[tokenId] == msg.sender, "Invalid token"); _tokenURIs[tokenId] = uri; } /** * @dev Set base token uri for tokens with no extension */ function _setBaseTokenURI(string memory uri) internal { _extensionBaseURI[address(this)] = uri; } /** * @dev Set token uri prefix for tokens with no extension */ function _setTokenURIPrefix(string calldata prefix) internal { _extensionURIPrefix[address(this)] = prefix; } /** * @dev Set token uri for a token with no extension */ function _setTokenURI(uint256 tokenId, string calldata uri) internal { require(_tokensExtension[tokenId] == address(this), "Invalid token"); _tokenURIs[tokenId] = uri; } /** * @dev Retrieve a token's URI */ function _tokenURI(uint256 tokenId) internal view returns (string memory) { address extension = _tokensExtension[tokenId]; require(!_blacklistedExtensions.contains(extension), "Extension blacklisted"); if (bytes(_tokenURIs[tokenId]).length != 0) { if (bytes(_extensionURIPrefix[extension]).length != 0) { return string(abi.encodePacked(_extensionURIPrefix[extension],_tokenURIs[tokenId])); } return _tokenURIs[tokenId]; } if (ERC165Checker.supportsInterface(extension, type(ICreatorExtensionTokenURI).interfaceId)) { return ICreatorExtensionTokenURI(extension).tokenURI(address(this), tokenId); } if (!_extensionBaseURIIdentical[extension]) { return string(abi.encodePacked(_extensionBaseURI[extension], tokenId.toString())); } else { return _extensionBaseURI[extension]; } } /** * Get token extension */ function _tokenExtension(uint256 tokenId) internal view returns (address extension) { extension = _tokensExtension[tokenId]; require(extension != address(this), "No extension for token"); require(!_blacklistedExtensions.contains(extension), "Extension blacklisted"); return extension; } /** * Helper to get royalties for a token */ function _getRoyalties(uint256 tokenId) view internal returns (address payable[] storage, uint256[] storage) { return (_getRoyaltyReceivers(tokenId), _getRoyaltyBPS(tokenId)); } /** * Helper to get royalty receivers for a token */ function _getRoyaltyReceivers(uint256 tokenId) view internal returns (address payable[] storage) { if (_tokenRoyaltyReceivers[tokenId].length > 0) { return _tokenRoyaltyReceivers[tokenId]; } else if (_extensionRoyaltyReceivers[_tokensExtension[tokenId]].length > 0) { return _extensionRoyaltyReceivers[_tokensExtension[tokenId]]; } return _extensionRoyaltyReceivers[address(this)]; } /** * Helper to get royalty basis points for a token */ function _getRoyaltyBPS(uint256 tokenId) view internal returns (uint256[] storage) { if (_tokenRoyaltyBPS[tokenId].length > 0) { return _tokenRoyaltyBPS[tokenId]; } else if (_extensionRoyaltyBPS[_tokensExtension[tokenId]].length > 0) { return _extensionRoyaltyBPS[_tokensExtension[tokenId]]; } return _extensionRoyaltyBPS[address(this)]; } function _getRoyaltyInfo(uint256 tokenId, uint256 value) view internal returns (address receiver, uint256 amount){ address payable[] storage receivers = _getRoyaltyReceivers(tokenId); require(receivers.length <= 1, "More than 1 royalty receiver"); if (receivers.length == 0) { return (address(this), 0); } return (receivers[0], _getRoyaltyBPS(tokenId)[0]*value/10000); } /** * Set royalties for a token */ function _setRoyalties(uint256 tokenId, address payable[] calldata receivers, uint256[] calldata basisPoints) internal { require(receivers.length == basisPoints.length, "Invalid input"); uint256 totalBasisPoints; for (uint i = 0; i < basisPoints.length; i++) { totalBasisPoints += basisPoints[i]; } require(totalBasisPoints < 10000, "Invalid total royalties"); _tokenRoyaltyReceivers[tokenId] = receivers; _tokenRoyaltyBPS[tokenId] = basisPoints; emit RoyaltiesUpdated(tokenId, receivers, basisPoints); } /** * Set royalties for all tokens of an extension */ function _setRoyaltiesExtension(address extension, address payable[] calldata receivers, uint256[] calldata basisPoints) internal { require(receivers.length == basisPoints.length, "Invalid input"); uint256 totalBasisPoints; for (uint i = 0; i < basisPoints.length; i++) { totalBasisPoints += basisPoints[i]; } require(totalBasisPoints < 10000, "Invalid total royalties"); _extensionRoyaltyReceivers[extension] = receivers; _extensionRoyaltyBPS[extension] = basisPoints; if (extension == address(this)) { emit DefaultRoyaltiesUpdated(receivers, basisPoints); } else { emit ExtensionRoyaltiesUpdated(extension, receivers, basisPoints); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and 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; } }
// SPDX-License-Identifier: MIT 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; 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(account).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 pragma solidity ^0.8.0; /// @author: manifold.xyz import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; /** * @dev Implement this if you want your extension to have overloadable URI's */ interface ICreatorExtensionTokenURI is IERC165 { /** * Get the uri for a given creator/tokenId */ function tokenURI(address creator, uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @author: manifold.xyz import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; /** * @dev Core creator interface */ interface ICreatorCore is IERC165 { event ExtensionRegistered(address indexed extension, address indexed sender); event ExtensionUnregistered(address indexed extension, address indexed sender); event ExtensionBlacklisted(address indexed extension, address indexed sender); event MintPermissionsUpdated(address indexed extension, address indexed permissions, address indexed sender); event RoyaltiesUpdated(uint256 indexed tokenId, address payable[] receivers, uint256[] basisPoints); event DefaultRoyaltiesUpdated(address payable[] receivers, uint256[] basisPoints); event ExtensionRoyaltiesUpdated(address indexed extension, address payable[] receivers, uint256[] basisPoints); event ExtensionApproveTransferUpdated(address indexed extension, bool enabled); /** * @dev gets address of all extensions */ function getExtensions() external view returns (address[] memory); /** * @dev add an extension. Can only be called by contract owner or admin. * extension address must point to a contract implementing ICreatorExtension. * Returns True if newly added, False if already added. */ function registerExtension(address extension, string calldata baseURI) external; /** * @dev add an extension. Can only be called by contract owner or admin. * extension address must point to a contract implementing ICreatorExtension. * Returns True if newly added, False if already added. */ function registerExtension(address extension, string calldata baseURI, bool baseURIIdentical) external; /** * @dev add an extension. Can only be called by contract owner or admin. * Returns True if removed, False if already removed. */ function unregisterExtension(address extension) external; /** * @dev blacklist an extension. Can only be called by contract owner or admin. * This function will destroy all ability to reference the metadata of any tokens created * by the specified extension. It will also unregister the extension if needed. * Returns True if removed, False if already removed. */ function blacklistExtension(address extension) external; /** * @dev set the baseTokenURI of an extension. Can only be called by extension. */ function setBaseTokenURIExtension(string calldata uri) external; /** * @dev set the baseTokenURI of an extension. Can only be called by extension. * For tokens with no uri configured, tokenURI will return "uri+tokenId" */ function setBaseTokenURIExtension(string calldata uri, bool identical) external; /** * @dev set the common prefix of an extension. Can only be called by extension. * If configured, and a token has a uri set, tokenURI will return "prefixURI+tokenURI" * Useful if you want to use ipfs/arweave */ function setTokenURIPrefixExtension(string calldata prefix) external; /** * @dev set the tokenURI of a token extension. Can only be called by extension that minted token. */ function setTokenURIExtension(uint256 tokenId, string calldata uri) external; /** * @dev set the tokenURI of a token extension for multiple tokens. Can only be called by extension that minted token. */ function setTokenURIExtension(uint256[] memory tokenId, string[] calldata uri) external; /** * @dev set the baseTokenURI for tokens with no extension. Can only be called by owner/admin. * For tokens with no uri configured, tokenURI will return "uri+tokenId" */ function setBaseTokenURI(string calldata uri) external; /** * @dev set the common prefix for tokens with no extension. Can only be called by owner/admin. * If configured, and a token has a uri set, tokenURI will return "prefixURI+tokenURI" * Useful if you want to use ipfs/arweave */ function setTokenURIPrefix(string calldata prefix) external; /** * @dev set the tokenURI of a token with no extension. Can only be called by owner/admin. */ function setTokenURI(uint256 tokenId, string calldata uri) external; /** * @dev set the tokenURI of multiple tokens with no extension. Can only be called by owner/admin. */ function setTokenURI(uint256[] memory tokenIds, string[] calldata uris) external; /** * @dev set a permissions contract for an extension. Used to control minting. */ function setMintPermissions(address extension, address permissions) external; /** * @dev Configure so transfers of tokens created by the caller (must be extension) gets approval * from the extension before transferring */ function setApproveTransferExtension(bool enabled) external; /** * @dev get the extension of a given token */ function tokenExtension(uint256 tokenId) external view returns (address); /** * @dev Set default royalties */ function setRoyalties(address payable[] calldata receivers, uint256[] calldata basisPoints) external; /** * @dev Set royalties of a token */ function setRoyalties(uint256 tokenId, address payable[] calldata receivers, uint256[] calldata basisPoints) external; /** * @dev Set royalties of an extension */ function setRoyaltiesExtension(address extension, address payable[] calldata receivers, uint256[] calldata basisPoints) external; /** * @dev Get royalites of a token. Returns list of receivers and basisPoints */ function getRoyalties(uint256 tokenId) external view returns (address payable[] memory, uint256[] memory); // Royalty support for various other standards function getFeeRecipients(uint256 tokenId) external view returns (address payable[] memory); function getFeeBps(uint256 tokenId) external view returns (uint[] memory); function getFees(uint256 tokenId) external view returns (address payable[] memory, uint256[] memory); function royaltyInfo(uint256 tokenId, uint256 value) external view returns (address, uint256); }
{ "optimizer": { "enabled": true, "runs": 250 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
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":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address payable[]","name":"receivers","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"basisPoints","type":"uint256[]"}],"name":"DefaultRoyaltiesUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"extension","type":"address"},{"indexed":false,"internalType":"bool","name":"enabled","type":"bool"}],"name":"ExtensionApproveTransferUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"extension","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"ExtensionBlacklisted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"extension","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"ExtensionRegistered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"extension","type":"address"},{"indexed":false,"internalType":"address payable[]","name":"receivers","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"basisPoints","type":"uint256[]"}],"name":"ExtensionRoyaltiesUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"extension","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"ExtensionUnregistered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"extension","type":"address"},{"indexed":true,"internalType":"address","name":"permissions","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"MintPermissionsUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"address payable[]","name":"receivers","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"basisPoints","type":"uint256[]"}],"name":"RoyaltiesUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"approveAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","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":"address","name":"account","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getAdmins","outputs":[{"internalType":"address[]","name":"admins","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":[],"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":"account","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[]"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"mintBaseExisting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"to","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"string[]","name":"uris","type":"string[]"}],"name":"mintBaseNew","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"to","type":"address[]"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"mintExtensionExisting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"to","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"string[]","name":"uris","type":"string[]"}],"name":"mintExtensionNew","outputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","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":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","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":[{"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":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":"tokenId","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
6080604052600060cc5534801561001557600080fd5b506001606555615fb6806200002b6000396000f3fe608060405234801561001057600080fd5b50600436106102945760003560e01c80636d73e66911610167578063b9c4d9fb116100ce578063e92a89f611610087578063e92a89f614610601578063e985e9c514610614578063f0cdc49914610650578063f242432a14610663578063f2fde38b14610676578063feeb5a9a1461068957600080fd5b8063b9c4d9fb14610587578063bb3bafd61461059a578063bd85b039146105bb578063ce8aee9d146105db578063d5a06d4c1461059a578063e6c884dc146105ee57600080fd5b80638da5cb5b116101205780638da5cb5b1461051757806399e0dd7c14610528578063a22cb4651461053b578063aafb2d441461054e578063ac0c8cfa14610561578063b0fe87c91461057457600080fd5b80636d73e669146104c6578063715018a6146104d95780638129fc1c146104e157806382dcc0c8146104e957806383b7db63146104fc5780638c6e84721461050457600080fd5b80632eb2c2d61161020b5780633e6134b8116101c45780633e6134b8146104545780633f0f37f6146104675780634e1273f41461047a57806361e5bc6b1461048d57806366d1e9d0146104a0578063695c96e6146104b357600080fd5b80632eb2c2d6146103e057806330176e13146103f35780633071a0f91461040657806331ae450b14610419578063332dd1ae1461042e5780633db0f8ab1461044157600080fd5b8063162094c41161025d578063162094c41461033757806320e4afe21461034a578063239be3171461035d57806324d7806c146103885780632a55205a1461039b5780632d345670146103cd57600080fd5b8062fdd58e1461029957806301ffc9a7146102bf57806302e7afb7146102e25780630e89341c146102f75780630ebd4c7f14610317575b600080fd5b6102ac6102a7366004614bc1565b61069c565b6040519081526020015b60405180910390f35b6102d26102cd366004614c03565b610738565b60405190151581526020016102b6565b6102f56102f0366004614c20565b610761565b005b61030a610305366004614c3d565b6107b7565b6040516102b69190614cae565b61032a610325366004614c3d565b6107c2565b6040516102b69190614cfc565b6102f5610345366004614d50565b610823565b6102f5610358366004614ddf565b61087d565b61037061036b366004614c3d565b6108db565b6040516001600160a01b0390911681526020016102b6565b6102d2610396366004614c20565b6108e6565b6103ae6103a9366004614e58565b61091f565b604080516001600160a01b0390931683526020830191909152016102b6565b6102f56103db366004614c20565b610938565b6102f56103ee366004614fdd565b6109e7565b6102f561040136600461508a565b610a77565b6102f56104143660046150cb565b610b00565b610421610b86565b6040516102b6919061513f565b6102f561043c366004615152565b610c34565b6102f561044f3660046151bd565b610c8b565b6102f561046236600461508a565b610dc8565b6102f5610475366004615240565b610dfb565b61032a6104883660046152a7565b610e7a565b6102f561049b366004615373565b610fa3565b6102f56104ae36600461508a565b61104e565b6102f56104c13660046153ce565b61107f565b6102f56104d4366004614c20565b61124e565b6102f56112f8565b6102f561135e565b6102f56104f7366004615467565b6113e9565b61042161141b565b61032a6105123660046153ce565b6114c5565b6033546001600160a01b0316610370565b6102f561053636600461508a565b6115a0565b6102f56105493660046154bd565b6115f4565b6102f561055c366004615373565b6116cb565b6102f561056f3660046154f6565b611799565b6102f5610582366004615513565b6118bf565b610421610595366004614c3d565b611916565b6105ad6105a8366004614c3d565b611980565b6040516102b6929190615552565b6102ac6105c9366004614c3d565b600090815260dc602052604090205490565b6102f56105e9366004614c20565b611a3f565b6102f56105fc3660046153ce565b611a92565b6102f561060f366004614d50565b611c37565b6102d2610622366004615580565b6001600160a01b039182166000908152609b6020908152604080832093909416825291909152205460ff1690565b6102f561065e366004615580565b611c69565b6102f56106713660046155ae565b611cbd565b6102f5610684366004614c20565b611d44565b61032a6106973660046153ce565b611e0c565b60006001600160a01b03831661070d5760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b506000818152609a602090815260408083206001600160a01b03861684529091529020545b92915050565b600061074382611ef5565b80610752575061075282611f1a565b80610732575061073282611f6a565b336107746033546001600160a01b031690565b6001600160a01b0316148061078f575061078f606633611f9f565b6107ab5760405162461bcd60e51b815260040161070490615616565b6107b481611fc4565b50565b6060610732826120c0565b60606107cd82612349565b80548060200260200160405190810160405280929190818152602001828054801561081757602002820191906000526020600020905b815481526020019060010190808311610803575b50505050509050919050565b336108366033546001600160a01b031690565b6001600160a01b031614806108515750610851606633611f9f565b61086d5760405162461bcd60e51b815260040161070490615616565b6108788383836123d5565b505050565b336108906033546001600160a01b031690565b6001600160a01b031614806108ab57506108ab606633611f9f565b6108c75760405162461bcd60e51b815260040161070490615616565b6108d48585858585612444565b5050505050565b60006107328261256d565b6000816001600160a01b03166109046033546001600160a01b031690565b6001600160a01b031614806107325750610732606683611f9f565b60008061092c8484612602565b915091505b9250929050565b6033546001600160a01b031633146109925760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610704565b61099d606682611f9f565b156107b45760405133906001600160a01b038316907f7c0c3c84c67c85fcac635147348bfe374c24a1a93d0366d1cfe9d8853cbf89d590600090a36109e36066826126ea565b5050565b6001600160a01b038516331480610a035750610a038533610622565b610a6a5760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b6064820152608401610704565b6108d485858585856126ff565b33610a8a6033546001600160a01b031690565b6001600160a01b03161480610aa55750610aa5606633611f9f565b610ac15760405162461bcd60e51b815260040161070490615616565b6109e382828080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506128ac92505050565b33610b136033546001600160a01b031690565b6001600160a01b03161480610b2e5750610b2e606633611f9f565b610b4a5760405162461bcd60e51b815260040161070490615616565b82610b5660cf82611f9f565b15610b735760405162461bcd60e51b81526004016107049061565a565b610b8084848460006128cc565b50505050565b6060610b926066612a07565b6001600160401b03811115610ba957610ba9614e7a565b604051908082528060200260200182016040528015610bd2578160200160208202803683370190505b50905060005b610be26066612a07565b811015610c3057610bf4606682612a11565b828281518110610c0657610c06615689565b6001600160a01b039092166020928302919091019091015280610c28816156b5565b915050610bd8565b5090565b33610c476033546001600160a01b031690565b6001600160a01b03161480610c625750610c62606633611f9f565b610c7e5760405162461bcd60e51b815260040161070490615616565b610b803085858585612a1d565b60026065541415610cae5760405162461bcd60e51b8152600401610704906156d0565b60026065556001600160a01b038316331480610ced57506001600160a01b0383166000908152609b6020908152604080832033845290915290205460ff165b610d395760405162461bcd60e51b815260206004820181905260248201527f43616c6c6572206973206e6f74206f776e6572206e6f7220617070726f7665646044820152606401610704565b8051825114610d5a5760405162461bcd60e51b815260040161070490615707565b815160011415610da857610da38383600081518110610d7b57610d7b615689565b602002602001015183600081518110610d9657610d96615689565b6020026020010151612ba6565b610db3565b610db3838383612bd9565b610dbe838383612c5b565b5050600160655550565b610dd360cd33611f9f565b610def5760405162461bcd60e51b81526004016107049061572e565b6109e382826000612dff565b33610e0e6033546001600160a01b031690565b6001600160a01b03161480610e295750610e29606633611f9f565b610e455760405162461bcd60e51b815260040161070490615616565b83610e5160cf82611f9f565b15610e6e5760405162461bcd60e51b81526004016107049061565a565b6108d4858585856128cc565b60608151835114610edf5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610704565b600083516001600160401b03811115610efa57610efa614e7a565b604051908082528060200260200182016040528015610f23578160200160208202803683370190505b50905060005b8451811015610f9b57610f6e858281518110610f4757610f47615689565b6020026020010151858381518110610f6157610f61615689565b602002602001015161069c565b828281518110610f8057610f80615689565b6020908102919091010152610f94816156b5565b9050610f29565b509392505050565b610fae60cd33611f9f565b610fca5760405162461bcd60e51b81526004016107049061572e565b82518114610fea5760405162461bcd60e51b815260040161070490615707565b60005b8351811015610b805761103c84828151811061100b5761100b615689565b602002602001015184848481811061102557611025615689565b90506020028101906110379190615765565b612e3c565b80611046816156b5565b915050610fed565b61105960cd33611f9f565b6110755760405162461bcd60e51b81526004016107049061572e565b6109e38282612e92565b600260655414156110a25760405162461bcd60e51b8152600401610704906156d0565b6002606555336110ba6033546001600160a01b031690565b6001600160a01b031614806110d557506110d5606633611f9f565b6110f15760405162461bcd60e51b815260040161070490615616565b60005b838110156111a1573060d3600087878581811061111357611113615689565b60209081029290920135835250810191909152604001600020546001600160a01b03161461118f5760405162461bcd60e51b815260206004820152602360248201527f4120746f6b656e20776173206372656174656420627920616e20657874656e7360448201526234b7b760e91b6064820152608401610704565b80611199816156b5565b9150506110f4565b506112413087878080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808b0282810182019093528a82529093508a92508991829185019084908082843760009201919091525050604080516020808a02828101820190935289825290935089925088918291850190849080828437600092019190915250612eac92505050565b5050600160655550505050565b6033546001600160a01b031633146112a85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610704565b6112b3606682611f9f565b6107b45760405133906001600160a01b038316907f7e1a1a08d52e4ba0e21554733d66165fd5151f99460116223d9e3a608eec5cb190600090a36109e360668261318e565b6033546001600160a01b031633146113525760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610704565b61135c60006131a3565b565b600054610100900460ff1680611377575060005460ff16155b6113935760405162461bcd60e51b8152600401610704906157ab565b600054610100900460ff161580156113b5576000805461ffff19166101011790555b6113cd604051806020016040528060008152506131f5565b6113d561327a565b80156107b4576000805461ff001916905550565b6113f460cd33611f9f565b6114105760405162461bcd60e51b81526004016107049061572e565b610878838383612dff565b606061142760cd612a07565b6001600160401b0381111561143e5761143e614e7a565b604051908082528060200260200182016040528015611467578160200160208202803683370190505b50905060005b61147760cd612a07565b811015610c305761148960cd82612a11565b82828151811061149b5761149b615689565b6001600160a01b0390921660209283029190910190910152806114bd816156b5565b91505061146d565b6060600260655414156114ea5760405162461bcd60e51b8152600401610704906156d0565b60026065556114fa60cd33611f9f565b6115165760405162461bcd60e51b81526004016107049061572e565b6115903388888080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808c0282810182019093528b82529093508b92508a91829185019084908082843760009201919091525061158b92508891508990506157f9565b6132e1565b6001606555979650505050505050565b336115b36033546001600160a01b031690565b6001600160a01b031614806115ce57506115ce606633611f9f565b6115ea5760405162461bcd60e51b815260040161070490615616565b6109e38282613698565b336001600160a01b038316141561165f5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610704565b336000818152609b602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b336116de6033546001600160a01b031690565b6001600160a01b031614806116f957506116f9606633611f9f565b6117155760405162461bcd60e51b815260040161070490615616565b825181146117355760405162461bcd60e51b815260040161070490615707565b60005b8351811015610b805761178784828151811061175657611756615689565b602002602001015184848481811061177057611770615689565b90506020028101906117829190615765565b6123d5565b80611791816156b5565b915050611738565b6117a460cd33611f9f565b6117c05760405162461bcd60e51b81526004016107049061572e565b8015806117d957506117d9336324ea02c560e21b6136b2565b61184d576040805162461bcd60e51b81526020600482015260248101919091527f457874656e73696f6e206d75737420696d706c656d656e74204945524331313560448201527f3543726561746f72457874656e73696f6e417070726f76655472616e736665726064820152608401610704565b33600090815260d2602052604090205460ff161515811515146107b45733600081815260d26020908152604091829020805460ff191685151590811790915591519182527f072a7592283e2c2d1d56d21517ff6013325e0f55483f4828373ff4d98b0a1a36910160405180910390a250565b336118d26033546001600160a01b031690565b6001600160a01b031614806118ed57506118ed606633611f9f565b6119095760405162461bcd60e51b815260040161070490615616565b6108d48585858585612a1d565b6060611921826136ce565b80548060200260200160405190810160405280929190818152602001828054801561081757602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116119575750505050509050919050565b60608061198c8361375a565b8154604080516020808402820181019092528281529184918301828280156119dd57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116119bf575b5050505050915080805480602002602001604051908101604052809291908181526020018280548015611a2f57602002820191906000526020600020905b815481526020019060010190808311611a1b575b5050505050905091509150915091565b33611a526033546001600160a01b031690565b6001600160a01b03161480611a6d5750611a6d606633611f9f565b611a895760405162461bcd60e51b815260040161070490615616565b6107b481613778565b60026065541415611ab55760405162461bcd60e51b8152600401610704906156d0565b6002606555611ac560cd33611f9f565b611ae15760405162461bcd60e51b81526004016107049061572e565b60005b83811015611b97573360d36000878785818110611b0357611b03615689565b60209081029290920135835250810191909152604001600020546001600160a01b031614611b855760405162461bcd60e51b815260206004820152602960248201527f4120746f6b656e20776173206e6f74206372656174656420627920746869732060448201526832bc3a32b739b4b7b760b91b6064820152608401610704565b80611b8f816156b5565b915050611ae4565b506112413387878080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808b0282810182019093528a82529093508a92508991829185019084908082843760009201919091525050604080516020808a02828101820190935289825290935089925088918291850190849080828437600092019190915250612eac92505050565b611c4260cd33611f9f565b611c5e5760405162461bcd60e51b81526004016107049061572e565b610878838383612e3c565b33611c7c6033546001600160a01b031690565b6001600160a01b03161480611c975750611c97606633611f9f565b611cb35760405162461bcd60e51b815260040161070490615616565b6109e382826137c9565b6001600160a01b038516331480611cd95750611cd98533610622565b611d375760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b6064820152608401610704565b6108d485858585856138f2565b6033546001600160a01b03163314611d9e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610704565b6001600160a01b038116611e035760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610704565b6107b4816131a3565b606060026065541415611e315760405162461bcd60e51b8152600401610704906156d0565b600260655533611e496033546001600160a01b031690565b6001600160a01b03161480611e645750611e64606633611f9f565b611e805760405162461bcd60e51b815260040161070490615616565b6115903088888080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808c0282810182019093528b82529093508b92508a91829185019084908082843760009201919091525061158b92508891508990506157f9565b60006001600160e01b031982166301f4921160e61b1480610732575061073282613a22565b60006001600160e01b03198216636cdb3d1360e11b1480611f4b57506001600160e01b031982166303a24d0760e21b145b8061073257506301ffc9a760e01b6001600160e01b0319831614610732565b60006001600160e01b03198216632a9f3abf60e11b148061073257506301ffc9a760e01b6001600160e01b0319831614610732565b6001600160a01b038116600090815260018301602052604081205415155b9392505050565b6001600160a01b03811630141561201d5760405162461bcd60e51b815260206004820152601960248201527f43616e6e6f7420626c61636b6c69737420796f757273656c66000000000000006044820152606401610704565b61202860cd82611f9f565b156120705760405133906001600160a01b038316907fd19cf84cf0fec6bec9ddfa29c63adf83a55707c712f32c8285d6180a7890147990600090a361206e60cd826126ea565b505b61207b60cf82611f9f565b6107b45760405133906001600160a01b038316907f05ac7bc5a606cd92a63365f9fda244499b9add0526b22d99937b6bd88181059c90600090a36109e360cf8261318e565b600081815260d360205260409020546060906001600160a01b03166120e660cf82611f9f565b156121035760405162461bcd60e51b81526004016107049061565a565b600083815260d760205260409020805461211c9061588a565b159050612236576001600160a01b038116600090815260d66020526040902080546121469061588a565b159050612197576001600160a01b038116600090815260d66020908152604080832086845260d78352928190209051612180939201615959565b604051602081830303815290604052915050919050565b600083815260d76020526040902080546121b09061588a565b80601f01602080910402602001604051908101604052809291908181526020018280546121dc9061588a565b80156122295780601f106121fe57610100808354040283529160200191612229565b820191906000526020600020905b81548152906001019060200180831161220c57829003601f168201915b5050505050915050919050565b6122478163e9dc637560e01b6136b2565b156122ce5760405163e9dc637560e01b8152306004820152602481018490526001600160a01b0382169063e9dc63759060440160006040518083038186803b15801561229257600080fd5b505afa1580156122a6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611fbd919081019061596e565b6001600160a01b038116600090815260d5602052604090205460ff16612320576001600160a01b038116600090815260d46020526040902061230f84613ab8565b6040516020016121809291906159e5565b6001600160a01b038116600090815260d46020526040902080546121b09061588a565b50919050565b600081815260db60205260408120541561236f5750600090815260db6020526040902090565b600082815260d360209081526040808320546001600160a01b0316835260d9909152902054156123c15750600090815260d360209081526040808320546001600160a01b0316835260d9909152902090565b505030600090815260d96020526040902090565b600083815260d360205260409020546001600160a01b0316301461242b5760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b2103a37b5b2b760991b6044820152606401610704565b600083815260d760205260409020610b80908383614a16565b8281146124635760405162461bcd60e51b815260040161070490615707565b6000805b828110156124a75783838281811061248157612481615689565b90506020020135826124939190615a0a565b91508061249f816156b5565b915050612467565b5061271081106124f35760405162461bcd60e51b8152602060048201526017602482015276496e76616c696420746f74616c20726f79616c7469657360481b6044820152606401610704565b600086815260da6020526040902061250c908686614a96565b50600086815260db60205260409020612526908484614ae9565b50857fabb46fe0761d77584bde75697647804ffd8113abd4d8d06bc664150395eccdee8686868660405161255d9493929190615a22565b60405180910390a2505050505050565b600081815260d360205260409020546001600160a01b0316308114156125d55760405162461bcd60e51b815260206004820152601660248201527f4e6f20657874656e73696f6e20666f7220746f6b656e000000000000000000006044820152606401610704565b6125e060cf82611f9f565b156125fd5760405162461bcd60e51b81526004016107049061565a565b919050565b6000806000612610856136ce565b8054909150600110156126655760405162461bcd60e51b815260206004820152601c60248201527f4d6f7265207468616e203120726f79616c7479207265636569766572000000006044820152606401610704565b8054612678573060009250925050610931565b8060008154811061268b5761268b615689565b6000918252602090912001546001600160a01b0316612710856126ad88612349565b6000815481106126bf576126bf615689565b90600052602060002001546126d49190615aa6565b6126de9190615adb565b92509250509250929050565b6000611fbd836001600160a01b038416613bbd565b81518351146127205760405162461bcd60e51b815260040161070490615aef565b6001600160a01b0384166127465760405162461bcd60e51b815260040161070490615b37565b33612755818787878787613cb0565b60005b845181101561283e57600085828151811061277557612775615689565b60200260200101519050600085838151811061279357612793615689565b6020908102919091018101516000848152609a835260408082206001600160a01b038e1683529093529190912054909150818110156127e45760405162461bcd60e51b815260040161070490615b7c565b6000838152609a602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290612823908490615a0a565b9250508190555050505080612837906156b5565b9050612758565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb878760405161288e929190615bc6565b60405180910390a46128a4818787878787613cbc565b505050505050565b30600090815260d46020908152604090912082516109e392840190614b23565b6001600160a01b0384163014156129185760405162461bcd60e51b815260206004820152601060248201526f10dc99585d1bdc8e88125b9d985b1a5960821b6044820152606401610704565b6001600160a01b0384163b61297d5760405162461bcd60e51b815260206004820152602560248201527f43726561746f723a20457874656e73696f6e206d757374206265206120636f6e6044820152641d1c9858dd60da1b6064820152608401610704565b61298860cd85611f9f565b610b80576001600160a01b038416600090815260d4602052604090206129af908484614a16565b506001600160a01b038416600081815260d56020526040808220805460ff1916851515179055513392917fd8cb8ba4086944eabf43c5535b7712015e4d4c714b24bf812c040ea5b7a3e42a91a36108d460cd8561318e565b6000610732825490565b6000611fbd8383613e27565b828114612a3c5760405162461bcd60e51b815260040161070490615707565b6000805b82811015612a8057838382818110612a5a57612a5a615689565b9050602002013582612a6c9190615a0a565b915080612a78816156b5565b915050612a40565b506127108110612acc5760405162461bcd60e51b8152602060048201526017602482015276496e76616c696420746f74616c20726f79616c7469657360481b6044820152606401610704565b6001600160a01b038616600090815260d860205260409020612aef908686614a96565b506001600160a01b038616600090815260d960205260409020612b13908484614ae9565b506001600160a01b038616301415612b67577f2b6849d5976d799a5b0ca4dfd6b40a3d7afe9ea72c091fa01a958594f9a2659b85858585604051612b5a9493929190615a22565b60405180910390a16128a4565b856001600160a01b03167f535a93d2cb000582c0ebeaa9be4890ec6a287f98eb2df00c54c300612fd78d8f8686868660405161255d9493929190615a22565b612bb1838383613e51565b600082815260dc602052604081208054839290612bcf908490615bd9565b9091555050505050565b612be4838383613f56565b60005b8251811015610b8057818181518110612c0257612c02615689565b602002602001015160dc6000858481518110612c2057612c20615689565b602002602001015181526020019081526020016000206000828254612c459190615bd9565b90915550612c549050816156b5565b9050612be7565b6000825111612c7c5760405162461bcd60e51b815260040161070490615707565b600060d3600084600081518110612c9557612c95615689565b6020026020010151815260200190815260200160002060009054906101000a90046001600160a01b0316905060005b8351811015612d7057816001600160a01b031660d36000868481518110612ced57612ced615689565b6020908102919091018101518252810191909152604001600020546001600160a01b031614612d5e5760405162461bcd60e51b815260206004820152601c60248201527f4d69736d61746368656420746f6b656e206f726967696e61746f7273000000006044820152606401610704565b80612d68816156b5565b915050612cc4565b506001600160a01b0381163014610b8057612d92816303dc6f6560e51b6136b2565b15610b80576040516303dc6f6560e51b81526001600160a01b03821690637b8deca090612dc790879087908790600401615bf0565b600060405180830381600087803b158015612de157600080fd5b505af1158015612df5573d6000803e3d6000fd5b5050505050505050565b33600090815260d460205260409020612e19908484614a16565b5033600090815260d560205260409020805460ff19169115159190911790555050565b600083815260d360205260409020546001600160a01b0316331461242b5760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b2103a37b5b2b760991b6044820152606401610704565b33600090815260d660205260409020610878908383614a16565b6001600160a01b0384163014612ec757612ec78383836140e7565b82516001148015612ed9575081516001145b8015612ee6575080516001145b15612f8d57612f8883600081518110612f0157612f01615689565b602002602001015183600081518110612f1c57612f1c615689565b602002602001015183600081518110612f3757612f37615689565b602002602001015160006001600160401b03811115612f5857612f58614e7a565b6040519080825280601f01601f191660200182016040528015612f82576020820181803683370190505b50614176565b610b80565b82516001148015612f9f575080518251145b1561300d57612f8883600081518110612fba57612fba615689565b6020026020010151838360006001600160401b03811115612fdd57612fdd614e7a565b6040519080825280601f01601f191660200182016040528015613007576020820181803683370190505b506141ab565b8151600114801561301f575080516001145b156130935760005b835181101561308d5761307b84828151811061304557613045615689565b60200260200101518460008151811061306057613060615689565b602002602001015184600081518110612f3757612f37615689565b80613085816156b5565b915050613027565b50610b80565b815160011480156130a5575080518351145b156131125760005b835181101561308d576131008482815181106130cb576130cb615689565b6020026020010151846000815181106130e6576130e6615689565b6020026020010151848481518110612f3757612f37615689565b8061310a816156b5565b9150506130ad565b81518351148015613124575080518351145b156131765760005b835181101561308d5761316484828151811061314a5761314a615689565b60200260200101518483815181106130e6576130e6615689565b8061316e816156b5565b91505061312c565b60405162461bcd60e51b815260040161070490615707565b6000611fbd836001600160a01b03841661422e565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff168061320e575060005460ff16155b61322a5760405162461bcd60e51b8152600401610704906157ab565b600054610100900460ff1615801561324c576000805461ffff19166101011790555b61325461427d565b61325c61427d565b613265826142e7565b80156109e3576000805461ff00191690555050565b600054610100900460ff1680613293575060005460ff16155b6132af5760405162461bcd60e51b8152600401610704906157ab565b600054610100900460ff161580156132d1576000805461ffff19166101011790555b6132d961427d565b6113d5614347565b606060018451111561334c576040805160018082528183019092529060208083019080368337019050509050600182511115801561332b575082516001148061332b575082518451145b6133475760405162461bcd60e51b815260040161070490615707565b6133be565b82516001600160401b0381111561336557613365614e7a565b60405190808252806020026020018201604052801561338e578160200160208202803683370190505b5090508151600014806133a2575081518351145b6133be5760405162461bcd60e51b815260040161070490615707565b60005b815181101561343f5760cc80549060006133da836156b5565b919050555060cc548282815181106133f4576133f4615689565b60209081029190910181019190915260cc54600090815260d39091526040902080546001600160a01b0319166001600160a01b03881617905580613437816156b5565b9150506133c1565b506001600160a01b038516301461345b5761345b8482856140e7565b8351600114801561346d575080516001145b156134c3576134be8460008151811061348857613488615689565b6020026020010151826000815181106134a3576134a3615689565b602002602001015185600081518110612f3757612f37615689565b6135e7565b6001845111156135ae578251600114156135465760005b84518110156135405761352e8582815181106134f8576134f8615689565b60200260200101518360008151811061351357613513615689565b602002602001015186600081518110612f3757612f37615689565b80613538816156b5565b9150506134da565b506135e7565b60005b84518110156135405761359c85828151811061356757613567615689565b60200260200101518360008151811061358257613582615689565b6020026020010151868481518110612f3757612f37615689565b806135a6816156b5565b915050613549565b6135e7846000815181106135c4576135c4615689565b6020026020010151828560006001600160401b03811115612fdd57612fdd614e7a565b60005b815181101561368f5782518110801561361d5750600083828151811061361257613612615689565b602002602001015151115b1561367d5782818151811061363457613634615689565b602002602001015160d7600084848151811061365257613652615689565b60200260200101518152602001908152602001600020908051906020019061367b929190614b23565b505b80613687816156b5565b9150506135ea565b50949350505050565b30600090815260d660205260409020610878908383614a16565b60006136bd836143a7565b8015611fbd5750611fbd83836143da565b600081815260da6020526040812054156136f45750600090815260da6020526040902090565b600082815260d360209081526040808320546001600160a01b0316835260d8909152902054156137465750600090815260d360209081526040808320546001600160a01b0316835260d8909152902090565b505030600090815260d86020526040902090565b600080613766836136ce565b61376f84612349565b91509150915091565b61378360cd82611f9f565b156107b45760405133906001600160a01b038316907fd19cf84cf0fec6bec9ddfa29c63adf83a55707c712f32c8285d6180a7890147990600090a36109e360cd826126ea565b6137d460cd83611f9f565b6138145760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21032bc3a32b739b4b7b760791b6044820152606401610704565b6001600160a01b03811615806138365750613836816378ea2a9760e11b6136b2565b6138745760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b6044820152606401610704565b6001600160a01b03828116600090815260d160205260409020548116908216146109e3576001600160a01b03828116600081815260d1602052604080822080546001600160a01b031916948616948517905551339392917f6a835c4fcf7e0d398db3762332fdaa1471814ad39f1e2d6d0b3fdabf8efee3e091a45050565b6001600160a01b0384166139185760405162461bcd60e51b815260040161070490615b37565b33613937818787613928886144c3565b613931886144c3565b87613cb0565b6000848152609a602090815260408083206001600160a01b038a1684529091529020548381101561397a5760405162461bcd60e51b815260040161070490615b7c565b6000858152609a602090815260408083206001600160a01b038b81168552925280832087850390559088168252812080548692906139b9908490615a0a565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4613a1982888888888861450e565b50505050505050565b60006001600160e01b031982166328f10a2160e01b1480613a475750613a4782611f1a565b80613a6257506001600160e01b03198216635d9dd7eb60e11b145b80613a7d57506001600160e01b03198216632dde656160e21b145b80613a9857506001600160e01b031982166335681b5360e21b145b8061073257506001600160e01b0319821663152a902d60e11b1492915050565b606081613adc5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115613b065780613af0816156b5565b9150613aff9050600a83615adb565b9150613ae0565b6000816001600160401b03811115613b2057613b20614e7a565b6040519080825280601f01601f191660200182016040528015613b4a576020820181803683370190505b5090505b8415613bb557613b5f600183615bd9565b9150613b6c600a86615c24565b613b77906030615a0a565b60f81b818381518110613b8c57613b8c615689565b60200101906001600160f81b031916908160001a905350613bae600a86615adb565b9450613b4e565b949350505050565b60008181526001830160205260408120548015613ca6576000613be1600183615bd9565b8554909150600090613bf590600190615bd9565b9050818114613c5a576000866000018281548110613c1557613c15615689565b9060005260206000200154905080876000018481548110613c3857613c38615689565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613c6b57613c6b615c38565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610732565b6000915050610732565b6128a4858585856145d8565b6001600160a01b0384163b156128a45760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190613d009089908990889088908890600401615c4e565b602060405180830381600087803b158015613d1a57600080fd5b505af1925050508015613d4a575060408051601f3d908101601f19168201909252613d4791810190615cac565b60015b613df757613d56615cc9565b806308c379a01415613d905750613d6b615ce5565b80613d765750613d92565b8060405162461bcd60e51b81526004016107049190614cae565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610704565b6001600160e01b0319811663bc197c8160e01b14613a195760405162461bcd60e51b815260040161070490615d6e565b6000826000018281548110613e3e57613e3e615689565b9060005260206000200154905092915050565b6001600160a01b038316613e775760405162461bcd60e51b815260040161070490615db6565b33613ea681856000613e88876144c3565b613e91876144c3565b60405180602001604052806000815250613cb0565b6000838152609a602090815260408083206001600160a01b038816845290915290205482811015613ee95760405162461bcd60e51b815260040161070490615df9565b6000848152609a602090815260408083206001600160a01b03898116808652918452828520888703905582518981529384018890529092908616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a45050505050565b6001600160a01b038316613f7c5760405162461bcd60e51b815260040161070490615db6565b8051825114613f9d5760405162461bcd60e51b815260040161070490615aef565b6000339050613fc081856000868660405180602001604052806000815250613cb0565b60005b8351811015614088576000848281518110613fe057613fe0615689565b602002602001015190506000848381518110613ffe57613ffe615689565b6020908102919091018101516000848152609a835260408082206001600160a01b038c16835290935291909120549091508181101561404f5760405162461bcd60e51b815260040161070490615df9565b6000928352609a602090815260408085206001600160a01b038b1686529091529092209103905580614080816156b5565b915050613fc3565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb86866040516140d9929190615bc6565b60405180910390a450505050565b33600090815260d160205260409020546001600160a01b0316156108785733600081815260d16020526040908190205490516378ea2a9760e11b81526001600160a01b039091169163f1d4552e916141489190879087908790600401615e3d565b600060405180830381600087803b15801561416257600080fd5b505af1158015613a19573d6000803e3d6000fd5b614182848484846147df565b600083815260dc6020526040812080548492906141a0908490615a0a565b909155505050505050565b6141b7848484846148a8565b60005b83518110156108d4578281815181106141d5576141d5615689565b602002602001015160dc60008684815181106141f3576141f3615689565b6020026020010151815260200190815260200160002060008282546142189190615a0a565b909155506142279050816156b5565b90506141ba565b600081815260018301602052604081205461427557508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610732565b506000610732565b600054610100900460ff1680614296575060005460ff16155b6142b25760405162461bcd60e51b8152600401610704906157ab565b600054610100900460ff161580156113d5576000805461ffff191661010117905580156107b4576000805461ff001916905550565b600054610100900460ff1680614300575060005460ff16155b61431c5760405162461bcd60e51b8152600401610704906157ab565b600054610100900460ff1615801561433e576000805461ffff19166101011790555b61326582614a03565b600054610100900460ff1680614360575060005460ff16155b61437c5760405162461bcd60e51b8152600401610704906157ab565b600054610100900460ff1615801561439e576000805461ffff19166101011790555b6113d5336131a3565b60006143ba826301ffc9a760e01b6143da565b801561073257506143d3826001600160e01b03196143da565b1592915050565b604080516001600160e01b0319831660248083019190915282518083039091018152604490910182526020810180516001600160e01b03166301ffc9a760e01b179052905160009190829081906001600160a01b0387169061753090614441908690615e90565b6000604051808303818686fa925050503d806000811461447d576040519150601f19603f3d011682016040523d82523d6000602084013e614482565b606091505b509150915060208151101561449d5760009350505050610732565b8180156144b95750808060200190518101906144b99190615eac565b9695505050505050565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106144fd576144fd615689565b602090810291909101015292915050565b6001600160a01b0384163b156128a45760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906145529089908990889088908890600401615ec9565b602060405180830381600087803b15801561456c57600080fd5b505af192505050801561459c575060408051601f3d908101601f1916820190925261459991810190615cac565b60015b6145a857613d56615cc9565b6001600160e01b0319811663f23a6e6160e01b14613a195760405162461bcd60e51b815260040161070490615d6e565b60008251116145f95760405162461bcd60e51b815260040161070490615707565b600060d360008460008151811061461257614612615689565b6020026020010151815260200190815260200160002060009054906101000a90046001600160a01b0316905060005b83518110156146ed57816001600160a01b031660d3600086848151811061466a5761466a615689565b6020908102919091018101518252810191909152604001600020546001600160a01b0316146146db5760405162461bcd60e51b815260206004820152601c60248201527f4d69736d61746368656420746f6b656e206f726967696e61746f7273000000006044820152606401610704565b806146e5816156b5565b915050614641565b506001600160a01b038116600090815260d2602052604090205460ff16156108d45760405163883da93360e01b81526001600160a01b0382169063883da93390614741908890889088908890600401615f01565b602060405180830381600087803b15801561475b57600080fd5b505af115801561476f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906147939190615eac565b6108d45760405162461bcd60e51b815260206004820152601a60248201527f457874656e73696f6e20617070726f76616c206661696c7572650000000000006044820152606401610704565b6001600160a01b0384166148055760405162461bcd60e51b815260040161070490615f3f565b3361481681600087613928886144c3565b6000848152609a602090815260408083206001600160a01b038916845290915281208054859290614848908490615a0a565b909155505060408051858152602081018590526001600160a01b0380881692600092918516917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46108d48160008787878761450e565b6001600160a01b0384166148ce5760405162461bcd60e51b815260040161070490615f3f565b81518351146148ef5760405162461bcd60e51b815260040161070490615aef565b336148ff81600087878787613cb0565b60005b845181101561499b5783818151811061491d5761491d615689565b6020026020010151609a600087848151811061493b5761493b615689565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b0316815260200190815260200160002060008282546149839190615a0a565b90915550819050614993816156b5565b915050614902565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516149ec929190615bc6565b60405180910390a46108d481600087878787613cbc565b80516109e390609c906020840190614b23565b828054614a229061588a565b90600052602060002090601f016020900481019282614a445760008555614a8a565b82601f10614a5d5782800160ff19823516178555614a8a565b82800160010185558215614a8a579182015b82811115614a8a578235825591602001919060010190614a6f565b50610c30929150614b97565b828054828255906000526020600020908101928215614a8a579160200282015b82811115614a8a5781546001600160a01b0319166001600160a01b03843516178255602090920191600190910190614ab6565b828054828255906000526020600020908101928215614a8a5791602002820182811115614a8a578235825591602001919060010190614a6f565b828054614b2f9061588a565b90600052602060002090601f016020900481019282614b515760008555614a8a565b82601f10614b6a57805160ff1916838001178555614a8a565b82800160010185558215614a8a579182015b82811115614a8a578251825591602001919060010190614b7c565b5b80821115610c305760008155600101614b98565b6001600160a01b03811681146107b457600080fd5b60008060408385031215614bd457600080fd5b8235614bdf81614bac565b946020939093013593505050565b6001600160e01b0319811681146107b457600080fd5b600060208284031215614c1557600080fd5b8135611fbd81614bed565b600060208284031215614c3257600080fd5b8135611fbd81614bac565b600060208284031215614c4f57600080fd5b5035919050565b60005b83811015614c71578181015183820152602001614c59565b83811115610b805750506000910152565b60008151808452614c9a816020860160208601614c56565b601f01601f19169290920160200192915050565b602081526000611fbd6020830184614c82565b600081518084526020808501945080840160005b83811015614cf157815187529582019590820190600101614cd5565b509495945050505050565b602081526000611fbd6020830184614cc1565b60008083601f840112614d2157600080fd5b5081356001600160401b03811115614d3857600080fd5b60208301915083602082850101111561093157600080fd5b600080600060408486031215614d6557600080fd5b8335925060208401356001600160401b03811115614d8257600080fd5b614d8e86828701614d0f565b9497909650939450505050565b60008083601f840112614dad57600080fd5b5081356001600160401b03811115614dc457600080fd5b6020830191508360208260051b850101111561093157600080fd5b600080600080600060608688031215614df757600080fd5b8535945060208601356001600160401b0380821115614e1557600080fd5b614e2189838a01614d9b565b90965094506040880135915080821115614e3a57600080fd5b50614e4788828901614d9b565b969995985093965092949392505050565b60008060408385031215614e6b57600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b0381118282101715614eb557614eb5614e7a565b6040525050565b60006001600160401b03821115614ed557614ed5614e7a565b5060051b60200190565b600082601f830112614ef057600080fd5b81356020614efd82614ebc565b604051614f0a8282614e90565b83815260059390931b8501820192828101915086841115614f2a57600080fd5b8286015b84811015614f455780358352918301918301614f2e565b509695505050505050565b60006001600160401b03821115614f6957614f69614e7a565b50601f01601f191660200190565b6000614f8283614f50565b604051614f8f8282614e90565b809250848152858585011115614fa457600080fd5b8484602083013760006020868301015250509392505050565b600082601f830112614fce57600080fd5b611fbd83833560208501614f77565b600080600080600060a08688031215614ff557600080fd5b853561500081614bac565b9450602086013561501081614bac565b935060408601356001600160401b038082111561502c57600080fd5b61503889838a01614edf565b9450606088013591508082111561504e57600080fd5b61505a89838a01614edf565b9350608088013591508082111561507057600080fd5b5061507d88828901614fbd565b9150509295509295909350565b6000806020838503121561509d57600080fd5b82356001600160401b038111156150b357600080fd5b6150bf85828601614d0f565b90969095509350505050565b6000806000604084860312156150e057600080fd5b83356150eb81614bac565b925060208401356001600160401b03811115614d8257600080fd5b600081518084526020808501945080840160005b83811015614cf15781516001600160a01b03168752958201959082019060010161511a565b602081526000611fbd6020830184615106565b6000806000806040858703121561516857600080fd5b84356001600160401b038082111561517f57600080fd5b61518b88838901614d9b565b909650945060208701359150808211156151a457600080fd5b506151b187828801614d9b565b95989497509550505050565b6000806000606084860312156151d257600080fd5b83356151dd81614bac565b925060208401356001600160401b03808211156151f957600080fd5b61520587838801614edf565b9350604086013591508082111561521b57600080fd5b5061522886828701614edf565b9150509250925092565b80151581146107b457600080fd5b6000806000806060858703121561525657600080fd5b843561526181614bac565b935060208501356001600160401b0381111561527c57600080fd5b61528887828801614d0f565b909450925050604085013561529c81615232565b939692955090935050565b600080604083850312156152ba57600080fd5b82356001600160401b03808211156152d157600080fd5b818501915085601f8301126152e557600080fd5b813560206152f282614ebc565b6040516152ff8282614e90565b83815260059390931b850182019282810191508984111561531f57600080fd5b948201945b8386101561534657853561533781614bac565b82529482019490820190615324565b9650508601359250508082111561535c57600080fd5b5061536985828601614edf565b9150509250929050565b60008060006040848603121561538857600080fd5b83356001600160401b038082111561539f57600080fd5b6153ab87838801614edf565b945060208601359150808211156153c157600080fd5b50614d8e86828701614d9b565b600080600080600080606087890312156153e757600080fd5b86356001600160401b03808211156153fe57600080fd5b61540a8a838b01614d9b565b9098509650602089013591508082111561542357600080fd5b61542f8a838b01614d9b565b9096509450604089013591508082111561544857600080fd5b5061545589828a01614d9b565b979a9699509497509295939492505050565b60008060006040848603121561547c57600080fd5b83356001600160401b0381111561549257600080fd5b61549e86828701614d0f565b90945092505060208401356154b281615232565b809150509250925092565b600080604083850312156154d057600080fd5b82356154db81614bac565b915060208301356154eb81615232565b809150509250929050565b60006020828403121561550857600080fd5b8135611fbd81615232565b60008060008060006060868803121561552b57600080fd5b853561553681614bac565b945060208601356001600160401b0380821115614e1557600080fd5b6040815260006155656040830185615106565b82810360208401526155778185614cc1565b95945050505050565b6000806040838503121561559357600080fd5b823561559e81614bac565b915060208301356154eb81614bac565b600080600080600060a086880312156155c657600080fd5b85356155d181614bac565b945060208601356155e181614bac565b9350604086013592506060860135915060808601356001600160401b0381111561560a57600080fd5b61507d88828901614fbd565b60208082526024908201527f41646d696e436f6e74726f6c3a204d757374206265206f776e6572206f7220616040820152633236b4b760e11b606082015260800190565b602080825260159082015274115e1d195b9cda5bdb88189b1858dadb1a5cdd1959605a1b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006000198214156156c9576156c961569f565b5060010190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6020808252600d908201526c125b9d985b1a59081a5b9c1d5d609a1b604082015260600190565b6020808252601c908201527f4d757374206265207265676973746572656420657874656e73696f6e00000000604082015260600190565b6000808335601e1984360301811261577c57600080fd5b8301803591506001600160401b0382111561579657600080fd5b60200191503681900382131561093157600080fd5b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b600061580483614ebc565b6040516158118282614e90565b84815260208082019250600586901b85013681111561582f57600080fd5b855b8181101561587e5780356001600160401b038111156158505760008081fd5b870136601f8201126158625760008081fd5b615870368235868401614f77565b865250938201938201615831565b50919695505050505050565b600181811c9082168061589e57607f821691505b6020821081141561234357634e487b7160e01b600052602260045260246000fd5b8054600090600181811c90808316806158d957607f831692505b60208084108214156158fb57634e487b7160e01b600052602260045260246000fd5b81801561590f57600181146159205761594d565b60ff1986168952848901965061594d565b60008881526020902060005b868110156159455781548b82015290850190830161592c565b505084890196505b50505050505092915050565b6000613bb561596883866158bf565b846158bf565b60006020828403121561598057600080fd5b81516001600160401b0381111561599657600080fd5b8201601f810184136159a757600080fd5b80516159b281614f50565b6040516159bf8282614e90565b8281528660208486010111156159d457600080fd5b6144b9836020830160208701614c56565b60006159f182856158bf565b8351615a01818360208801614c56565b01949350505050565b60008219821115615a1d57615a1d61569f565b500190565b6040808252810184905260008560608301825b87811015615a65578235615a4881614bac565b6001600160a01b0316825260209283019290910190600101615a35565b5083810360208501528481526001600160fb1b03851115615a8557600080fd5b8460051b915081866020830137600091016020019081529695505050505050565b6000816000190483118215151615615ac057615ac061569f565b500290565b634e487b7160e01b600052601260045260246000fd5b600082615aea57615aea615ac5565b500490565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6040815260006155656040830185614cc1565b600082821015615beb57615beb61569f565b500390565b6001600160a01b0384168152606060208201526000615c126060830185614cc1565b82810360408401526144b98185614cc1565b600082615c3357615c33615ac5565b500690565b634e487b7160e01b600052603160045260246000fd5b60006001600160a01b03808816835280871660208401525060a06040830152615c7a60a0830186614cc1565b8281036060840152615c8c8186614cc1565b90508281036080840152615ca08185614c82565b98975050505050505050565b600060208284031215615cbe57600080fd5b8151611fbd81614bed565b600060033d1115615ce25760046000803e5060005160e01c5b90565b600060443d1015615cf35790565b6040516003193d81016004833e81513d6001600160401b038160248401118184111715615d2257505050505090565b8285019150815181811115615d3a5750505050505090565b843d8701016020828501011115615d545750505050505090565b615d6360208286010187614e90565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526024908201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604082015263616e636560e01b606082015260800190565b6001600160a01b0385168152608060208201526000615e5f6080830186615106565b8281036040840152615e718186614cc1565b90508281036060840152615e858185614cc1565b979650505050505050565b60008251615ea2818460208701614c56565b9190910192915050565b600060208284031215615ebe57600080fd5b8151611fbd81615232565b60006001600160a01b03808816835280871660208401525084604083015283606083015260a06080830152615e8560a0830184614c82565b60006001600160a01b03808716835280861660208401525060806040830152615f2d6080830185614cc1565b8281036060840152615e858185614cc1565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b60608201526080019056fea26469706673582212209bb76f7f1d77f659f312e4694b698d5447d09878f0a18e13cafb2ffeb50f07e164736f6c63430008090033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102945760003560e01c80636d73e66911610167578063b9c4d9fb116100ce578063e92a89f611610087578063e92a89f614610601578063e985e9c514610614578063f0cdc49914610650578063f242432a14610663578063f2fde38b14610676578063feeb5a9a1461068957600080fd5b8063b9c4d9fb14610587578063bb3bafd61461059a578063bd85b039146105bb578063ce8aee9d146105db578063d5a06d4c1461059a578063e6c884dc146105ee57600080fd5b80638da5cb5b116101205780638da5cb5b1461051757806399e0dd7c14610528578063a22cb4651461053b578063aafb2d441461054e578063ac0c8cfa14610561578063b0fe87c91461057457600080fd5b80636d73e669146104c6578063715018a6146104d95780638129fc1c146104e157806382dcc0c8146104e957806383b7db63146104fc5780638c6e84721461050457600080fd5b80632eb2c2d61161020b5780633e6134b8116101c45780633e6134b8146104545780633f0f37f6146104675780634e1273f41461047a57806361e5bc6b1461048d57806366d1e9d0146104a0578063695c96e6146104b357600080fd5b80632eb2c2d6146103e057806330176e13146103f35780633071a0f91461040657806331ae450b14610419578063332dd1ae1461042e5780633db0f8ab1461044157600080fd5b8063162094c41161025d578063162094c41461033757806320e4afe21461034a578063239be3171461035d57806324d7806c146103885780632a55205a1461039b5780632d345670146103cd57600080fd5b8062fdd58e1461029957806301ffc9a7146102bf57806302e7afb7146102e25780630e89341c146102f75780630ebd4c7f14610317575b600080fd5b6102ac6102a7366004614bc1565b61069c565b6040519081526020015b60405180910390f35b6102d26102cd366004614c03565b610738565b60405190151581526020016102b6565b6102f56102f0366004614c20565b610761565b005b61030a610305366004614c3d565b6107b7565b6040516102b69190614cae565b61032a610325366004614c3d565b6107c2565b6040516102b69190614cfc565b6102f5610345366004614d50565b610823565b6102f5610358366004614ddf565b61087d565b61037061036b366004614c3d565b6108db565b6040516001600160a01b0390911681526020016102b6565b6102d2610396366004614c20565b6108e6565b6103ae6103a9366004614e58565b61091f565b604080516001600160a01b0390931683526020830191909152016102b6565b6102f56103db366004614c20565b610938565b6102f56103ee366004614fdd565b6109e7565b6102f561040136600461508a565b610a77565b6102f56104143660046150cb565b610b00565b610421610b86565b6040516102b6919061513f565b6102f561043c366004615152565b610c34565b6102f561044f3660046151bd565b610c8b565b6102f561046236600461508a565b610dc8565b6102f5610475366004615240565b610dfb565b61032a6104883660046152a7565b610e7a565b6102f561049b366004615373565b610fa3565b6102f56104ae36600461508a565b61104e565b6102f56104c13660046153ce565b61107f565b6102f56104d4366004614c20565b61124e565b6102f56112f8565b6102f561135e565b6102f56104f7366004615467565b6113e9565b61042161141b565b61032a6105123660046153ce565b6114c5565b6033546001600160a01b0316610370565b6102f561053636600461508a565b6115a0565b6102f56105493660046154bd565b6115f4565b6102f561055c366004615373565b6116cb565b6102f561056f3660046154f6565b611799565b6102f5610582366004615513565b6118bf565b610421610595366004614c3d565b611916565b6105ad6105a8366004614c3d565b611980565b6040516102b6929190615552565b6102ac6105c9366004614c3d565b600090815260dc602052604090205490565b6102f56105e9366004614c20565b611a3f565b6102f56105fc3660046153ce565b611a92565b6102f561060f366004614d50565b611c37565b6102d2610622366004615580565b6001600160a01b039182166000908152609b6020908152604080832093909416825291909152205460ff1690565b6102f561065e366004615580565b611c69565b6102f56106713660046155ae565b611cbd565b6102f5610684366004614c20565b611d44565b61032a6106973660046153ce565b611e0c565b60006001600160a01b03831661070d5760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b506000818152609a602090815260408083206001600160a01b03861684529091529020545b92915050565b600061074382611ef5565b80610752575061075282611f1a565b80610732575061073282611f6a565b336107746033546001600160a01b031690565b6001600160a01b0316148061078f575061078f606633611f9f565b6107ab5760405162461bcd60e51b815260040161070490615616565b6107b481611fc4565b50565b6060610732826120c0565b60606107cd82612349565b80548060200260200160405190810160405280929190818152602001828054801561081757602002820191906000526020600020905b815481526020019060010190808311610803575b50505050509050919050565b336108366033546001600160a01b031690565b6001600160a01b031614806108515750610851606633611f9f565b61086d5760405162461bcd60e51b815260040161070490615616565b6108788383836123d5565b505050565b336108906033546001600160a01b031690565b6001600160a01b031614806108ab57506108ab606633611f9f565b6108c75760405162461bcd60e51b815260040161070490615616565b6108d48585858585612444565b5050505050565b60006107328261256d565b6000816001600160a01b03166109046033546001600160a01b031690565b6001600160a01b031614806107325750610732606683611f9f565b60008061092c8484612602565b915091505b9250929050565b6033546001600160a01b031633146109925760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610704565b61099d606682611f9f565b156107b45760405133906001600160a01b038316907f7c0c3c84c67c85fcac635147348bfe374c24a1a93d0366d1cfe9d8853cbf89d590600090a36109e36066826126ea565b5050565b6001600160a01b038516331480610a035750610a038533610622565b610a6a5760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b6064820152608401610704565b6108d485858585856126ff565b33610a8a6033546001600160a01b031690565b6001600160a01b03161480610aa55750610aa5606633611f9f565b610ac15760405162461bcd60e51b815260040161070490615616565b6109e382828080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506128ac92505050565b33610b136033546001600160a01b031690565b6001600160a01b03161480610b2e5750610b2e606633611f9f565b610b4a5760405162461bcd60e51b815260040161070490615616565b82610b5660cf82611f9f565b15610b735760405162461bcd60e51b81526004016107049061565a565b610b8084848460006128cc565b50505050565b6060610b926066612a07565b6001600160401b03811115610ba957610ba9614e7a565b604051908082528060200260200182016040528015610bd2578160200160208202803683370190505b50905060005b610be26066612a07565b811015610c3057610bf4606682612a11565b828281518110610c0657610c06615689565b6001600160a01b039092166020928302919091019091015280610c28816156b5565b915050610bd8565b5090565b33610c476033546001600160a01b031690565b6001600160a01b03161480610c625750610c62606633611f9f565b610c7e5760405162461bcd60e51b815260040161070490615616565b610b803085858585612a1d565b60026065541415610cae5760405162461bcd60e51b8152600401610704906156d0565b60026065556001600160a01b038316331480610ced57506001600160a01b0383166000908152609b6020908152604080832033845290915290205460ff165b610d395760405162461bcd60e51b815260206004820181905260248201527f43616c6c6572206973206e6f74206f776e6572206e6f7220617070726f7665646044820152606401610704565b8051825114610d5a5760405162461bcd60e51b815260040161070490615707565b815160011415610da857610da38383600081518110610d7b57610d7b615689565b602002602001015183600081518110610d9657610d96615689565b6020026020010151612ba6565b610db3565b610db3838383612bd9565b610dbe838383612c5b565b5050600160655550565b610dd360cd33611f9f565b610def5760405162461bcd60e51b81526004016107049061572e565b6109e382826000612dff565b33610e0e6033546001600160a01b031690565b6001600160a01b03161480610e295750610e29606633611f9f565b610e455760405162461bcd60e51b815260040161070490615616565b83610e5160cf82611f9f565b15610e6e5760405162461bcd60e51b81526004016107049061565a565b6108d4858585856128cc565b60608151835114610edf5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610704565b600083516001600160401b03811115610efa57610efa614e7a565b604051908082528060200260200182016040528015610f23578160200160208202803683370190505b50905060005b8451811015610f9b57610f6e858281518110610f4757610f47615689565b6020026020010151858381518110610f6157610f61615689565b602002602001015161069c565b828281518110610f8057610f80615689565b6020908102919091010152610f94816156b5565b9050610f29565b509392505050565b610fae60cd33611f9f565b610fca5760405162461bcd60e51b81526004016107049061572e565b82518114610fea5760405162461bcd60e51b815260040161070490615707565b60005b8351811015610b805761103c84828151811061100b5761100b615689565b602002602001015184848481811061102557611025615689565b90506020028101906110379190615765565b612e3c565b80611046816156b5565b915050610fed565b61105960cd33611f9f565b6110755760405162461bcd60e51b81526004016107049061572e565b6109e38282612e92565b600260655414156110a25760405162461bcd60e51b8152600401610704906156d0565b6002606555336110ba6033546001600160a01b031690565b6001600160a01b031614806110d557506110d5606633611f9f565b6110f15760405162461bcd60e51b815260040161070490615616565b60005b838110156111a1573060d3600087878581811061111357611113615689565b60209081029290920135835250810191909152604001600020546001600160a01b03161461118f5760405162461bcd60e51b815260206004820152602360248201527f4120746f6b656e20776173206372656174656420627920616e20657874656e7360448201526234b7b760e91b6064820152608401610704565b80611199816156b5565b9150506110f4565b506112413087878080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808b0282810182019093528a82529093508a92508991829185019084908082843760009201919091525050604080516020808a02828101820190935289825290935089925088918291850190849080828437600092019190915250612eac92505050565b5050600160655550505050565b6033546001600160a01b031633146112a85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610704565b6112b3606682611f9f565b6107b45760405133906001600160a01b038316907f7e1a1a08d52e4ba0e21554733d66165fd5151f99460116223d9e3a608eec5cb190600090a36109e360668261318e565b6033546001600160a01b031633146113525760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610704565b61135c60006131a3565b565b600054610100900460ff1680611377575060005460ff16155b6113935760405162461bcd60e51b8152600401610704906157ab565b600054610100900460ff161580156113b5576000805461ffff19166101011790555b6113cd604051806020016040528060008152506131f5565b6113d561327a565b80156107b4576000805461ff001916905550565b6113f460cd33611f9f565b6114105760405162461bcd60e51b81526004016107049061572e565b610878838383612dff565b606061142760cd612a07565b6001600160401b0381111561143e5761143e614e7a565b604051908082528060200260200182016040528015611467578160200160208202803683370190505b50905060005b61147760cd612a07565b811015610c305761148960cd82612a11565b82828151811061149b5761149b615689565b6001600160a01b0390921660209283029190910190910152806114bd816156b5565b91505061146d565b6060600260655414156114ea5760405162461bcd60e51b8152600401610704906156d0565b60026065556114fa60cd33611f9f565b6115165760405162461bcd60e51b81526004016107049061572e565b6115903388888080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808c0282810182019093528b82529093508b92508a91829185019084908082843760009201919091525061158b92508891508990506157f9565b6132e1565b6001606555979650505050505050565b336115b36033546001600160a01b031690565b6001600160a01b031614806115ce57506115ce606633611f9f565b6115ea5760405162461bcd60e51b815260040161070490615616565b6109e38282613698565b336001600160a01b038316141561165f5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610704565b336000818152609b602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b336116de6033546001600160a01b031690565b6001600160a01b031614806116f957506116f9606633611f9f565b6117155760405162461bcd60e51b815260040161070490615616565b825181146117355760405162461bcd60e51b815260040161070490615707565b60005b8351811015610b805761178784828151811061175657611756615689565b602002602001015184848481811061177057611770615689565b90506020028101906117829190615765565b6123d5565b80611791816156b5565b915050611738565b6117a460cd33611f9f565b6117c05760405162461bcd60e51b81526004016107049061572e565b8015806117d957506117d9336324ea02c560e21b6136b2565b61184d576040805162461bcd60e51b81526020600482015260248101919091527f457874656e73696f6e206d75737420696d706c656d656e74204945524331313560448201527f3543726561746f72457874656e73696f6e417070726f76655472616e736665726064820152608401610704565b33600090815260d2602052604090205460ff161515811515146107b45733600081815260d26020908152604091829020805460ff191685151590811790915591519182527f072a7592283e2c2d1d56d21517ff6013325e0f55483f4828373ff4d98b0a1a36910160405180910390a250565b336118d26033546001600160a01b031690565b6001600160a01b031614806118ed57506118ed606633611f9f565b6119095760405162461bcd60e51b815260040161070490615616565b6108d48585858585612a1d565b6060611921826136ce565b80548060200260200160405190810160405280929190818152602001828054801561081757602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116119575750505050509050919050565b60608061198c8361375a565b8154604080516020808402820181019092528281529184918301828280156119dd57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116119bf575b5050505050915080805480602002602001604051908101604052809291908181526020018280548015611a2f57602002820191906000526020600020905b815481526020019060010190808311611a1b575b5050505050905091509150915091565b33611a526033546001600160a01b031690565b6001600160a01b03161480611a6d5750611a6d606633611f9f565b611a895760405162461bcd60e51b815260040161070490615616565b6107b481613778565b60026065541415611ab55760405162461bcd60e51b8152600401610704906156d0565b6002606555611ac560cd33611f9f565b611ae15760405162461bcd60e51b81526004016107049061572e565b60005b83811015611b97573360d36000878785818110611b0357611b03615689565b60209081029290920135835250810191909152604001600020546001600160a01b031614611b855760405162461bcd60e51b815260206004820152602960248201527f4120746f6b656e20776173206e6f74206372656174656420627920746869732060448201526832bc3a32b739b4b7b760b91b6064820152608401610704565b80611b8f816156b5565b915050611ae4565b506112413387878080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808b0282810182019093528a82529093508a92508991829185019084908082843760009201919091525050604080516020808a02828101820190935289825290935089925088918291850190849080828437600092019190915250612eac92505050565b611c4260cd33611f9f565b611c5e5760405162461bcd60e51b81526004016107049061572e565b610878838383612e3c565b33611c7c6033546001600160a01b031690565b6001600160a01b03161480611c975750611c97606633611f9f565b611cb35760405162461bcd60e51b815260040161070490615616565b6109e382826137c9565b6001600160a01b038516331480611cd95750611cd98533610622565b611d375760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b6064820152608401610704565b6108d485858585856138f2565b6033546001600160a01b03163314611d9e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610704565b6001600160a01b038116611e035760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610704565b6107b4816131a3565b606060026065541415611e315760405162461bcd60e51b8152600401610704906156d0565b600260655533611e496033546001600160a01b031690565b6001600160a01b03161480611e645750611e64606633611f9f565b611e805760405162461bcd60e51b815260040161070490615616565b6115903088888080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808c0282810182019093528b82529093508b92508a91829185019084908082843760009201919091525061158b92508891508990506157f9565b60006001600160e01b031982166301f4921160e61b1480610732575061073282613a22565b60006001600160e01b03198216636cdb3d1360e11b1480611f4b57506001600160e01b031982166303a24d0760e21b145b8061073257506301ffc9a760e01b6001600160e01b0319831614610732565b60006001600160e01b03198216632a9f3abf60e11b148061073257506301ffc9a760e01b6001600160e01b0319831614610732565b6001600160a01b038116600090815260018301602052604081205415155b9392505050565b6001600160a01b03811630141561201d5760405162461bcd60e51b815260206004820152601960248201527f43616e6e6f7420626c61636b6c69737420796f757273656c66000000000000006044820152606401610704565b61202860cd82611f9f565b156120705760405133906001600160a01b038316907fd19cf84cf0fec6bec9ddfa29c63adf83a55707c712f32c8285d6180a7890147990600090a361206e60cd826126ea565b505b61207b60cf82611f9f565b6107b45760405133906001600160a01b038316907f05ac7bc5a606cd92a63365f9fda244499b9add0526b22d99937b6bd88181059c90600090a36109e360cf8261318e565b600081815260d360205260409020546060906001600160a01b03166120e660cf82611f9f565b156121035760405162461bcd60e51b81526004016107049061565a565b600083815260d760205260409020805461211c9061588a565b159050612236576001600160a01b038116600090815260d66020526040902080546121469061588a565b159050612197576001600160a01b038116600090815260d66020908152604080832086845260d78352928190209051612180939201615959565b604051602081830303815290604052915050919050565b600083815260d76020526040902080546121b09061588a565b80601f01602080910402602001604051908101604052809291908181526020018280546121dc9061588a565b80156122295780601f106121fe57610100808354040283529160200191612229565b820191906000526020600020905b81548152906001019060200180831161220c57829003601f168201915b5050505050915050919050565b6122478163e9dc637560e01b6136b2565b156122ce5760405163e9dc637560e01b8152306004820152602481018490526001600160a01b0382169063e9dc63759060440160006040518083038186803b15801561229257600080fd5b505afa1580156122a6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611fbd919081019061596e565b6001600160a01b038116600090815260d5602052604090205460ff16612320576001600160a01b038116600090815260d46020526040902061230f84613ab8565b6040516020016121809291906159e5565b6001600160a01b038116600090815260d46020526040902080546121b09061588a565b50919050565b600081815260db60205260408120541561236f5750600090815260db6020526040902090565b600082815260d360209081526040808320546001600160a01b0316835260d9909152902054156123c15750600090815260d360209081526040808320546001600160a01b0316835260d9909152902090565b505030600090815260d96020526040902090565b600083815260d360205260409020546001600160a01b0316301461242b5760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b2103a37b5b2b760991b6044820152606401610704565b600083815260d760205260409020610b80908383614a16565b8281146124635760405162461bcd60e51b815260040161070490615707565b6000805b828110156124a75783838281811061248157612481615689565b90506020020135826124939190615a0a565b91508061249f816156b5565b915050612467565b5061271081106124f35760405162461bcd60e51b8152602060048201526017602482015276496e76616c696420746f74616c20726f79616c7469657360481b6044820152606401610704565b600086815260da6020526040902061250c908686614a96565b50600086815260db60205260409020612526908484614ae9565b50857fabb46fe0761d77584bde75697647804ffd8113abd4d8d06bc664150395eccdee8686868660405161255d9493929190615a22565b60405180910390a2505050505050565b600081815260d360205260409020546001600160a01b0316308114156125d55760405162461bcd60e51b815260206004820152601660248201527f4e6f20657874656e73696f6e20666f7220746f6b656e000000000000000000006044820152606401610704565b6125e060cf82611f9f565b156125fd5760405162461bcd60e51b81526004016107049061565a565b919050565b6000806000612610856136ce565b8054909150600110156126655760405162461bcd60e51b815260206004820152601c60248201527f4d6f7265207468616e203120726f79616c7479207265636569766572000000006044820152606401610704565b8054612678573060009250925050610931565b8060008154811061268b5761268b615689565b6000918252602090912001546001600160a01b0316612710856126ad88612349565b6000815481106126bf576126bf615689565b90600052602060002001546126d49190615aa6565b6126de9190615adb565b92509250509250929050565b6000611fbd836001600160a01b038416613bbd565b81518351146127205760405162461bcd60e51b815260040161070490615aef565b6001600160a01b0384166127465760405162461bcd60e51b815260040161070490615b37565b33612755818787878787613cb0565b60005b845181101561283e57600085828151811061277557612775615689565b60200260200101519050600085838151811061279357612793615689565b6020908102919091018101516000848152609a835260408082206001600160a01b038e1683529093529190912054909150818110156127e45760405162461bcd60e51b815260040161070490615b7c565b6000838152609a602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290612823908490615a0a565b9250508190555050505080612837906156b5565b9050612758565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb878760405161288e929190615bc6565b60405180910390a46128a4818787878787613cbc565b505050505050565b30600090815260d46020908152604090912082516109e392840190614b23565b6001600160a01b0384163014156129185760405162461bcd60e51b815260206004820152601060248201526f10dc99585d1bdc8e88125b9d985b1a5960821b6044820152606401610704565b6001600160a01b0384163b61297d5760405162461bcd60e51b815260206004820152602560248201527f43726561746f723a20457874656e73696f6e206d757374206265206120636f6e6044820152641d1c9858dd60da1b6064820152608401610704565b61298860cd85611f9f565b610b80576001600160a01b038416600090815260d4602052604090206129af908484614a16565b506001600160a01b038416600081815260d56020526040808220805460ff1916851515179055513392917fd8cb8ba4086944eabf43c5535b7712015e4d4c714b24bf812c040ea5b7a3e42a91a36108d460cd8561318e565b6000610732825490565b6000611fbd8383613e27565b828114612a3c5760405162461bcd60e51b815260040161070490615707565b6000805b82811015612a8057838382818110612a5a57612a5a615689565b9050602002013582612a6c9190615a0a565b915080612a78816156b5565b915050612a40565b506127108110612acc5760405162461bcd60e51b8152602060048201526017602482015276496e76616c696420746f74616c20726f79616c7469657360481b6044820152606401610704565b6001600160a01b038616600090815260d860205260409020612aef908686614a96565b506001600160a01b038616600090815260d960205260409020612b13908484614ae9565b506001600160a01b038616301415612b67577f2b6849d5976d799a5b0ca4dfd6b40a3d7afe9ea72c091fa01a958594f9a2659b85858585604051612b5a9493929190615a22565b60405180910390a16128a4565b856001600160a01b03167f535a93d2cb000582c0ebeaa9be4890ec6a287f98eb2df00c54c300612fd78d8f8686868660405161255d9493929190615a22565b612bb1838383613e51565b600082815260dc602052604081208054839290612bcf908490615bd9565b9091555050505050565b612be4838383613f56565b60005b8251811015610b8057818181518110612c0257612c02615689565b602002602001015160dc6000858481518110612c2057612c20615689565b602002602001015181526020019081526020016000206000828254612c459190615bd9565b90915550612c549050816156b5565b9050612be7565b6000825111612c7c5760405162461bcd60e51b815260040161070490615707565b600060d3600084600081518110612c9557612c95615689565b6020026020010151815260200190815260200160002060009054906101000a90046001600160a01b0316905060005b8351811015612d7057816001600160a01b031660d36000868481518110612ced57612ced615689565b6020908102919091018101518252810191909152604001600020546001600160a01b031614612d5e5760405162461bcd60e51b815260206004820152601c60248201527f4d69736d61746368656420746f6b656e206f726967696e61746f7273000000006044820152606401610704565b80612d68816156b5565b915050612cc4565b506001600160a01b0381163014610b8057612d92816303dc6f6560e51b6136b2565b15610b80576040516303dc6f6560e51b81526001600160a01b03821690637b8deca090612dc790879087908790600401615bf0565b600060405180830381600087803b158015612de157600080fd5b505af1158015612df5573d6000803e3d6000fd5b5050505050505050565b33600090815260d460205260409020612e19908484614a16565b5033600090815260d560205260409020805460ff19169115159190911790555050565b600083815260d360205260409020546001600160a01b0316331461242b5760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b2103a37b5b2b760991b6044820152606401610704565b33600090815260d660205260409020610878908383614a16565b6001600160a01b0384163014612ec757612ec78383836140e7565b82516001148015612ed9575081516001145b8015612ee6575080516001145b15612f8d57612f8883600081518110612f0157612f01615689565b602002602001015183600081518110612f1c57612f1c615689565b602002602001015183600081518110612f3757612f37615689565b602002602001015160006001600160401b03811115612f5857612f58614e7a565b6040519080825280601f01601f191660200182016040528015612f82576020820181803683370190505b50614176565b610b80565b82516001148015612f9f575080518251145b1561300d57612f8883600081518110612fba57612fba615689565b6020026020010151838360006001600160401b03811115612fdd57612fdd614e7a565b6040519080825280601f01601f191660200182016040528015613007576020820181803683370190505b506141ab565b8151600114801561301f575080516001145b156130935760005b835181101561308d5761307b84828151811061304557613045615689565b60200260200101518460008151811061306057613060615689565b602002602001015184600081518110612f3757612f37615689565b80613085816156b5565b915050613027565b50610b80565b815160011480156130a5575080518351145b156131125760005b835181101561308d576131008482815181106130cb576130cb615689565b6020026020010151846000815181106130e6576130e6615689565b6020026020010151848481518110612f3757612f37615689565b8061310a816156b5565b9150506130ad565b81518351148015613124575080518351145b156131765760005b835181101561308d5761316484828151811061314a5761314a615689565b60200260200101518483815181106130e6576130e6615689565b8061316e816156b5565b91505061312c565b60405162461bcd60e51b815260040161070490615707565b6000611fbd836001600160a01b03841661422e565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff168061320e575060005460ff16155b61322a5760405162461bcd60e51b8152600401610704906157ab565b600054610100900460ff1615801561324c576000805461ffff19166101011790555b61325461427d565b61325c61427d565b613265826142e7565b80156109e3576000805461ff00191690555050565b600054610100900460ff1680613293575060005460ff16155b6132af5760405162461bcd60e51b8152600401610704906157ab565b600054610100900460ff161580156132d1576000805461ffff19166101011790555b6132d961427d565b6113d5614347565b606060018451111561334c576040805160018082528183019092529060208083019080368337019050509050600182511115801561332b575082516001148061332b575082518451145b6133475760405162461bcd60e51b815260040161070490615707565b6133be565b82516001600160401b0381111561336557613365614e7a565b60405190808252806020026020018201604052801561338e578160200160208202803683370190505b5090508151600014806133a2575081518351145b6133be5760405162461bcd60e51b815260040161070490615707565b60005b815181101561343f5760cc80549060006133da836156b5565b919050555060cc548282815181106133f4576133f4615689565b60209081029190910181019190915260cc54600090815260d39091526040902080546001600160a01b0319166001600160a01b03881617905580613437816156b5565b9150506133c1565b506001600160a01b038516301461345b5761345b8482856140e7565b8351600114801561346d575080516001145b156134c3576134be8460008151811061348857613488615689565b6020026020010151826000815181106134a3576134a3615689565b602002602001015185600081518110612f3757612f37615689565b6135e7565b6001845111156135ae578251600114156135465760005b84518110156135405761352e8582815181106134f8576134f8615689565b60200260200101518360008151811061351357613513615689565b602002602001015186600081518110612f3757612f37615689565b80613538816156b5565b9150506134da565b506135e7565b60005b84518110156135405761359c85828151811061356757613567615689565b60200260200101518360008151811061358257613582615689565b6020026020010151868481518110612f3757612f37615689565b806135a6816156b5565b915050613549565b6135e7846000815181106135c4576135c4615689565b6020026020010151828560006001600160401b03811115612fdd57612fdd614e7a565b60005b815181101561368f5782518110801561361d5750600083828151811061361257613612615689565b602002602001015151115b1561367d5782818151811061363457613634615689565b602002602001015160d7600084848151811061365257613652615689565b60200260200101518152602001908152602001600020908051906020019061367b929190614b23565b505b80613687816156b5565b9150506135ea565b50949350505050565b30600090815260d660205260409020610878908383614a16565b60006136bd836143a7565b8015611fbd5750611fbd83836143da565b600081815260da6020526040812054156136f45750600090815260da6020526040902090565b600082815260d360209081526040808320546001600160a01b0316835260d8909152902054156137465750600090815260d360209081526040808320546001600160a01b0316835260d8909152902090565b505030600090815260d86020526040902090565b600080613766836136ce565b61376f84612349565b91509150915091565b61378360cd82611f9f565b156107b45760405133906001600160a01b038316907fd19cf84cf0fec6bec9ddfa29c63adf83a55707c712f32c8285d6180a7890147990600090a36109e360cd826126ea565b6137d460cd83611f9f565b6138145760405162461bcd60e51b815260206004820152601160248201527024b73b30b634b21032bc3a32b739b4b7b760791b6044820152606401610704565b6001600160a01b03811615806138365750613836816378ea2a9760e11b6136b2565b6138745760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b6044820152606401610704565b6001600160a01b03828116600090815260d160205260409020548116908216146109e3576001600160a01b03828116600081815260d1602052604080822080546001600160a01b031916948616948517905551339392917f6a835c4fcf7e0d398db3762332fdaa1471814ad39f1e2d6d0b3fdabf8efee3e091a45050565b6001600160a01b0384166139185760405162461bcd60e51b815260040161070490615b37565b33613937818787613928886144c3565b613931886144c3565b87613cb0565b6000848152609a602090815260408083206001600160a01b038a1684529091529020548381101561397a5760405162461bcd60e51b815260040161070490615b7c565b6000858152609a602090815260408083206001600160a01b038b81168552925280832087850390559088168252812080548692906139b9908490615a0a565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4613a1982888888888861450e565b50505050505050565b60006001600160e01b031982166328f10a2160e01b1480613a475750613a4782611f1a565b80613a6257506001600160e01b03198216635d9dd7eb60e11b145b80613a7d57506001600160e01b03198216632dde656160e21b145b80613a9857506001600160e01b031982166335681b5360e21b145b8061073257506001600160e01b0319821663152a902d60e11b1492915050565b606081613adc5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115613b065780613af0816156b5565b9150613aff9050600a83615adb565b9150613ae0565b6000816001600160401b03811115613b2057613b20614e7a565b6040519080825280601f01601f191660200182016040528015613b4a576020820181803683370190505b5090505b8415613bb557613b5f600183615bd9565b9150613b6c600a86615c24565b613b77906030615a0a565b60f81b818381518110613b8c57613b8c615689565b60200101906001600160f81b031916908160001a905350613bae600a86615adb565b9450613b4e565b949350505050565b60008181526001830160205260408120548015613ca6576000613be1600183615bd9565b8554909150600090613bf590600190615bd9565b9050818114613c5a576000866000018281548110613c1557613c15615689565b9060005260206000200154905080876000018481548110613c3857613c38615689565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613c6b57613c6b615c38565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610732565b6000915050610732565b6128a4858585856145d8565b6001600160a01b0384163b156128a45760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190613d009089908990889088908890600401615c4e565b602060405180830381600087803b158015613d1a57600080fd5b505af1925050508015613d4a575060408051601f3d908101601f19168201909252613d4791810190615cac565b60015b613df757613d56615cc9565b806308c379a01415613d905750613d6b615ce5565b80613d765750613d92565b8060405162461bcd60e51b81526004016107049190614cae565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610704565b6001600160e01b0319811663bc197c8160e01b14613a195760405162461bcd60e51b815260040161070490615d6e565b6000826000018281548110613e3e57613e3e615689565b9060005260206000200154905092915050565b6001600160a01b038316613e775760405162461bcd60e51b815260040161070490615db6565b33613ea681856000613e88876144c3565b613e91876144c3565b60405180602001604052806000815250613cb0565b6000838152609a602090815260408083206001600160a01b038816845290915290205482811015613ee95760405162461bcd60e51b815260040161070490615df9565b6000848152609a602090815260408083206001600160a01b03898116808652918452828520888703905582518981529384018890529092908616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a45050505050565b6001600160a01b038316613f7c5760405162461bcd60e51b815260040161070490615db6565b8051825114613f9d5760405162461bcd60e51b815260040161070490615aef565b6000339050613fc081856000868660405180602001604052806000815250613cb0565b60005b8351811015614088576000848281518110613fe057613fe0615689565b602002602001015190506000848381518110613ffe57613ffe615689565b6020908102919091018101516000848152609a835260408082206001600160a01b038c16835290935291909120549091508181101561404f5760405162461bcd60e51b815260040161070490615df9565b6000928352609a602090815260408085206001600160a01b038b1686529091529092209103905580614080816156b5565b915050613fc3565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb86866040516140d9929190615bc6565b60405180910390a450505050565b33600090815260d160205260409020546001600160a01b0316156108785733600081815260d16020526040908190205490516378ea2a9760e11b81526001600160a01b039091169163f1d4552e916141489190879087908790600401615e3d565b600060405180830381600087803b15801561416257600080fd5b505af1158015613a19573d6000803e3d6000fd5b614182848484846147df565b600083815260dc6020526040812080548492906141a0908490615a0a565b909155505050505050565b6141b7848484846148a8565b60005b83518110156108d4578281815181106141d5576141d5615689565b602002602001015160dc60008684815181106141f3576141f3615689565b6020026020010151815260200190815260200160002060008282546142189190615a0a565b909155506142279050816156b5565b90506141ba565b600081815260018301602052604081205461427557508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610732565b506000610732565b600054610100900460ff1680614296575060005460ff16155b6142b25760405162461bcd60e51b8152600401610704906157ab565b600054610100900460ff161580156113d5576000805461ffff191661010117905580156107b4576000805461ff001916905550565b600054610100900460ff1680614300575060005460ff16155b61431c5760405162461bcd60e51b8152600401610704906157ab565b600054610100900460ff1615801561433e576000805461ffff19166101011790555b61326582614a03565b600054610100900460ff1680614360575060005460ff16155b61437c5760405162461bcd60e51b8152600401610704906157ab565b600054610100900460ff1615801561439e576000805461ffff19166101011790555b6113d5336131a3565b60006143ba826301ffc9a760e01b6143da565b801561073257506143d3826001600160e01b03196143da565b1592915050565b604080516001600160e01b0319831660248083019190915282518083039091018152604490910182526020810180516001600160e01b03166301ffc9a760e01b179052905160009190829081906001600160a01b0387169061753090614441908690615e90565b6000604051808303818686fa925050503d806000811461447d576040519150601f19603f3d011682016040523d82523d6000602084013e614482565b606091505b509150915060208151101561449d5760009350505050610732565b8180156144b95750808060200190518101906144b99190615eac565b9695505050505050565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106144fd576144fd615689565b602090810291909101015292915050565b6001600160a01b0384163b156128a45760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906145529089908990889088908890600401615ec9565b602060405180830381600087803b15801561456c57600080fd5b505af192505050801561459c575060408051601f3d908101601f1916820190925261459991810190615cac565b60015b6145a857613d56615cc9565b6001600160e01b0319811663f23a6e6160e01b14613a195760405162461bcd60e51b815260040161070490615d6e565b60008251116145f95760405162461bcd60e51b815260040161070490615707565b600060d360008460008151811061461257614612615689565b6020026020010151815260200190815260200160002060009054906101000a90046001600160a01b0316905060005b83518110156146ed57816001600160a01b031660d3600086848151811061466a5761466a615689565b6020908102919091018101518252810191909152604001600020546001600160a01b0316146146db5760405162461bcd60e51b815260206004820152601c60248201527f4d69736d61746368656420746f6b656e206f726967696e61746f7273000000006044820152606401610704565b806146e5816156b5565b915050614641565b506001600160a01b038116600090815260d2602052604090205460ff16156108d45760405163883da93360e01b81526001600160a01b0382169063883da93390614741908890889088908890600401615f01565b602060405180830381600087803b15801561475b57600080fd5b505af115801561476f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906147939190615eac565b6108d45760405162461bcd60e51b815260206004820152601a60248201527f457874656e73696f6e20617070726f76616c206661696c7572650000000000006044820152606401610704565b6001600160a01b0384166148055760405162461bcd60e51b815260040161070490615f3f565b3361481681600087613928886144c3565b6000848152609a602090815260408083206001600160a01b038916845290915281208054859290614848908490615a0a565b909155505060408051858152602081018590526001600160a01b0380881692600092918516917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46108d48160008787878761450e565b6001600160a01b0384166148ce5760405162461bcd60e51b815260040161070490615f3f565b81518351146148ef5760405162461bcd60e51b815260040161070490615aef565b336148ff81600087878787613cb0565b60005b845181101561499b5783818151811061491d5761491d615689565b6020026020010151609a600087848151811061493b5761493b615689565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b0316815260200190815260200160002060008282546149839190615a0a565b90915550819050614993816156b5565b915050614902565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516149ec929190615bc6565b60405180910390a46108d481600087878787613cbc565b80516109e390609c906020840190614b23565b828054614a229061588a565b90600052602060002090601f016020900481019282614a445760008555614a8a565b82601f10614a5d5782800160ff19823516178555614a8a565b82800160010185558215614a8a579182015b82811115614a8a578235825591602001919060010190614a6f565b50610c30929150614b97565b828054828255906000526020600020908101928215614a8a579160200282015b82811115614a8a5781546001600160a01b0319166001600160a01b03843516178255602090920191600190910190614ab6565b828054828255906000526020600020908101928215614a8a5791602002820182811115614a8a578235825591602001919060010190614a6f565b828054614b2f9061588a565b90600052602060002090601f016020900481019282614b515760008555614a8a565b82601f10614b6a57805160ff1916838001178555614a8a565b82800160010185558215614a8a579182015b82811115614a8a578251825591602001919060010190614b7c565b5b80821115610c305760008155600101614b98565b6001600160a01b03811681146107b457600080fd5b60008060408385031215614bd457600080fd5b8235614bdf81614bac565b946020939093013593505050565b6001600160e01b0319811681146107b457600080fd5b600060208284031215614c1557600080fd5b8135611fbd81614bed565b600060208284031215614c3257600080fd5b8135611fbd81614bac565b600060208284031215614c4f57600080fd5b5035919050565b60005b83811015614c71578181015183820152602001614c59565b83811115610b805750506000910152565b60008151808452614c9a816020860160208601614c56565b601f01601f19169290920160200192915050565b602081526000611fbd6020830184614c82565b600081518084526020808501945080840160005b83811015614cf157815187529582019590820190600101614cd5565b509495945050505050565b602081526000611fbd6020830184614cc1565b60008083601f840112614d2157600080fd5b5081356001600160401b03811115614d3857600080fd5b60208301915083602082850101111561093157600080fd5b600080600060408486031215614d6557600080fd5b8335925060208401356001600160401b03811115614d8257600080fd5b614d8e86828701614d0f565b9497909650939450505050565b60008083601f840112614dad57600080fd5b5081356001600160401b03811115614dc457600080fd5b6020830191508360208260051b850101111561093157600080fd5b600080600080600060608688031215614df757600080fd5b8535945060208601356001600160401b0380821115614e1557600080fd5b614e2189838a01614d9b565b90965094506040880135915080821115614e3a57600080fd5b50614e4788828901614d9b565b969995985093965092949392505050565b60008060408385031215614e6b57600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b0381118282101715614eb557614eb5614e7a565b6040525050565b60006001600160401b03821115614ed557614ed5614e7a565b5060051b60200190565b600082601f830112614ef057600080fd5b81356020614efd82614ebc565b604051614f0a8282614e90565b83815260059390931b8501820192828101915086841115614f2a57600080fd5b8286015b84811015614f455780358352918301918301614f2e565b509695505050505050565b60006001600160401b03821115614f6957614f69614e7a565b50601f01601f191660200190565b6000614f8283614f50565b604051614f8f8282614e90565b809250848152858585011115614fa457600080fd5b8484602083013760006020868301015250509392505050565b600082601f830112614fce57600080fd5b611fbd83833560208501614f77565b600080600080600060a08688031215614ff557600080fd5b853561500081614bac565b9450602086013561501081614bac565b935060408601356001600160401b038082111561502c57600080fd5b61503889838a01614edf565b9450606088013591508082111561504e57600080fd5b61505a89838a01614edf565b9350608088013591508082111561507057600080fd5b5061507d88828901614fbd565b9150509295509295909350565b6000806020838503121561509d57600080fd5b82356001600160401b038111156150b357600080fd5b6150bf85828601614d0f565b90969095509350505050565b6000806000604084860312156150e057600080fd5b83356150eb81614bac565b925060208401356001600160401b03811115614d8257600080fd5b600081518084526020808501945080840160005b83811015614cf15781516001600160a01b03168752958201959082019060010161511a565b602081526000611fbd6020830184615106565b6000806000806040858703121561516857600080fd5b84356001600160401b038082111561517f57600080fd5b61518b88838901614d9b565b909650945060208701359150808211156151a457600080fd5b506151b187828801614d9b565b95989497509550505050565b6000806000606084860312156151d257600080fd5b83356151dd81614bac565b925060208401356001600160401b03808211156151f957600080fd5b61520587838801614edf565b9350604086013591508082111561521b57600080fd5b5061522886828701614edf565b9150509250925092565b80151581146107b457600080fd5b6000806000806060858703121561525657600080fd5b843561526181614bac565b935060208501356001600160401b0381111561527c57600080fd5b61528887828801614d0f565b909450925050604085013561529c81615232565b939692955090935050565b600080604083850312156152ba57600080fd5b82356001600160401b03808211156152d157600080fd5b818501915085601f8301126152e557600080fd5b813560206152f282614ebc565b6040516152ff8282614e90565b83815260059390931b850182019282810191508984111561531f57600080fd5b948201945b8386101561534657853561533781614bac565b82529482019490820190615324565b9650508601359250508082111561535c57600080fd5b5061536985828601614edf565b9150509250929050565b60008060006040848603121561538857600080fd5b83356001600160401b038082111561539f57600080fd5b6153ab87838801614edf565b945060208601359150808211156153c157600080fd5b50614d8e86828701614d9b565b600080600080600080606087890312156153e757600080fd5b86356001600160401b03808211156153fe57600080fd5b61540a8a838b01614d9b565b9098509650602089013591508082111561542357600080fd5b61542f8a838b01614d9b565b9096509450604089013591508082111561544857600080fd5b5061545589828a01614d9b565b979a9699509497509295939492505050565b60008060006040848603121561547c57600080fd5b83356001600160401b0381111561549257600080fd5b61549e86828701614d0f565b90945092505060208401356154b281615232565b809150509250925092565b600080604083850312156154d057600080fd5b82356154db81614bac565b915060208301356154eb81615232565b809150509250929050565b60006020828403121561550857600080fd5b8135611fbd81615232565b60008060008060006060868803121561552b57600080fd5b853561553681614bac565b945060208601356001600160401b0380821115614e1557600080fd5b6040815260006155656040830185615106565b82810360208401526155778185614cc1565b95945050505050565b6000806040838503121561559357600080fd5b823561559e81614bac565b915060208301356154eb81614bac565b600080600080600060a086880312156155c657600080fd5b85356155d181614bac565b945060208601356155e181614bac565b9350604086013592506060860135915060808601356001600160401b0381111561560a57600080fd5b61507d88828901614fbd565b60208082526024908201527f41646d696e436f6e74726f6c3a204d757374206265206f776e6572206f7220616040820152633236b4b760e11b606082015260800190565b602080825260159082015274115e1d195b9cda5bdb88189b1858dadb1a5cdd1959605a1b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006000198214156156c9576156c961569f565b5060010190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6020808252600d908201526c125b9d985b1a59081a5b9c1d5d609a1b604082015260600190565b6020808252601c908201527f4d757374206265207265676973746572656420657874656e73696f6e00000000604082015260600190565b6000808335601e1984360301811261577c57600080fd5b8301803591506001600160401b0382111561579657600080fd5b60200191503681900382131561093157600080fd5b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b600061580483614ebc565b6040516158118282614e90565b84815260208082019250600586901b85013681111561582f57600080fd5b855b8181101561587e5780356001600160401b038111156158505760008081fd5b870136601f8201126158625760008081fd5b615870368235868401614f77565b865250938201938201615831565b50919695505050505050565b600181811c9082168061589e57607f821691505b6020821081141561234357634e487b7160e01b600052602260045260246000fd5b8054600090600181811c90808316806158d957607f831692505b60208084108214156158fb57634e487b7160e01b600052602260045260246000fd5b81801561590f57600181146159205761594d565b60ff1986168952848901965061594d565b60008881526020902060005b868110156159455781548b82015290850190830161592c565b505084890196505b50505050505092915050565b6000613bb561596883866158bf565b846158bf565b60006020828403121561598057600080fd5b81516001600160401b0381111561599657600080fd5b8201601f810184136159a757600080fd5b80516159b281614f50565b6040516159bf8282614e90565b8281528660208486010111156159d457600080fd5b6144b9836020830160208701614c56565b60006159f182856158bf565b8351615a01818360208801614c56565b01949350505050565b60008219821115615a1d57615a1d61569f565b500190565b6040808252810184905260008560608301825b87811015615a65578235615a4881614bac565b6001600160a01b0316825260209283019290910190600101615a35565b5083810360208501528481526001600160fb1b03851115615a8557600080fd5b8460051b915081866020830137600091016020019081529695505050505050565b6000816000190483118215151615615ac057615ac061569f565b500290565b634e487b7160e01b600052601260045260246000fd5b600082615aea57615aea615ac5565b500490565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6040815260006155656040830185614cc1565b600082821015615beb57615beb61569f565b500390565b6001600160a01b0384168152606060208201526000615c126060830185614cc1565b82810360408401526144b98185614cc1565b600082615c3357615c33615ac5565b500690565b634e487b7160e01b600052603160045260246000fd5b60006001600160a01b03808816835280871660208401525060a06040830152615c7a60a0830186614cc1565b8281036060840152615c8c8186614cc1565b90508281036080840152615ca08185614c82565b98975050505050505050565b600060208284031215615cbe57600080fd5b8151611fbd81614bed565b600060033d1115615ce25760046000803e5060005160e01c5b90565b600060443d1015615cf35790565b6040516003193d81016004833e81513d6001600160401b038160248401118184111715615d2257505050505090565b8285019150815181811115615d3a5750505050505090565b843d8701016020828501011115615d545750505050505090565b615d6360208286010187614e90565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526024908201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604082015263616e636560e01b606082015260800190565b6001600160a01b0385168152608060208201526000615e5f6080830186615106565b8281036040840152615e718186614cc1565b90508281036060840152615e858185614cc1565b979650505050505050565b60008251615ea2818460208701614c56565b9190910192915050565b600060208284031215615ebe57600080fd5b8151611fbd81615232565b60006001600160a01b03808816835280871660208401525084604083015283606083015260a06080830152615e8560a0830184614c82565b60006001600160a01b03808716835280861660208401525060806040830152615f2d6080830185614cc1565b8281036060840152615e858185614cc1565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b60608201526080019056fea26469706673582212209bb76f7f1d77f659f312e4694b698d5447d09878f0a18e13cafb2ffeb50f07e164736f6c63430008090033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
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.