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
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
ERC1155ProjectImpl
Compiler Version
v0.8.2+commit.661d1103
Optimization Enabled:
Yes with 500 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.2; /// @title: My Project import "./core/ERC1155/ERC1155ProjectUpgradeable.sol"; contract ERC1155ProjectImpl is ERC1155ProjectUpgradeable { /// @custom:oz-upgrades-unsafe-allow constructor constructor() initializer {} function initialize() public initializer { _initialize(); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.2; import "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; import "../../access/AdminControlUpgradeable.sol"; import "./ERC1155ProjectCoreUpgradeable.sol"; /** * @dev ERC1155Project implementation */ abstract contract ERC1155ProjectUpgradeable is Initializable, AdminControlUpgradeable, ERC1155Upgradeable, ERC1155ProjectCoreUpgradeable, UUPSUpgradeable { mapping(uint256 => uint256) private _totalSupply; function _initialize() internal initializer { __AdminControl_init(); __ERC1155_init(""); __ERC1155ProjectCore_init(); __UUPSUpgradeable_init(); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(AdminControlUpgradeable, ERC1155Upgradeable, ERC1155ProjectCoreUpgradeable) returns (bool) { return super.supportsInterface(interfaceId); } /** * @dev Total amount of tokens in with a given id. */ function totalSupply(uint256 id) public view returns (uint256) { return _totalSupply[id]; } /** * @dev Indicates whether any token exist with a given id, or not. */ function exists(uint256 id) public view returns (bool) { return totalSupply(id) > 0; } function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory tokenIds, uint256[] memory amounts, bytes memory data ) internal override { super._beforeTokenTransfer(operator, from, to, tokenIds, amounts, data); if (from == address(0)) { for (uint256 i = 0; i < tokenIds.length; ++i) { _totalSupply[tokenIds[i]] += amounts[i]; } } if (to == address(0)) { for (uint256 i = 0; i < tokenIds.length; ++i) { _totalSupply[tokenIds[i]] -= amounts[i]; } } _approveTransfer(from, to, tokenIds, amounts); } /** * @dev See {IProjectCore-registerManager}. */ function registerManager( address manager, string calldata baseURI, bool baseURIIdentical ) external override adminRequired nonBlacklistRequired(manager) { _registerManager(manager, baseURI, baseURIIdentical); } /** * @dev See {IProjectCore-unregisterManager}. */ function unregisterManager(address manager) external override adminRequired { _unregisterManager(manager); } /** * @dev See {IProjectCore-blacklistManager}. */ function blacklistManager(address manager) external override adminRequired { _blacklistManager(manager); } /** * @dev See {IProjectCore-managerSetBaseTokenURI}. */ function managerSetBaseTokenURI(string calldata _uri, bool identical) external override managerRequired { _managerSetBaseTokenURI(_uri, identical); } /** * @dev See {IProjectCore-managerSetTokenURIPrefix}. */ function managerSetTokenURIPrefix(string calldata prefix) external override managerRequired { _managerSetTokenURIPrefix(prefix); } /** * @dev See {IProjectCore-managerSetTokenURI}. */ function managerSetTokenURI(uint256 tokenId, string calldata _uri) external override managerRequired { _managerSetTokenURI(tokenId, _uri); } /** * @dev See {IProjectCore-managerSetTokenURI}. */ function managerSetTokenURI(uint256[] calldata tokenIds, string[] calldata uris) external override managerRequired { require(tokenIds.length == uris.length, "Invalid input"); for (uint256 i = 0; i < tokenIds.length; i++) { _managerSetTokenURI(tokenIds[i], uris[i]); } } /** * @dev See {IProjectCore-setBaseTokenURI}. */ function setBaseTokenURI(string calldata _uri) external override adminRequired { _setBaseTokenURI(_uri); } /** * @dev See {IProjectCore-setTokenURIPrefix}. */ function setTokenURIPrefix(string calldata prefix) external override adminRequired { _setTokenURIPrefix(prefix); } /** * @dev See {IProjectCore-setTokenURI}. */ function setTokenURI(uint256 tokenId, string calldata _uri) external override adminRequired { _setTokenURI(tokenId, _uri); } /** * @dev See {IProjectCore-setTokenURI}. */ function setTokenURI(uint256[] calldata tokenIds, string[] calldata uris) external override adminRequired { require(tokenIds.length == uris.length, "Invalid input"); for (uint256 i = 0; i < tokenIds.length; i++) { _setTokenURI(tokenIds[i], uris[i]); } } /** * @dev See {IProjectCore-setMintPermissions}. */ function setMintPermissions(address manager, address permissions) external override adminRequired { // removed mintPermissions to reduce size // _setMintPermissions(manager, permissions); } /** * @dev See {IERC1155ProjectCore-adminMintBatch}. batch mint tokenIds and amounts to each address in to */ function adminMintBatch( address[] calldata to, uint256[] calldata tokenIds, uint256[] calldata amounts, bytes calldata data ) external virtual override nonReentrant adminRequired { for (uint256 i = 0; i < tokenIds.length; i++) { _tokensManager[tokenIds[i]] = address(this); } for (uint256 i = 0; i < to.length; i++) { _mintBatch(to[i], tokenIds, amounts, data); } } /** * @dev See {IERC1155ProjectCore-managerMintBatch}. */ function managerMintBatch( address[] calldata to, uint256[] calldata tokenIds, uint256[] calldata amounts, bytes calldata data ) external virtual override nonReentrant managerRequired { for (uint256 i = 0; i < tokenIds.length; i++) { _tokensManager[tokenIds[i]] = _msgSender(); } for (uint256 i = 0; i < to.length; i++) { _mintBatch(to[i], tokenIds, amounts, data); } } /** * @dev See {IERC1155ProjectCore-tokenManager}. */ function tokenManager(uint256 tokenId) public view virtual override returns (address) { require(exists(tokenId), "Nonexistent token"); return _tokenManager(tokenId); } /** * @dev See {IERC1155ProjectCore-burn}. */ function burn( address account, uint256[] memory tokenIds, uint256[] memory amounts, bytes calldata data ) public virtual override nonReentrant { require( account == _msgSender() || isApprovedForAll(account, _msgSender()), "ERC1155: 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, data); } /** * @dev See {IProjectCore-setDefaultRoyalties}. */ function setDefaultRoyalty(address receiver, uint256 royaltyBPs) external override adminRequired { _setDefaultRoyalty(receiver, royaltyBPs); } /** * @dev See {IProjectCore-setTokenRoyalties}. */ function setTokenRoyalty( uint256 tokenId, address receiver, uint256 royaltyBPs ) external override adminRequired { _setTokenRoyalty(tokenId, receiver, royaltyBPs); } /** * @dev See {IProjectCore-setContractURI} */ function setContractURI(string memory _uri) external override adminRequired { _setContractURI(_uri); } /** * @dev See {IERC1155Metadata-tokenURI}. */ function uri(uint256 tokenId) public view virtual override returns (string memory) { require(exists(tokenId), "Nonexistent token"); return _tokenURI(tokenId); } function _authorizeUpgrade(address newImplementation) internal override onlyOwner {} uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/ERC1155.sol) 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 onlyInitializing { __ERC1155_init_unchained(uri_); } function __ERC1155_init_unchained(string memory uri_) internal onlyInitializing { _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 { _setApprovalForAll(_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 `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mint( address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, address(0), to, _asSingletonArray(id), _asSingletonArray(amount), data); _balances[id][to] += amount; emit TransferSingle(operator, address(0), to, id, amount); _doSafeTransferAcceptanceCheck(operator, address(0), to, 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 `from` * * Requirements: * * - `from` cannot be the zero address. * - `from` must have at least `amount` tokens of token type `id`. */ function _burn( address from, uint256 id, uint256 amount ) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, address(0), _asSingletonArray(id), _asSingletonArray(amount), ""); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][from] = fromBalance - amount; } emit TransferSingle(operator, from, 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 from, uint256[] memory ids, uint256[] memory amounts ) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); 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: burn amount exceeds balance"); unchecked { _balances[id][from] = fromBalance - amount; } } emit TransferBatch(operator, from, address(0), ids, amounts); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC1155: setting approval status for self"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @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.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.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; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[47] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.0; import "../../utils/AddressUpgradeable.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() initializer {} * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { // If the contract is initializing we ignore whether _initialized is set in order to support multiple // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the // contract may have been reentered. require(_initializing ? _isConstructor() : !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} modifier, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } function _isConstructor() private view returns (bool) { return !AddressUpgradeable.isContract(address(this)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/UUPSUpgradeable.sol) pragma solidity ^0.8.0; import "../../interfaces/draft-IERC1822Upgradeable.sol"; import "../ERC1967/ERC1967UpgradeUpgradeable.sol"; import "./Initializable.sol"; /** * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy. * * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing * `UUPSUpgradeable` with a custom implementation of upgrades. * * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism. * * _Available since v4.1._ */ abstract contract UUPSUpgradeable is Initializable, IERC1822ProxiableUpgradeable, ERC1967UpgradeUpgradeable { function __UUPSUpgradeable_init() internal onlyInitializing { } function __UUPSUpgradeable_init_unchained() internal onlyInitializing { } /// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment address private immutable __self = address(this); /** * @dev Check that the execution is being performed through a delegatecall call and that the execution context is * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to * fail. */ modifier onlyProxy() { require(address(this) != __self, "Function must be called through delegatecall"); require(_getImplementation() == __self, "Function must be called through active proxy"); _; } /** * @dev Check that the execution is not being performed through a delegate call. This allows a function to be * callable on the implementing contract but not through proxies. */ modifier notDelegated() { require(address(this) == __self, "UUPSUpgradeable: must not be called through delegatecall"); _; } /** * @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the * implementation. It is used to validate that the this implementation remains valid after an upgrade. * * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this * function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier. */ function proxiableUUID() external view virtual override notDelegated returns (bytes32) { return _IMPLEMENTATION_SLOT; } /** * @dev Upgrade the implementation of the proxy to `newImplementation`. * * Calls {_authorizeUpgrade}. * * Emits an {Upgraded} event. */ function upgradeTo(address newImplementation) external virtual onlyProxy { _authorizeUpgrade(newImplementation); _upgradeToAndCallUUPS(newImplementation, new bytes(0), false); } /** * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call * encoded in `data`. * * Calls {_authorizeUpgrade}. * * Emits an {Upgraded} event. */ function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual onlyProxy { _authorizeUpgrade(newImplementation); _upgradeToAndCallUUPS(newImplementation, data, true); } /** * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by * {upgradeTo} and {upgradeToAndCall}. * * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}. * * ```solidity * function _authorizeUpgrade(address) internal override onlyOwner {} * ``` */ function _authorizeUpgrade(address newImplementation) internal virtual; /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.2; import "@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import "./IAdminControlUpgradeable.sol"; abstract contract AdminControlUpgradeable is Initializable, OwnableUpgradeable, IAdminControlUpgradeable, ERC165Upgradeable { using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet; // Track registered admins EnumerableSetUpgradeable.AddressSet private _admins; /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __AdminControl_init() internal initializer { __Context_init_unchained(); __Ownable_init_unchained(); __ERC165_init_unchained(); __AdminControl_init_unchained(); } function __AdminControl_init_unchained() internal initializer {} /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) { return interfaceId == type(IAdminControlUpgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Only allows approved admins to call the specified function */ modifier adminRequired() { require(isAdmin(_msgSender()), "AdminControl: Must be owner or admin"); _; } /** * @dev See {IAdminControl-getAdmins}. */ function getAdmins() external view override returns (address[] memory admins) { admins = new address[](_admins.length()); for (uint256 i = 0; i < _admins.length(); i++) { admins[i] = _admins.at(i); } return admins; } /** * @dev See {IAdminControl-approveAdmin}. */ function approveAdmin(address admin) external override onlyOwner { if (_admins.add(admin)) { emit AdminApproved(admin, msg.sender); } } /** * @dev See {IAdminControl-revokeAdmin}. */ function revokeAdmin(address admin) external override onlyOwner { if (_admins.remove(admin)) { emit AdminRevoked(admin, msg.sender); } } /** * @dev See {IAdminControl-isAdmin}. */ function isAdmin(address admin) public view override returns (bool) { return (owner() == admin || _admins.contains(admin)); } uint256[49] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.2; import "@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import "../../managers/ERC1155/IERC1155ProjectApproveTransferManager.sol"; import "../../managers/ERC1155/IERC1155ProjectBurnableManager.sol"; import "./IERC1155ProjectCoreUpgradeable.sol"; import "../project-base/ProjectCoreUpgradeable.sol"; /** * @dev Core ERC1155 project implementation */ abstract contract ERC1155ProjectCoreUpgradeable is Initializable, ProjectCoreUpgradeable, IERC1155ProjectCoreUpgradeable { using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet; /** * @dev initializer */ function __ERC1155ProjectCore_init() internal initializer { __ProjectCore_init_unchained(); __ReentrancyGuard_init_unchained(); __ERC165_init_unchained(); __ERC1155ProjectCore_init_unchained(); } function __ERC1155ProjectCore_init_unchained() internal initializer {} /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ProjectCoreUpgradeable, IERC165Upgradeable) returns (bool) { return interfaceId == type(IERC1155ProjectCoreUpgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IProjectCore-managerSetApproveTransfer}. */ function managerSetApproveTransfer(bool enabled) external override managerRequired { require( !enabled || ERC165CheckerUpgradeable.supportsInterface( msg.sender, type(IERC1155ProjectApproveTransferManager).interfaceId ), "Manager must implement IERC1155ProjectApproveTransferManager" ); if (_managerApproveTransfers[msg.sender] != enabled) { _managerApproveTransfers[msg.sender] = enabled; emit ManagerApproveTransferUpdated(msg.sender, enabled); } } /** * Post burn actions */ function _postBurn( address owner, uint256[] memory tokenIds, uint256[] memory amounts, bytes memory data ) internal virtual { require(tokenIds.length > 0, "Invalid input"); address manager = _tokensManager[tokenIds[0]]; for (uint256 i = 0; i < tokenIds.length; i++) { require(_tokensManager[tokenIds[i]] == manager, "Mismatched token originators"); } // Callback to originating extension if needed if (manager != address(this)) { if (ERC165CheckerUpgradeable.supportsInterface(manager, type(IERC1155ProjectBurnableManager).interfaceId)) { IERC1155ProjectBurnableManager(manager).onBurn(owner, tokenIds, amounts, data); } } } /** * Approve a transfer */ function _approveTransfer( address from, address to, uint256[] memory tokenIds, uint256[] memory amounts ) internal { require(tokenIds.length > 0, "Invalid input"); address manager = _tokensManager[tokenIds[0]]; for (uint256 i = 0; i < tokenIds.length; i++) { require(_tokensManager[tokenIds[i]] == manager, "Mismatched token originators"); } if (_managerApproveTransfers[manager]) { require( IERC1155ProjectApproveTransferManager(manager).approveTransfer(from, to, tokenIds, amounts), "Manager approval failure" ); } } uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155.sol) 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 // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol) 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. * * NOTE: 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. * * NOTE: 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 // OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol) 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 // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library 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 * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; 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 onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable { function __ERC165_init() internal onlyInitializing { } function __ERC165_init_unchained() internal onlyInitializing { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165Upgradeable).interfaceId; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface 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 // OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol) pragma solidity ^0.8.0; /** * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified * proxy whose upgrades are fully controlled by the current implementation. */ interface IERC1822ProxiableUpgradeable { /** * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation * address. * * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this * function revert if invoked through a proxy. */ function proxiableUUID() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (proxy/ERC1967/ERC1967Upgrade.sol) pragma solidity ^0.8.2; import "../beacon/IBeaconUpgradeable.sol"; import "../../interfaces/draft-IERC1822Upgradeable.sol"; import "../../utils/AddressUpgradeable.sol"; import "../../utils/StorageSlotUpgradeable.sol"; import "../utils/Initializable.sol"; /** * @dev This abstract contract provides getters and event emitting update functions for * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots. * * _Available since v4.1._ * * @custom:oz-upgrades-unsafe-allow delegatecall */ abstract contract ERC1967UpgradeUpgradeable is Initializable { function __ERC1967Upgrade_init() internal onlyInitializing { } function __ERC1967Upgrade_init_unchained() internal onlyInitializing { } // This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1 bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143; /** * @dev Storage slot with the address of the current implementation. * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /** * @dev Emitted when the implementation is upgraded. */ event Upgraded(address indexed implementation); /** * @dev Returns the current implementation address. */ function _getImplementation() internal view returns (address) { return StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value; } /** * @dev Stores a new address in the EIP1967 implementation slot. */ function _setImplementation(address newImplementation) private { require(AddressUpgradeable.isContract(newImplementation), "ERC1967: new implementation is not a contract"); StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; } /** * @dev Perform implementation upgrade * * Emits an {Upgraded} event. */ function _upgradeTo(address newImplementation) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); } /** * @dev Perform implementation upgrade with additional setup call. * * Emits an {Upgraded} event. */ function _upgradeToAndCall( address newImplementation, bytes memory data, bool forceCall ) internal { _upgradeTo(newImplementation); if (data.length > 0 || forceCall) { _functionDelegateCall(newImplementation, data); } } /** * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call. * * Emits an {Upgraded} event. */ function _upgradeToAndCallUUPS( address newImplementation, bytes memory data, bool forceCall ) internal { // Upgrades from old implementations will perform a rollback test. This test requires the new // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing // this special case will break upgrade paths from old UUPS implementation to new ones. if (StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT).value) { _setImplementation(newImplementation); } else { try IERC1822ProxiableUpgradeable(newImplementation).proxiableUUID() returns (bytes32 slot) { require(slot == _IMPLEMENTATION_SLOT, "ERC1967Upgrade: unsupported proxiableUUID"); } catch { revert("ERC1967Upgrade: new implementation is not UUPS"); } _upgradeToAndCall(newImplementation, data, forceCall); } } /** * @dev Storage slot with the admin of the contract. * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; /** * @dev Emitted when the admin account has changed. */ event AdminChanged(address previousAdmin, address newAdmin); /** * @dev Returns the current admin. */ function _getAdmin() internal view returns (address) { return StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value; } /** * @dev Stores a new address in the EIP1967 admin slot. */ function _setAdmin(address newAdmin) private { require(newAdmin != address(0), "ERC1967: new admin is the zero address"); StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value = newAdmin; } /** * @dev Changes the admin of the proxy. * * Emits an {AdminChanged} event. */ function _changeAdmin(address newAdmin) internal { emit AdminChanged(_getAdmin(), newAdmin); _setAdmin(newAdmin); } /** * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy. * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor. */ bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50; /** * @dev Emitted when the beacon is upgraded. */ event BeaconUpgraded(address indexed beacon); /** * @dev Returns the current beacon. */ function _getBeacon() internal view returns (address) { return StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value; } /** * @dev Stores a new beacon in the EIP1967 beacon slot. */ function _setBeacon(address newBeacon) private { require(AddressUpgradeable.isContract(newBeacon), "ERC1967: new beacon is not a contract"); require( AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()), "ERC1967: beacon implementation is not a contract" ); StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value = newBeacon; } /** * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that). * * Emits a {BeaconUpgraded} event. */ function _upgradeBeaconToAndCall( address newBeacon, bytes memory data, bool forceCall ) internal { _setBeacon(newBeacon); emit BeaconUpgraded(newBeacon); if (data.length > 0 || forceCall) { _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data); } } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function _functionDelegateCall(address target, bytes memory data) private returns (bytes memory) { require(AddressUpgradeable.isContract(target), "Address: delegate call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return AddressUpgradeable.verifyCallResult(success, returndata, "Address: low-level delegate call failed"); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol) pragma solidity ^0.8.0; /** * @dev This is the interface that {BeaconProxy} expects of its beacon. */ interface IBeaconUpgradeable { /** * @dev Must return an address that can be used as a delegate call target. * * {BeaconProxy} will check that this address is a contract. */ function implementation() external view returns (address); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol) pragma solidity ^0.8.0; /** * @dev Library for reading and writing primitive types to specific storage slots. * * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. * This library helps with reading and writing to such slots without the need for inline assembly. * * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. * * Example usage to set ERC1967 implementation slot: * ``` * contract ERC1967 { * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; * * function _getImplementation() internal view returns (address) { * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; * } * * function _setImplementation(address newImplementation) internal { * require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` * * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._ */ library StorageSlotUpgradeable { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { assembly { r.slot := slot } } /** * @dev Returns an `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { assembly { r.slot := slot } } /** * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { assembly { r.slot := slot } } /** * @dev Returns an `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { assembly { r.slot := slot } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/structs/EnumerableSet.sol) pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. */ library EnumerableSetUpgradeable { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastvalue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastvalue; // Update the index for the moved value set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { return _values(set._inner); } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; assembly { result := store } return result; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/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 onlyInitializing { __Ownable_init_unchained(); } function __Ownable_init_unchained() internal onlyInitializing { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.2; import "@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol"; /** * @dev Interface for admin control */ interface IAdminControlUpgradeable is IERC165Upgradeable { 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.2; import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; /** * Implement this if you want your manager to approve a transfer */ interface IERC1155ProjectApproveTransferManager is IERC165 { /** * @dev Set whether or not the project will check the manager for approval of token transfer */ function setApproveTransfer(address project, bool enabled) external; /** * @dev Called by project 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.2; import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; /** * @dev Your manager is required to implement this interface if it wishes * to receive the onBurn callback whenever a token the manager created is * burned */ interface IERC1155ProjectBurnableManager is IERC165 { /** * @dev callback handler for burn events */ function onBurn( address owner, uint256[] calldata tokenIds, uint256[] calldata amounts, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.2; import "../project-base/IProjectCoreUpgradeable.sol"; /** * @dev Core ERC1155 project interface */ interface IERC1155ProjectCoreUpgradeable is IProjectCoreUpgradeable { /** * @dev batch mint tokens with no manager. Can only be called by an admin. batch mint tokenIds and amounts to each address in to */ function adminMintBatch( address[] calldata to, uint256[] calldata tokenIds, uint256[] calldata amounts, bytes calldata data ) external; /** * @dev batch mint a token. Can only be called by a registered manager. * Returns tokenIds minted */ function managerMintBatch( address[] calldata to, uint256[] calldata tokenIds, uint256[] calldata amounts, bytes calldata data ) external; /** * @dev burn tokens. Can only be called by token owner or approved address. * On burn, calls back to the registered manager's onBurn method */ function burn( address account, uint256[] calldata tokenIds, uint256[] calldata amounts, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.2; import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165CheckerUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/structs/EnumerableSetUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import "../../managers/project-token-uri-manager/IProjectTokenURIManager.sol"; import "./IProjectCoreUpgradeable.sol"; import "../ERC2981/ERC2981Upgradeable.sol"; /** * @dev Core project implementation */ abstract contract ProjectCoreUpgradeable is Initializable, ERC165Upgradeable, ERC2981Upgradeable, IProjectCoreUpgradeable, ReentrancyGuardUpgradeable { using StringsUpgradeable for uint256; using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet; using AddressUpgradeable for address; // Track registered managers data EnumerableSetUpgradeable.AddressSet internal _managers; EnumerableSetUpgradeable.AddressSet internal _blacklistedManagers; mapping(address => address) internal _managerPermissions; mapping(address => bool) internal _managerApproveTransfers; // For tracking which manager a token was minted by mapping(uint256 => address) internal _tokensManager; // The baseURI for a given manager mapping(address => string) private _managerBaseURI; mapping(address => bool) private _managerBaseURIIdentical; // The prefix for any tokens with a uri configured mapping(address => string) private _managerURIPrefix; // Mapping for individual token URIs mapping(uint256 => string) internal _tokenURIs; string internal _contractURI; /** * @dev initializer */ function __ProjectCore_init() internal initializer { __ERC2981_init_unchained(); __ERC165_init_unchained(); __ReentrancyGuard_init_unchained(); __ProjectCore_init_unchained(); } function __ProjectCore_init_unchained() internal initializer {} /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable, ERC2981Upgradeable) returns (bool) { return interfaceId == type(IProjectCoreUpgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Only allows registered managers to call the specified function */ modifier managerRequired() { require(_managers.contains(msg.sender), "Must be registered manager"); _; } /** * @dev Only allows non-blacklisted managers */ modifier nonBlacklistRequired(address manager) { require(!_blacklistedManagers.contains(manager), "Manager blacklisted"); _; } /** * @dev See {IProjectCore-contractURI}. */ function contractURI() external view override returns (string memory) { return _contractURI; } /** * @dev See {IProjectCore-getManagers}. */ function getManagers() external view override returns (address[] memory managers) { managers = new address[](_managers.length()); for (uint256 i = 0; i < _managers.length(); i++) { managers[i] = _managers.at(i); } return managers; } /** * @dev Register an manager */ function _registerManager( address manager, string calldata baseURI, bool baseURIIdentical ) internal { require(manager != address(this), "Project: Invalid"); require(manager.isContract(), "Project: Manager must be a contract"); if (_managers.add(manager)) { _managerBaseURI[manager] = baseURI; _managerBaseURIIdentical[manager] = baseURIIdentical; emit ManagerRegistered(manager, msg.sender); } } /** * @dev Unregister an manager */ function _unregisterManager(address manager) internal { if (_managers.remove(manager)) { emit ManagerUnregistered(manager, msg.sender); } } /** * @dev Blacklist an manager */ function _blacklistManager(address manager) internal { require(manager != address(this), "Cannot blacklist yourself"); if (_managers.remove(manager)) { emit ManagerUnregistered(manager, msg.sender); } if (_blacklistedManagers.add(manager)) { emit ManagerBlacklisted(manager, msg.sender); } } /** * @dev Set base token uri for an manager */ function _managerSetBaseTokenURI(string calldata uri, bool identical) internal { _managerBaseURI[msg.sender] = uri; _managerBaseURIIdentical[msg.sender] = identical; } /** * @dev Set token uri prefix for an manager */ function _managerSetTokenURIPrefix(string calldata prefix) internal { _managerURIPrefix[msg.sender] = prefix; } /** * @dev Set token uri for a token of an manager */ function _managerSetTokenURI(uint256 tokenId, string calldata uri) internal { require(_tokensManager[tokenId] == msg.sender, "Invalid token"); _tokenURIs[tokenId] = uri; } /** * @dev Set base token uri for tokens with no manager */ function _setBaseTokenURI(string memory uri) internal { _managerBaseURI[address(this)] = uri; } /** * @dev Set token uri prefix for tokens with no manager */ function _setTokenURIPrefix(string calldata prefix) internal { _managerURIPrefix[address(this)] = prefix; } /** * @dev Set token uri for a token with no manager */ function _setTokenURI(uint256 tokenId, string calldata uri) internal { require(_tokensManager[tokenId] == address(this), "Invalid token"); _tokenURIs[tokenId] = uri; } /** * @dev Retrieve a token's URI */ function _tokenURI(uint256 tokenId) internal view returns (string memory) { address manager = _tokensManager[tokenId]; require(!_blacklistedManagers.contains(manager), "Manager blacklisted"); // 1. if tokenURI is stored in this contract, use it with managerURIPrefix if any if (bytes(_tokenURIs[tokenId]).length != 0) { if (bytes(_managerURIPrefix[manager]).length != 0) { return string(abi.encodePacked(_managerURIPrefix[manager], _tokenURIs[tokenId])); } return _tokenURIs[tokenId]; } // 2. if URI is controlled by manager, retrieve it from manager if (ERC165CheckerUpgradeable.supportsInterface(manager, type(IProjectTokenURIManager).interfaceId)) { return IProjectTokenURIManager(manager).tokenURI(address(this), tokenId); } // 3. use managerBaseURI with id or not if (!_managerBaseURIIdentical[manager]) { return string(abi.encodePacked(_managerBaseURI[manager], tokenId.toString())); } else { return _managerBaseURI[manager]; } } /** * Get token manager */ function _tokenManager(uint256 tokenId) internal view returns (address manager) { manager = _tokensManager[tokenId]; require(manager != address(this), "No manager for token"); require(!_blacklistedManagers.contains(manager), "Manager blacklisted"); return manager; } function _setContractURI(string memory uri) internal { _contractURI = uri; emit ContractURISet(uri); } uint256[41] private __gap; }
// 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.2; import "@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol"; import "../ERC2981/IERC2981Upgradeable.sol"; /** * @dev Core project interface */ interface IProjectCoreUpgradeable is IERC165Upgradeable, IERC2981Upgradeable { event ManagerRegistered(address indexed manager, address indexed sender); event ManagerUnregistered(address indexed manager, address indexed sender); event ManagerBlacklisted(address indexed manager, address indexed sender); event MintPermissionsUpdated(address indexed manager, address indexed permissions, address indexed sender); event RoyaltiesUpdated(uint256 indexed tokenId, address payable[] receivers, uint256[] basisPoints); event DefaultRoyaltiesUpdated(address payable[] receivers, uint256[] basisPoints); event ManagerRoyaltiesUpdated(address indexed manager, address payable[] receivers, uint256[] basisPoints); event ManagerApproveTransferUpdated(address indexed manager, bool enabled); event ContractURISet(string uri); /** * @dev gets contract level URI. see https://docs.opensea.io/docs/contract-level-metadata */ function contractURI() external view returns (string memory); /** * @dev gets address of all managers */ function getManagers() external view returns (address[] memory); /** * @dev add an manager. Can only be called by contract owner or admin. * manager address must point to a contract implementing IProjectManager. * Returns True if newly added, False if already added. */ function registerManager( address manager, string calldata baseURI, bool baseURIIdentical ) external; /** * @dev add an manager. Can only be called by contract owner or admin. * Returns True if removed, False if already removed. */ function unregisterManager(address manager) external; /** * @dev blacklist an manager. 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 manager. It will also unregister the manager if needed. * Returns True if removed, False if already removed. */ function blacklistManager(address manager) external; /** * @dev set the baseTokenURI of an manager. Can only be called by manager. * For tokens with no uri configured, tokenURI will return "uri+tokenId" */ function managerSetBaseTokenURI(string calldata uri, bool identical) external; /** * @dev set the common prefix of an manager. Can only be called by manager. * If configured, and a token has a uri set, tokenURI will return "prefixURI+tokenURI" * Useful if you want to use ipfs/arweave */ function managerSetTokenURIPrefix(string calldata prefix) external; /** * @dev set the tokenURI of a token manager. Can only be called by manager that minted token. */ function managerSetTokenURI(uint256 tokenId, string calldata uri) external; /** * @dev set the tokenURI of a token manager for multiple tokens. Can only be called by manager that minted token. */ function managerSetTokenURI(uint256[] calldata tokenId, string[] calldata uri) external; /** * @dev set the baseTokenURI for tokens with no manager. 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 manager. 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 manager. Can only be called by owner/admin. */ function setTokenURI(uint256 tokenId, string calldata uri) external; /** * @dev set the tokenURI of multiple tokens with no manager. Can only be called by owner/admin. */ function setTokenURI(uint256[] calldata tokenIds, string[] calldata uris) external; /** * @dev set a permissions contract for an manager. Used to control minting. */ function setMintPermissions(address manager, address permissions) external; /** * @dev Configure so transfers of tokens created by the caller (must be manager) gets approval * from the manager before transferring */ function managerSetApproveTransfer(bool enabled) external; /** * @dev get the manager of a given token */ function tokenManager(uint256 tokenId) external view returns (address); /** * @dev Set default royalty */ function setDefaultRoyalty(address receiver, uint256 royaltyBPs) external; /** * @dev Set royalty for specifically token */ function setTokenRoyalty( uint256 tokenId, address receiver, uint256 royaltyBPs ) external; /** * @dev Set Contract URI, see https://docs.opensea.io/docs/contract-level-metadata */ function setContractURI(string memory _uri) external; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.2; import "@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol"; /// /// @dev Interface for the NFT Royalty Standard /// interface IERC2981Upgradeable is IERC165Upgradeable { /// ERC165 bytes to add to interface array - set in parent contract /// implementing this standard /// /// bytes4(keccak256("royaltyInfo(uint256,uint256)")) == 0x2a55205a /// bytes4 private constant _INTERFACE_ID_ERC2981 = 0x2a55205a; /// _registerInterface(_INTERFACE_ID_ERC2981); /// @notice Called with the sale price to determine how much royalty // is owed and to whom. /// @param _tokenId - the NFT asset queried for royalty information /// @param _salePrice - the sale price of the NFT asset specified by _tokenId /// @return receiver - address of who should be sent the royalty payment /// @return royaltyAmount - the royalty payment amount for _salePrice function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view returns (address receiver, uint256 royaltyAmount); /// @notice Informs callers that this contract supports ERC2981 /// @dev If `_registerInterface(_INTERFACE_ID_ERC2981)` is called /// in the initializer, this should be automatic /// @param interfaceID The interface identifier, as specified in ERC-165 /// @return `true` if the contract implements /// `_INTERFACE_ID_ERC2981` and `false` otherwise function supportsInterface(bytes4 interfaceID) external view override returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @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 ReentrancyGuardUpgradeable is Initializable { // 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; function __ReentrancyGuard_init() internal onlyInitializing { __ReentrancyGuard_init_unchained(); } function __ReentrancyGuard_init_unchained() internal onlyInitializing { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library StringsUpgradeable { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165Checker.sol) pragma solidity ^0.8.0; import "./IERC165Upgradeable.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 ERC165CheckerUpgradeable { // 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(IERC165Upgradeable).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(IERC165Upgradeable.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.2; import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; /** * @dev Implement this if you want your manager to have overloadable URI's */ interface IProjectTokenURIManager is IERC165 { /** * Get the uri for a given project/tokenId */ function tokenURI(address project, uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.2; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol"; import "./IERC2981Upgradeable.sol"; abstract contract ERC2981Upgradeable is Initializable, IERC2981Upgradeable, ERC165Upgradeable { struct Royalty { address receiver; uint256 bps; } // bytes4(keccak256("royaltyInfo(uint256,uint256)")) == 0x2a55205a bytes4 private constant _INTERFACE_ID_ERC2981 = 0x2a55205a; // token id -> royalty mapping(uint256 => Royalty) public royaltyMap; address public defaultRoyaltyReceiver; uint256 public defaultRoyaltyBPs; event RoyaltySet(uint256 indexed tokenId, address receiver, uint256 royaltyBPs); event DefaultRoyaltySet(address receiver, uint256 royaltyBPs); modifier onlyValidRoyalty(address _receiver, uint256 _royaltyBPs) { require(_receiver != address(0), "_receiver can not be 0x0"); require(_royaltyBPs <= 10000, "_royaltyBPs should less than 10000"); _; } function __ERC2981_init() internal initializer { __ERC165_init_unchained(); __ERC2981_init_unchained(); } function __ERC2981_init_unchained() internal initializer {} /// @notice Called with the sale price to determine how much royalty // is owed and to whom. /// @param _tokenId - the NFT asset queried for royalty information /// @param _salePrice - the sale price of the NFT asset specified by _tokenId /// @return receiver - address of who should be sent the royalty payment /// @return royaltyAmount - the royalty payment amount for _salePrice function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view override returns (address receiver, uint256 royaltyAmount) { Royalty memory royalty = royaltyMap[_tokenId]; receiver = royalty.receiver; uint256 bps = royalty.bps; // if this token not set specifically, use default settings if (receiver == address(0)) { receiver = defaultRoyaltyReceiver; bps = defaultRoyaltyBPs; } // if default is not set either, royaltyAmount is 0 royaltyAmount = (_salePrice * bps) / 10000; } function _setTokenRoyalty( uint256 _id, address _receiver, uint256 _royaltyBPs ) internal onlyValidRoyalty(_receiver, _royaltyBPs) { royaltyMap[_id] = Royalty({receiver: _receiver, bps: _royaltyBPs}); emit RoyaltySet(_id, _receiver, _royaltyBPs); } // all tokens that not set specifically can use default royalty function _setDefaultRoyalty(address _receiver, uint256 _royaltyBPs) internal onlyValidRoyalty(_receiver, _royaltyBPs) { defaultRoyaltyReceiver = _receiver; defaultRoyaltyBPs = _royaltyBPs; emit DefaultRoyaltySet(_receiver, _royaltyBPs); } /** * @dev See {IERC165-supportsInterface}. * * ERC165 bytes to add to interface array - set in parent contract * implementing this standard * * bytes4(keccak256("royaltyInfo(uint256,uint256)")) == 0x2a55205a * bytes4 private constant _INTERFACE_ID_ERC2981 = 0x2a55205a; * _registerInterface(_INTERFACE_ID_ERC2981); */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC2981Upgradeable, ERC165Upgradeable) returns (bool) { return interfaceId == type(IERC2981Upgradeable).interfaceId || interfaceId == _INTERFACE_ID_ERC2981 || super.supportsInterface(interfaceId); } uint256[46] private __gap; }
{ "optimizer": { "enabled": true, "runs": 500 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"AdminApproved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminChanged","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":true,"internalType":"address","name":"beacon","type":"address"}],"name":"BeaconUpgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"uri","type":"string"}],"name":"ContractURISet","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":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"royaltyBPs","type":"uint256"}],"name":"DefaultRoyaltySet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"manager","type":"address"},{"indexed":false,"internalType":"bool","name":"enabled","type":"bool"}],"name":"ManagerApproveTransferUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"manager","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"ManagerBlacklisted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"manager","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"ManagerRegistered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"manager","type":"address"},{"indexed":false,"internalType":"address payable[]","name":"receivers","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"basisPoints","type":"uint256[]"}],"name":"ManagerRoyaltiesUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"manager","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"ManagerUnregistered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"manager","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":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"royaltyBPs","type":"uint256"}],"name":"RoyaltySet","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"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"inputs":[{"internalType":"address[]","name":"to","type":"address[]"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"adminMintBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"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":"manager","type":"address"}],"name":"blacklistManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"defaultRoyaltyBPs","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"defaultRoyaltyReceiver","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAdmins","outputs":[{"internalType":"address[]","name":"admins","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getManagers","outputs":[{"internalType":"address[]","name":"managers","type":"address[]"}],"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[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"managerMintBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"enabled","type":"bool"}],"name":"managerSetApproveTransfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uri","type":"string"},{"internalType":"bool","name":"identical","type":"bool"}],"name":"managerSetBaseTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"string[]","name":"uris","type":"string[]"}],"name":"managerSetTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"_uri","type":"string"}],"name":"managerSetTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"prefix","type":"string"}],"name":"managerSetTokenURIPrefix","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proxiableUUID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"manager","type":"address"},{"internalType":"string","name":"baseURI","type":"string"},{"internalType":"bool","name":"baseURIIdentical","type":"bool"}],"name":"registerManager","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":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"royaltyMap","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"bps","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":"string","name":"_uri","type":"string"}],"name":"setBaseTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uri","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyBPs","type":"uint256"}],"name":"setDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"manager","type":"address"},{"internalType":"address","name":"permissions","type":"address"}],"name":"setMintPermissions","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyBPs","type":"uint256"}],"name":"setTokenRoyalty","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":"string","name":"prefix","type":"string"}],"name":"setTokenURIPrefix","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":"tokenManager","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","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":"manager","type":"address"}],"name":"unregisterManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"}],"name":"upgradeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60a06040523060601b6080523480156200001857600080fd5b50600054610100900460ff16620000365760005460ff161562000040565b62000040620000ee565b620000a85760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840160405180910390fd5b600054610100900460ff16158015620000d4576000805460ff1961ff0019909116610100171660011790555b8015620000e7576000805461ff00191690555b506200011b565b600062000106306200010c60201b620022df1760201c565b15905090565b6001600160a01b03163b151590565b60805160601c615ea46200015660003960008181610eec01528181610f71015281816111f50152818161127a01526113bf0152615ea46000f3fe6080604052600436106102f75760003560e01c80638129fc1c1161019a578063ada4a768116100e1578063e8a3d4851161008a578063f0cdc49911610064578063f0cdc4991461090b578063f242432a1461092b578063f2fde38b1461094b576102f7565b8063e8a3d48514610897578063e985e9c5146108ac578063e9c5d7b9146108f5576102f7565b8063d8d045b4116100bb578063d8d045b414610837578063e461aa2314610857578063e492bf8d14610877576102f7565b8063ada4a768146107c9578063bd85b039146107e9578063cc0c701e14610817576102f7565b806399e0dd7c11610143578063a6e9d5461161011d578063a6e9d54614610754578063a8d088bb14610794578063aafb2d44146107a9576102f7565b806399e0dd7c146106f4578063a22cb46514610714578063a24db95d14610734576102f7565b8063938e3d7b11610174578063938e3d7b146106945780639713c807146106b4578063973d1c6a146106d4576102f7565b80638129fc1c1461064157806388d5786c146106565780638da5cb5b14610676576102f7565b80633659cfe61161025e57806352d1902d116102075780636d73e669116101e15780636d73e669146105ec578063715018a61461060c5780637502acaf14610621576102f7565b806352d1902d1461057f5780635d986cd3146105945780636502abea146105b4576102f7565b80634f1ef286116102385780634f1ef2861461051c5780634f558e791461052f578063522543d11461055f576102f7565b80633659cfe6146104af5780634ac824e1146104cf5780634e1273f4146104ef576102f7565b806324d7806c116102c05780632eb2c2d61161029a5780632eb2c2d61461044d57806330176e131461046d57806331ae450b1461048d576102f7565b806324d7806c146103ce5780632a55205a146103ee5780632d3456701461042d576102f7565b8062fdd58e146102fc57806301ffc9a71461032f5780630e89341c1461035f57806312d9e9a01461038c578063162094c4146103ae575b600080fd5b34801561030857600080fd5b5061031c6103173660046152eb565b61096b565b6040519081526020015b60405180910390f35b34801561033b57600080fd5b5061034f61034a36600461554b565b610a07565b6040519015158152602001610326565b34801561036b57600080fd5b5061037f61037a3660046156d2565b610a1a565b6040516103269190615a89565b34801561039857600080fd5b506103ac6103a7366004615492565b610a76565b005b3480156103ba57600080fd5b506103ac6103c936600461571e565b610b8f565b3480156103da57600080fd5b5061034f6103e9366004615014565b610bc4565b3480156103fa57600080fd5b5061040e610409366004615768565b610bfd565b604080516001600160a01b039093168352602083019190915201610326565b34801561043957600080fd5b506103ac610448366004615014565b610c6e565b34801561045957600080fd5b506103ac610468366004615060565b610d12565b34801561047957600080fd5b506103ac610488366004615583565b610dad565b34801561049957600080fd5b506104a2610e15565b6040516103269190615a04565b3480156104bb57600080fd5b506103ac6104ca366004615014565b610ee1565b3480156104db57600080fd5b506103ac6104ea366004615014565b61105a565b3480156104fb57600080fd5b5061050f61050a3660046153d3565b611088565b6040516103269190615a51565b6103ac61052a36600461523b565b6111ea565b34801561053b57600080fd5b5061034f61054a3660046156d2565b600090815261022a6020526040902054151590565b34801561056b57600080fd5b506103ac61057a366004615583565b611353565b34801561058b57600080fd5b5061031c6113b2565b3480156105a057600080fd5b506103ac6105af36600461571e565b611477565b3480156105c057600080fd5b506105d46105cf3660046156d2565b6114d7565b6040516001600160a01b039091168152602001610326565b3480156105f857600080fd5b506103ac610607366004615014565b611530565b34801561061857600080fd5b506103ac6115d3565b34801561062d57600080fd5b506103ac61063c366004615314565b611639565b34801561064d57600080fd5b506103ac61186a565b34801561066257600080fd5b506103ac6106713660046154fb565b6118ec565b34801561068257600080fd5b506033546001600160a01b03166105d4565b3480156106a057600080fd5b506103ac6106af366004615618565b611a40565b3480156106c057600080fd5b506103ac6106cf3660046156ea565b611a6e565b3480156106e057600080fd5b506103ac6106ef366004615169565b611a9e565b34801561070057600080fd5b506103ac61070f366004615583565b611c77565b34801561072057600080fd5b506103ac61072f366004615205565b611ca6565b34801561074057600080fd5b506103ac61074f366004615287565b611cb1565b34801561076057600080fd5b5061040e61076f3660046156d2565b60fc60205260009081526040902080546001909101546001600160a01b039091169082565b3480156107a057600080fd5b506104a2611d32565b3480156107b557600080fd5b506103ac6107c4366004615492565b611dfc565b3480156107d557600080fd5b506103ac6107e4366004615014565b611ede565b3480156107f557600080fd5b5061031c6108043660046156d2565b600090815261022a602052604090205490565b34801561082357600080fd5b506103ac610832366004615314565b611f0c565b34801561084357600080fd5b506103ac6108523660046152eb565b612049565b34801561086357600080fd5b5060fd546105d4906001600160a01b031681565b34801561088357600080fd5b506103ac6108923660046155c3565b612078565b3480156108a357600080fd5b5061037f6120d8565b3480156108b857600080fd5b5061034f6108c736600461502e565b6001600160a01b03918216600090815260cb6020908152604080832093909416825291909152205460ff1690565b34801561090157600080fd5b5061031c60fe5481565b34801561091757600080fd5b506103ac61092636600461502e565b61216b565b34801561093757600080fd5b506103ac610946366004615106565b612190565b34801561095757600080fd5b506103ac610966366004615014565b612217565b60006001600160a01b0383166109dc5760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b50600081815260ca602090815260408083206001600160a01b03861684529091529020545b92915050565b6000610a12826122ee565b90505b919050565b600081815261022a6020526040902054606090610a6d5760405162461bcd60e51b81526020600482015260116024820152702737b732bc34b9ba32b73a103a37b5b2b760791b60448201526064016109d3565b610a1282612313565b610a8261015f336125d4565b610acb5760405162461bcd60e51b815260206004820152601a60248201527926bab9ba103132903932b3b4b9ba32b932b21036b0b730b3b2b960311b60448201526064016109d3565b828114610b0a5760405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a59081a5b9c1d5d609a1b60448201526064016109d3565b60005b83811015610b8857610b76858583818110610b3857634e487b7160e01b600052603260045260246000fd5b90506020020135848484818110610b5f57634e487b7160e01b600052603260045260246000fd5b9050602002810190610b719190615b88565b6125f9565b80610b8081615d09565b915050610b0d565b5050505050565b610b98336103e9565b610bb45760405162461bcd60e51b81526004016109d390615af9565b610bbf838383612670565b505050565b6000816001600160a01b0316610be26033546001600160a01b031690565b6001600160a01b03161480610a125750610a126097836125d4565b600082815260fc60209081526040808320815180830190925280546001600160a01b0316808352600190910154928201839052929183610c4c575060fd5460fe546001600160a01b0390911693505b612710610c598287615c45565b610c639190615c31565b925050509250929050565b6033546001600160a01b03163314610cc85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109d3565b610cd36097826126c7565b15610d0f5760405133906001600160a01b038316907f7c0c3c84c67c85fcac635147348bfe374c24a1a93d0366d1cfe9d8853cbf89d590600090a35b50565b6001600160a01b038516331480610d2e5750610d2e85336108c7565b610da05760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f742060448201527f6f776e6572206e6f7220617070726f766564000000000000000000000000000060648201526084016109d3565b610b8885858585856126dc565b610db6336103e9565b610dd25760405162461bcd60e51b81526004016109d390615af9565b610e1182828080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061296792505050565b5050565b6060610e216097612988565b67ffffffffffffffff811115610e4757634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610e70578160200160208202803683370190505b50905060005b610e806097612988565b811015610edc57610e92609782612992565b828281518110610eb257634e487b7160e01b600052603260045260246000fd5b6001600160a01b039092166020928302919091019091015280610ed481615d09565b915050610e76565b505b90565b306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161415610f6f5760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b19195b1959d85d1958d85b1b60a21b60648201526084016109d3565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316610fca7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b0316146110355760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b6163746976652070726f787960a01b60648201526084016109d3565b61103e8161299e565b60408051600080825260208201909252610d0f918391906129f8565b611063336103e9565b61107f5760405162461bcd60e51b81526004016109d390615af9565b610d0f81612b98565b606081518351146110ed5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016109d3565b6000835167ffffffffffffffff81111561111757634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611140578160200160208202803683370190505b50905060005b84518110156111e2576111a785828151811061117257634e487b7160e01b600052603260045260246000fd5b602002602001015185838151811061119a57634e487b7160e01b600052603260045260246000fd5b602002602001015161096b565b8282815181106111c757634e487b7160e01b600052603260045260246000fd5b60209081029190910101526111db81615d09565b9050611146565b509392505050565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614156112785760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b19195b1959d85d1958d85b1b60a21b60648201526084016109d3565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166112d37f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b03161461133e5760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b6163746976652070726f787960a01b60648201526084016109d3565b6113478261299e565b610e11828260016129f8565b61135f61015f336125d4565b6113a85760405162461bcd60e51b815260206004820152601a60248201527926bab9ba103132903932b3b4b9ba32b932b21036b0b730b3b2b960311b60448201526064016109d3565b610e118282612c83565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146114525760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c000000000000000060648201526084016109d3565b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc90565b61148361015f336125d4565b6114cc5760405162461bcd60e51b815260206004820152601a60248201527926bab9ba103132903932b3b4b9ba32b932b21036b0b730b3b2b960311b60448201526064016109d3565b610bbf8383836125f9565b600081815261022a60205260408120546115275760405162461bcd60e51b81526020600482015260116024820152702737b732bc34b9ba32b73a103a37b5b2b760791b60448201526064016109d3565b610a1282612c9e565b6033546001600160a01b0316331461158a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109d3565b611595609782612d56565b15610d0f5760405133906001600160a01b038316907f7e1a1a08d52e4ba0e21554733d66165fd5151f99460116223d9e3a608eec5cb190600090a350565b6033546001600160a01b0316331461162d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109d3565b6116376000612d6b565b565b600261012d54141561168d5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109d3565b600261012d5561169f61015f336125d4565b6116e85760405162461bcd60e51b815260206004820152601a60248201527926bab9ba103132903932b3b4b9ba32b932b21036b0b730b3b2b960311b60448201526064016109d3565b60005b858110156117655733610165600089898581811061171957634e487b7160e01b600052603260045260246000fd5b90506020020135815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b03160217905550808061175d90615d09565b9150506116eb565b5060005b878110156118595761184789898381811061179457634e487b7160e01b600052603260045260246000fd5b90506020020160208101906117a99190615014565b88888080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808c0282810182019093528b82529093508b92508a91829185019084908082843760009201919091525050604080516020601f8b018190048102820181019092528981529250899150889081908401838280828437600092019190915250612dbd92505050565b8061185181615d09565b915050611769565b5050600161012d5550505050505050565b600054610100900460ff166118855760005460ff1615611889565b303b155b6118a55760405162461bcd60e51b81526004016109d390615a9c565b600054610100900460ff161580156118d0576000805460ff1961ff0019909116610100171660011790555b6118d8612faf565b8015610d0f576000805461ff001916905550565b6118f861015f336125d4565b6119415760405162461bcd60e51b815260206004820152601a60248201527926bab9ba103132903932b3b4b9ba32b932b21036b0b730b3b2b960311b60448201526064016109d3565b80158061195a575061195a336324ea02c560e21b613045565b6119cc5760405162461bcd60e51b815260206004820152603c60248201527f4d616e61676572206d75737420696d706c656d656e742049455243313135355060448201527f726f6a656374417070726f76655472616e736665724d616e616765720000000060648201526084016109d3565b336000908152610164602052604090205460ff16151581151514610d0f573360008181526101646020908152604091829020805460ff191685151590811790915591519182527fe47f635a589f28dfbd63e4f968448214c1516b874d0ec067c1a451790c36ac10910160405180910390a250565b611a49336103e9565b611a655760405162461bcd60e51b81526004016109d390615af9565b610d0f81613061565b611a77336103e9565b611a935760405162461bcd60e51b81526004016109d390615af9565b610bbf8383836130b0565b600261012d541415611af25760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109d3565b600261012d556001600160a01b038516331480611b145750611b1485336108c7565b611b725760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b60648201526084016109d3565b8251845114611bb35760405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a59081a5b9c1d5d609a1b60448201526064016109d3565b835160011415611c1d57611c188585600081518110611be257634e487b7160e01b600052603260045260246000fd5b602002602001015185600081518110611c0b57634e487b7160e01b600052603260045260246000fd5b60200260200101516131ef565b611c28565b611c2885858561336c565b611c6a85858585858080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506135d292505050565b5050600161012d55505050565b611c80336103e9565b611c9c5760405162461bcd60e51b81526004016109d390615af9565b610e1182826137b7565b610e113383836137d2565b611cba336103e9565b611cd65760405162461bcd60e51b81526004016109d390615af9565b83611ce3610161826125d4565b15611d265760405162461bcd60e51b815260206004820152601360248201527213585b9859d95c88189b1858dadb1a5cdd1959606a1b60448201526064016109d3565b610b88858585856138b3565b6060611d3f61015f612988565b67ffffffffffffffff811115611d6557634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611d8e578160200160208202803683370190505b50905060005b611d9f61015f612988565b811015610edc57611db261015f82612992565b828281518110611dd257634e487b7160e01b600052603260045260246000fd5b6001600160a01b039092166020928302919091019091015280611df481615d09565b915050611d94565b611e05336103e9565b611e215760405162461bcd60e51b81526004016109d390615af9565b828114611e605760405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a59081a5b9c1d5d609a1b60448201526064016109d3565b60005b83811015610b8857611ecc858583818110611e8e57634e487b7160e01b600052603260045260246000fd5b90506020020135848484818110611eb557634e487b7160e01b600052603260045260246000fd5b9050602002810190611ec79190615b88565b612670565b80611ed681615d09565b915050611e63565b611ee7336103e9565b611f035760405162461bcd60e51b81526004016109d390615af9565b610d0f816139f8565b600261012d541415611f605760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109d3565b600261012d55611f6f336103e9565b611f8b5760405162461bcd60e51b81526004016109d390615af9565b60005b8581101561200857306101656000898985818110611fbc57634e487b7160e01b600052603260045260246000fd5b90506020020135815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b03160217905550808061200090615d09565b915050611f8e565b5060005b878110156118595761203789898381811061179457634e487b7160e01b600052603260045260246000fd5b8061204181615d09565b91505061200c565b612052336103e9565b61206e5760405162461bcd60e51b81526004016109d390615af9565b610e118282613a42565b61208461015f336125d4565b6120cd5760405162461bcd60e51b815260206004820152601a60248201527926bab9ba103132903932b3b4b9ba32b932b21036b0b730b3b2b960311b60448201526064016109d3565b610bbf838383613b59565b606061016a80546120e890615ca7565b80601f016020809104026020016040519081016040528092919081815260200182805461211490615ca7565b80156121615780601f1061213657610100808354040283529160200191612161565b820191906000526020600020905b81548152906001019060200180831161214457829003601f168201915b5050505050905090565b612174336103e9565b610e115760405162461bcd60e51b81526004016109d390615af9565b6001600160a01b0385163314806121ac57506121ac85336108c7565b61220a5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b60648201526084016109d3565b610b888585858585613b98565b6033546001600160a01b031633146122715760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109d3565b6001600160a01b0381166122d65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016109d3565b610d0f81612d6b565b6001600160a01b03163b151590565b60006001600160e01b03198216632e33c0db60e01b1480610a125750610a1282613d49565b600081815261016560205260409020546060906001600160a01b031661233b610161826125d4565b1561237e5760405162461bcd60e51b815260206004820152601360248201527213585b9859d95c88189b1858dadb1a5cdd1959606a1b60448201526064016109d3565b600083815261016960205260409020805461239890615ca7565b1590506124b6576001600160a01b03811660009081526101686020526040902080546123c390615ca7565b159050612416576001600160a01b03811660009081526101686020908152604080832086845261016983529281902090516123ff9392016158c8565b604051602081830303815290604052915050610a15565b600083815261016960205260409020805461243090615ca7565b80601f016020809104026020016040519081016040528092919081815260200182805461245c90615ca7565b80156124a95780601f1061247e576101008083540402835291602001916124a9565b820191906000526020600020905b81548152906001019060200180831161248c57829003601f168201915b5050505050915050610a15565b6124c78163e9dc637560e01b613045565b156125565760405163e9dc637560e01b8152306004820152602481018490526001600160a01b0382169063e9dc63759060440160006040518083038186803b15801561251257600080fd5b505afa158015612526573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261254e919081019061565e565b915050610a15565b6001600160a01b0381166000908152610167602052604090205460ff166125aa576001600160a01b03811660009081526101666020526040902061259984613d6e565b6040516020016123ff9291906158a3565b6001600160a01b038116600090815261016660205260409020805461243090615ca7565b50919050565b6001600160a01b038116600090815260018301602052604081205415155b9392505050565b600083815261016560205260409020546001600160a01b031633146126505760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b2103a37b5b2b760991b60448201526064016109d3565b60008381526101696020526040902061266a908383614d94565b50505050565b600083815261016560205260409020546001600160a01b031630146126505760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b2103a37b5b2b760991b60448201526064016109d3565b60006125f2836001600160a01b038416613ea9565b815183511461273e5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b60648201526084016109d3565b6001600160a01b0384166127a25760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b60648201526084016109d3565b336127b1818787878787613fc6565b60005b84518110156128f95760008582815181106127df57634e487b7160e01b600052603260045260246000fd5b60200260200101519050600085838151811061280b57634e487b7160e01b600052603260045260246000fd5b602090810291909101810151600084815260ca835260408082206001600160a01b038e16835290935291909120549091508181101561289f5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201526939103a3930b739b332b960b11b60648201526084016109d3565b600083815260ca602090815260408083206001600160a01b038e8116855292528083208585039055908b168252812080548492906128de908490615c19565b92505081905550505050806128f290615d09565b90506127b4565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051612949929190615a64565b60405180910390a461295f81878787878761411a565b505050505050565b306000908152610166602090815260409091208251610e1192840190614e14565b6000610a12825490565b60006125f283836142cf565b6033546001600160a01b03163314610d0f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109d3565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615612a3057612a2b83614307565b610bbf565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b815260040160206040518083038186803b158015612a6957600080fd5b505afa925050508015612a99575060408051601f3d908101601f19168201909252612a9691810190615533565b60015b612b0b5760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201527f6f6e206973206e6f74205555505300000000000000000000000000000000000060648201526084016109d3565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8114612b8c5760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b60648201526084016109d3565b50610bbf8383836143b5565b6001600160a01b038116301415612bf15760405162461bcd60e51b815260206004820152601960248201527f43616e6e6f7420626c61636b6c69737420796f757273656c660000000000000060448201526064016109d3565b612bfd61015f826126c7565b15612c395760405133906001600160a01b038316907f605ecd285af8d775a646fccb959e452c9fcbc3fb990969d941a79d5e91c9ff0c90600090a35b612c4561016182612d56565b15610d0f5760405133906001600160a01b038316907f884ad0bc819ed270213c85246d940694ab55524886b6427934dc3a268974ecf590600090a350565b33600090815261016860205260409020610bbf908383614d94565b600081815261016560205260409020546001600160a01b031630811415612d075760405162461bcd60e51b815260206004820152601460248201527f4e6f206d616e6167657220666f7220746f6b656e00000000000000000000000060448201526064016109d3565b612d13610161826125d4565b15610a155760405162461bcd60e51b815260206004820152601360248201527213585b9859d95c88189b1858dadb1a5cdd1959606a1b60448201526064016109d3565b60006125f2836001600160a01b0384166143da565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b038416612e1d5760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b60648201526084016109d3565b8151835114612e7f5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b60648201526084016109d3565b33612e8f81600087878787613fc6565b60005b8451811015612f4757838181518110612ebb57634e487b7160e01b600052603260045260246000fd5b602002602001015160ca6000878481518110612ee757634e487b7160e01b600052603260045260246000fd5b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b031681526020019081526020016000206000828254612f2f9190615c19565b90915550819050612f3f81615d09565b915050612e92565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051612f98929190615a64565b60405180910390a4610b888160008787878761411a565b600054610100900460ff16612fca5760005460ff1615612fce565b303b155b612fea5760405162461bcd60e51b81526004016109d390615a9c565b600054610100900460ff16158015613015576000805460ff1961ff0019909116610100171660011790555b61301d614429565b613035604051806020016040528060008152506144af565b61303d6144df565b6118d8614555565b60006130508361457c565b80156125f257506125f283836145af565b80516130759061016a906020840190614e14565b507faf497693a87db12ca89131a31edbb3db4bb5702dfb284e8ae7427d185f09112d816040516130a59190615a89565b60405180910390a150565b81816001600160a01b0382166131085760405162461bcd60e51b815260206004820152601860248201527f5f72656365697665722063616e206e6f7420626520307830000000000000000060448201526064016109d3565b6127108111156131655760405162461bcd60e51b815260206004820152602260248201527f5f726f79616c74794250732073686f756c64206c657373207468616e20313030604482015261030360f41b60648201526084016109d3565b6040805180820182526001600160a01b03868116808352602080840188815260008b815260fc8352869020945185546001600160a01b031916941693909317845591516001909301929092558251918252810185905286917f49018ca4b3b4f0c8442e69b201303bb7f7919a14033768ce71ad07ba63a348a3910160405180910390a25050505050565b6001600160a01b0383166132515760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b60648201526084016109d3565b3361328081856000613262876146ad565b61326b876146ad565b60405180602001604052806000815250613fc6565b600083815260ca602090815260408083206001600160a01b0388168452909152902054828110156132ff5760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b60648201526084016109d3565b600084815260ca602090815260408083206001600160a01b03898116808652918452828520888703905582518981529384018890529092908616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a45050505050565b6001600160a01b0383166133ce5760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b60648201526084016109d3565b80518251146134305760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b60648201526084016109d3565b600033905061345381856000868660405180602001604052806000815250613fc6565b60005b835181101561357357600084828151811061348157634e487b7160e01b600052603260045260246000fd5b6020026020010151905060008483815181106134ad57634e487b7160e01b600052603260045260246000fd5b602090810291909101810151600084815260ca835260408082206001600160a01b038c16835290935291909120549091508181101561353a5760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b60648201526084016109d3565b600092835260ca602090815260408085206001600160a01b038b168652909152909220910390558061356b81615d09565b915050613456565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb86866040516135c4929190615a64565b60405180910390a450505050565b60008351116136135760405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a59081a5b9c1d5d609a1b60448201526064016109d3565b600061016560008560008151811061363b57634e487b7160e01b600052603260045260246000fd5b6020026020010151815260200190815260200160002060009054906101000a90046001600160a01b0316905060005b845181101561372557816001600160a01b031661016560008784815181106136a257634e487b7160e01b600052603260045260246000fd5b6020908102919091018101518252810191909152604001600020546001600160a01b0316146137135760405162461bcd60e51b815260206004820152601c60248201527f4d69736d61746368656420746f6b656e206f726967696e61746f72730000000060448201526064016109d3565b8061371d81615d09565b91505061366a565b506001600160a01b0381163014610b88576137478163adf4024360e01b613045565b15610b885760405163adf4024360e01b81526001600160a01b0382169063adf402439061377e9088908890889088906004016159bc565b600060405180830381600087803b15801561379857600080fd5b505af11580156137ac573d6000803e3d6000fd5b505050505050505050565b30600090815261016860205260409020610bbf908383614d94565b816001600160a01b0316836001600160a01b031614156138465760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b60648201526084016109d3565b6001600160a01b03838116600081815260cb6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b03841630141561390c5760405162461bcd60e51b815260206004820152601060248201527f50726f6a6563743a20496e76616c69640000000000000000000000000000000060448201526064016109d3565b6001600160a01b0384163b61396f5760405162461bcd60e51b815260206004820152602360248201527f50726f6a6563743a204d616e61676572206d757374206265206120636f6e74726044820152621858dd60ea1b60648201526084016109d3565b61397b61015f85612d56565b1561266a576001600160a01b0384166000908152610166602052604090206139a4908484614d94565b506001600160a01b03841660008181526101676020526040808220805460ff1916851515179055513392917f8fc18cc172f74c81235145b7927190d2bd0e351fc45bfb17bb572593273cef2191a350505050565b613a0461015f826126c7565b15610d0f5760405133906001600160a01b038316907f605ecd285af8d775a646fccb959e452c9fcbc3fb990969d941a79d5e91c9ff0c90600090a350565b81816001600160a01b038216613a9a5760405162461bcd60e51b815260206004820152601860248201527f5f72656365697665722063616e206e6f7420626520307830000000000000000060448201526064016109d3565b612710811115613af75760405162461bcd60e51b815260206004820152602260248201527f5f726f79616c74794250732073686f756c64206c657373207468616e20313030604482015261030360f41b60648201526084016109d3565b60fd80546001600160a01b0319166001600160a01b03861690811790915560fe84905560408051918252602082018590527fd85b7816dca44c313f0fdadd9567f99f3620a2fac7c21a8a7872e1ac4d10fe55910160405180910390a150505050565b33600090815261016660205260409020613b74908484614d94565b5033600090815261016760205260409020805460ff19169115159190911790555050565b6001600160a01b038416613bfc5760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b60648201526084016109d3565b33613c1b818787613c0c886146ad565b613c15886146ad565b87613fc6565b600084815260ca602090815260408083206001600160a01b038a16845290915290205483811015613ca15760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201526939103a3930b739b332b960b11b60648201526084016109d3565b600085815260ca602090815260408083206001600160a01b038b8116855292528083208785039055908816825281208054869290613ce0908490615c19565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4613d40828888888888614706565b50505050505050565b60006001600160e01b031982166328dfb2fd60e01b1480610a125750610a1282614811565b606081613d9357506040805180820190915260018152600360fc1b6020820152610a15565b8160005b8115613dbd5780613da781615d09565b9150613db69050600a83615c31565b9150613d97565b60008167ffffffffffffffff811115613de657634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015613e10576020820181803683370190505b5090505b8415613ea157613e25600183615c64565b9150613e32600a86615d24565b613e3d906030615c19565b60f81b818381518110613e6057634e487b7160e01b600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350613e9a600a86615c31565b9450613e14565b949350505050565b60008181526001830160205260408120548015613fbc576000613ecd600183615c64565b8554909150600090613ee190600190615c64565b9050818114613f62576000866000018281548110613f0f57634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905080876000018481548110613f4057634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613f8157634e487b7160e01b600052603160045260246000fd5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610a01565b6000915050610a01565b6001600160a01b03851661406a5760005b83518110156140685782818151811061400057634e487b7160e01b600052603260045260246000fd5b602002602001015161022a600086848151811061402d57634e487b7160e01b600052603260045260246000fd5b6020026020010151815260200190815260200160002060008282546140529190615c19565b90915550614061905081615d09565b9050613fd7565b505b6001600160a01b03841661410e5760005b835181101561410c578281815181106140a457634e487b7160e01b600052603260045260246000fd5b602002602001015161022a60008684815181106140d157634e487b7160e01b600052603260045260246000fd5b6020026020010151815260200190815260200160002060008282546140f69190615c64565b90915550614105905081615d09565b905061407b565b505b61295f85858585614851565b6001600160a01b0384163b1561295f5760405163bc197c8160e01b81526001600160a01b0385169063bc197c819061415e9089908990889088908890600401615926565b602060405180830381600087803b15801561417857600080fd5b505af19250505080156141a8575060408051601f3d908101601f191682019092526141a591810190615567565b60015b61425e576141b4615d7a565b806308c379a014156141ee57506141c9615d91565b806141d457506141f0565b8060405162461bcd60e51b81526004016109d39190615a89565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e204552433131353560448201527f526563656976657220696d706c656d656e74657200000000000000000000000060648201526084016109d3565b6001600160e01b0319811663bc197c8160e01b14613d405760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a656374656044820152676420746f6b656e7360c01b60648201526084016109d3565b60008260000182815481106142f457634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905092915050565b6001600160a01b0381163b6143745760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016109d3565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6143be83614a97565b6000825111806143cb5750805b15610bbf5761266a8383614ad7565b600081815260018301602052604081205461442157508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a01565b506000610a01565b600054610100900460ff166144445760005460ff1615614448565b303b155b6144645760405162461bcd60e51b81526004016109d390615a9c565b600054610100900460ff1615801561448f576000805460ff1961ff0019909116610100171660011790555b614497614555565b61449f614bcb565b6144a7614555565b6118d8614bfb565b600054610100900460ff166144d65760405162461bcd60e51b81526004016109d390615b3d565b610d0f81614c74565b600054610100900460ff166144fa5760005460ff16156144fe565b303b155b61451a5760405162461bcd60e51b81526004016109d390615a9c565b600054610100900460ff16158015614545576000805460ff1961ff0019909116610100171660011790555b61454d614bfb565b61449f614ca4565b600054610100900460ff166116375760405162461bcd60e51b81526004016109d390615b3d565b600061458f826301ffc9a760e01b6145af565b8015610a1257506145a8826001600160e01b03196145af565b1592915050565b604080516001600160e01b0319831660248083019190915282518083039091018152604490910182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166301ffc9a760e01b179052905160009190829081906001600160a01b038716906175309061462b908690615887565b6000604051808303818686fa925050503d8060008114614667576040519150601f19603f3d011682016040523d82523d6000602084013e61466c565b606091505b50915091506020815110156146875760009350505050610a01565b8180156146a35750808060200190518101906146a39190615517565b9695505050505050565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106146f557634e487b7160e01b600052603260045260246000fd5b602090810291909101015292915050565b6001600160a01b0384163b1561295f5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e619061474a9089908990889088908890600401615984565b602060405180830381600087803b15801561476457600080fd5b505af1925050508015614794575060408051601f3d908101601f1916820190925261479191810190615567565b60015b6147a0576141b4615d7a565b6001600160e01b0319811663f23a6e6160e01b14613d405760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a656374656044820152676420746f6b656e7360c01b60648201526084016109d3565b60006001600160e01b03198216632baae9fd60e01b148061484257506001600160e01b0319821663152a902d60e11b145b80610a125750610a1282614cd3565b60008251116148925760405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a59081a5b9c1d5d609a1b60448201526064016109d3565b60006101656000846000815181106148ba57634e487b7160e01b600052603260045260246000fd5b6020026020010151815260200190815260200160002060009054906101000a90046001600160a01b0316905060005b83518110156149a457816001600160a01b0316610165600086848151811061492157634e487b7160e01b600052603260045260246000fd5b6020908102919091018101518252810191909152604001600020546001600160a01b0316146149925760405162461bcd60e51b815260206004820152601c60248201527f4d69736d61746368656420746f6b656e206f726967696e61746f72730000000060448201526064016109d3565b8061499c81615d09565b9150506148e9565b506001600160a01b0381166000908152610164602052604090205460ff1615610b885760405163883da93360e01b81526001600160a01b0382169063883da933906149f99088908890889088906004016158dd565b602060405180830381600087803b158015614a1357600080fd5b505af1158015614a27573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614a4b9190615517565b610b885760405162461bcd60e51b815260206004820152601860248201527f4d616e6167657220617070726f76616c206661696c757265000000000000000060448201526064016109d3565b614aa081614307565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b614b3f5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016109d3565b600080846001600160a01b031684604051614b5a9190615887565b600060405180830381855af49150503d8060008114614b95576040519150601f19603f3d011682016040523d82523d6000602084013e614b9a565b606091505b5091509150614bc28282604051806060016040528060278152602001615e4860279139614d13565b95945050505050565b600054610100900460ff16614bf25760405162461bcd60e51b81526004016109d390615b3d565b61163733612d6b565b600054610100900460ff16614c165760005460ff1615614c1a565b303b155b614c365760405162461bcd60e51b81526004016109d390615a9c565b600054610100900460ff161580156118d8576000805460ff1961ff0019909116610100171660011790558015610d0f576000805461ff001916905550565b600054610100900460ff16614c9b5760405162461bcd60e51b81526004016109d390615b3d565b610d0f81614d4c565b600054610100900460ff16614ccb5760405162461bcd60e51b81526004016109d390615b3d565b600161012d55565b60006001600160e01b03198216636cdb3d1360e11b1480614d0457506001600160e01b031982166303a24d0760e21b145b80610a125750610a1282614d5f565b60608315614d225750816125f2565b825115614d325782518084602001fd5b8160405162461bcd60e51b81526004016109d39190615a89565b8051610e119060cc906020840190614e14565b60006001600160e01b03198216632a9f3abf60e11b1480610a1257506301ffc9a760e01b6001600160e01b0319831614610a12565b828054614da090615ca7565b90600052602060002090601f016020900481019282614dc25760008555614e08565b82601f10614ddb5782800160ff19823516178555614e08565b82800160010185558215614e08579182015b82811115614e08578235825591602001919060010190614ded565b50610edc929150614e88565b828054614e2090615ca7565b90600052602060002090601f016020900481019282614e425760008555614e08565b82601f10614e5b57805160ff1916838001178555614e08565b82800160010185558215614e08579182015b82811115614e08578251825591602001919060010190614e6d565b5b80821115610edc5760008155600101614e89565b6000614ea883615bf1565b604051614eb58282615cdc565b809250848152858585011115614eca57600080fd5b8484602083013760006020868301015250509392505050565b80356001600160a01b0381168114610a1557600080fd5b60008083601f840112614f0b578182fd5b50813567ffffffffffffffff811115614f22578182fd5b6020830191508360208083028501011115614f3c57600080fd5b9250929050565b600082601f830112614f53578081fd5b81356020614f6082615bcd565b604051614f6d8282615cdc565b838152828101915085830183850287018401881015614f8a578586fd5b855b85811015614fa857813584529284019290840190600101614f8c565b5090979650505050505050565b60008083601f840112614fc6578182fd5b50813567ffffffffffffffff811115614fdd578182fd5b602083019150836020828501011115614f3c57600080fd5b600082601f830112615005578081fd5b6125f283833560208501614e9d565b600060208284031215615025578081fd5b6125f282614ee3565b60008060408385031215615040578081fd5b61504983614ee3565b915061505760208401614ee3565b90509250929050565b600080600080600060a08688031215615077578081fd5b61508086614ee3565b945061508e60208701614ee3565b9350604086013567ffffffffffffffff808211156150aa578283fd5b6150b689838a01614f43565b945060608801359150808211156150cb578283fd5b6150d789838a01614f43565b935060808801359150808211156150ec578283fd5b506150f988828901614ff5565b9150509295509295909350565b600080600080600060a0868803121561511d578283fd5b61512686614ee3565b945061513460208701614ee3565b93506040860135925060608601359150608086013567ffffffffffffffff81111561515d578182fd5b6150f988828901614ff5565b600080600080600060808688031215615180578283fd5b61518986614ee3565b9450602086013567ffffffffffffffff808211156151a5578485fd5b6151b189838a01614f43565b955060408801359150808211156151c6578485fd5b6151d289838a01614f43565b945060608801359150808211156151e7578283fd5b506151f488828901614fb5565b969995985093965092949392505050565b60008060408385031215615217578182fd5b61522083614ee3565b9150602083013561523081615e23565b809150509250929050565b6000806040838503121561524d578182fd5b61525683614ee3565b9150602083013567ffffffffffffffff811115615271578182fd5b61527d85828601614ff5565b9150509250929050565b6000806000806060858703121561529c578182fd5b6152a585614ee3565b9350602085013567ffffffffffffffff8111156152c0578283fd5b6152cc87828801614fb5565b90945092505060408501356152e081615e23565b939692955090935050565b600080604083850312156152fd578182fd5b61530683614ee3565b946020939093013593505050565b6000806000806000806000806080898b03121561532f578586fd5b883567ffffffffffffffff80821115615346578788fd5b6153528c838d01614efa565b909a50985060208b013591508082111561536a578788fd5b6153768c838d01614efa565b909850965060408b013591508082111561538e578485fd5b61539a8c838d01614efa565b909650945060608b01359150808211156153b2578384fd5b506153bf8b828c01614fb5565b999c989b5096995094979396929594505050565b600080604083850312156153e5578182fd5b823567ffffffffffffffff808211156153fc578384fd5b818501915085601f83011261540f578384fd5b8135602061541c82615bcd565b6040516154298282615cdc565b8381528281019150858301838502870184018b1015615446578889fd5b8896505b8487101561546f5761545b81614ee3565b83526001969096019591830191830161544a565b5096505086013592505080821115615485578283fd5b5061527d85828601614f43565b600080600080604085870312156154a7578182fd5b843567ffffffffffffffff808211156154be578384fd5b6154ca88838901614efa565b909650945060208701359150808211156154e2578384fd5b506154ef87828801614efa565b95989497509550505050565b60006020828403121561550c578081fd5b81356125f281615e23565b600060208284031215615528578081fd5b81516125f281615e23565b600060208284031215615544578081fd5b5051919050565b60006020828403121561555c578081fd5b81356125f281615e31565b600060208284031215615578578081fd5b81516125f281615e31565b60008060208385031215615595578182fd5b823567ffffffffffffffff8111156155ab578283fd5b6155b785828601614fb5565b90969095509350505050565b6000806000604084860312156155d7578081fd5b833567ffffffffffffffff8111156155ed578182fd5b6155f986828701614fb5565b909450925050602084013561560d81615e23565b809150509250925092565b600060208284031215615629578081fd5b813567ffffffffffffffff81111561563f578182fd5b8201601f8101841361564f578182fd5b613ea184823560208401614e9d565b60006020828403121561566f578081fd5b815167ffffffffffffffff811115615685578182fd5b8201601f81018413615695578182fd5b80516156a081615bf1565b6040516156ad8282615cdc565b8281528660208486010111156156c1578485fd5b6146a3836020830160208701615c7b565b6000602082840312156156e3578081fd5b5035919050565b6000806000606084860312156156fe578081fd5b8335925061570e60208501614ee3565b9150604084013590509250925092565b600080600060408486031215615732578081fd5b83359250602084013567ffffffffffffffff81111561574f578182fd5b61575b86828701614fb5565b9497909650939450505050565b6000806040838503121561577a578182fd5b50508035926020909101359150565b6000815180845260208085019450808401835b838110156157b85781518752958201959082019060010161579c565b509495945050505050565b600081518084526157db816020860160208601615c7b565b601f01601f19169290920160200192915050565b80546000906002810460018083168061580957607f831692505b602080841082141561582957634e487b7160e01b86526022600452602486fd5b81801561583d576001811461584e5761587b565b60ff1986168952848901965061587b565b60008881526020902060005b868110156158735781548b82015290850190830161585a565b505084890196505b50505050505092915050565b60008251615899818460208701615c7b565b9190910192915050565b60006158af82856157ef565b83516158bf818360208801615c7b565b01949350505050565b6000613ea16158d783866157ef565b846157ef565b60006001600160a01b038087168352808616602084015250608060408301526159096080830185615789565b828103606084015261591b8185615789565b979650505050505050565b60006001600160a01b03808816835280871660208401525060a0604083015261595260a0830186615789565b82810360608401526159648186615789565b9050828103608084015261597881856157c3565b98975050505050505050565b60006001600160a01b03808816835280871660208401525084604083015283606083015260a0608083015261591b60a08301846157c3565b60006001600160a01b0386168252608060208301526159de6080830186615789565b82810360408401526159f08186615789565b9050828103606084015261591b81856157c3565b6020808252825182820181905260009190848201906040850190845b81811015615a455783516001600160a01b031683529284019291840191600101615a20565b50909695505050505050565b6000602082526125f26020830184615789565b600060408252615a776040830185615789565b8281036020840152614bc28185615789565b6000602082526125f260208301846157c3565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201527f647920696e697469616c697a6564000000000000000000000000000000000000606082015260800190565b60208082526024908201527f41646d696e436f6e74726f6c3a204d757374206265206f776e6572206f7220616040820152633236b4b760e11b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6000808335601e19843603018112615b9e578283fd5b83018035915067ffffffffffffffff821115615bb8578283fd5b602001915036819003821315614f3c57600080fd5b600067ffffffffffffffff821115615be757615be7615d64565b5060209081020190565b600067ffffffffffffffff821115615c0b57615c0b615d64565b50601f01601f191660200190565b60008219821115615c2c57615c2c615d38565b500190565b600082615c4057615c40615d4e565b500490565b6000816000190483118215151615615c5f57615c5f615d38565b500290565b600082821015615c7657615c76615d38565b500390565b60005b83811015615c96578181015183820152602001615c7e565b8381111561266a5750506000910152565b600281046001821680615cbb57607f821691505b602082108114156125ce57634e487b7160e01b600052602260045260246000fd5b601f8201601f1916810167ffffffffffffffff81118282101715615d0257615d02615d64565b6040525050565b6000600019821415615d1d57615d1d615d38565b5060010190565b600082615d3357615d33615d4e565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b600060033d1115610ede57600481823e5160e01c90565b600060443d1015615da157610ede565b6040516003193d81016004833e81513d67ffffffffffffffff8160248401118184111715615dd3575050505050610ede565b8285019150815181811115615ded57505050505050610ede565b843d8701016020828501011115615e0957505050505050610ede565b615e1860208286010187615cdc565b509094505050505090565b8015158114610d0f57600080fd5b6001600160e01b031981168114610d0f57600080fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220fb9362ae958ff4c41302a3213da0f94cd7434c8a850559987931ab97670ceb0d64736f6c63430008020033
Deployed Bytecode
0x6080604052600436106102f75760003560e01c80638129fc1c1161019a578063ada4a768116100e1578063e8a3d4851161008a578063f0cdc49911610064578063f0cdc4991461090b578063f242432a1461092b578063f2fde38b1461094b576102f7565b8063e8a3d48514610897578063e985e9c5146108ac578063e9c5d7b9146108f5576102f7565b8063d8d045b4116100bb578063d8d045b414610837578063e461aa2314610857578063e492bf8d14610877576102f7565b8063ada4a768146107c9578063bd85b039146107e9578063cc0c701e14610817576102f7565b806399e0dd7c11610143578063a6e9d5461161011d578063a6e9d54614610754578063a8d088bb14610794578063aafb2d44146107a9576102f7565b806399e0dd7c146106f4578063a22cb46514610714578063a24db95d14610734576102f7565b8063938e3d7b11610174578063938e3d7b146106945780639713c807146106b4578063973d1c6a146106d4576102f7565b80638129fc1c1461064157806388d5786c146106565780638da5cb5b14610676576102f7565b80633659cfe61161025e57806352d1902d116102075780636d73e669116101e15780636d73e669146105ec578063715018a61461060c5780637502acaf14610621576102f7565b806352d1902d1461057f5780635d986cd3146105945780636502abea146105b4576102f7565b80634f1ef286116102385780634f1ef2861461051c5780634f558e791461052f578063522543d11461055f576102f7565b80633659cfe6146104af5780634ac824e1146104cf5780634e1273f4146104ef576102f7565b806324d7806c116102c05780632eb2c2d61161029a5780632eb2c2d61461044d57806330176e131461046d57806331ae450b1461048d576102f7565b806324d7806c146103ce5780632a55205a146103ee5780632d3456701461042d576102f7565b8062fdd58e146102fc57806301ffc9a71461032f5780630e89341c1461035f57806312d9e9a01461038c578063162094c4146103ae575b600080fd5b34801561030857600080fd5b5061031c6103173660046152eb565b61096b565b6040519081526020015b60405180910390f35b34801561033b57600080fd5b5061034f61034a36600461554b565b610a07565b6040519015158152602001610326565b34801561036b57600080fd5b5061037f61037a3660046156d2565b610a1a565b6040516103269190615a89565b34801561039857600080fd5b506103ac6103a7366004615492565b610a76565b005b3480156103ba57600080fd5b506103ac6103c936600461571e565b610b8f565b3480156103da57600080fd5b5061034f6103e9366004615014565b610bc4565b3480156103fa57600080fd5b5061040e610409366004615768565b610bfd565b604080516001600160a01b039093168352602083019190915201610326565b34801561043957600080fd5b506103ac610448366004615014565b610c6e565b34801561045957600080fd5b506103ac610468366004615060565b610d12565b34801561047957600080fd5b506103ac610488366004615583565b610dad565b34801561049957600080fd5b506104a2610e15565b6040516103269190615a04565b3480156104bb57600080fd5b506103ac6104ca366004615014565b610ee1565b3480156104db57600080fd5b506103ac6104ea366004615014565b61105a565b3480156104fb57600080fd5b5061050f61050a3660046153d3565b611088565b6040516103269190615a51565b6103ac61052a36600461523b565b6111ea565b34801561053b57600080fd5b5061034f61054a3660046156d2565b600090815261022a6020526040902054151590565b34801561056b57600080fd5b506103ac61057a366004615583565b611353565b34801561058b57600080fd5b5061031c6113b2565b3480156105a057600080fd5b506103ac6105af36600461571e565b611477565b3480156105c057600080fd5b506105d46105cf3660046156d2565b6114d7565b6040516001600160a01b039091168152602001610326565b3480156105f857600080fd5b506103ac610607366004615014565b611530565b34801561061857600080fd5b506103ac6115d3565b34801561062d57600080fd5b506103ac61063c366004615314565b611639565b34801561064d57600080fd5b506103ac61186a565b34801561066257600080fd5b506103ac6106713660046154fb565b6118ec565b34801561068257600080fd5b506033546001600160a01b03166105d4565b3480156106a057600080fd5b506103ac6106af366004615618565b611a40565b3480156106c057600080fd5b506103ac6106cf3660046156ea565b611a6e565b3480156106e057600080fd5b506103ac6106ef366004615169565b611a9e565b34801561070057600080fd5b506103ac61070f366004615583565b611c77565b34801561072057600080fd5b506103ac61072f366004615205565b611ca6565b34801561074057600080fd5b506103ac61074f366004615287565b611cb1565b34801561076057600080fd5b5061040e61076f3660046156d2565b60fc60205260009081526040902080546001909101546001600160a01b039091169082565b3480156107a057600080fd5b506104a2611d32565b3480156107b557600080fd5b506103ac6107c4366004615492565b611dfc565b3480156107d557600080fd5b506103ac6107e4366004615014565b611ede565b3480156107f557600080fd5b5061031c6108043660046156d2565b600090815261022a602052604090205490565b34801561082357600080fd5b506103ac610832366004615314565b611f0c565b34801561084357600080fd5b506103ac6108523660046152eb565b612049565b34801561086357600080fd5b5060fd546105d4906001600160a01b031681565b34801561088357600080fd5b506103ac6108923660046155c3565b612078565b3480156108a357600080fd5b5061037f6120d8565b3480156108b857600080fd5b5061034f6108c736600461502e565b6001600160a01b03918216600090815260cb6020908152604080832093909416825291909152205460ff1690565b34801561090157600080fd5b5061031c60fe5481565b34801561091757600080fd5b506103ac61092636600461502e565b61216b565b34801561093757600080fd5b506103ac610946366004615106565b612190565b34801561095757600080fd5b506103ac610966366004615014565b612217565b60006001600160a01b0383166109dc5760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b50600081815260ca602090815260408083206001600160a01b03861684529091529020545b92915050565b6000610a12826122ee565b90505b919050565b600081815261022a6020526040902054606090610a6d5760405162461bcd60e51b81526020600482015260116024820152702737b732bc34b9ba32b73a103a37b5b2b760791b60448201526064016109d3565b610a1282612313565b610a8261015f336125d4565b610acb5760405162461bcd60e51b815260206004820152601a60248201527926bab9ba103132903932b3b4b9ba32b932b21036b0b730b3b2b960311b60448201526064016109d3565b828114610b0a5760405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a59081a5b9c1d5d609a1b60448201526064016109d3565b60005b83811015610b8857610b76858583818110610b3857634e487b7160e01b600052603260045260246000fd5b90506020020135848484818110610b5f57634e487b7160e01b600052603260045260246000fd5b9050602002810190610b719190615b88565b6125f9565b80610b8081615d09565b915050610b0d565b5050505050565b610b98336103e9565b610bb45760405162461bcd60e51b81526004016109d390615af9565b610bbf838383612670565b505050565b6000816001600160a01b0316610be26033546001600160a01b031690565b6001600160a01b03161480610a125750610a126097836125d4565b600082815260fc60209081526040808320815180830190925280546001600160a01b0316808352600190910154928201839052929183610c4c575060fd5460fe546001600160a01b0390911693505b612710610c598287615c45565b610c639190615c31565b925050509250929050565b6033546001600160a01b03163314610cc85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109d3565b610cd36097826126c7565b15610d0f5760405133906001600160a01b038316907f7c0c3c84c67c85fcac635147348bfe374c24a1a93d0366d1cfe9d8853cbf89d590600090a35b50565b6001600160a01b038516331480610d2e5750610d2e85336108c7565b610da05760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f742060448201527f6f776e6572206e6f7220617070726f766564000000000000000000000000000060648201526084016109d3565b610b8885858585856126dc565b610db6336103e9565b610dd25760405162461bcd60e51b81526004016109d390615af9565b610e1182828080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061296792505050565b5050565b6060610e216097612988565b67ffffffffffffffff811115610e4757634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610e70578160200160208202803683370190505b50905060005b610e806097612988565b811015610edc57610e92609782612992565b828281518110610eb257634e487b7160e01b600052603260045260246000fd5b6001600160a01b039092166020928302919091019091015280610ed481615d09565b915050610e76565b505b90565b306001600160a01b037f00000000000000000000000094f015180265e7d74ebe464ca759a59eddbdc654161415610f6f5760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b19195b1959d85d1958d85b1b60a21b60648201526084016109d3565b7f00000000000000000000000094f015180265e7d74ebe464ca759a59eddbdc6546001600160a01b0316610fca7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b0316146110355760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b6163746976652070726f787960a01b60648201526084016109d3565b61103e8161299e565b60408051600080825260208201909252610d0f918391906129f8565b611063336103e9565b61107f5760405162461bcd60e51b81526004016109d390615af9565b610d0f81612b98565b606081518351146110ed5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016109d3565b6000835167ffffffffffffffff81111561111757634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611140578160200160208202803683370190505b50905060005b84518110156111e2576111a785828151811061117257634e487b7160e01b600052603260045260246000fd5b602002602001015185838151811061119a57634e487b7160e01b600052603260045260246000fd5b602002602001015161096b565b8282815181106111c757634e487b7160e01b600052603260045260246000fd5b60209081029190910101526111db81615d09565b9050611146565b509392505050565b306001600160a01b037f00000000000000000000000094f015180265e7d74ebe464ca759a59eddbdc6541614156112785760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b19195b1959d85d1958d85b1b60a21b60648201526084016109d3565b7f00000000000000000000000094f015180265e7d74ebe464ca759a59eddbdc6546001600160a01b03166112d37f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b03161461133e5760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b6163746976652070726f787960a01b60648201526084016109d3565b6113478261299e565b610e11828260016129f8565b61135f61015f336125d4565b6113a85760405162461bcd60e51b815260206004820152601a60248201527926bab9ba103132903932b3b4b9ba32b932b21036b0b730b3b2b960311b60448201526064016109d3565b610e118282612c83565b6000306001600160a01b037f00000000000000000000000094f015180265e7d74ebe464ca759a59eddbdc65416146114525760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c000000000000000060648201526084016109d3565b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc90565b61148361015f336125d4565b6114cc5760405162461bcd60e51b815260206004820152601a60248201527926bab9ba103132903932b3b4b9ba32b932b21036b0b730b3b2b960311b60448201526064016109d3565b610bbf8383836125f9565b600081815261022a60205260408120546115275760405162461bcd60e51b81526020600482015260116024820152702737b732bc34b9ba32b73a103a37b5b2b760791b60448201526064016109d3565b610a1282612c9e565b6033546001600160a01b0316331461158a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109d3565b611595609782612d56565b15610d0f5760405133906001600160a01b038316907f7e1a1a08d52e4ba0e21554733d66165fd5151f99460116223d9e3a608eec5cb190600090a350565b6033546001600160a01b0316331461162d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109d3565b6116376000612d6b565b565b600261012d54141561168d5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109d3565b600261012d5561169f61015f336125d4565b6116e85760405162461bcd60e51b815260206004820152601a60248201527926bab9ba103132903932b3b4b9ba32b932b21036b0b730b3b2b960311b60448201526064016109d3565b60005b858110156117655733610165600089898581811061171957634e487b7160e01b600052603260045260246000fd5b90506020020135815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b03160217905550808061175d90615d09565b9150506116eb565b5060005b878110156118595761184789898381811061179457634e487b7160e01b600052603260045260246000fd5b90506020020160208101906117a99190615014565b88888080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808c0282810182019093528b82529093508b92508a91829185019084908082843760009201919091525050604080516020601f8b018190048102820181019092528981529250899150889081908401838280828437600092019190915250612dbd92505050565b8061185181615d09565b915050611769565b5050600161012d5550505050505050565b600054610100900460ff166118855760005460ff1615611889565b303b155b6118a55760405162461bcd60e51b81526004016109d390615a9c565b600054610100900460ff161580156118d0576000805460ff1961ff0019909116610100171660011790555b6118d8612faf565b8015610d0f576000805461ff001916905550565b6118f861015f336125d4565b6119415760405162461bcd60e51b815260206004820152601a60248201527926bab9ba103132903932b3b4b9ba32b932b21036b0b730b3b2b960311b60448201526064016109d3565b80158061195a575061195a336324ea02c560e21b613045565b6119cc5760405162461bcd60e51b815260206004820152603c60248201527f4d616e61676572206d75737420696d706c656d656e742049455243313135355060448201527f726f6a656374417070726f76655472616e736665724d616e616765720000000060648201526084016109d3565b336000908152610164602052604090205460ff16151581151514610d0f573360008181526101646020908152604091829020805460ff191685151590811790915591519182527fe47f635a589f28dfbd63e4f968448214c1516b874d0ec067c1a451790c36ac10910160405180910390a250565b611a49336103e9565b611a655760405162461bcd60e51b81526004016109d390615af9565b610d0f81613061565b611a77336103e9565b611a935760405162461bcd60e51b81526004016109d390615af9565b610bbf8383836130b0565b600261012d541415611af25760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109d3565b600261012d556001600160a01b038516331480611b145750611b1485336108c7565b611b725760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b60648201526084016109d3565b8251845114611bb35760405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a59081a5b9c1d5d609a1b60448201526064016109d3565b835160011415611c1d57611c188585600081518110611be257634e487b7160e01b600052603260045260246000fd5b602002602001015185600081518110611c0b57634e487b7160e01b600052603260045260246000fd5b60200260200101516131ef565b611c28565b611c2885858561336c565b611c6a85858585858080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506135d292505050565b5050600161012d55505050565b611c80336103e9565b611c9c5760405162461bcd60e51b81526004016109d390615af9565b610e1182826137b7565b610e113383836137d2565b611cba336103e9565b611cd65760405162461bcd60e51b81526004016109d390615af9565b83611ce3610161826125d4565b15611d265760405162461bcd60e51b815260206004820152601360248201527213585b9859d95c88189b1858dadb1a5cdd1959606a1b60448201526064016109d3565b610b88858585856138b3565b6060611d3f61015f612988565b67ffffffffffffffff811115611d6557634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611d8e578160200160208202803683370190505b50905060005b611d9f61015f612988565b811015610edc57611db261015f82612992565b828281518110611dd257634e487b7160e01b600052603260045260246000fd5b6001600160a01b039092166020928302919091019091015280611df481615d09565b915050611d94565b611e05336103e9565b611e215760405162461bcd60e51b81526004016109d390615af9565b828114611e605760405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a59081a5b9c1d5d609a1b60448201526064016109d3565b60005b83811015610b8857611ecc858583818110611e8e57634e487b7160e01b600052603260045260246000fd5b90506020020135848484818110611eb557634e487b7160e01b600052603260045260246000fd5b9050602002810190611ec79190615b88565b612670565b80611ed681615d09565b915050611e63565b611ee7336103e9565b611f035760405162461bcd60e51b81526004016109d390615af9565b610d0f816139f8565b600261012d541415611f605760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109d3565b600261012d55611f6f336103e9565b611f8b5760405162461bcd60e51b81526004016109d390615af9565b60005b8581101561200857306101656000898985818110611fbc57634e487b7160e01b600052603260045260246000fd5b90506020020135815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b03160217905550808061200090615d09565b915050611f8e565b5060005b878110156118595761203789898381811061179457634e487b7160e01b600052603260045260246000fd5b8061204181615d09565b91505061200c565b612052336103e9565b61206e5760405162461bcd60e51b81526004016109d390615af9565b610e118282613a42565b61208461015f336125d4565b6120cd5760405162461bcd60e51b815260206004820152601a60248201527926bab9ba103132903932b3b4b9ba32b932b21036b0b730b3b2b960311b60448201526064016109d3565b610bbf838383613b59565b606061016a80546120e890615ca7565b80601f016020809104026020016040519081016040528092919081815260200182805461211490615ca7565b80156121615780601f1061213657610100808354040283529160200191612161565b820191906000526020600020905b81548152906001019060200180831161214457829003601f168201915b5050505050905090565b612174336103e9565b610e115760405162461bcd60e51b81526004016109d390615af9565b6001600160a01b0385163314806121ac57506121ac85336108c7565b61220a5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b60648201526084016109d3565b610b888585858585613b98565b6033546001600160a01b031633146122715760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109d3565b6001600160a01b0381166122d65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016109d3565b610d0f81612d6b565b6001600160a01b03163b151590565b60006001600160e01b03198216632e33c0db60e01b1480610a125750610a1282613d49565b600081815261016560205260409020546060906001600160a01b031661233b610161826125d4565b1561237e5760405162461bcd60e51b815260206004820152601360248201527213585b9859d95c88189b1858dadb1a5cdd1959606a1b60448201526064016109d3565b600083815261016960205260409020805461239890615ca7565b1590506124b6576001600160a01b03811660009081526101686020526040902080546123c390615ca7565b159050612416576001600160a01b03811660009081526101686020908152604080832086845261016983529281902090516123ff9392016158c8565b604051602081830303815290604052915050610a15565b600083815261016960205260409020805461243090615ca7565b80601f016020809104026020016040519081016040528092919081815260200182805461245c90615ca7565b80156124a95780601f1061247e576101008083540402835291602001916124a9565b820191906000526020600020905b81548152906001019060200180831161248c57829003601f168201915b5050505050915050610a15565b6124c78163e9dc637560e01b613045565b156125565760405163e9dc637560e01b8152306004820152602481018490526001600160a01b0382169063e9dc63759060440160006040518083038186803b15801561251257600080fd5b505afa158015612526573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261254e919081019061565e565b915050610a15565b6001600160a01b0381166000908152610167602052604090205460ff166125aa576001600160a01b03811660009081526101666020526040902061259984613d6e565b6040516020016123ff9291906158a3565b6001600160a01b038116600090815261016660205260409020805461243090615ca7565b50919050565b6001600160a01b038116600090815260018301602052604081205415155b9392505050565b600083815261016560205260409020546001600160a01b031633146126505760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b2103a37b5b2b760991b60448201526064016109d3565b60008381526101696020526040902061266a908383614d94565b50505050565b600083815261016560205260409020546001600160a01b031630146126505760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b2103a37b5b2b760991b60448201526064016109d3565b60006125f2836001600160a01b038416613ea9565b815183511461273e5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b60648201526084016109d3565b6001600160a01b0384166127a25760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b60648201526084016109d3565b336127b1818787878787613fc6565b60005b84518110156128f95760008582815181106127df57634e487b7160e01b600052603260045260246000fd5b60200260200101519050600085838151811061280b57634e487b7160e01b600052603260045260246000fd5b602090810291909101810151600084815260ca835260408082206001600160a01b038e16835290935291909120549091508181101561289f5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201526939103a3930b739b332b960b11b60648201526084016109d3565b600083815260ca602090815260408083206001600160a01b038e8116855292528083208585039055908b168252812080548492906128de908490615c19565b92505081905550505050806128f290615d09565b90506127b4565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051612949929190615a64565b60405180910390a461295f81878787878761411a565b505050505050565b306000908152610166602090815260409091208251610e1192840190614e14565b6000610a12825490565b60006125f283836142cf565b6033546001600160a01b03163314610d0f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109d3565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff1615612a3057612a2b83614307565b610bbf565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b815260040160206040518083038186803b158015612a6957600080fd5b505afa925050508015612a99575060408051601f3d908101601f19168201909252612a9691810190615533565b60015b612b0b5760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201527f6f6e206973206e6f74205555505300000000000000000000000000000000000060648201526084016109d3565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8114612b8c5760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b60648201526084016109d3565b50610bbf8383836143b5565b6001600160a01b038116301415612bf15760405162461bcd60e51b815260206004820152601960248201527f43616e6e6f7420626c61636b6c69737420796f757273656c660000000000000060448201526064016109d3565b612bfd61015f826126c7565b15612c395760405133906001600160a01b038316907f605ecd285af8d775a646fccb959e452c9fcbc3fb990969d941a79d5e91c9ff0c90600090a35b612c4561016182612d56565b15610d0f5760405133906001600160a01b038316907f884ad0bc819ed270213c85246d940694ab55524886b6427934dc3a268974ecf590600090a350565b33600090815261016860205260409020610bbf908383614d94565b600081815261016560205260409020546001600160a01b031630811415612d075760405162461bcd60e51b815260206004820152601460248201527f4e6f206d616e6167657220666f7220746f6b656e00000000000000000000000060448201526064016109d3565b612d13610161826125d4565b15610a155760405162461bcd60e51b815260206004820152601360248201527213585b9859d95c88189b1858dadb1a5cdd1959606a1b60448201526064016109d3565b60006125f2836001600160a01b0384166143da565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b038416612e1d5760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b60648201526084016109d3565b8151835114612e7f5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b60648201526084016109d3565b33612e8f81600087878787613fc6565b60005b8451811015612f4757838181518110612ebb57634e487b7160e01b600052603260045260246000fd5b602002602001015160ca6000878481518110612ee757634e487b7160e01b600052603260045260246000fd5b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b031681526020019081526020016000206000828254612f2f9190615c19565b90915550819050612f3f81615d09565b915050612e92565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051612f98929190615a64565b60405180910390a4610b888160008787878761411a565b600054610100900460ff16612fca5760005460ff1615612fce565b303b155b612fea5760405162461bcd60e51b81526004016109d390615a9c565b600054610100900460ff16158015613015576000805460ff1961ff0019909116610100171660011790555b61301d614429565b613035604051806020016040528060008152506144af565b61303d6144df565b6118d8614555565b60006130508361457c565b80156125f257506125f283836145af565b80516130759061016a906020840190614e14565b507faf497693a87db12ca89131a31edbb3db4bb5702dfb284e8ae7427d185f09112d816040516130a59190615a89565b60405180910390a150565b81816001600160a01b0382166131085760405162461bcd60e51b815260206004820152601860248201527f5f72656365697665722063616e206e6f7420626520307830000000000000000060448201526064016109d3565b6127108111156131655760405162461bcd60e51b815260206004820152602260248201527f5f726f79616c74794250732073686f756c64206c657373207468616e20313030604482015261030360f41b60648201526084016109d3565b6040805180820182526001600160a01b03868116808352602080840188815260008b815260fc8352869020945185546001600160a01b031916941693909317845591516001909301929092558251918252810185905286917f49018ca4b3b4f0c8442e69b201303bb7f7919a14033768ce71ad07ba63a348a3910160405180910390a25050505050565b6001600160a01b0383166132515760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b60648201526084016109d3565b3361328081856000613262876146ad565b61326b876146ad565b60405180602001604052806000815250613fc6565b600083815260ca602090815260408083206001600160a01b0388168452909152902054828110156132ff5760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b60648201526084016109d3565b600084815260ca602090815260408083206001600160a01b03898116808652918452828520888703905582518981529384018890529092908616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a45050505050565b6001600160a01b0383166133ce5760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b60648201526084016109d3565b80518251146134305760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b60648201526084016109d3565b600033905061345381856000868660405180602001604052806000815250613fc6565b60005b835181101561357357600084828151811061348157634e487b7160e01b600052603260045260246000fd5b6020026020010151905060008483815181106134ad57634e487b7160e01b600052603260045260246000fd5b602090810291909101810151600084815260ca835260408082206001600160a01b038c16835290935291909120549091508181101561353a5760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b60648201526084016109d3565b600092835260ca602090815260408085206001600160a01b038b168652909152909220910390558061356b81615d09565b915050613456565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb86866040516135c4929190615a64565b60405180910390a450505050565b60008351116136135760405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a59081a5b9c1d5d609a1b60448201526064016109d3565b600061016560008560008151811061363b57634e487b7160e01b600052603260045260246000fd5b6020026020010151815260200190815260200160002060009054906101000a90046001600160a01b0316905060005b845181101561372557816001600160a01b031661016560008784815181106136a257634e487b7160e01b600052603260045260246000fd5b6020908102919091018101518252810191909152604001600020546001600160a01b0316146137135760405162461bcd60e51b815260206004820152601c60248201527f4d69736d61746368656420746f6b656e206f726967696e61746f72730000000060448201526064016109d3565b8061371d81615d09565b91505061366a565b506001600160a01b0381163014610b88576137478163adf4024360e01b613045565b15610b885760405163adf4024360e01b81526001600160a01b0382169063adf402439061377e9088908890889088906004016159bc565b600060405180830381600087803b15801561379857600080fd5b505af11580156137ac573d6000803e3d6000fd5b505050505050505050565b30600090815261016860205260409020610bbf908383614d94565b816001600160a01b0316836001600160a01b031614156138465760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b60648201526084016109d3565b6001600160a01b03838116600081815260cb6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b03841630141561390c5760405162461bcd60e51b815260206004820152601060248201527f50726f6a6563743a20496e76616c69640000000000000000000000000000000060448201526064016109d3565b6001600160a01b0384163b61396f5760405162461bcd60e51b815260206004820152602360248201527f50726f6a6563743a204d616e61676572206d757374206265206120636f6e74726044820152621858dd60ea1b60648201526084016109d3565b61397b61015f85612d56565b1561266a576001600160a01b0384166000908152610166602052604090206139a4908484614d94565b506001600160a01b03841660008181526101676020526040808220805460ff1916851515179055513392917f8fc18cc172f74c81235145b7927190d2bd0e351fc45bfb17bb572593273cef2191a350505050565b613a0461015f826126c7565b15610d0f5760405133906001600160a01b038316907f605ecd285af8d775a646fccb959e452c9fcbc3fb990969d941a79d5e91c9ff0c90600090a350565b81816001600160a01b038216613a9a5760405162461bcd60e51b815260206004820152601860248201527f5f72656365697665722063616e206e6f7420626520307830000000000000000060448201526064016109d3565b612710811115613af75760405162461bcd60e51b815260206004820152602260248201527f5f726f79616c74794250732073686f756c64206c657373207468616e20313030604482015261030360f41b60648201526084016109d3565b60fd80546001600160a01b0319166001600160a01b03861690811790915560fe84905560408051918252602082018590527fd85b7816dca44c313f0fdadd9567f99f3620a2fac7c21a8a7872e1ac4d10fe55910160405180910390a150505050565b33600090815261016660205260409020613b74908484614d94565b5033600090815261016760205260409020805460ff19169115159190911790555050565b6001600160a01b038416613bfc5760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b60648201526084016109d3565b33613c1b818787613c0c886146ad565b613c15886146ad565b87613fc6565b600084815260ca602090815260408083206001600160a01b038a16845290915290205483811015613ca15760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201526939103a3930b739b332b960b11b60648201526084016109d3565b600085815260ca602090815260408083206001600160a01b038b8116855292528083208785039055908816825281208054869290613ce0908490615c19565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4613d40828888888888614706565b50505050505050565b60006001600160e01b031982166328dfb2fd60e01b1480610a125750610a1282614811565b606081613d9357506040805180820190915260018152600360fc1b6020820152610a15565b8160005b8115613dbd5780613da781615d09565b9150613db69050600a83615c31565b9150613d97565b60008167ffffffffffffffff811115613de657634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015613e10576020820181803683370190505b5090505b8415613ea157613e25600183615c64565b9150613e32600a86615d24565b613e3d906030615c19565b60f81b818381518110613e6057634e487b7160e01b600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350613e9a600a86615c31565b9450613e14565b949350505050565b60008181526001830160205260408120548015613fbc576000613ecd600183615c64565b8554909150600090613ee190600190615c64565b9050818114613f62576000866000018281548110613f0f57634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905080876000018481548110613f4057634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613f8157634e487b7160e01b600052603160045260246000fd5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610a01565b6000915050610a01565b6001600160a01b03851661406a5760005b83518110156140685782818151811061400057634e487b7160e01b600052603260045260246000fd5b602002602001015161022a600086848151811061402d57634e487b7160e01b600052603260045260246000fd5b6020026020010151815260200190815260200160002060008282546140529190615c19565b90915550614061905081615d09565b9050613fd7565b505b6001600160a01b03841661410e5760005b835181101561410c578281815181106140a457634e487b7160e01b600052603260045260246000fd5b602002602001015161022a60008684815181106140d157634e487b7160e01b600052603260045260246000fd5b6020026020010151815260200190815260200160002060008282546140f69190615c64565b90915550614105905081615d09565b905061407b565b505b61295f85858585614851565b6001600160a01b0384163b1561295f5760405163bc197c8160e01b81526001600160a01b0385169063bc197c819061415e9089908990889088908890600401615926565b602060405180830381600087803b15801561417857600080fd5b505af19250505080156141a8575060408051601f3d908101601f191682019092526141a591810190615567565b60015b61425e576141b4615d7a565b806308c379a014156141ee57506141c9615d91565b806141d457506141f0565b8060405162461bcd60e51b81526004016109d39190615a89565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e204552433131353560448201527f526563656976657220696d706c656d656e74657200000000000000000000000060648201526084016109d3565b6001600160e01b0319811663bc197c8160e01b14613d405760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a656374656044820152676420746f6b656e7360c01b60648201526084016109d3565b60008260000182815481106142f457634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905092915050565b6001600160a01b0381163b6143745760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016109d3565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b6143be83614a97565b6000825111806143cb5750805b15610bbf5761266a8383614ad7565b600081815260018301602052604081205461442157508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a01565b506000610a01565b600054610100900460ff166144445760005460ff1615614448565b303b155b6144645760405162461bcd60e51b81526004016109d390615a9c565b600054610100900460ff1615801561448f576000805460ff1961ff0019909116610100171660011790555b614497614555565b61449f614bcb565b6144a7614555565b6118d8614bfb565b600054610100900460ff166144d65760405162461bcd60e51b81526004016109d390615b3d565b610d0f81614c74565b600054610100900460ff166144fa5760005460ff16156144fe565b303b155b61451a5760405162461bcd60e51b81526004016109d390615a9c565b600054610100900460ff16158015614545576000805460ff1961ff0019909116610100171660011790555b61454d614bfb565b61449f614ca4565b600054610100900460ff166116375760405162461bcd60e51b81526004016109d390615b3d565b600061458f826301ffc9a760e01b6145af565b8015610a1257506145a8826001600160e01b03196145af565b1592915050565b604080516001600160e01b0319831660248083019190915282518083039091018152604490910182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166301ffc9a760e01b179052905160009190829081906001600160a01b038716906175309061462b908690615887565b6000604051808303818686fa925050503d8060008114614667576040519150601f19603f3d011682016040523d82523d6000602084013e61466c565b606091505b50915091506020815110156146875760009350505050610a01565b8180156146a35750808060200190518101906146a39190615517565b9695505050505050565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106146f557634e487b7160e01b600052603260045260246000fd5b602090810291909101015292915050565b6001600160a01b0384163b1561295f5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e619061474a9089908990889088908890600401615984565b602060405180830381600087803b15801561476457600080fd5b505af1925050508015614794575060408051601f3d908101601f1916820190925261479191810190615567565b60015b6147a0576141b4615d7a565b6001600160e01b0319811663f23a6e6160e01b14613d405760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a656374656044820152676420746f6b656e7360c01b60648201526084016109d3565b60006001600160e01b03198216632baae9fd60e01b148061484257506001600160e01b0319821663152a902d60e11b145b80610a125750610a1282614cd3565b60008251116148925760405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a59081a5b9c1d5d609a1b60448201526064016109d3565b60006101656000846000815181106148ba57634e487b7160e01b600052603260045260246000fd5b6020026020010151815260200190815260200160002060009054906101000a90046001600160a01b0316905060005b83518110156149a457816001600160a01b0316610165600086848151811061492157634e487b7160e01b600052603260045260246000fd5b6020908102919091018101518252810191909152604001600020546001600160a01b0316146149925760405162461bcd60e51b815260206004820152601c60248201527f4d69736d61746368656420746f6b656e206f726967696e61746f72730000000060448201526064016109d3565b8061499c81615d09565b9150506148e9565b506001600160a01b0381166000908152610164602052604090205460ff1615610b885760405163883da93360e01b81526001600160a01b0382169063883da933906149f99088908890889088906004016158dd565b602060405180830381600087803b158015614a1357600080fd5b505af1158015614a27573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614a4b9190615517565b610b885760405162461bcd60e51b815260206004820152601860248201527f4d616e6167657220617070726f76616c206661696c757265000000000000000060448201526064016109d3565b614aa081614307565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606001600160a01b0383163b614b3f5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b60648201526084016109d3565b600080846001600160a01b031684604051614b5a9190615887565b600060405180830381855af49150503d8060008114614b95576040519150601f19603f3d011682016040523d82523d6000602084013e614b9a565b606091505b5091509150614bc28282604051806060016040528060278152602001615e4860279139614d13565b95945050505050565b600054610100900460ff16614bf25760405162461bcd60e51b81526004016109d390615b3d565b61163733612d6b565b600054610100900460ff16614c165760005460ff1615614c1a565b303b155b614c365760405162461bcd60e51b81526004016109d390615a9c565b600054610100900460ff161580156118d8576000805460ff1961ff0019909116610100171660011790558015610d0f576000805461ff001916905550565b600054610100900460ff16614c9b5760405162461bcd60e51b81526004016109d390615b3d565b610d0f81614d4c565b600054610100900460ff16614ccb5760405162461bcd60e51b81526004016109d390615b3d565b600161012d55565b60006001600160e01b03198216636cdb3d1360e11b1480614d0457506001600160e01b031982166303a24d0760e21b145b80610a125750610a1282614d5f565b60608315614d225750816125f2565b825115614d325782518084602001fd5b8160405162461bcd60e51b81526004016109d39190615a89565b8051610e119060cc906020840190614e14565b60006001600160e01b03198216632a9f3abf60e11b1480610a1257506301ffc9a760e01b6001600160e01b0319831614610a12565b828054614da090615ca7565b90600052602060002090601f016020900481019282614dc25760008555614e08565b82601f10614ddb5782800160ff19823516178555614e08565b82800160010185558215614e08579182015b82811115614e08578235825591602001919060010190614ded565b50610edc929150614e88565b828054614e2090615ca7565b90600052602060002090601f016020900481019282614e425760008555614e08565b82601f10614e5b57805160ff1916838001178555614e08565b82800160010185558215614e08579182015b82811115614e08578251825591602001919060010190614e6d565b5b80821115610edc5760008155600101614e89565b6000614ea883615bf1565b604051614eb58282615cdc565b809250848152858585011115614eca57600080fd5b8484602083013760006020868301015250509392505050565b80356001600160a01b0381168114610a1557600080fd5b60008083601f840112614f0b578182fd5b50813567ffffffffffffffff811115614f22578182fd5b6020830191508360208083028501011115614f3c57600080fd5b9250929050565b600082601f830112614f53578081fd5b81356020614f6082615bcd565b604051614f6d8282615cdc565b838152828101915085830183850287018401881015614f8a578586fd5b855b85811015614fa857813584529284019290840190600101614f8c565b5090979650505050505050565b60008083601f840112614fc6578182fd5b50813567ffffffffffffffff811115614fdd578182fd5b602083019150836020828501011115614f3c57600080fd5b600082601f830112615005578081fd5b6125f283833560208501614e9d565b600060208284031215615025578081fd5b6125f282614ee3565b60008060408385031215615040578081fd5b61504983614ee3565b915061505760208401614ee3565b90509250929050565b600080600080600060a08688031215615077578081fd5b61508086614ee3565b945061508e60208701614ee3565b9350604086013567ffffffffffffffff808211156150aa578283fd5b6150b689838a01614f43565b945060608801359150808211156150cb578283fd5b6150d789838a01614f43565b935060808801359150808211156150ec578283fd5b506150f988828901614ff5565b9150509295509295909350565b600080600080600060a0868803121561511d578283fd5b61512686614ee3565b945061513460208701614ee3565b93506040860135925060608601359150608086013567ffffffffffffffff81111561515d578182fd5b6150f988828901614ff5565b600080600080600060808688031215615180578283fd5b61518986614ee3565b9450602086013567ffffffffffffffff808211156151a5578485fd5b6151b189838a01614f43565b955060408801359150808211156151c6578485fd5b6151d289838a01614f43565b945060608801359150808211156151e7578283fd5b506151f488828901614fb5565b969995985093965092949392505050565b60008060408385031215615217578182fd5b61522083614ee3565b9150602083013561523081615e23565b809150509250929050565b6000806040838503121561524d578182fd5b61525683614ee3565b9150602083013567ffffffffffffffff811115615271578182fd5b61527d85828601614ff5565b9150509250929050565b6000806000806060858703121561529c578182fd5b6152a585614ee3565b9350602085013567ffffffffffffffff8111156152c0578283fd5b6152cc87828801614fb5565b90945092505060408501356152e081615e23565b939692955090935050565b600080604083850312156152fd578182fd5b61530683614ee3565b946020939093013593505050565b6000806000806000806000806080898b03121561532f578586fd5b883567ffffffffffffffff80821115615346578788fd5b6153528c838d01614efa565b909a50985060208b013591508082111561536a578788fd5b6153768c838d01614efa565b909850965060408b013591508082111561538e578485fd5b61539a8c838d01614efa565b909650945060608b01359150808211156153b2578384fd5b506153bf8b828c01614fb5565b999c989b5096995094979396929594505050565b600080604083850312156153e5578182fd5b823567ffffffffffffffff808211156153fc578384fd5b818501915085601f83011261540f578384fd5b8135602061541c82615bcd565b6040516154298282615cdc565b8381528281019150858301838502870184018b1015615446578889fd5b8896505b8487101561546f5761545b81614ee3565b83526001969096019591830191830161544a565b5096505086013592505080821115615485578283fd5b5061527d85828601614f43565b600080600080604085870312156154a7578182fd5b843567ffffffffffffffff808211156154be578384fd5b6154ca88838901614efa565b909650945060208701359150808211156154e2578384fd5b506154ef87828801614efa565b95989497509550505050565b60006020828403121561550c578081fd5b81356125f281615e23565b600060208284031215615528578081fd5b81516125f281615e23565b600060208284031215615544578081fd5b5051919050565b60006020828403121561555c578081fd5b81356125f281615e31565b600060208284031215615578578081fd5b81516125f281615e31565b60008060208385031215615595578182fd5b823567ffffffffffffffff8111156155ab578283fd5b6155b785828601614fb5565b90969095509350505050565b6000806000604084860312156155d7578081fd5b833567ffffffffffffffff8111156155ed578182fd5b6155f986828701614fb5565b909450925050602084013561560d81615e23565b809150509250925092565b600060208284031215615629578081fd5b813567ffffffffffffffff81111561563f578182fd5b8201601f8101841361564f578182fd5b613ea184823560208401614e9d565b60006020828403121561566f578081fd5b815167ffffffffffffffff811115615685578182fd5b8201601f81018413615695578182fd5b80516156a081615bf1565b6040516156ad8282615cdc565b8281528660208486010111156156c1578485fd5b6146a3836020830160208701615c7b565b6000602082840312156156e3578081fd5b5035919050565b6000806000606084860312156156fe578081fd5b8335925061570e60208501614ee3565b9150604084013590509250925092565b600080600060408486031215615732578081fd5b83359250602084013567ffffffffffffffff81111561574f578182fd5b61575b86828701614fb5565b9497909650939450505050565b6000806040838503121561577a578182fd5b50508035926020909101359150565b6000815180845260208085019450808401835b838110156157b85781518752958201959082019060010161579c565b509495945050505050565b600081518084526157db816020860160208601615c7b565b601f01601f19169290920160200192915050565b80546000906002810460018083168061580957607f831692505b602080841082141561582957634e487b7160e01b86526022600452602486fd5b81801561583d576001811461584e5761587b565b60ff1986168952848901965061587b565b60008881526020902060005b868110156158735781548b82015290850190830161585a565b505084890196505b50505050505092915050565b60008251615899818460208701615c7b565b9190910192915050565b60006158af82856157ef565b83516158bf818360208801615c7b565b01949350505050565b6000613ea16158d783866157ef565b846157ef565b60006001600160a01b038087168352808616602084015250608060408301526159096080830185615789565b828103606084015261591b8185615789565b979650505050505050565b60006001600160a01b03808816835280871660208401525060a0604083015261595260a0830186615789565b82810360608401526159648186615789565b9050828103608084015261597881856157c3565b98975050505050505050565b60006001600160a01b03808816835280871660208401525084604083015283606083015260a0608083015261591b60a08301846157c3565b60006001600160a01b0386168252608060208301526159de6080830186615789565b82810360408401526159f08186615789565b9050828103606084015261591b81856157c3565b6020808252825182820181905260009190848201906040850190845b81811015615a455783516001600160a01b031683529284019291840191600101615a20565b50909695505050505050565b6000602082526125f26020830184615789565b600060408252615a776040830185615789565b8281036020840152614bc28185615789565b6000602082526125f260208301846157c3565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201527f647920696e697469616c697a6564000000000000000000000000000000000000606082015260800190565b60208082526024908201527f41646d696e436f6e74726f6c3a204d757374206265206f776e6572206f7220616040820152633236b4b760e11b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6000808335601e19843603018112615b9e578283fd5b83018035915067ffffffffffffffff821115615bb8578283fd5b602001915036819003821315614f3c57600080fd5b600067ffffffffffffffff821115615be757615be7615d64565b5060209081020190565b600067ffffffffffffffff821115615c0b57615c0b615d64565b50601f01601f191660200190565b60008219821115615c2c57615c2c615d38565b500190565b600082615c4057615c40615d4e565b500490565b6000816000190483118215151615615c5f57615c5f615d38565b500290565b600082821015615c7657615c76615d38565b500390565b60005b83811015615c96578181015183820152602001615c7e565b8381111561266a5750506000910152565b600281046001821680615cbb57607f821691505b602082108114156125ce57634e487b7160e01b600052602260045260246000fd5b601f8201601f1916810167ffffffffffffffff81118282101715615d0257615d02615d64565b6040525050565b6000600019821415615d1d57615d1d615d38565b5060010190565b600082615d3357615d33615d4e565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b600060033d1115610ede57600481823e5160e01c90565b600060443d1015615da157610ede565b6040516003193d81016004833e81513d67ffffffffffffffff8160248401118184111715615dd3575050505050610ede565b8285019150815181811115615ded57505050505050610ede565b843d8701016020828501011115615e0957505050505050610ede565b615e1860208286010187615cdc565b509094505050505090565b8015158114610d0f57600080fd5b6001600160e01b031981168114610d0f57600080fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220fb9362ae958ff4c41302a3213da0f94cd7434c8a850559987931ab97670ceb0d64736f6c63430008020033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.