Feature Tip: Add private address tag to any address under My Name Tag !
ERC-1155
Overview
Max Total Supply
280
Holders
76
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
Em
Compiler Version
v0.8.6+commit.11564f7e
Optimization Enabled:
Yes with 1000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: Unlicense pragma solidity ^0.8.6; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/access/AccessControlEnumerable.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; contract Em is Context, AccessControlEnumerable, ERC1155, ERC1155Burnable, ERC1155Supply { uint256 public constant OG_TOKEN_ID = 0; uint256 public constant FOUNDER_TOKEN_ID = 1; bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); Merge public immutable merge; address public vault; uint256 public royaltyInBips; address public royaltyReceiver; bool public isOgTokenClaimingEnabled; bool public isFounderTokenClaimingEnabled; bool public isFounderTokenMintingEnabled; mapping(address => uint256) public addressToNumClaimableOgTokens; mapping(address => uint256) public addressToNumClaimableFounderTokens; event OgTokenClaimed(address indexed to, uint256 qty); event FounderTokenClaimed(address indexed to, uint256 qty); event FounderTokenMinted(address indexed to, uint256 qty); constructor( string memory uri, address merge_, address vault_, uint256 royaltyInBips_, address royaltyReceiver_ ) ERC1155(uri) { merge = Merge(merge_); vault = vault_; royaltyInBips = royaltyInBips_; royaltyReceiver = royaltyReceiver_; _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); _setupRole(ADMIN_ROLE, _msgSender()); _setRoleAdmin(ADMIN_ROLE, DEFAULT_ADMIN_ROLE); } function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address, uint256) { uint256 royaltyAmount = (salePrice * royaltyInBips) / 10000; return (royaltyReceiver, royaltyAmount); } function supportsInterface(bytes4 interfaceId) public view override(AccessControlEnumerable, ERC1155) returns (bool) { bytes4 _ERC2981_ = 0x2a55205a; return super.supportsInterface(interfaceId) || interfaceId == _ERC2981_; } function setUri(string memory uri) external onlyRole(ADMIN_ROLE) { _setURI(uri); } function setVault(address vault_) external onlyRole(ADMIN_ROLE) { vault = vault_; } function setRoyaltyInBips(uint256 royaltyInBips_) external onlyRole(ADMIN_ROLE) { require(royaltyInBips_ <= 10000, "More than 100%"); royaltyInBips = royaltyInBips_; } function setRoyaltyReceiver(address royaltyReceiver_) external onlyRole(ADMIN_ROLE) { royaltyReceiver = royaltyReceiver_; } function toggleOgTokenClaiming() external onlyRole(ADMIN_ROLE) { isOgTokenClaimingEnabled = !isOgTokenClaimingEnabled; } function toggleFounderTokenClaiming() external onlyRole(ADMIN_ROLE) { isFounderTokenClaimingEnabled = !isFounderTokenClaimingEnabled; } function toggleFounderTokenMinting() external onlyRole(ADMIN_ROLE) { isFounderTokenMintingEnabled = !isFounderTokenMintingEnabled; } function setNumClaimableOgTokensForAddresses( address[] calldata addresses, uint256[] calldata numClaimableTokenss ) external onlyRole(ADMIN_ROLE) { require( numClaimableTokenss.length == addresses.length, "Lengths are not equal" ); uint256 numAddresses = addresses.length; for (uint256 i = 0; i < numAddresses; ++i) { addressToNumClaimableOgTokens[addresses[i]] = numClaimableTokenss[ i ]; } } function setNumClaimableFounderTokensForAddresses( address[] calldata addresses, uint256[] calldata numClaimableTokenss ) external onlyRole(ADMIN_ROLE) { require( numClaimableTokenss.length == addresses.length, "Lengths are not equal" ); uint256 numAddresses = addresses.length; for (uint256 i = 0; i < numAddresses; ++i) { addressToNumClaimableFounderTokens[ addresses[i] ] = numClaimableTokenss[i]; } } function claimOgToken(address to) external { require(isOgTokenClaimingEnabled, "Not enabled"); uint256 qty = addressToNumClaimableOgTokens[to]; require(qty > 0, "Not enough quota"); addressToNumClaimableOgTokens[to] = 0; _mint(to, OG_TOKEN_ID, qty, ""); emit OgTokenClaimed(to, qty); } function claimFounderToken(address to) external { require(isFounderTokenClaimingEnabled, "Not enabled"); uint256 qty = addressToNumClaimableFounderTokens[to]; require(qty > 0, "Not enough quota"); addressToNumClaimableFounderTokens[to] = 0; _mint(to, FOUNDER_TOKEN_ID, qty, ""); emit FounderTokenClaimed(to, qty); } function mintFounderToken(address to, uint256 mergeId) external { require(isFounderTokenMintingEnabled, "Not enabled"); uint256 vaultMergeId = merge.tokenOf(vault); uint256 mass = merge.massOf(mergeId); require(mass <= merge.massOf(vaultMergeId), "Too big"); merge.safeTransferFrom(merge.ownerOf(mergeId), vault, mergeId); require(merge.decodeClass(merge.getValueOf(vaultMergeId)) == 3, "WTF"); _mint(to, FOUNDER_TOKEN_ID, mass, ""); emit FounderTokenMinted(to, mass); } function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override(ERC1155, ERC1155Supply) { return super._beforeTokenTransfer(operator, from, to, ids, amounts, data); } } contract Merge { function ownerOf(uint256 tokenId) public view returns (address owner) {} function safeTransferFrom( address from, address to, uint256 tokenId ) public {} function massOf(uint256 tokenId) public view returns (uint256) {} function getValueOf(uint256 tokenId) public view returns (uint256) {} function decodeClass(uint256 value) public pure returns (uint256) {} function decodeMass(uint256 value) public pure returns (uint256) {} function tokenOf(address owner) public view returns (uint256) {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (access/AccessControlEnumerable.sol) pragma solidity ^0.8.0; import "./IAccessControlEnumerable.sol"; import "./AccessControl.sol"; import "../utils/structs/EnumerableSet.sol"; /** * @dev Extension of {AccessControl} that allows enumerating the members of each role. */ abstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl { using EnumerableSet for EnumerableSet.AddressSet; mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) public view override returns (address) { return _roleMembers[role].at(index); } /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) public view override returns (uint256) { return _roleMembers[role].length(); } /** * @dev Overload {_grantRole} to track enumerable memberships */ function _grantRole(bytes32 role, address account) internal virtual override { super._grantRole(role, account); _roleMembers[role].add(account); } /** * @dev Overload {_revokeRole} to track enumerable memberships */ function _revokeRole(bytes32 role, address account) internal virtual override { super._revokeRole(role, account); _roleMembers[role].remove(account); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC1155/ERC1155.sol) pragma solidity ^0.8.0; import "./IERC1155.sol"; import "./IERC1155Receiver.sol"; import "./extensions/IERC1155MetadataURI.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/introspection/ERC165.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 ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI { using Address 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}. */ constructor(string memory uri_) { _setURI(uri_); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC1155).interfaceId || interfaceId == type(IERC1155MetadataURI).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 IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) { if (response != IERC1155Receiver.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 IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns ( bytes4 response ) { if (response != IERC1155Receiver.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; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC1155/extensions/ERC1155Burnable.sol) pragma solidity ^0.8.0; import "../ERC1155.sol"; /** * @dev Extension of {ERC1155} that allows token holders to destroy both their * own tokens and those that they have been approved to use. * * _Available since v3.1._ */ abstract contract ERC1155Burnable is ERC1155 { function burn( address account, uint256 id, uint256 value ) public virtual { require( account == _msgSender() || isApprovedForAll(account, _msgSender()), "ERC1155: caller is not owner nor approved" ); _burn(account, id, value); } function burnBatch( address account, uint256[] memory ids, uint256[] memory values ) public virtual { require( account == _msgSender() || isApprovedForAll(account, _msgSender()), "ERC1155: caller is not owner nor approved" ); _burnBatch(account, ids, values); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC1155/extensions/ERC1155Supply.sol) pragma solidity ^0.8.0; import "../ERC1155.sol"; /** * @dev Extension of ERC1155 that adds tracking of total supply per id. * * Useful for scenarios where Fungible and Non-fungible tokens have to be * clearly identified. Note: While a totalSupply of 1 might mean the * corresponding is an NFT, there is no guarantees that no other token with the * same id are not going to be minted. */ abstract contract ERC1155Supply is ERC1155 { mapping(uint256 => uint256) private _totalSupply; /** * @dev Total amount of tokens in with a given id. */ function totalSupply(uint256 id) public view virtual returns (uint256) { return _totalSupply[id]; } /** * @dev Indicates whether any token exist with a given id, or not. */ function exists(uint256 id) public view virtual returns (bool) { return ERC1155Supply.totalSupply(id) > 0; } /** * @dev See {ERC1155-_beforeTokenTransfer}. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override { super._beforeTokenTransfer(operator, from, to, ids, amounts, data); if (from == address(0)) { for (uint256 i = 0; i < ids.length; ++i) { _totalSupply[ids[i]] += amounts[i]; } } if (to == address(0)) { for (uint256 i = 0; i < ids.length; ++i) { _totalSupply[ids[i]] -= amounts[i]; } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (access/IAccessControlEnumerable.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; /** * @dev External interface of AccessControlEnumerable declared to support ERC165 detection. */ interface IAccessControlEnumerable is IAccessControl { /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) external view returns (address); /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; import "../utils/Context.sol"; import "../utils/Strings.sol"; import "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role, _msgSender()); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(uint160(account), 20), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/structs/EnumerableSet.sol) pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastvalue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastvalue; // Update the index for the moved value set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { return _values(set._inner); } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; assembly { result := store } return result; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC1155/IERC1155.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.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 IERC1155 is IERC165 { /** * @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 v4.4.0 (token/ERC1155/IERC1155Receiver.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev _Available since v3.1._ */ interface IERC1155Receiver is IERC165 { /** @dev Handles the receipt of a single ERC1155 token type. This function is called at the end of a `safeTransferFrom` after the balance has been updated. To accept the transfer, this must return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` (i.e. 0xf23a6e61, or its own function selector). @param operator The address which initiated the transfer (i.e. msg.sender) @param from The address which previously owned the token @param id The ID of the token being transferred @param value The amount of tokens being transferred @param data Additional data with no specified format @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed */ function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external returns (bytes4); /** @dev Handles the receipt of a multiple ERC1155 token types. This function is called at the end of a `safeBatchTransferFrom` after the balances have been updated. To accept the transfer(s), this must return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` (i.e. 0xbc197c81, or its own function selector). @param operator The address which initiated the batch transfer (i.e. msg.sender) @param from The address which previously owned the token @param ids An array containing ids of each token being transferred (order and length must match values array) @param values An array containing amounts of each token being transferred (order and length must match ids array) @param data Additional data with no specified format @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed */ function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC1155/extensions/IERC1155MetadataURI.sol) pragma solidity ^0.8.0; import "../IERC1155.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 IERC1155MetadataURI is IERC1155 { /** * @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 v4.4.0 (utils/Address.sol) pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
{ "optimizer": { "enabled": true, "runs": 1000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"uri","type":"string"},{"internalType":"address","name":"merge_","type":"address"},{"internalType":"address","name":"vault_","type":"address"},{"internalType":"uint256","name":"royaltyInBips_","type":"uint256"},{"internalType":"address","name":"royaltyReceiver_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"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":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"qty","type":"uint256"}],"name":"FounderTokenClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"qty","type":"uint256"}],"name":"FounderTokenMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"qty","type":"uint256"}],"name":"OgTokenClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"inputs":[],"name":"ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FOUNDER_TOKEN_ID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OG_TOKEN_ID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"addressToNumClaimableFounderTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"addressToNumClaimableOgTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"burnBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"claimFounderToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"claimOgToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","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":[],"name":"isFounderTokenClaimingEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isFounderTokenMintingEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isOgTokenClaimingEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"merge","outputs":[{"internalType":"contract Merge","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"mergeId","type":"uint256"}],"name":"mintFounderToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"royaltyInBips","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"royaltyReceiver","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"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":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256[]","name":"numClaimableTokenss","type":"uint256[]"}],"name":"setNumClaimableFounderTokensForAddresses","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256[]","name":"numClaimableTokenss","type":"uint256[]"}],"name":"setNumClaimableOgTokensForAddresses","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"royaltyInBips_","type":"uint256"}],"name":"setRoyaltyInBips","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"royaltyReceiver_","type":"address"}],"name":"setRoyaltyReceiver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri","type":"string"}],"name":"setUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"vault_","type":"address"}],"name":"setVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"toggleFounderTokenClaiming","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"toggleFounderTokenMinting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"toggleOgTokenClaiming","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60a06040523480156200001157600080fd5b5060405162003f1a38038062003f1a833981016040819052620000349162000366565b846200004081620000de565b506001600160601b0319606085901b16608052600680546001600160a01b038581166001600160a01b031992831617909255600784905560088054928416929091169190911790556200009c6000620000963390565b620000f7565b620000b760008051602062003efa83398151915233620000f7565b620000d360008051602062003efa833981519152600062000103565b5050505050620004d9565b8051620000f3906004906020840190620002a3565b5050565b620000f382826200014e565b600082815260208190526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b6200016582826200019160201b620019eb1760201c565b60008281526001602090815260409091206200018c91839062001a8962000231821b17901c565b505050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16620000f3576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620001ed3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600062000248836001600160a01b03841662000251565b90505b92915050565b60008181526001830160205260408120546200029a575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556200024b565b5060006200024b565b828054620002b19062000486565b90600052602060002090601f016020900481019282620002d5576000855562000320565b82601f10620002f057805160ff191683800117855562000320565b8280016001018555821562000320579182015b828111156200032057825182559160200191906001019062000303565b506200032e92915062000332565b5090565b5b808211156200032e576000815560010162000333565b80516001600160a01b03811681146200036157600080fd5b919050565b600080600080600060a086880312156200037f57600080fd5b85516001600160401b03808211156200039757600080fd5b818801915088601f830112620003ac57600080fd5b815181811115620003c157620003c1620004c3565b604051601f8201601f19908116603f01168101908382118183101715620003ec57620003ec620004c3565b81604052828152602093508b848487010111156200040957600080fd5b600091505b828210156200042d57848201840151818301850152908301906200040e565b828211156200043f5760008484830101525b98506200045191505088820162000349565b95505050620004636040870162000349565b9250606086015191506200047a6080870162000349565b90509295509295909350565b600181811c908216806200049b57607f821691505b60208210811415620004bd57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b60805160601c6139df6200051b6000396000818161035101528181611024015281816110c20152818161115501528181611255015261137601526139df6000f3fe608060405234801561001057600080fd5b50600436106102fe5760003560e01c80636b20c4541161019c578063a22cb465116100ee578063d547741f11610097578063f5298aca11610071578063f5298aca14610701578063f9ae3c0314610714578063fbfa77cf1461072757600080fd5b8063d547741f1461069f578063e985e9c5146106b2578063f242432a146106ee57600080fd5b8063c993ab2f116100c8578063c993ab2f14610665578063ca15c87314610679578063d0094f7e1461068c57600080fd5b8063a22cb4651461062a578063bd85b0391461063d578063c8c1282b1461065d57600080fd5b80639010d07c116101505780639f7e75d11161012a5780639f7e75d11461060e5780639fbc871314610617578063a217fddf1461043557600080fd5b80639010d07c146105b157806391d14854146105c45780639b642de1146105fb57600080fd5b806375b238fc1161018157806375b238fc146105635780637e436bc11461058a5780638dc251e31461059e57600080fd5b80636b20c45414610548578063740ddb8f1461055b57600080fd5b80632f2ff15d116102555780634e1273f41161020957806363da3d45116101e357806363da3d451461051a5780636817031b1461052257806369545b4d1461053557600080fd5b80634e1273f4146104d05780634f558e79146104f0578063603f85841461051257600080fd5b8063373aad971161023a578063373aad97146104895780633ef5a13a1461049c57806349db4795146104b057600080fd5b80632f2ff15d1461046357806336568abe1461047657600080fd5b8063248a9ca3116102b75780632a58d0a5116102915780632a58d0a5146104355780632d3ccfe21461043d5780632eb2c2d61461045057600080fd5b8063248a9ca3146103cb57806329d7797f146103ee5780632a55205a1461040357600080fd5b80630b65108b116102e85780630b65108b1461034c5780630e89341c1461038b578063164385e9146103ab57600080fd5b8062fdd58e1461030357806301ffc9a714610329575b600080fd5b61031661031136600461329e565b61073a565b6040519081526020015b60405180910390f35b61033c61033736600461349e565b6107e8565b6040519015158152602001610320565b6103737f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610320565b61039e61039936600461343e565b610832565b604051610320919061370c565b6103166103b936600461306b565b600a6020526000908152604090205481565b6103166103d936600461343e565b60009081526020819052604090206001015490565b6104016103fc36600461306b565b6108c6565b005b61041661041136600461347c565b6109f2565b604080516001600160a01b039093168352602083019190915201610320565b610316600081565b61040161044b36600461306b565b610a2b565b61040161045e3660046130de565b610b48565b610401610471366004613457565b610bea565b610401610484366004613457565b610c15565b6104016104973660046132ff565b610ca1565b60085461033c90600160a81b900460ff1681565b6103166104be36600461306b565b60096020526000908152604090205481565b6104e36104de36600461336b565b610d9e565b60405161032091906136cb565b61033c6104fe36600461343e565b600090815260056020526040902054151590565b610401610edc565b610316600181565b61040161053036600461306b565b610f44565b61040161054336600461329e565b610f9f565b6104016105563660046131f5565b611524565b6104016115a9565b6103167fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b60085461033c90600160b01b900460ff1681565b6104016105ac36600461306b565b611611565b6103736105bf36600461347c565b61166c565b61033c6105d2366004613457565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6104016106093660046134d8565b611684565b61031660075481565b600854610373906001600160a01b031681565b61040161063836600461326b565b6116b8565b61031661064b36600461343e565b60009081526005602052604090205490565b6104016116c3565b60085461033c90600160a01b900460ff1681565b61031661068736600461343e565b61172b565b61040161069a3660046132ff565b611742565b6104016106ad366004613457565b611836565b61033c6106c03660046130a5565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205460ff1690565b6104016106fc36600461318c565b61185c565b61040161070f3660046132ca565b6118e3565b61040161072236600461343e565b611968565b600654610373906001600160a01b031681565b60006001600160a01b0383166107bd5760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201527f65726f206164647265737300000000000000000000000000000000000000000060648201526084015b60405180910390fd5b5060008181526002602090815260408083206001600160a01b03861684529091529020545b92915050565b60007f2a55205a0000000000000000000000000000000000000000000000000000000061081483611a9e565b8061082b57506001600160e01b0319838116908216145b9392505050565b606060048054610841906137fa565b80601f016020809104026020016040519081016040528092919081815260200182805461086d906137fa565b80156108ba5780601f1061088f576101008083540402835291602001916108ba565b820191906000526020600020905b81548152906001019060200180831161089d57829003601f168201915b50505050509050919050565b600854600160a81b900460ff1661090d5760405162461bcd60e51b815260206004820152600b60248201526a139bdd08195b98589b195960aa1b60448201526064016107b4565b6001600160a01b0381166000908152600a6020526040902054806109735760405162461bcd60e51b815260206004820152601060248201527f4e6f7420656e6f7567682071756f74610000000000000000000000000000000060448201526064016107b4565b6001600160a01b0382166000908152600a60209081526040808320839055805191820190529081526109ab9083906001908490611b10565b816001600160a01b03167f2ec62373990d2b3ea65a3801472527b7acb88e0888f390d5996e469ba3b626df826040516109e691815260200190565b60405180910390a25050565b600080600061271060075485610a08919061377d565b610a12919061375b565b6008546001600160a01b031693509150505b9250929050565b600854600160a01b900460ff16610a725760405162461bcd60e51b815260206004820152600b60248201526a139bdd08195b98589b195960aa1b60448201526064016107b4565b6001600160a01b03811660009081526009602052604090205480610ad85760405162461bcd60e51b815260206004820152601060248201527f4e6f7420656e6f7567682071756f74610000000000000000000000000000000060448201526064016107b4565b6001600160a01b038216600090815260096020908152604080832083905580519182019052818152610b0d9184918490611b10565b816001600160a01b03167f21e0dc0d648f45076a89386cd5fedd6f7082f7bef696ea6be5b7890db2817a68826040516109e691815260200190565b6001600160a01b038516331480610b645750610b6485336106c0565b610bd65760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f742060448201527f6f776e6572206e6f7220617070726f766564000000000000000000000000000060648201526084016107b4565b610be38585858585611c3e565b5050505050565b600082815260208190526040902060010154610c068133611ead565b610c108383611f2b565b505050565b6001600160a01b0381163314610c935760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084016107b4565b610c9d8282611f4d565b5050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775610ccc8133611ead565b818414610d1b5760405162461bcd60e51b815260206004820152601560248201527f4c656e6774687320617265206e6f7420657175616c000000000000000000000060448201526064016107b4565b8360005b81811015610d9557848482818110610d3957610d396138a9565b9050602002013560096000898985818110610d5657610d566138a9565b9050602002016020810190610d6b919061306b565b6001600160a01b03168152602081019190915260400160002055610d8e81613862565b9050610d1f565b50505050505050565b60608151835114610e175760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e67746860448201527f206d69736d61746368000000000000000000000000000000000000000000000060648201526084016107b4565b6000835167ffffffffffffffff811115610e3357610e336138bf565b604051908082528060200260200182016040528015610e5c578160200160208202803683370190505b50905060005b8451811015610ed457610ea7858281518110610e8057610e806138a9565b6020026020010151858381518110610e9a57610e9a6138a9565b602002602001015161073a565b828281518110610eb957610eb96138a9565b6020908102919091010152610ecd81613862565b9050610e62565b509392505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775610f078133611ead565b50600880547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff8116600160a01b9182900460ff1615909102179055565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775610f6f8133611ead565b506006805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b600854600160b01b900460ff16610fe65760405162461bcd60e51b815260206004820152600b60248201526a139bdd08195b98589b195960aa1b60448201526064016107b4565b6006546040517f42ec38e20000000000000000000000000000000000000000000000000000000081526001600160a01b0391821660048201526000917f000000000000000000000000000000000000000000000000000000000000000016906342ec38e29060240160206040518083038186803b15801561106657600080fd5b505afa15801561107a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061109e9190613529565b6040516330f60ddb60e11b8152600481018490529091506000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906361ec1bb69060240160206040518083038186803b15801561110457600080fd5b505afa158015611118573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061113c9190613529565b6040516330f60ddb60e11b8152600481018490529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906361ec1bb69060240160206040518083038186803b15801561119f57600080fd5b505afa1580156111b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111d79190613529565b8111156112265760405162461bcd60e51b815260206004820152600760248201527f546f6f206269670000000000000000000000000000000000000000000000000060448201526064016107b4565b6040517f6352211e000000000000000000000000000000000000000000000000000000008152600481018490527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342842e0e908290636352211e9060240160206040518083038186803b1580156112a757600080fd5b505afa1580156112bb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112df9190613088565b60065460405160e084901b6001600160e01b03191681526001600160a01b0392831660048201529116602482015260448101869052606401600060405180830381600087803b15801561133157600080fd5b505af1158015611345573d6000803e3d6000fd5b50506040517f0ab2b6b9000000000000000000000000000000000000000000000000000000008152600481018590527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316925063eafe706e91508290630ab2b6b99060240160206040518083038186803b1580156113ca57600080fd5b505afa1580156113de573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114029190613529565b6040518263ffffffff1660e01b815260040161142091815260200190565b60206040518083038186803b15801561143857600080fd5b505afa15801561144c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114709190613529565b6003146114bf5760405162461bcd60e51b815260206004820152600360248201527f575446000000000000000000000000000000000000000000000000000000000060448201526064016107b4565b6114db8460018360405180602001604052806000815250611b10565b836001600160a01b03167fd99bacd7f46ae80ec6c4324d3490daf3166de45d0859c6a6f7428eb8f7a3673a8260405161151691815260200190565b60405180910390a250505050565b6001600160a01b038316331480611540575061154083336106c0565b61159e5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b60648201526084016107b4565b610c10838383611f6f565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756115d48133611ead565b50600880547fffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffff8116600160b01b9182900460ff1615909102179055565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177561163c8133611ead565b506008805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b600082815260016020526040812061082b90836121b9565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756116af8133611ead565b610c9d826121c5565b610c9d3383836121d8565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756116ee8133611ead565b50600880547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff8116600160a81b9182900460ff1615909102179055565b60008181526001602052604081206107e2906122cd565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177561176d8133611ead565b8184146117bc5760405162461bcd60e51b815260206004820152601560248201527f4c656e6774687320617265206e6f7420657175616c000000000000000000000060448201526064016107b4565b8360005b81811015610d95578484828181106117da576117da6138a9565b90506020020135600a60008989858181106117f7576117f76138a9565b905060200201602081019061180c919061306b565b6001600160a01b0316815260208101919091526040016000205561182f81613862565b90506117c0565b6000828152602081905260409020600101546118528133611ead565b610c108383611f4d565b6001600160a01b038516331480611878575061187885336106c0565b6118d65760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b60648201526084016107b4565b610be385858585856122d7565b6001600160a01b0383163314806118ff57506118ff83336106c0565b61195d5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b60648201526084016107b4565b610c10838383612470565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756119938133611ead565b6127108211156119e55760405162461bcd60e51b815260206004820152600e60248201527f4d6f7265207468616e203130302500000000000000000000000000000000000060448201526064016107b4565b50600755565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610c9d576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055611a453390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600061082b836001600160a01b0384166125ed565b60006001600160e01b031982167fd9b67a26000000000000000000000000000000000000000000000000000000001480611b0157506001600160e01b031982167f0e89341c00000000000000000000000000000000000000000000000000000000145b806107e257506107e28261263c565b6001600160a01b038416611b8c5760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f2061646472657360448201527f730000000000000000000000000000000000000000000000000000000000000060648201526084016107b4565b33611bac81600087611b9d8861267a565b611ba68861267a565b876126c5565b60008481526002602090815260408083206001600160a01b038916845290915281208054859290611bde908490613743565b909155505060408051858152602081018590526001600160a01b0380881692600092918516917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4610be3816000878787876126d3565b8151835114611ca05760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b60648201526084016107b4565b6001600160a01b038416611d045760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b60648201526084016107b4565b33611d138187878787876126c5565b60005b8451811015611e3f576000858281518110611d3357611d336138a9565b602002602001015190506000858381518110611d5157611d516138a9565b60209081029190910181015160008481526002835260408082206001600160a01b038e168352909352919091205490915081811015611de55760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201526939103a3930b739b332b960b11b60648201526084016107b4565b60008381526002602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290611e24908490613743565b9250508190555050505080611e3890613862565b9050611d16565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051611e8f9291906136de565b60405180910390a4611ea5818787878787612888565b505050505050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610c9d57611ee9816001600160a01b03166014612993565b611ef4836020612993565b604051602001611f059291906135a9565b60408051601f198184030181529082905262461bcd60e51b82526107b49160040161370c565b611f3582826119eb565b6000828152600160205260409020610c109082611a89565b611f578282612b74565b6000828152600160205260409020610c109082612bf3565b6001600160a01b038316611fd15760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b60648201526084016107b4565b80518251146120335760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b60648201526084016107b4565b6000339050612056818560008686604051806020016040528060008152506126c5565b60005b835181101561215a576000848281518110612076576120766138a9565b602002602001015190506000848381518110612094576120946138a9565b60209081029190910181015160008481526002835260408082206001600160a01b038c1683529093529190912054909150818110156121215760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b60648201526084016107b4565b60009283526002602090815260408085206001600160a01b038b168652909152909220910390558061215281613862565b915050612059565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb86866040516121ab9291906136de565b60405180910390a450505050565b600061082b8383612c08565b8051610c9d906004906020840190612e98565b816001600160a01b0316836001600160a01b031614156122605760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c2073746174757360448201527f20666f722073656c66000000000000000000000000000000000000000000000060648201526084016107b4565b6001600160a01b03838116600081815260036020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60006107e2825490565b6001600160a01b03841661233b5760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b60648201526084016107b4565b3361234b818787611b9d8861267a565b60008481526002602090815260408083206001600160a01b038a168452909152902054838110156123d15760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201526939103a3930b739b332b960b11b60648201526084016107b4565b60008581526002602090815260408083206001600160a01b038b8116855292528083208785039055908816825281208054869290612410908490613743565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4610d958288888888886126d3565b6001600160a01b0383166124d25760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b60648201526084016107b4565b33612501818560006124e38761267a565b6124ec8761267a565b604051806020016040528060008152506126c5565b60008381526002602090815260408083206001600160a01b0388168452909152902054828110156125805760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b60648201526084016107b4565b60008481526002602090815260408083206001600160a01b03898116808652918452828520888703905582518981529384018890529092908616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a45050505050565b6000818152600183016020526040812054612634575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556107e2565b5060006107e2565b60006001600160e01b031982167f5a05180f0000000000000000000000000000000000000000000000000000000014806107e257506107e282612c32565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106126b4576126b46138a9565b602090810291909101015292915050565b611ea5868686868686612c99565b6001600160a01b0384163b15611ea55760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906127179089908990889088908890600401613688565b602060405180830381600087803b15801561273157600080fd5b505af1925050508015612761575060408051601f3d908101601f1916820190925261275e918101906134bb565b60015b6128175761276d6138d5565b806308c379a014156127a757506127826138f1565b8061278d57506127a9565b8060405162461bcd60e51b81526004016107b4919061370c565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e204552433131353560448201527f526563656976657220696d706c656d656e74657200000000000000000000000060648201526084016107b4565b6001600160e01b0319811663f23a6e6160e01b14610d955760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a656374656044820152676420746f6b656e7360c01b60648201526084016107b4565b6001600160a01b0384163b15611ea55760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906128cc908990899088908890889060040161362a565b602060405180830381600087803b1580156128e657600080fd5b505af1925050508015612916575060408051601f3d908101601f19168201909252612913918101906134bb565b60015b6129225761276d6138d5565b6001600160e01b0319811663bc197c8160e01b14610d955760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a656374656044820152676420746f6b656e7360c01b60648201526084016107b4565b606060006129a283600261377d565b6129ad906002613743565b67ffffffffffffffff8111156129c5576129c56138bf565b6040519080825280601f01601f1916602001820160405280156129ef576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110612a2657612a266138a9565b60200101906001600160f81b031916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110612a7157612a716138a9565b60200101906001600160f81b031916908160001a9053506000612a9584600261377d565b612aa0906001613743565b90505b6001811115612b25577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110612ae157612ae16138a9565b1a60f81b828281518110612af757612af76138a9565b60200101906001600160f81b031916908160001a90535060049490941c93612b1e816137e3565b9050612aa3565b50831561082b5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016107b4565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1615610c9d576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061082b836001600160a01b038416612da5565b6000826000018281548110612c1f57612c1f6138a9565b9060005260206000200154905092915050565b60006001600160e01b031982167f7965db0b0000000000000000000000000000000000000000000000000000000014806107e257507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316146107e2565b6001600160a01b038516612d205760005b8351811015612d1e57828181518110612cc557612cc56138a9565b602002602001015160056000868481518110612ce357612ce36138a9565b602002602001015181526020019081526020016000206000828254612d089190613743565b90915550612d17905081613862565b9050612caa565b505b6001600160a01b038416611ea55760005b8351811015610d9557828181518110612d4c57612d4c6138a9565b602002602001015160056000868481518110612d6a57612d6a6138a9565b602002602001015181526020019081526020016000206000828254612d8f919061379c565b90915550612d9e905081613862565b9050612d31565b60008181526001830160205260408120548015612e8e576000612dc960018361379c565b8554909150600090612ddd9060019061379c565b9050818114612e42576000866000018281548110612dfd57612dfd6138a9565b9060005260206000200154905080876000018481548110612e2057612e206138a9565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080612e5357612e53613893565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506107e2565b60009150506107e2565b828054612ea4906137fa565b90600052602060002090601f016020900481019282612ec65760008555612f0c565b82601f10612edf57805160ff1916838001178555612f0c565b82800160010185558215612f0c579182015b82811115612f0c578251825591602001919060010190612ef1565b50612f18929150612f1c565b5090565b5b80821115612f185760008155600101612f1d565b600067ffffffffffffffff831115612f4b57612f4b6138bf565b604051612f62601f8501601f191660200182613835565b809150838152848484011115612f7757600080fd5b83836020830137600060208583010152509392505050565b60008083601f840112612fa157600080fd5b50813567ffffffffffffffff811115612fb957600080fd5b6020830191508360208260051b8501011115610a2457600080fd5b600082601f830112612fe557600080fd5b81356020612ff28261371f565b604051612fff8282613835565b8381528281019150858301600585901b8701840188101561301f57600080fd5b60005b8581101561303e57813584529284019290840190600101613022565b5090979650505050505050565b600082601f83011261305c57600080fd5b61082b83833560208501612f31565b60006020828403121561307d57600080fd5b813561082b8161397b565b60006020828403121561309a57600080fd5b815161082b8161397b565b600080604083850312156130b857600080fd5b82356130c38161397b565b915060208301356130d38161397b565b809150509250929050565b600080600080600060a086880312156130f657600080fd5b85356131018161397b565b945060208601356131118161397b565b9350604086013567ffffffffffffffff8082111561312e57600080fd5b61313a89838a01612fd4565b9450606088013591508082111561315057600080fd5b61315c89838a01612fd4565b9350608088013591508082111561317257600080fd5b5061317f8882890161304b565b9150509295509295909350565b600080600080600060a086880312156131a457600080fd5b85356131af8161397b565b945060208601356131bf8161397b565b93506040860135925060608601359150608086013567ffffffffffffffff8111156131e957600080fd5b61317f8882890161304b565b60008060006060848603121561320a57600080fd5b83356132158161397b565b9250602084013567ffffffffffffffff8082111561323257600080fd5b61323e87838801612fd4565b9350604086013591508082111561325457600080fd5b5061326186828701612fd4565b9150509250925092565b6000806040838503121561327e57600080fd5b82356132898161397b565b9150602083013580151581146130d357600080fd5b600080604083850312156132b157600080fd5b82356132bc8161397b565b946020939093013593505050565b6000806000606084860312156132df57600080fd5b83356132ea8161397b565b95602085013595506040909401359392505050565b6000806000806040858703121561331557600080fd5b843567ffffffffffffffff8082111561332d57600080fd5b61333988838901612f8f565b9096509450602087013591508082111561335257600080fd5b5061335f87828801612f8f565b95989497509550505050565b6000806040838503121561337e57600080fd5b823567ffffffffffffffff8082111561339657600080fd5b818501915085601f8301126133aa57600080fd5b813560206133b78261371f565b6040516133c48282613835565b8381528281019150858301600585901b870184018b10156133e457600080fd5b600096505b848710156134105780356133fc8161397b565b8352600196909601959183019183016133e9565b509650508601359250508082111561342757600080fd5b5061343485828601612fd4565b9150509250929050565b60006020828403121561345057600080fd5b5035919050565b6000806040838503121561346a57600080fd5b8235915060208301356130d38161397b565b6000806040838503121561348f57600080fd5b50508035926020909101359150565b6000602082840312156134b057600080fd5b813561082b81613993565b6000602082840312156134cd57600080fd5b815161082b81613993565b6000602082840312156134ea57600080fd5b813567ffffffffffffffff81111561350157600080fd5b8201601f8101841361351257600080fd5b61352184823560208401612f31565b949350505050565b60006020828403121561353b57600080fd5b5051919050565b600081518084526020808501945080840160005b8381101561357257815187529582019590820190600101613556565b509495945050505050565b600081518084526135958160208601602086016137b3565b601f01601f19169290920160200192915050565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516135e18160178501602088016137b3565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000601791840191820152835161361e8160288401602088016137b3565b01602801949350505050565b60006001600160a01b03808816835280871660208401525060a0604083015261365660a0830186613542565b82810360608401526136688186613542565b9050828103608084015261367c818561357d565b98975050505050505050565b60006001600160a01b03808816835280871660208401525084604083015283606083015260a060808301526136c060a083018461357d565b979650505050505050565b60208152600061082b6020830184613542565b6040815260006136f16040830185613542565b82810360208401526137038185613542565b95945050505050565b60208152600061082b602083018461357d565b600067ffffffffffffffff821115613739576137396138bf565b5060051b60200190565b600082198211156137565761375661387d565b500190565b60008261377857634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156137975761379761387d565b500290565b6000828210156137ae576137ae61387d565b500390565b60005b838110156137ce5781810151838201526020016137b6565b838111156137dd576000848401525b50505050565b6000816137f2576137f261387d565b506000190190565b600181811c9082168061380e57607f821691505b6020821081141561382f57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8201601f1916810167ffffffffffffffff8111828210171561385b5761385b6138bf565b6040525050565b60006000198214156138765761387661387d565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b600060033d11156138ee5760046000803e5060005160e01c5b90565b600060443d10156138ff5790565b6040516003193d81016004833e81513d67ffffffffffffffff816024840111818411171561392f57505050505090565b82850191508151818111156139475750505050505090565b843d87010160208285010111156139615750505050505090565b61397060208286010187613835565b509095945050505050565b6001600160a01b038116811461399057600080fd5b50565b6001600160e01b03198116811461399057600080fdfea2646970667358221220e05daaac9d0cd2f6b6ca76244a0ec4e265f57b79819f687e7654e27a332ed2e564736f6c63430008060033a49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177500000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000c3f8a0f5841abff777d3eefa5047e8d413a1c9ab000000000000000000000000a0ac1acaf32e03cbb657d99f66743ea435236e5a00000000000000000000000000000000000000000000000000000000000003e8000000000000000000000000ea6cf725f7c540af7daa5a1815fd0cbec05c81e3000000000000000000000000000000000000000000000000000000000000003f697066733a2f2f516d5675765870437565485364643267645939446454425163786d6e397656555a787643585044335a753637774c2f7b69647d2e6a736f6e00
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102fe5760003560e01c80636b20c4541161019c578063a22cb465116100ee578063d547741f11610097578063f5298aca11610071578063f5298aca14610701578063f9ae3c0314610714578063fbfa77cf1461072757600080fd5b8063d547741f1461069f578063e985e9c5146106b2578063f242432a146106ee57600080fd5b8063c993ab2f116100c8578063c993ab2f14610665578063ca15c87314610679578063d0094f7e1461068c57600080fd5b8063a22cb4651461062a578063bd85b0391461063d578063c8c1282b1461065d57600080fd5b80639010d07c116101505780639f7e75d11161012a5780639f7e75d11461060e5780639fbc871314610617578063a217fddf1461043557600080fd5b80639010d07c146105b157806391d14854146105c45780639b642de1146105fb57600080fd5b806375b238fc1161018157806375b238fc146105635780637e436bc11461058a5780638dc251e31461059e57600080fd5b80636b20c45414610548578063740ddb8f1461055b57600080fd5b80632f2ff15d116102555780634e1273f41161020957806363da3d45116101e357806363da3d451461051a5780636817031b1461052257806369545b4d1461053557600080fd5b80634e1273f4146104d05780634f558e79146104f0578063603f85841461051257600080fd5b8063373aad971161023a578063373aad97146104895780633ef5a13a1461049c57806349db4795146104b057600080fd5b80632f2ff15d1461046357806336568abe1461047657600080fd5b8063248a9ca3116102b75780632a58d0a5116102915780632a58d0a5146104355780632d3ccfe21461043d5780632eb2c2d61461045057600080fd5b8063248a9ca3146103cb57806329d7797f146103ee5780632a55205a1461040357600080fd5b80630b65108b116102e85780630b65108b1461034c5780630e89341c1461038b578063164385e9146103ab57600080fd5b8062fdd58e1461030357806301ffc9a714610329575b600080fd5b61031661031136600461329e565b61073a565b6040519081526020015b60405180910390f35b61033c61033736600461349e565b6107e8565b6040519015158152602001610320565b6103737f000000000000000000000000c3f8a0f5841abff777d3eefa5047e8d413a1c9ab81565b6040516001600160a01b039091168152602001610320565b61039e61039936600461343e565b610832565b604051610320919061370c565b6103166103b936600461306b565b600a6020526000908152604090205481565b6103166103d936600461343e565b60009081526020819052604090206001015490565b6104016103fc36600461306b565b6108c6565b005b61041661041136600461347c565b6109f2565b604080516001600160a01b039093168352602083019190915201610320565b610316600081565b61040161044b36600461306b565b610a2b565b61040161045e3660046130de565b610b48565b610401610471366004613457565b610bea565b610401610484366004613457565b610c15565b6104016104973660046132ff565b610ca1565b60085461033c90600160a81b900460ff1681565b6103166104be36600461306b565b60096020526000908152604090205481565b6104e36104de36600461336b565b610d9e565b60405161032091906136cb565b61033c6104fe36600461343e565b600090815260056020526040902054151590565b610401610edc565b610316600181565b61040161053036600461306b565b610f44565b61040161054336600461329e565b610f9f565b6104016105563660046131f5565b611524565b6104016115a9565b6103167fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177581565b60085461033c90600160b01b900460ff1681565b6104016105ac36600461306b565b611611565b6103736105bf36600461347c565b61166c565b61033c6105d2366004613457565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6104016106093660046134d8565b611684565b61031660075481565b600854610373906001600160a01b031681565b61040161063836600461326b565b6116b8565b61031661064b36600461343e565b60009081526005602052604090205490565b6104016116c3565b60085461033c90600160a01b900460ff1681565b61031661068736600461343e565b61172b565b61040161069a3660046132ff565b611742565b6104016106ad366004613457565b611836565b61033c6106c03660046130a5565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205460ff1690565b6104016106fc36600461318c565b61185c565b61040161070f3660046132ca565b6118e3565b61040161072236600461343e565b611968565b600654610373906001600160a01b031681565b60006001600160a01b0383166107bd5760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201527f65726f206164647265737300000000000000000000000000000000000000000060648201526084015b60405180910390fd5b5060008181526002602090815260408083206001600160a01b03861684529091529020545b92915050565b60007f2a55205a0000000000000000000000000000000000000000000000000000000061081483611a9e565b8061082b57506001600160e01b0319838116908216145b9392505050565b606060048054610841906137fa565b80601f016020809104026020016040519081016040528092919081815260200182805461086d906137fa565b80156108ba5780601f1061088f576101008083540402835291602001916108ba565b820191906000526020600020905b81548152906001019060200180831161089d57829003601f168201915b50505050509050919050565b600854600160a81b900460ff1661090d5760405162461bcd60e51b815260206004820152600b60248201526a139bdd08195b98589b195960aa1b60448201526064016107b4565b6001600160a01b0381166000908152600a6020526040902054806109735760405162461bcd60e51b815260206004820152601060248201527f4e6f7420656e6f7567682071756f74610000000000000000000000000000000060448201526064016107b4565b6001600160a01b0382166000908152600a60209081526040808320839055805191820190529081526109ab9083906001908490611b10565b816001600160a01b03167f2ec62373990d2b3ea65a3801472527b7acb88e0888f390d5996e469ba3b626df826040516109e691815260200190565b60405180910390a25050565b600080600061271060075485610a08919061377d565b610a12919061375b565b6008546001600160a01b031693509150505b9250929050565b600854600160a01b900460ff16610a725760405162461bcd60e51b815260206004820152600b60248201526a139bdd08195b98589b195960aa1b60448201526064016107b4565b6001600160a01b03811660009081526009602052604090205480610ad85760405162461bcd60e51b815260206004820152601060248201527f4e6f7420656e6f7567682071756f74610000000000000000000000000000000060448201526064016107b4565b6001600160a01b038216600090815260096020908152604080832083905580519182019052818152610b0d9184918490611b10565b816001600160a01b03167f21e0dc0d648f45076a89386cd5fedd6f7082f7bef696ea6be5b7890db2817a68826040516109e691815260200190565b6001600160a01b038516331480610b645750610b6485336106c0565b610bd65760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f742060448201527f6f776e6572206e6f7220617070726f766564000000000000000000000000000060648201526084016107b4565b610be38585858585611c3e565b5050505050565b600082815260208190526040902060010154610c068133611ead565b610c108383611f2b565b505050565b6001600160a01b0381163314610c935760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084016107b4565b610c9d8282611f4d565b5050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775610ccc8133611ead565b818414610d1b5760405162461bcd60e51b815260206004820152601560248201527f4c656e6774687320617265206e6f7420657175616c000000000000000000000060448201526064016107b4565b8360005b81811015610d9557848482818110610d3957610d396138a9565b9050602002013560096000898985818110610d5657610d566138a9565b9050602002016020810190610d6b919061306b565b6001600160a01b03168152602081019190915260400160002055610d8e81613862565b9050610d1f565b50505050505050565b60608151835114610e175760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e67746860448201527f206d69736d61746368000000000000000000000000000000000000000000000060648201526084016107b4565b6000835167ffffffffffffffff811115610e3357610e336138bf565b604051908082528060200260200182016040528015610e5c578160200160208202803683370190505b50905060005b8451811015610ed457610ea7858281518110610e8057610e806138a9565b6020026020010151858381518110610e9a57610e9a6138a9565b602002602001015161073a565b828281518110610eb957610eb96138a9565b6020908102919091010152610ecd81613862565b9050610e62565b509392505050565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775610f078133611ead565b50600880547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff8116600160a01b9182900460ff1615909102179055565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775610f6f8133611ead565b506006805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b600854600160b01b900460ff16610fe65760405162461bcd60e51b815260206004820152600b60248201526a139bdd08195b98589b195960aa1b60448201526064016107b4565b6006546040517f42ec38e20000000000000000000000000000000000000000000000000000000081526001600160a01b0391821660048201526000917f000000000000000000000000c3f8a0f5841abff777d3eefa5047e8d413a1c9ab16906342ec38e29060240160206040518083038186803b15801561106657600080fd5b505afa15801561107a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061109e9190613529565b6040516330f60ddb60e11b8152600481018490529091506000906001600160a01b037f000000000000000000000000c3f8a0f5841abff777d3eefa5047e8d413a1c9ab16906361ec1bb69060240160206040518083038186803b15801561110457600080fd5b505afa158015611118573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061113c9190613529565b6040516330f60ddb60e11b8152600481018490529091507f000000000000000000000000c3f8a0f5841abff777d3eefa5047e8d413a1c9ab6001600160a01b0316906361ec1bb69060240160206040518083038186803b15801561119f57600080fd5b505afa1580156111b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111d79190613529565b8111156112265760405162461bcd60e51b815260206004820152600760248201527f546f6f206269670000000000000000000000000000000000000000000000000060448201526064016107b4565b6040517f6352211e000000000000000000000000000000000000000000000000000000008152600481018490527f000000000000000000000000c3f8a0f5841abff777d3eefa5047e8d413a1c9ab6001600160a01b0316906342842e0e908290636352211e9060240160206040518083038186803b1580156112a757600080fd5b505afa1580156112bb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112df9190613088565b60065460405160e084901b6001600160e01b03191681526001600160a01b0392831660048201529116602482015260448101869052606401600060405180830381600087803b15801561133157600080fd5b505af1158015611345573d6000803e3d6000fd5b50506040517f0ab2b6b9000000000000000000000000000000000000000000000000000000008152600481018590527f000000000000000000000000c3f8a0f5841abff777d3eefa5047e8d413a1c9ab6001600160a01b0316925063eafe706e91508290630ab2b6b99060240160206040518083038186803b1580156113ca57600080fd5b505afa1580156113de573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114029190613529565b6040518263ffffffff1660e01b815260040161142091815260200190565b60206040518083038186803b15801561143857600080fd5b505afa15801561144c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114709190613529565b6003146114bf5760405162461bcd60e51b815260206004820152600360248201527f575446000000000000000000000000000000000000000000000000000000000060448201526064016107b4565b6114db8460018360405180602001604052806000815250611b10565b836001600160a01b03167fd99bacd7f46ae80ec6c4324d3490daf3166de45d0859c6a6f7428eb8f7a3673a8260405161151691815260200190565b60405180910390a250505050565b6001600160a01b038316331480611540575061154083336106c0565b61159e5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b60648201526084016107b4565b610c10838383611f6f565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756115d48133611ead565b50600880547fffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffff8116600160b01b9182900460ff1615909102179055565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177561163c8133611ead565b506008805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b600082815260016020526040812061082b90836121b9565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756116af8133611ead565b610c9d826121c5565b610c9d3383836121d8565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756116ee8133611ead565b50600880547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff8116600160a81b9182900460ff1615909102179055565b60008181526001602052604081206107e2906122cd565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177561176d8133611ead565b8184146117bc5760405162461bcd60e51b815260206004820152601560248201527f4c656e6774687320617265206e6f7420657175616c000000000000000000000060448201526064016107b4565b8360005b81811015610d95578484828181106117da576117da6138a9565b90506020020135600a60008989858181106117f7576117f76138a9565b905060200201602081019061180c919061306b565b6001600160a01b0316815260208101919091526040016000205561182f81613862565b90506117c0565b6000828152602081905260409020600101546118528133611ead565b610c108383611f4d565b6001600160a01b038516331480611878575061187885336106c0565b6118d65760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b60648201526084016107b4565b610be385858585856122d7565b6001600160a01b0383163314806118ff57506118ff83336106c0565b61195d5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b60648201526084016107b4565b610c10838383612470565b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217756119938133611ead565b6127108211156119e55760405162461bcd60e51b815260206004820152600e60248201527f4d6f7265207468616e203130302500000000000000000000000000000000000060448201526064016107b4565b50600755565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610c9d576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055611a453390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600061082b836001600160a01b0384166125ed565b60006001600160e01b031982167fd9b67a26000000000000000000000000000000000000000000000000000000001480611b0157506001600160e01b031982167f0e89341c00000000000000000000000000000000000000000000000000000000145b806107e257506107e28261263c565b6001600160a01b038416611b8c5760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f2061646472657360448201527f730000000000000000000000000000000000000000000000000000000000000060648201526084016107b4565b33611bac81600087611b9d8861267a565b611ba68861267a565b876126c5565b60008481526002602090815260408083206001600160a01b038916845290915281208054859290611bde908490613743565b909155505060408051858152602081018590526001600160a01b0380881692600092918516917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4610be3816000878787876126d3565b8151835114611ca05760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b60648201526084016107b4565b6001600160a01b038416611d045760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b60648201526084016107b4565b33611d138187878787876126c5565b60005b8451811015611e3f576000858281518110611d3357611d336138a9565b602002602001015190506000858381518110611d5157611d516138a9565b60209081029190910181015160008481526002835260408082206001600160a01b038e168352909352919091205490915081811015611de55760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201526939103a3930b739b332b960b11b60648201526084016107b4565b60008381526002602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290611e24908490613743565b9250508190555050505080611e3890613862565b9050611d16565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051611e8f9291906136de565b60405180910390a4611ea5818787878787612888565b505050505050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610c9d57611ee9816001600160a01b03166014612993565b611ef4836020612993565b604051602001611f059291906135a9565b60408051601f198184030181529082905262461bcd60e51b82526107b49160040161370c565b611f3582826119eb565b6000828152600160205260409020610c109082611a89565b611f578282612b74565b6000828152600160205260409020610c109082612bf3565b6001600160a01b038316611fd15760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b60648201526084016107b4565b80518251146120335760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b60648201526084016107b4565b6000339050612056818560008686604051806020016040528060008152506126c5565b60005b835181101561215a576000848281518110612076576120766138a9565b602002602001015190506000848381518110612094576120946138a9565b60209081029190910181015160008481526002835260408082206001600160a01b038c1683529093529190912054909150818110156121215760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b60648201526084016107b4565b60009283526002602090815260408085206001600160a01b038b168652909152909220910390558061215281613862565b915050612059565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb86866040516121ab9291906136de565b60405180910390a450505050565b600061082b8383612c08565b8051610c9d906004906020840190612e98565b816001600160a01b0316836001600160a01b031614156122605760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c2073746174757360448201527f20666f722073656c66000000000000000000000000000000000000000000000060648201526084016107b4565b6001600160a01b03838116600081815260036020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60006107e2825490565b6001600160a01b03841661233b5760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b60648201526084016107b4565b3361234b818787611b9d8861267a565b60008481526002602090815260408083206001600160a01b038a168452909152902054838110156123d15760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201526939103a3930b739b332b960b11b60648201526084016107b4565b60008581526002602090815260408083206001600160a01b038b8116855292528083208785039055908816825281208054869290612410908490613743565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4610d958288888888886126d3565b6001600160a01b0383166124d25760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b60648201526084016107b4565b33612501818560006124e38761267a565b6124ec8761267a565b604051806020016040528060008152506126c5565b60008381526002602090815260408083206001600160a01b0388168452909152902054828110156125805760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b60648201526084016107b4565b60008481526002602090815260408083206001600160a01b03898116808652918452828520888703905582518981529384018890529092908616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a45050505050565b6000818152600183016020526040812054612634575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556107e2565b5060006107e2565b60006001600160e01b031982167f5a05180f0000000000000000000000000000000000000000000000000000000014806107e257506107e282612c32565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106126b4576126b46138a9565b602090810291909101015292915050565b611ea5868686868686612c99565b6001600160a01b0384163b15611ea55760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906127179089908990889088908890600401613688565b602060405180830381600087803b15801561273157600080fd5b505af1925050508015612761575060408051601f3d908101601f1916820190925261275e918101906134bb565b60015b6128175761276d6138d5565b806308c379a014156127a757506127826138f1565b8061278d57506127a9565b8060405162461bcd60e51b81526004016107b4919061370c565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e204552433131353560448201527f526563656976657220696d706c656d656e74657200000000000000000000000060648201526084016107b4565b6001600160e01b0319811663f23a6e6160e01b14610d955760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a656374656044820152676420746f6b656e7360c01b60648201526084016107b4565b6001600160a01b0384163b15611ea55760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906128cc908990899088908890889060040161362a565b602060405180830381600087803b1580156128e657600080fd5b505af1925050508015612916575060408051601f3d908101601f19168201909252612913918101906134bb565b60015b6129225761276d6138d5565b6001600160e01b0319811663bc197c8160e01b14610d955760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a656374656044820152676420746f6b656e7360c01b60648201526084016107b4565b606060006129a283600261377d565b6129ad906002613743565b67ffffffffffffffff8111156129c5576129c56138bf565b6040519080825280601f01601f1916602001820160405280156129ef576020820181803683370190505b5090507f300000000000000000000000000000000000000000000000000000000000000081600081518110612a2657612a266138a9565b60200101906001600160f81b031916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110612a7157612a716138a9565b60200101906001600160f81b031916908160001a9053506000612a9584600261377d565b612aa0906001613743565b90505b6001811115612b25577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110612ae157612ae16138a9565b1a60f81b828281518110612af757612af76138a9565b60200101906001600160f81b031916908160001a90535060049490941c93612b1e816137e3565b9050612aa3565b50831561082b5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016107b4565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1615610c9d576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061082b836001600160a01b038416612da5565b6000826000018281548110612c1f57612c1f6138a9565b9060005260206000200154905092915050565b60006001600160e01b031982167f7965db0b0000000000000000000000000000000000000000000000000000000014806107e257507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316146107e2565b6001600160a01b038516612d205760005b8351811015612d1e57828181518110612cc557612cc56138a9565b602002602001015160056000868481518110612ce357612ce36138a9565b602002602001015181526020019081526020016000206000828254612d089190613743565b90915550612d17905081613862565b9050612caa565b505b6001600160a01b038416611ea55760005b8351811015610d9557828181518110612d4c57612d4c6138a9565b602002602001015160056000868481518110612d6a57612d6a6138a9565b602002602001015181526020019081526020016000206000828254612d8f919061379c565b90915550612d9e905081613862565b9050612d31565b60008181526001830160205260408120548015612e8e576000612dc960018361379c565b8554909150600090612ddd9060019061379c565b9050818114612e42576000866000018281548110612dfd57612dfd6138a9565b9060005260206000200154905080876000018481548110612e2057612e206138a9565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080612e5357612e53613893565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506107e2565b60009150506107e2565b828054612ea4906137fa565b90600052602060002090601f016020900481019282612ec65760008555612f0c565b82601f10612edf57805160ff1916838001178555612f0c565b82800160010185558215612f0c579182015b82811115612f0c578251825591602001919060010190612ef1565b50612f18929150612f1c565b5090565b5b80821115612f185760008155600101612f1d565b600067ffffffffffffffff831115612f4b57612f4b6138bf565b604051612f62601f8501601f191660200182613835565b809150838152848484011115612f7757600080fd5b83836020830137600060208583010152509392505050565b60008083601f840112612fa157600080fd5b50813567ffffffffffffffff811115612fb957600080fd5b6020830191508360208260051b8501011115610a2457600080fd5b600082601f830112612fe557600080fd5b81356020612ff28261371f565b604051612fff8282613835565b8381528281019150858301600585901b8701840188101561301f57600080fd5b60005b8581101561303e57813584529284019290840190600101613022565b5090979650505050505050565b600082601f83011261305c57600080fd5b61082b83833560208501612f31565b60006020828403121561307d57600080fd5b813561082b8161397b565b60006020828403121561309a57600080fd5b815161082b8161397b565b600080604083850312156130b857600080fd5b82356130c38161397b565b915060208301356130d38161397b565b809150509250929050565b600080600080600060a086880312156130f657600080fd5b85356131018161397b565b945060208601356131118161397b565b9350604086013567ffffffffffffffff8082111561312e57600080fd5b61313a89838a01612fd4565b9450606088013591508082111561315057600080fd5b61315c89838a01612fd4565b9350608088013591508082111561317257600080fd5b5061317f8882890161304b565b9150509295509295909350565b600080600080600060a086880312156131a457600080fd5b85356131af8161397b565b945060208601356131bf8161397b565b93506040860135925060608601359150608086013567ffffffffffffffff8111156131e957600080fd5b61317f8882890161304b565b60008060006060848603121561320a57600080fd5b83356132158161397b565b9250602084013567ffffffffffffffff8082111561323257600080fd5b61323e87838801612fd4565b9350604086013591508082111561325457600080fd5b5061326186828701612fd4565b9150509250925092565b6000806040838503121561327e57600080fd5b82356132898161397b565b9150602083013580151581146130d357600080fd5b600080604083850312156132b157600080fd5b82356132bc8161397b565b946020939093013593505050565b6000806000606084860312156132df57600080fd5b83356132ea8161397b565b95602085013595506040909401359392505050565b6000806000806040858703121561331557600080fd5b843567ffffffffffffffff8082111561332d57600080fd5b61333988838901612f8f565b9096509450602087013591508082111561335257600080fd5b5061335f87828801612f8f565b95989497509550505050565b6000806040838503121561337e57600080fd5b823567ffffffffffffffff8082111561339657600080fd5b818501915085601f8301126133aa57600080fd5b813560206133b78261371f565b6040516133c48282613835565b8381528281019150858301600585901b870184018b10156133e457600080fd5b600096505b848710156134105780356133fc8161397b565b8352600196909601959183019183016133e9565b509650508601359250508082111561342757600080fd5b5061343485828601612fd4565b9150509250929050565b60006020828403121561345057600080fd5b5035919050565b6000806040838503121561346a57600080fd5b8235915060208301356130d38161397b565b6000806040838503121561348f57600080fd5b50508035926020909101359150565b6000602082840312156134b057600080fd5b813561082b81613993565b6000602082840312156134cd57600080fd5b815161082b81613993565b6000602082840312156134ea57600080fd5b813567ffffffffffffffff81111561350157600080fd5b8201601f8101841361351257600080fd5b61352184823560208401612f31565b949350505050565b60006020828403121561353b57600080fd5b5051919050565b600081518084526020808501945080840160005b8381101561357257815187529582019590820190600101613556565b509495945050505050565b600081518084526135958160208601602086016137b3565b601f01601f19169290920160200192915050565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516135e18160178501602088016137b3565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000601791840191820152835161361e8160288401602088016137b3565b01602801949350505050565b60006001600160a01b03808816835280871660208401525060a0604083015261365660a0830186613542565b82810360608401526136688186613542565b9050828103608084015261367c818561357d565b98975050505050505050565b60006001600160a01b03808816835280871660208401525084604083015283606083015260a060808301526136c060a083018461357d565b979650505050505050565b60208152600061082b6020830184613542565b6040815260006136f16040830185613542565b82810360208401526137038185613542565b95945050505050565b60208152600061082b602083018461357d565b600067ffffffffffffffff821115613739576137396138bf565b5060051b60200190565b600082198211156137565761375661387d565b500190565b60008261377857634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156137975761379761387d565b500290565b6000828210156137ae576137ae61387d565b500390565b60005b838110156137ce5781810151838201526020016137b6565b838111156137dd576000848401525b50505050565b6000816137f2576137f261387d565b506000190190565b600181811c9082168061380e57607f821691505b6020821081141561382f57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8201601f1916810167ffffffffffffffff8111828210171561385b5761385b6138bf565b6040525050565b60006000198214156138765761387661387d565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b600060033d11156138ee5760046000803e5060005160e01c5b90565b600060443d10156138ff5790565b6040516003193d81016004833e81513d67ffffffffffffffff816024840111818411171561392f57505050505090565b82850191508151818111156139475750505050505090565b843d87010160208285010111156139615750505050505090565b61397060208286010187613835565b509095945050505050565b6001600160a01b038116811461399057600080fd5b50565b6001600160e01b03198116811461399057600080fdfea2646970667358221220e05daaac9d0cd2f6b6ca76244a0ec4e265f57b79819f687e7654e27a332ed2e564736f6c63430008060033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000c3f8a0f5841abff777d3eefa5047e8d413a1c9ab000000000000000000000000a0ac1acaf32e03cbb657d99f66743ea435236e5a00000000000000000000000000000000000000000000000000000000000003e8000000000000000000000000ea6cf725f7c540af7daa5a1815fd0cbec05c81e3000000000000000000000000000000000000000000000000000000000000003f697066733a2f2f516d5675765870437565485364643267645939446454425163786d6e397656555a787643585044335a753637774c2f7b69647d2e6a736f6e00
-----Decoded View---------------
Arg [0] : uri (string): ipfs://QmVuvXpCueHSdd2gdY9DdTBQcxmn9vVUZxvCXPD3Zu67wL/{id}.json
Arg [1] : merge_ (address): 0xc3f8a0F5841aBFf777d3eefA5047e8D413a1C9AB
Arg [2] : vault_ (address): 0xa0ac1AcaF32e03CBB657D99F66743EA435236E5a
Arg [3] : royaltyInBips_ (uint256): 1000
Arg [4] : royaltyReceiver_ (address): 0xEA6Cf725f7C540af7DAa5A1815FD0Cbec05c81E3
-----Encoded View---------------
8 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [1] : 000000000000000000000000c3f8a0f5841abff777d3eefa5047e8d413a1c9ab
Arg [2] : 000000000000000000000000a0ac1acaf32e03cbb657d99f66743ea435236e5a
Arg [3] : 00000000000000000000000000000000000000000000000000000000000003e8
Arg [4] : 000000000000000000000000ea6cf725f7c540af7daa5a1815fd0cbec05c81e3
Arg [5] : 000000000000000000000000000000000000000000000000000000000000003f
Arg [6] : 697066733a2f2f516d5675765870437565485364643267645939446454425163
Arg [7] : 786d6e397656555a787643585044335a753637774c2f7b69647d2e6a736f6e00
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.