ERC-1155
Overview
Max Total Supply
0
Holders
585
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:
Shards
Compiler Version
v0.8.17+commit.8df45f5f
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.17; import "ERC1155Burnable.sol"; import "OwnableRoles.sol"; import "IShards.sol"; /// @title Prestige Shards for Isekai Meta Faction Wars. /// @author ItsCuzzo contract Shards is IShards, OwnableRoles, ERC1155Burnable { /// @dev Define `Shard` packed struct. struct Shard { uint120 supply; uint120 burned; bool tradeable; } Shard public shard; /// @dev `keccak256("AUTHORIZED_BURNER")` uint256 public constant AUTHORIZED_BURNER = 0x6dfed56f3d168174131a4e9163c47d5ceb4882b561b6092a62ebfb58f2dc8604; constructor(string memory uri_) ERC1155(uri_) { _initializeOwner(msg.sender); } /// @notice Function used to airdrop shards to `receipients`. /// @param recipients Array of recipient addresses. function airdrop( address[] calldata recipients, uint256[] calldata quantities ) external onlyOwner { unchecked { if (recipients.length == 0) revert NoRecipients(); if (recipients.length != quantities.length) revert ArrayLengthMismatch(); uint120 count; for (uint256 i = 0; i < recipients.length; i++) { if (quantities[i] == 0) revert NoShards(); count += uint120(quantities[i]); _mint(recipients[i], 0, quantities[i], ""); } shard.supply += count; } } /// @notice Function used to burn shards. /// @param from Address to burn from. /// @param amount Number of shards to burn. /// @dev No balance check of `amount` required as reverts within `_burn`. function burn(address from, uint256 amount) external onlyRoles(AUTHORIZED_BURNER) { unchecked { uint120 count = uint120(amount); shard.supply -= count; shard.burned += count; _burn(from, 0, amount); } } /// @notice Function used to toggle tradeability of shards. function toggleTradeability() external onlyOwner { shard.tradeable = !shard.tradeable; } /// @notice Function used to set a new `_uri` value. /// @param newURI Newly desired `_uri` value. function setURI(string calldata newURI) external onlyOwner { _setURI(newURI); } /// @notice Function used to view the URI value of `id`. /// @dev To adhere to the ERC1155 specification, `id` param must be passed. function uri(uint256 id) public view override returns (string memory) { if (id != 0) revert NonExistent(); return string(abi.encodePacked(super.uri(0), "0")); } /// @dev Tradeability of shards can be enabled. function safeTransferFrom( address from, address to, uint256 id, uint256 value, bytes memory data ) public override(IERC1155, ERC1155) { if (!shard.tradeable) revert Untradeable(); super.safeTransferFrom(from, to, id, value, data); } /// @dev Tradeability of shards can be enabled. function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory values, bytes memory data ) public override(IERC1155, ERC1155) { if (!shard.tradeable) revert Untradeable(); super.safeBatchTransferFrom(from, to, ids, values, data); } }
// SPDX-License-Identifier: MIT 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 pragma solidity ^0.8.0; import "IERC1155.sol"; import "IERC1155Receiver.sol"; import "IERC1155MetadataURI.sol"; import "Address.sol"; import "Context.sol"; import "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 { require(_msgSender() != operator, "ERC1155: setting approval status for self"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC1155-isApprovedForAll}. */ function isApprovedForAll(address account, address operator) public view virtual override returns (bool) { return _operatorApprovals[account][operator]; } /** * @dev See {IERC1155-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: caller is not owner nor approved" ); _safeTransferFrom(from, to, id, amount, data); } /** * @dev See {IERC1155-safeBatchTransferFrom}. */ function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: transfer caller is not owner nor approved" ); _safeBatchTransferFrom(from, to, ids, amounts, data); } /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, to, _asSingletonArray(id), _asSingletonArray(amount), data); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; emit TransferSingle(operator, from, to, id, amount); _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, to, ids, amounts, data); for (uint256 i = 0; i < ids.length; ++i) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; } emit TransferBatch(operator, from, to, ids, amounts); _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data); } /** * @dev Sets a new URI for all token types, by relying on the token type ID * substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * By this mechanism, any occurrence of the `\{id\}` substring in either the * URI or any of the amounts in the JSON file at said URI will be replaced by * clients with the token type ID. * * For example, the `https://token-cdn-domain/\{id\}.json` URI would be * interpreted by clients as * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json` * for token type ID 0x4cce0. * * See {uri}. * * Because these URIs cannot be meaningfully represented by the {URI} event, * this function emits no events. */ function _setURI(string memory newuri) internal virtual { _uri = newuri; } /** * @dev Creates `amount` tokens of token type `id`, and assigns them to `account`. * * Emits a {TransferSingle} event. * * Requirements: * * - `account` cannot be the zero address. * - If `account` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mint( address account, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(account != address(0), "ERC1155: mint to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, address(0), account, _asSingletonArray(id), _asSingletonArray(amount), data); _balances[id][account] += amount; emit TransferSingle(operator, address(0), account, id, amount); _doSafeTransferAcceptanceCheck(operator, address(0), account, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _mintBatch( address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); for (uint256 i = 0; i < ids.length; i++) { _balances[ids[i]][to] += amounts[i]; } emit TransferBatch(operator, address(0), to, ids, amounts); _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data); } /** * @dev Destroys `amount` tokens of token type `id` from `account` * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens of token type `id`. */ function _burn( address account, uint256 id, uint256 amount ) internal virtual { require(account != address(0), "ERC1155: burn from the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, account, address(0), _asSingletonArray(id), _asSingletonArray(amount), ""); uint256 accountBalance = _balances[id][account]; require(accountBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][account] = accountBalance - amount; } emit TransferSingle(operator, account, address(0), id, amount); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}. * * Requirements: * * - `ids` and `amounts` must have the same length. */ function _burnBatch( address account, uint256[] memory ids, uint256[] memory amounts ) internal virtual { require(account != address(0), "ERC1155: burn from the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, account, address(0), ids, amounts, ""); for (uint256 i = 0; i < ids.length; i++) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 accountBalance = _balances[id][account]; require(accountBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][account] = accountBalance - amount; } } emit TransferBatch(operator, account, address(0), ids, amounts); } /** * @dev Hook that is called before any token transfer. This includes minting * and burning, as well as batched variants. * * The same hook is called on both single and batched variants. For single * transfers, the length of the `id` and `amount` arrays will be 1. * * Calling conditions (for each `id` and `amount` pair): * * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens * of token type `id` will be transferred to `to`. * - When `from` is zero, `amount` tokens of token type `id` will be minted * for `to`. * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` * will be burned. * - `from` and `to` are never both zero. * - `ids` and `amounts` have the same, non-zero length. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual {} function _doSafeTransferAcceptanceCheck( address operator, address from, address to, uint256 id, uint256 amount, bytes memory data ) private { if (to.isContract()) { try 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 pragma solidity ^0.8.0; import "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 pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "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 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 pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT 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 pragma solidity ^0.8.0; import "IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; /// @notice Simple single owner and multiroles authorization mixin. /// @author Solady (https://github.com/vectorized/solady/blob/main/src/auth/OwnableRoles.sol) /// @dev While the ownable portion follows [EIP-173](https://eips.ethereum.org/EIPS/eip-173) /// for compatibility, the nomenclature for the 2-step ownership handover and roles /// may be unique to this codebase. abstract contract OwnableRoles { /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* CUSTOM ERRORS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev The caller is not authorized to call the function. error Unauthorized(); /// @dev The `newOwner` cannot be the zero address. error NewOwnerIsZeroAddress(); /// @dev The `pendingOwner` does not have a valid handover request. error NoHandoverRequest(); /// @dev `bytes4(keccak256(bytes("Unauthorized()")))`. uint256 private constant _UNAUTHORIZED_ERROR_SELECTOR = 0x82b42900; /// @dev `bytes4(keccak256(bytes("NewOwnerIsZeroAddress()")))`. uint256 private constant _NEW_OWNER_IS_ZERO_ADDRESS_ERROR_SELECTOR = 0x7448fbae; /// @dev `bytes4(keccak256(bytes("NoHandoverRequest()")))`. uint256 private constant _NO_HANDOVER_REQUEST_ERROR_SELECTOR = 0x6f5e8818; /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* EVENTS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev The ownership is transferred from `oldOwner` to `newOwner`. /// This event is intentionally kept the same as OpenZeppelin's Ownable to be /// compatible with indexers and [EIP-173](https://eips.ethereum.org/EIPS/eip-173), /// despite it not being as lightweight as a single argument event. event OwnershipTransferred(address indexed oldOwner, address indexed newOwner); /// @dev An ownership handover to `pendingOwner` has been requested. event OwnershipHandoverRequested(address indexed pendingOwner); /// @dev The ownership handover to `pendingOwner` has been canceled. event OwnershipHandoverCanceled(address indexed pendingOwner); /// @dev The `user`'s roles is updated to `roles`. /// Each bit of `roles` represents whether the role is set. event RolesUpdated(address indexed user, uint256 indexed roles); /// @dev `keccak256(bytes("OwnershipTransferred(address,address)"))`. uint256 private constant _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE = 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0; /// @dev `keccak256(bytes("OwnershipHandoverRequested(address)"))`. uint256 private constant _OWNERSHIP_HANDOVER_REQUESTED_EVENT_SIGNATURE = 0xdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d; /// @dev `keccak256(bytes("OwnershipHandoverCanceled(address)"))`. uint256 private constant _OWNERSHIP_HANDOVER_CANCELED_EVENT_SIGNATURE = 0xfa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92; /// @dev `keccak256(bytes("RolesUpdated(address,uint256)"))`. uint256 private constant _ROLES_UPDATED_EVENT_SIGNATURE = 0x715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe26; /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* STORAGE */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev The owner slot is given by: `not(_OWNER_SLOT_NOT)`. /// It is intentionally choosen to be a high value /// to avoid collision with lower slots. /// The choice of manual storage layout is to enable compatibility /// with both regular and upgradeable contracts. /// /// The role slot of `user` is given by: /// ``` /// mstore(0x00, or(shl(96, user), _OWNER_SLOT_NOT)) /// let roleSlot := keccak256(0x00, 0x20) /// ``` /// This automatically ignores the upper bits of the `user` in case /// they are not clean, as well as keep the `keccak256` under 32-bytes. uint256 private constant _OWNER_SLOT_NOT = 0x8b78c6d8; /// The ownership handover slot of `newOwner` is given by: /// ``` /// mstore(0x00, or(shl(96, user), _HANDOVER_SLOT_SEED)) /// let handoverSlot := keccak256(0x00, 0x20) /// ``` /// It stores the expiry timestamp of the two-step ownership handover. uint256 private constant _HANDOVER_SLOT_SEED = 0x389a75e1; /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* INTERNAL FUNCTIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Initializes the owner directly without authorization guard. /// This function must be called upon initialization, /// regardless of whether the contract is upgradeable or not. /// This is to enable generalization to both regular and upgradeable contracts, /// and to save gas in case the initial owner is not the caller. /// For performance reasons, this function will not check if there /// is an existing owner. function _initializeOwner(address newOwner) internal virtual { assembly { // Clean the upper 96 bits. newOwner := shr(96, shl(96, newOwner)) // Store the new value. sstore(not(_OWNER_SLOT_NOT), newOwner) // Emit the {OwnershipTransferred} event. log3(0, 0, _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE, 0, newOwner) } } /// @dev Sets the owner directly without authorization guard. function _setOwner(address newOwner) internal virtual { assembly { let ownerSlot := not(_OWNER_SLOT_NOT) // Clean the upper 96 bits. newOwner := shr(96, shl(96, newOwner)) // Emit the {OwnershipTransferred} event. log3(0, 0, _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE, sload(ownerSlot), newOwner) // Store the new value. sstore(ownerSlot, newOwner) } } /// @dev Grants the roles directly without authorization guard. /// Each bit of `roles` represents the role to turn on. function _grantRoles(address user, uint256 roles) internal virtual { assembly { // Compute the role slot. mstore(0x00, or(shl(96, user), _OWNER_SLOT_NOT)) let roleSlot := keccak256(0x00, 0x20) // Load the current value and `or` it with `roles`. let newRoles := or(sload(roleSlot), roles) // Store the new value. sstore(roleSlot, newRoles) // Emit the {RolesUpdated} event. log3(0, 0, _ROLES_UPDATED_EVENT_SIGNATURE, shr(96, shl(96, user)), newRoles) } } /// @dev Removes the roles directly without authorization guard. /// Each bit of `roles` represents the role to turn off. function _removeRoles(address user, uint256 roles) internal virtual { assembly { // Compute the role slot. mstore(0x00, or(shl(96, user), _OWNER_SLOT_NOT)) let roleSlot := keccak256(0x00, 0x20) // Load the current value. let currentRoles := sload(roleSlot) // Use `and` to compute the intersection of `currentRoles` and `roles`, // `xor` it with `currentRoles` to flip the bits in the intersection. let newRoles := xor(currentRoles, and(currentRoles, roles)) // Then, store the new value. sstore(roleSlot, newRoles) // Emit the {RolesUpdated} event. log3(0, 0, _ROLES_UPDATED_EVENT_SIGNATURE, shr(96, shl(96, user)), newRoles) } } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* PUBLIC UPDATE FUNCTIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Allows the owner to transfer the ownership to `newOwner`. function transferOwnership(address newOwner) public payable virtual onlyOwner { assembly { // Clean the upper 96 bits. newOwner := shr(96, shl(96, newOwner)) // Reverts if the `newOwner` is the zero address. if iszero(newOwner) { mstore(0x00, _NEW_OWNER_IS_ZERO_ADDRESS_ERROR_SELECTOR) revert(0x1c, 0x04) } // Emit the {OwnershipTransferred} event. log3(0, 0, _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE, caller(), newOwner) // Store the new value. sstore(not(_OWNER_SLOT_NOT), newOwner) } } /// @dev Allows the owner to renounce their ownership. function renounceOwnership() public payable virtual onlyOwner { assembly { // Emit the {OwnershipTransferred} event. log3(0, 0, _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE, caller(), 0) // Store the new value. sstore(not(_OWNER_SLOT_NOT), 0) } } /// @dev Request a two-step ownership handover to the caller. /// The request will be automatically expire in 48 hours (172800 seconds) by default. function requestOwnershipHandover() public payable virtual { unchecked { uint256 expires = block.timestamp + ownershipHandoverValidFor(); assembly { // Compute and set the handover slot to 1. mstore(0x00, or(shl(96, caller()), _HANDOVER_SLOT_SEED)) sstore(keccak256(0x00, 0x20), expires) // Emit the {OwnershipHandoverRequested} event. log2(0, 0, _OWNERSHIP_HANDOVER_REQUESTED_EVENT_SIGNATURE, caller()) } } } /// @dev Cancels the two-step ownership handover to the caller, if any. function cancelOwnershipHandover() public payable virtual { assembly { // Compute and set the handover slot to 0. mstore(0x00, or(shl(96, caller()), _HANDOVER_SLOT_SEED)) sstore(keccak256(0x00, 0x20), 0) // Emit the {OwnershipHandoverCanceled} event. log2(0, 0, _OWNERSHIP_HANDOVER_CANCELED_EVENT_SIGNATURE, caller()) } } /// @dev Allows the owner to complete the two-step ownership handover to `pendingOwner`. /// Reverts if there is no existing ownership handover requested by `pendingOwner`. function completeOwnershipHandover(address pendingOwner) public payable virtual onlyOwner { assembly { // Clean the upper 96 bits. pendingOwner := shr(96, shl(96, pendingOwner)) // Compute and set the handover slot to 0. mstore(0x00, or(shl(96, pendingOwner), _HANDOVER_SLOT_SEED)) let handoverSlot := keccak256(0x00, 0x20) // If the handover does not exist, or has expired. if gt(timestamp(), sload(handoverSlot)) { mstore(0x00, _NO_HANDOVER_REQUEST_ERROR_SELECTOR) revert(0x1c, 0x04) } // Set the handover slot to 0. sstore(handoverSlot, 0) // Emit the {OwnershipTransferred} event. log3(0, 0, _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE, caller(), pendingOwner) // Store the new value. sstore(not(_OWNER_SLOT_NOT), pendingOwner) } } /// @dev Allows the owner to grant `user` `roles`. /// If the `user` already has a role, then it will be an no-op for the role. function grantRoles(address user, uint256 roles) public payable virtual onlyOwner { _grantRoles(user, roles); } /// @dev Allows the owner to remove `user` `roles`. /// If the `user` does not have a role, then it will be an no-op for the role. function revokeRoles(address user, uint256 roles) public payable virtual onlyOwner { _removeRoles(user, roles); } /// @dev Allow the caller to remove their own roles. /// If the caller does not have a role, then it will be an no-op for the role. function renounceRoles(uint256 roles) public payable virtual { _removeRoles(msg.sender, roles); } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* PUBLIC READ FUNCTIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Returns the owner of the contract. function owner() public view virtual returns (address result) { assembly { result := sload(not(_OWNER_SLOT_NOT)) } } /// @dev Returns the expiry timestamp for the two-step ownership handover to `pendingOwner`. function ownershipHandoverExpiresAt(address pendingOwner) public view virtual returns (uint256 result) { assembly { // Compute the handover slot. mstore(0x00, or(shl(96, pendingOwner), _HANDOVER_SLOT_SEED)) // Load the handover slot. result := sload(keccak256(0x00, 0x20)) } } /// @dev Returns how long a two-step ownership handover is valid for in seconds. function ownershipHandoverValidFor() public view virtual returns (uint64) { return 48 * 3600; } /// @dev Returns whether `user` has any of `roles`. function hasAnyRole(address user, uint256 roles) public view virtual returns (bool result) { assembly { // Compute the role slot. mstore(0x00, or(shl(96, user), _OWNER_SLOT_NOT)) // Load the stored value, and set the result to whether the // `and` intersection of the value and `roles` is not zero. result := iszero(iszero(and(sload(keccak256(0x00, 0x20)), roles))) } } /// @dev Returns whether `user` has all of `roles`. function hasAllRoles(address user, uint256 roles) public view virtual returns (bool result) { assembly { // Compute the role slot. mstore(0x00, or(shl(96, user), _OWNER_SLOT_NOT)) // Whether the stored value is contains all the set bits in `roles`. result := eq(and(sload(keccak256(0x00, 0x20)), roles), roles) } } /// @dev Returns the roles of `user`. function rolesOf(address user) public view virtual returns (uint256 roles) { assembly { // Compute the role slot. mstore(0x00, or(shl(96, user), _OWNER_SLOT_NOT)) // Load the stored value. roles := sload(keccak256(0x00, 0x20)) } } /// @dev Convenience function to return a `roles` bitmap from an array of `ordinals`. /// This is meant for frontends like Etherscan, and is therefore not fully optimized. /// Not recommended to be called on-chain. function rolesFromOrdinals(uint8[] memory ordinals) public pure returns (uint256 roles) { assembly { // Skip the length slot. let o := add(ordinals, 0x20) // `shl` 5 is equivalent to multiplying by 0x20. let end := add(o, shl(5, mload(ordinals))) // prettier-ignore for {} iszero(eq(o, end)) { o := add(o, 0x20) } { roles := or(roles, shl(and(mload(o), 0xff), 1)) } } } /// @dev Convenience function to return an array of `ordinals` from the `roles` bitmap. /// This is meant for frontends like Etherscan, and is therefore not fully optimized. /// Not recommended to be called on-chain. function ordinalsFromRoles(uint256 roles) public pure returns (uint8[] memory ordinals) { assembly { // Grab the pointer to the free memory. let ptr := add(mload(0x40), 0x20) // The absence of lookup tables, De Bruijn, etc., here is intentional for // smaller bytecode, as this function is not meant to be called on-chain. // prettier-ignore for { let i := 0 } 1 { i := add(i, 1) } { mstore(ptr, i) // `shr` 5 is equivalent to multiplying by 0x20. // Push back into the ordinals array if the bit is set. ptr := add(ptr, shl(5, and(roles, 1))) roles := shr(1, roles) // prettier-ignore if iszero(roles) { break } } // Set `ordinals` to the start of the free memory. ordinals := mload(0x40) // Allocate the memory. mstore(0x40, ptr) // Store the length of `ordinals`. mstore(ordinals, shr(5, sub(ptr, add(ordinals, 0x20)))) } } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* MODIFIERS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Marks a function as only callable by the owner. modifier onlyOwner() virtual { assembly { // If the caller is not the stored owner, revert. if iszero(eq(caller(), sload(not(_OWNER_SLOT_NOT)))) { mstore(0x00, _UNAUTHORIZED_ERROR_SELECTOR) revert(0x1c, 0x04) } } _; } /// @dev Marks a function as only callable by an account with `roles`. modifier onlyRoles(uint256 roles) virtual { assembly { // Compute the role slot. mstore(0x00, or(shl(96, caller()), _OWNER_SLOT_NOT)) // Load the stored value, and if the `and` intersection // of the value and `roles` is zero, revert. if iszero(and(sload(keccak256(0x00, 0x20)), roles)) { mstore(0x00, _UNAUTHORIZED_ERROR_SELECTOR) revert(0x1c, 0x04) } } _; } /// @dev Marks a function as only callable by the owner or by an account /// with `roles`. Checks for ownership first, then lazily checks for roles. modifier onlyOwnerOrRoles(uint256 roles) virtual { assembly { // If the caller is not the stored owner. if iszero(eq(caller(), sload(not(_OWNER_SLOT_NOT)))) { // Compute the role slot. mstore(0x00, or(shl(96, caller()), _OWNER_SLOT_NOT)) // Load the stored value, and if the `and` intersection // of the value and `roles` is zero, revert. if iszero(and(sload(keccak256(0x00, 0x20)), roles)) { mstore(0x00, _UNAUTHORIZED_ERROR_SELECTOR) revert(0x1c, 0x04) } } } _; } /// @dev Marks a function as only callable by an account with `roles` /// or the owner. Checks for roles first, then lazily checks for ownership. modifier onlyRolesOrOwner(uint256 roles) virtual { assembly { // Compute the role slot. mstore(0x00, or(shl(96, caller()), _OWNER_SLOT_NOT)) // Load the stored value, and if the `and` intersection // of the value and `roles` is zero, revert. if iszero(and(sload(keccak256(0x00, 0x20)), roles)) { // If the caller is not the stored owner. if iszero(eq(caller(), sload(not(_OWNER_SLOT_NOT)))) { mstore(0x00, _UNAUTHORIZED_ERROR_SELECTOR) revert(0x1c, 0x04) } } } _; } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* ROLE CONSTANTS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ // IYKYK uint256 internal constant _ROLE_0 = 1 << 0; uint256 internal constant _ROLE_1 = 1 << 1; uint256 internal constant _ROLE_2 = 1 << 2; uint256 internal constant _ROLE_3 = 1 << 3; uint256 internal constant _ROLE_4 = 1 << 4; uint256 internal constant _ROLE_5 = 1 << 5; uint256 internal constant _ROLE_6 = 1 << 6; uint256 internal constant _ROLE_7 = 1 << 7; uint256 internal constant _ROLE_8 = 1 << 8; uint256 internal constant _ROLE_9 = 1 << 9; uint256 internal constant _ROLE_10 = 1 << 10; uint256 internal constant _ROLE_11 = 1 << 11; uint256 internal constant _ROLE_12 = 1 << 12; uint256 internal constant _ROLE_13 = 1 << 13; uint256 internal constant _ROLE_14 = 1 << 14; uint256 internal constant _ROLE_15 = 1 << 15; uint256 internal constant _ROLE_16 = 1 << 16; uint256 internal constant _ROLE_17 = 1 << 17; uint256 internal constant _ROLE_18 = 1 << 18; uint256 internal constant _ROLE_19 = 1 << 19; uint256 internal constant _ROLE_20 = 1 << 20; uint256 internal constant _ROLE_21 = 1 << 21; uint256 internal constant _ROLE_22 = 1 << 22; uint256 internal constant _ROLE_23 = 1 << 23; uint256 internal constant _ROLE_24 = 1 << 24; uint256 internal constant _ROLE_25 = 1 << 25; uint256 internal constant _ROLE_26 = 1 << 26; uint256 internal constant _ROLE_27 = 1 << 27; uint256 internal constant _ROLE_28 = 1 << 28; uint256 internal constant _ROLE_29 = 1 << 29; uint256 internal constant _ROLE_30 = 1 << 30; uint256 internal constant _ROLE_31 = 1 << 31; uint256 internal constant _ROLE_32 = 1 << 32; uint256 internal constant _ROLE_33 = 1 << 33; uint256 internal constant _ROLE_34 = 1 << 34; uint256 internal constant _ROLE_35 = 1 << 35; uint256 internal constant _ROLE_36 = 1 << 36; uint256 internal constant _ROLE_37 = 1 << 37; uint256 internal constant _ROLE_38 = 1 << 38; uint256 internal constant _ROLE_39 = 1 << 39; uint256 internal constant _ROLE_40 = 1 << 40; uint256 internal constant _ROLE_41 = 1 << 41; uint256 internal constant _ROLE_42 = 1 << 42; uint256 internal constant _ROLE_43 = 1 << 43; uint256 internal constant _ROLE_44 = 1 << 44; uint256 internal constant _ROLE_45 = 1 << 45; uint256 internal constant _ROLE_46 = 1 << 46; uint256 internal constant _ROLE_47 = 1 << 47; uint256 internal constant _ROLE_48 = 1 << 48; uint256 internal constant _ROLE_49 = 1 << 49; uint256 internal constant _ROLE_50 = 1 << 50; uint256 internal constant _ROLE_51 = 1 << 51; uint256 internal constant _ROLE_52 = 1 << 52; uint256 internal constant _ROLE_53 = 1 << 53; uint256 internal constant _ROLE_54 = 1 << 54; uint256 internal constant _ROLE_55 = 1 << 55; uint256 internal constant _ROLE_56 = 1 << 56; uint256 internal constant _ROLE_57 = 1 << 57; uint256 internal constant _ROLE_58 = 1 << 58; uint256 internal constant _ROLE_59 = 1 << 59; uint256 internal constant _ROLE_60 = 1 << 60; uint256 internal constant _ROLE_61 = 1 << 61; uint256 internal constant _ROLE_62 = 1 << 62; uint256 internal constant _ROLE_63 = 1 << 63; uint256 internal constant _ROLE_64 = 1 << 64; uint256 internal constant _ROLE_65 = 1 << 65; uint256 internal constant _ROLE_66 = 1 << 66; uint256 internal constant _ROLE_67 = 1 << 67; uint256 internal constant _ROLE_68 = 1 << 68; uint256 internal constant _ROLE_69 = 1 << 69; uint256 internal constant _ROLE_70 = 1 << 70; uint256 internal constant _ROLE_71 = 1 << 71; uint256 internal constant _ROLE_72 = 1 << 72; uint256 internal constant _ROLE_73 = 1 << 73; uint256 internal constant _ROLE_74 = 1 << 74; uint256 internal constant _ROLE_75 = 1 << 75; uint256 internal constant _ROLE_76 = 1 << 76; uint256 internal constant _ROLE_77 = 1 << 77; uint256 internal constant _ROLE_78 = 1 << 78; uint256 internal constant _ROLE_79 = 1 << 79; uint256 internal constant _ROLE_80 = 1 << 80; uint256 internal constant _ROLE_81 = 1 << 81; uint256 internal constant _ROLE_82 = 1 << 82; uint256 internal constant _ROLE_83 = 1 << 83; uint256 internal constant _ROLE_84 = 1 << 84; uint256 internal constant _ROLE_85 = 1 << 85; uint256 internal constant _ROLE_86 = 1 << 86; uint256 internal constant _ROLE_87 = 1 << 87; uint256 internal constant _ROLE_88 = 1 << 88; uint256 internal constant _ROLE_89 = 1 << 89; uint256 internal constant _ROLE_90 = 1 << 90; uint256 internal constant _ROLE_91 = 1 << 91; uint256 internal constant _ROLE_92 = 1 << 92; uint256 internal constant _ROLE_93 = 1 << 93; uint256 internal constant _ROLE_94 = 1 << 94; uint256 internal constant _ROLE_95 = 1 << 95; uint256 internal constant _ROLE_96 = 1 << 96; uint256 internal constant _ROLE_97 = 1 << 97; uint256 internal constant _ROLE_98 = 1 << 98; uint256 internal constant _ROLE_99 = 1 << 99; uint256 internal constant _ROLE_100 = 1 << 100; uint256 internal constant _ROLE_101 = 1 << 101; uint256 internal constant _ROLE_102 = 1 << 102; uint256 internal constant _ROLE_103 = 1 << 103; uint256 internal constant _ROLE_104 = 1 << 104; uint256 internal constant _ROLE_105 = 1 << 105; uint256 internal constant _ROLE_106 = 1 << 106; uint256 internal constant _ROLE_107 = 1 << 107; uint256 internal constant _ROLE_108 = 1 << 108; uint256 internal constant _ROLE_109 = 1 << 109; uint256 internal constant _ROLE_110 = 1 << 110; uint256 internal constant _ROLE_111 = 1 << 111; uint256 internal constant _ROLE_112 = 1 << 112; uint256 internal constant _ROLE_113 = 1 << 113; uint256 internal constant _ROLE_114 = 1 << 114; uint256 internal constant _ROLE_115 = 1 << 115; uint256 internal constant _ROLE_116 = 1 << 116; uint256 internal constant _ROLE_117 = 1 << 117; uint256 internal constant _ROLE_118 = 1 << 118; uint256 internal constant _ROLE_119 = 1 << 119; uint256 internal constant _ROLE_120 = 1 << 120; uint256 internal constant _ROLE_121 = 1 << 121; uint256 internal constant _ROLE_122 = 1 << 122; uint256 internal constant _ROLE_123 = 1 << 123; uint256 internal constant _ROLE_124 = 1 << 124; uint256 internal constant _ROLE_125 = 1 << 125; uint256 internal constant _ROLE_126 = 1 << 126; uint256 internal constant _ROLE_127 = 1 << 127; uint256 internal constant _ROLE_128 = 1 << 128; uint256 internal constant _ROLE_129 = 1 << 129; uint256 internal constant _ROLE_130 = 1 << 130; uint256 internal constant _ROLE_131 = 1 << 131; uint256 internal constant _ROLE_132 = 1 << 132; uint256 internal constant _ROLE_133 = 1 << 133; uint256 internal constant _ROLE_134 = 1 << 134; uint256 internal constant _ROLE_135 = 1 << 135; uint256 internal constant _ROLE_136 = 1 << 136; uint256 internal constant _ROLE_137 = 1 << 137; uint256 internal constant _ROLE_138 = 1 << 138; uint256 internal constant _ROLE_139 = 1 << 139; uint256 internal constant _ROLE_140 = 1 << 140; uint256 internal constant _ROLE_141 = 1 << 141; uint256 internal constant _ROLE_142 = 1 << 142; uint256 internal constant _ROLE_143 = 1 << 143; uint256 internal constant _ROLE_144 = 1 << 144; uint256 internal constant _ROLE_145 = 1 << 145; uint256 internal constant _ROLE_146 = 1 << 146; uint256 internal constant _ROLE_147 = 1 << 147; uint256 internal constant _ROLE_148 = 1 << 148; uint256 internal constant _ROLE_149 = 1 << 149; uint256 internal constant _ROLE_150 = 1 << 150; uint256 internal constant _ROLE_151 = 1 << 151; uint256 internal constant _ROLE_152 = 1 << 152; uint256 internal constant _ROLE_153 = 1 << 153; uint256 internal constant _ROLE_154 = 1 << 154; uint256 internal constant _ROLE_155 = 1 << 155; uint256 internal constant _ROLE_156 = 1 << 156; uint256 internal constant _ROLE_157 = 1 << 157; uint256 internal constant _ROLE_158 = 1 << 158; uint256 internal constant _ROLE_159 = 1 << 159; uint256 internal constant _ROLE_160 = 1 << 160; uint256 internal constant _ROLE_161 = 1 << 161; uint256 internal constant _ROLE_162 = 1 << 162; uint256 internal constant _ROLE_163 = 1 << 163; uint256 internal constant _ROLE_164 = 1 << 164; uint256 internal constant _ROLE_165 = 1 << 165; uint256 internal constant _ROLE_166 = 1 << 166; uint256 internal constant _ROLE_167 = 1 << 167; uint256 internal constant _ROLE_168 = 1 << 168; uint256 internal constant _ROLE_169 = 1 << 169; uint256 internal constant _ROLE_170 = 1 << 170; uint256 internal constant _ROLE_171 = 1 << 171; uint256 internal constant _ROLE_172 = 1 << 172; uint256 internal constant _ROLE_173 = 1 << 173; uint256 internal constant _ROLE_174 = 1 << 174; uint256 internal constant _ROLE_175 = 1 << 175; uint256 internal constant _ROLE_176 = 1 << 176; uint256 internal constant _ROLE_177 = 1 << 177; uint256 internal constant _ROLE_178 = 1 << 178; uint256 internal constant _ROLE_179 = 1 << 179; uint256 internal constant _ROLE_180 = 1 << 180; uint256 internal constant _ROLE_181 = 1 << 181; uint256 internal constant _ROLE_182 = 1 << 182; uint256 internal constant _ROLE_183 = 1 << 183; uint256 internal constant _ROLE_184 = 1 << 184; uint256 internal constant _ROLE_185 = 1 << 185; uint256 internal constant _ROLE_186 = 1 << 186; uint256 internal constant _ROLE_187 = 1 << 187; uint256 internal constant _ROLE_188 = 1 << 188; uint256 internal constant _ROLE_189 = 1 << 189; uint256 internal constant _ROLE_190 = 1 << 190; uint256 internal constant _ROLE_191 = 1 << 191; uint256 internal constant _ROLE_192 = 1 << 192; uint256 internal constant _ROLE_193 = 1 << 193; uint256 internal constant _ROLE_194 = 1 << 194; uint256 internal constant _ROLE_195 = 1 << 195; uint256 internal constant _ROLE_196 = 1 << 196; uint256 internal constant _ROLE_197 = 1 << 197; uint256 internal constant _ROLE_198 = 1 << 198; uint256 internal constant _ROLE_199 = 1 << 199; uint256 internal constant _ROLE_200 = 1 << 200; uint256 internal constant _ROLE_201 = 1 << 201; uint256 internal constant _ROLE_202 = 1 << 202; uint256 internal constant _ROLE_203 = 1 << 203; uint256 internal constant _ROLE_204 = 1 << 204; uint256 internal constant _ROLE_205 = 1 << 205; uint256 internal constant _ROLE_206 = 1 << 206; uint256 internal constant _ROLE_207 = 1 << 207; uint256 internal constant _ROLE_208 = 1 << 208; uint256 internal constant _ROLE_209 = 1 << 209; uint256 internal constant _ROLE_210 = 1 << 210; uint256 internal constant _ROLE_211 = 1 << 211; uint256 internal constant _ROLE_212 = 1 << 212; uint256 internal constant _ROLE_213 = 1 << 213; uint256 internal constant _ROLE_214 = 1 << 214; uint256 internal constant _ROLE_215 = 1 << 215; uint256 internal constant _ROLE_216 = 1 << 216; uint256 internal constant _ROLE_217 = 1 << 217; uint256 internal constant _ROLE_218 = 1 << 218; uint256 internal constant _ROLE_219 = 1 << 219; uint256 internal constant _ROLE_220 = 1 << 220; uint256 internal constant _ROLE_221 = 1 << 221; uint256 internal constant _ROLE_222 = 1 << 222; uint256 internal constant _ROLE_223 = 1 << 223; uint256 internal constant _ROLE_224 = 1 << 224; uint256 internal constant _ROLE_225 = 1 << 225; uint256 internal constant _ROLE_226 = 1 << 226; uint256 internal constant _ROLE_227 = 1 << 227; uint256 internal constant _ROLE_228 = 1 << 228; uint256 internal constant _ROLE_229 = 1 << 229; uint256 internal constant _ROLE_230 = 1 << 230; uint256 internal constant _ROLE_231 = 1 << 231; uint256 internal constant _ROLE_232 = 1 << 232; uint256 internal constant _ROLE_233 = 1 << 233; uint256 internal constant _ROLE_234 = 1 << 234; uint256 internal constant _ROLE_235 = 1 << 235; uint256 internal constant _ROLE_236 = 1 << 236; uint256 internal constant _ROLE_237 = 1 << 237; uint256 internal constant _ROLE_238 = 1 << 238; uint256 internal constant _ROLE_239 = 1 << 239; uint256 internal constant _ROLE_240 = 1 << 240; uint256 internal constant _ROLE_241 = 1 << 241; uint256 internal constant _ROLE_242 = 1 << 242; uint256 internal constant _ROLE_243 = 1 << 243; uint256 internal constant _ROLE_244 = 1 << 244; uint256 internal constant _ROLE_245 = 1 << 245; uint256 internal constant _ROLE_246 = 1 << 246; uint256 internal constant _ROLE_247 = 1 << 247; uint256 internal constant _ROLE_248 = 1 << 248; uint256 internal constant _ROLE_249 = 1 << 249; uint256 internal constant _ROLE_250 = 1 << 250; uint256 internal constant _ROLE_251 = 1 << 251; uint256 internal constant _ROLE_252 = 1 << 252; uint256 internal constant _ROLE_253 = 1 << 253; uint256 internal constant _ROLE_254 = 1 << 254; uint256 internal constant _ROLE_255 = 1 << 255; }
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.17; import "IERC1155.sol"; interface IShards is IERC1155 { error NoRecipients(); error NonExistent(); error Untradeable(); error ArrayLengthMismatch(); error NoShards(); function burn(address, uint256) external; }
{ "evmVersion": "istanbul", "optimizer": { "enabled": true, "runs": 200 }, "libraries": { "Shards.sol": {} }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"uri_","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ArrayLengthMismatch","type":"error"},{"inputs":[],"name":"NewOwnerIsZeroAddress","type":"error"},{"inputs":[],"name":"NoHandoverRequest","type":"error"},{"inputs":[],"name":"NoRecipients","type":"error"},{"inputs":[],"name":"NoShards","type":"error"},{"inputs":[],"name":"NonExistent","type":"error"},{"inputs":[],"name":"Unauthorized","type":"error"},{"inputs":[],"name":"Untradeable","type":"error"},{"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":"pendingOwner","type":"address"}],"name":"OwnershipHandoverCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pendingOwner","type":"address"}],"name":"OwnershipHandoverRequested","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"roles","type":"uint256"}],"name":"RolesUpdated","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":"AUTHORIZED_BURNER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"recipients","type":"address[]"},{"internalType":"uint256[]","name":"quantities","type":"uint256[]"}],"name":"airdrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","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":[],"name":"cancelOwnershipHandover","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"pendingOwner","type":"address"}],"name":"completeOwnershipHandover","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"roles","type":"uint256"}],"name":"grantRoles","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"roles","type":"uint256"}],"name":"hasAllRoles","outputs":[{"internalType":"bool","name":"result","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"roles","type":"uint256"}],"name":"hasAnyRole","outputs":[{"internalType":"bool","name":"result","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"roles","type":"uint256"}],"name":"ordinalsFromRoles","outputs":[{"internalType":"uint8[]","name":"ordinals","type":"uint8[]"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"result","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"pendingOwner","type":"address"}],"name":"ownershipHandoverExpiresAt","outputs":[{"internalType":"uint256","name":"result","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ownershipHandoverValidFor","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"roles","type":"uint256"}],"name":"renounceRoles","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"requestOwnershipHandover","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"roles","type":"uint256"}],"name":"revokeRoles","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint8[]","name":"ordinals","type":"uint8[]"}],"name":"rolesFromOrdinals","outputs":[{"internalType":"uint256","name":"roles","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"rolesOf","outputs":[{"internalType":"uint256","name":"roles","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"values","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":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newURI","type":"string"}],"name":"setURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"shard","outputs":[{"internalType":"uint120","name":"supply","type":"uint120"},{"internalType":"uint120","name":"burned","type":"uint120"},{"internalType":"bool","name":"tradeable","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"toggleTradeability","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b5060405162002a9238038062002a928339810160408190526200003491620000b7565b80620000408162000053565b506200004c3362000065565b50620002e7565b60026200006182826200021b565b5050565b6001600160a01b0316638b78c6d8198190558060007f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b634e487b7160e01b600052604160045260246000fd5b60006020808385031215620000cb57600080fd5b82516001600160401b0380821115620000e357600080fd5b818501915085601f830112620000f857600080fd5b8151818111156200010d576200010d620000a1565b604051601f8201601f19908116603f01168101908382118183101715620001385762000138620000a1565b8160405282815288868487010111156200015157600080fd5b600093505b8284101562000175578484018601518185018701529285019262000156565b600086848301015280965050505050505092915050565b600181811c90821680620001a157607f821691505b602082108103620001c257634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200021657600081815260208120601f850160051c81016020861015620001f15750805b601f850160051c820191505b818110156200021257828155600101620001fd565b5050505b505050565b81516001600160401b03811115620002375762000237620000a1565b6200024f816200024884546200018c565b84620001c8565b602080601f8311600181146200028757600084156200026e5750858301515b600019600386901b1c1916600185901b17855562000212565b600085815260208120601f198616915b82811015620002b85788860151825594840194600190910190840162000297565b5085821015620002d75787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61279b80620002f76000396000f3fe6080604052600436106101e25760003560e01c80636724348211610102578063d7533f0211610095578063f2fde38b11610064578063f2fde38b146105fd578063f5298aca14610610578063fe52b11714610630578063fee81cf41461064557600080fd5b8063d7533f0214610563578063e985e9c514610581578063f04e283e146105ca578063f242432a146105dd57600080fd5b80638da5cb5b116100d15780638da5cb5b14610497578063996373c3146104c35780639dc29fac14610523578063a22cb4651461054357600080fd5b806367243482146104225780636b20c45414610442578063715018a6146104625780637359e41f1461046a57600080fd5b8063256929621161017a5780634a4ee7b1116101495780634a4ee7b1146103a35780634e1273f4146103b6578063514e62fc146103e357806354d1f13d1461041a57600080fd5b806325692962146103165780632de948071461031e5780632eb2c2d61461034f57806347edc4e31461036f57600080fd5b806313a661ed116101b657806313a661ed14610299578063183a4f6e146102b95780631c10893f146102cc5780631cd64df4146102df57600080fd5b8062fdd58e146101e757806301ffc9a71461021a57806302fe53051461024a5780630e89341c1461026c575b600080fd5b3480156101f357600080fd5b50610207610202366004611a9b565b610676565b6040519081526020015b60405180910390f35b34801561022657600080fd5b5061023a610235366004611adb565b610710565b6040519015158152602001610211565b34801561025657600080fd5b5061026a610265366004611aff565b610760565b005b34801561027857600080fd5b5061028c610287366004611b70565b6107be565b6040516102119190611bd9565b3480156102a557600080fd5b506102076102b4366004611c51565b61080f565b61026a6102c7366004611b70565b610842565b61026a6102da366004611a9b565b61084f565b3480156102eb57600080fd5b5061023a6102fa366004611a9b565b60609190911b638b78c6d8176000908152602090205481161490565b61026a610874565b34801561032a57600080fd5b50610207610339366004611cfc565b60601b638b78c6d8176000908152602090205490565b34801561035b57600080fd5b5061026a61036a366004611dfb565b6108c4565b34801561037b57600080fd5b506102077f6dfed56f3d168174131a4e9163c47d5ceb4882b561b6092a62ebfb58f2dc860481565b61026a6103b1366004611a9b565b610902565b3480156103c257600080fd5b506103d66103d1366004611ea4565b610927565b6040516102119190611fa9565b3480156103ef57600080fd5b5061023a6103fe366004611a9b565b60609190911b638b78c6d8176000908152602090205416151590565b61026a610a50565b34801561042e57600080fd5b5061026a61043d366004612007565b610a8d565b34801561044e57600080fd5b5061026a61045d366004612072565b610bda565b61026a610c22565b34801561047657600080fd5b5061048a610485366004611b70565b610c70565b60405161021191906120e5565b3480156104a357600080fd5b50638b78c6d819546040516001600160a01b039091168152602001610211565b3480156104cf57600080fd5b506003546104fb906001600160781b0380821691600160781b810490911690600160f01b900460ff1683565b604080516001600160781b039485168152939092166020840152151590820152606001610211565b34801561052f57600080fd5b5061026a61053e366004611a9b565b610cb8565b34801561054f57600080fd5b5061026a61055e36600461212c565b610d56565b34801561056f57600080fd5b506040516202a3008152602001610211565b34801561058d57600080fd5b5061023a61059c366004612168565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b61026a6105d8366004611cfc565b610e2c565b3480156105e957600080fd5b5061026a6105f836600461219b565b610eae565b61026a61060b366004611cfc565b610ee5565b34801561061c57600080fd5b5061026a61062b3660046121ff565b610f4c565b34801561063c57600080fd5b5061026a610f8f565b34801561065157600080fd5b50610207610660366004611cfc565b60601b63389a75e1176000908152602090205490565b60006001600160a01b0383166106e75760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b506000818152602081815260408083206001600160a01b03861684529091529020545b92915050565b60006001600160e01b03198216636cdb3d1360e11b148061074157506001600160e01b031982166303a24d0760e21b145b8061070a57506301ffc9a760e01b6001600160e01b031983161461070a565b638b78c6d81954331461077b576382b429006000526004601cfd5b6107ba82828080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610fcb92505050565b5050565b606081156107df57604051632f9d01c560e01b815260040160405180910390fd5b6107e96000610fd7565b6040516020016107f99190612232565b6040516020818303038152906040529050919050565b600060208201825160051b81015b80821461083b57600160ff8351161b8317925060208201915061081d565b5050919050565b61084c338261106b565b50565b638b78c6d81954331461086a576382b429006000526004601cfd5b6107ba82826110bc565b60006202a3006001600160401b03164201905063389a75e13360601b1760005280602060002055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d600080a250565b600354600160f01b900460ff166108ee576040516362d8c5ff60e01b815260040160405180910390fd5b6108fb8585858585611108565b5050505050565b638b78c6d81954331461091d576382b429006000526004601cfd5b6107ba828261106b565b6060815183511461098c5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016106de565b600083516001600160401b038111156109a7576109a7611bec565b6040519080825280602002602001820160405280156109d0578160200160208202803683370190505b50905060005b8451811015610a4857610a1b8582815181106109f4576109f4612257565b6020026020010151858381518110610a0e57610a0e612257565b6020026020010151610676565b828281518110610a2d57610a2d612257565b6020908102919091010152610a4181612283565b90506109d6565b509392505050565b63389a75e13360601b176000526000602060002055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92600080a2565b638b78c6d819543314610aa8576382b429006000526004601cfd5b6000839003610aca576040516348e0555160e11b815260040160405180910390fd5b828114610aea5760405163512509d360e11b815260040160405180910390fd5b6000805b84811015610bae57838382818110610b0857610b08612257565b90506020020135600003610b2f5760405163d627d38560e01b815260040160405180910390fd5b838382818110610b4157610b41612257565b9050602002013582019150610ba6868683818110610b6157610b61612257565b9050602002016020810190610b769190611cfc565b6000868685818110610b8a57610b8a612257565b9050602002013560405180602001604052806000815250611198565b600101610aee565b50600380546001600160781b031981166001600160781b03918216939093011691909117905550505050565b6001600160a01b038316331480610bf65750610bf6833361059c565b610c125760405162461bcd60e51b81526004016106de9061229c565b610c1d8383836112a2565b505050565b638b78c6d819543314610c3d576382b429006000526004601cfd5b6000337f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a36000638b78c6d81955565b606060206040510160005b8082526001841660051b820191508360011c93508315610c9d57600101610c7b565b5060405191508060405260208201810360051c825250919050565b7f6dfed56f3d168174131a4e9163c47d5ceb4882b561b6092a62ebfb58f2dc8604638b78c6d83360601b176000528060206000205416610d00576382b429006000526004601cfd5b60038054600160781b6001600160781b0380831686900381166001600160781b031984168117839004821687019091169091026001600160f01b03199092161717905581610d508460008361141e565b50505050565b6001600160a01b0382163303610dc05760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b60648201526084016106de565b3360008181526001602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b638b78c6d819543314610e47576382b429006000526004601cfd5b8060601b60601c905063389a75e18160601b1760005260206000208054421115610e7957636f5e88186000526004601cfd5b600081555080337f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3638b78c6d81955565b600354600160f01b900460ff16610ed8576040516362d8c5ff60e01b815260040160405180910390fd5b6108fb8585858585611520565b638b78c6d819543314610f00576382b429006000526004601cfd5b6001600160a01b031680610f1c57637448fbae6000526004601cfd5b80337f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3638b78c6d81955565b6001600160a01b038316331480610f685750610f68833361059c565b610f845760405162461bcd60e51b81526004016106de9061229c565b610c1d83838361141e565b638b78c6d819543314610faa576382b429006000526004601cfd5b6003805460ff60f01b198116600160f01b9182900460ff1615909102179055565b60026107ba8282612365565b606060028054610fe6906122e5565b80601f0160208091040260200160405190810160405280929190818152602001828054611012906122e5565b801561105f5780601f106110345761010080835404028352916020019161105f565b820191906000526020600020905b81548152906001019060200180831161104257829003601f168201915b50505050509050919050565b638b78c6d88260601b176000526020600020805482811681189050808255808460601b60601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe26600080a350505050565b638b78c6d88260601b17600052602060002081815417808255808460601b60601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe26600080a350505050565b6001600160a01b0385163314806111245750611124853361059c565b61118b5760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b60648201526084016106de565b6108fb8585858585611565565b6001600160a01b0384166111f85760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b60648201526084016106de565b336112128160008761120988611701565b6108fb88611701565b6000848152602081815260408083206001600160a01b038916845290915281208054859290611242908490612424565b909155505060408051858152602081018590526001600160a01b0380881692600092918516917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46108fb8160008787878761174c565b6001600160a01b0383166112c85760405162461bcd60e51b81526004016106de90612437565b80518251146112e95760405162461bcd60e51b81526004016106de9061247a565b604080516020810190915260009081905233905b83518110156113bf57600084828151811061131a5761131a612257565b60200260200101519050600084838151811061133857611338612257565b602090810291909101810151600084815280835260408082206001600160a01b038c1683529093529190912054909150818110156113885760405162461bcd60e51b81526004016106de906124c2565b6000928352602083815260408085206001600160a01b038b16865290915290922091039055806113b781612283565b9150506112fd565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8686604051611410929190612506565b60405180910390a450505050565b6001600160a01b0383166114445760405162461bcd60e51b81526004016106de90612437565b336114748185600061145587611701565b61145e87611701565b5050604080516020810190915260009052505050565b6000838152602081815260408083206001600160a01b0388168452909152902054828110156114b55760405162461bcd60e51b81526004016106de906124c2565b6000848152602081815260408083206001600160a01b03898116808652918452828520888703905582518981529384018890529092908616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a45050505050565b6001600160a01b03851633148061153c575061153c853361059c565b6115585760405162461bcd60e51b81526004016106de9061229c565b6108fb85858585856118b0565b81518351146115865760405162461bcd60e51b81526004016106de9061247a565b6001600160a01b0384166115ac5760405162461bcd60e51b81526004016106de90612534565b3360005b84518110156116935760008582815181106115cd576115cd612257565b6020026020010151905060008583815181106115eb576115eb612257565b602090810291909101810151600084815280835260408082206001600160a01b038e16835290935291909120549091508181101561163b5760405162461bcd60e51b81526004016106de90612579565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290611678908490612424565b925050819055505050508061168c90612283565b90506115b0565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516116e3929190612506565b60405180910390a46116f98187878787876119c4565b505050505050565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061173b5761173b612257565b602090810291909101015292915050565b6001600160a01b0384163b156116f95760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e619061179090899089908890889088906004016125c3565b6020604051808303816000875af19250505080156117cb575060408051601f3d908101601f191682019092526117c8918101906125fd565b60015b611877576117d761261a565b806308c379a00361181057506117eb612636565b806117f65750611812565b8060405162461bcd60e51b81526004016106de9190611bd9565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016106de565b6001600160e01b0319811663f23a6e6160e01b146118a75760405162461bcd60e51b81526004016106de906126bf565b50505050505050565b6001600160a01b0384166118d65760405162461bcd60e51b81526004016106de90612534565b336118e681878761120988611701565b6000848152602081815260408083206001600160a01b038a168452909152902054838110156119275760405162461bcd60e51b81526004016106de90612579565b6000858152602081815260408083206001600160a01b038b8116855292528083208785039055908816825281208054869290611964908490612424565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46118a782888888888861174c565b6001600160a01b0384163b156116f95760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190611a089089908990889088908890600401612707565b6020604051808303816000875af1925050508015611a43575060408051601f3d908101601f19168201909252611a40918101906125fd565b60015b611a4f576117d761261a565b6001600160e01b0319811663bc197c8160e01b146118a75760405162461bcd60e51b81526004016106de906126bf565b80356001600160a01b0381168114611a9657600080fd5b919050565b60008060408385031215611aae57600080fd5b611ab783611a7f565b946020939093013593505050565b6001600160e01b03198116811461084c57600080fd5b600060208284031215611aed57600080fd5b8135611af881611ac5565b9392505050565b60008060208385031215611b1257600080fd5b82356001600160401b0380821115611b2957600080fd5b818501915085601f830112611b3d57600080fd5b813581811115611b4c57600080fd5b866020828501011115611b5e57600080fd5b60209290920196919550909350505050565b600060208284031215611b8257600080fd5b5035919050565b60005b83811015611ba4578181015183820152602001611b8c565b50506000910152565b60008151808452611bc5816020860160208601611b89565b601f01601f19169290920160200192915050565b602081526000611af86020830184611bad565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b0381118282101715611c2757611c27611bec565b6040525050565b60006001600160401b03821115611c4757611c47611bec565b5060051b60200190565b60006020808385031215611c6457600080fd5b82356001600160401b03811115611c7a57600080fd5b8301601f81018513611c8b57600080fd5b8035611c9681611c2e565b604051611ca38282611c02565b82815260059290921b8301840191848101915087831115611cc357600080fd5b928401925b82841015611cf157833560ff81168114611ce25760008081fd5b82529284019290840190611cc8565b979650505050505050565b600060208284031215611d0e57600080fd5b611af882611a7f565b600082601f830112611d2857600080fd5b81356020611d3582611c2e565b604051611d428282611c02565b83815260059390931b8501820192828101915086841115611d6257600080fd5b8286015b84811015611d7d5780358352918301918301611d66565b509695505050505050565b600082601f830112611d9957600080fd5b81356001600160401b03811115611db257611db2611bec565b604051611dc9601f8301601f191660200182611c02565b818152846020838601011115611dde57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a08688031215611e1357600080fd5b611e1c86611a7f565b9450611e2a60208701611a7f565b935060408601356001600160401b0380821115611e4657600080fd5b611e5289838a01611d17565b94506060880135915080821115611e6857600080fd5b611e7489838a01611d17565b93506080880135915080821115611e8a57600080fd5b50611e9788828901611d88565b9150509295509295909350565b60008060408385031215611eb757600080fd5b82356001600160401b0380821115611ece57600080fd5b818501915085601f830112611ee257600080fd5b81356020611eef82611c2e565b604051611efc8282611c02565b83815260059390931b8501820192828101915089841115611f1c57600080fd5b948201945b83861015611f4157611f3286611a7f565b82529482019490820190611f21565b96505086013592505080821115611f5757600080fd5b50611f6485828601611d17565b9150509250929050565b600081518084526020808501945080840160005b83811015611f9e57815187529582019590820190600101611f82565b509495945050505050565b602081526000611af86020830184611f6e565b60008083601f840112611fce57600080fd5b5081356001600160401b03811115611fe557600080fd5b6020830191508360208260051b850101111561200057600080fd5b9250929050565b6000806000806040858703121561201d57600080fd5b84356001600160401b038082111561203457600080fd5b61204088838901611fbc565b9096509450602087013591508082111561205957600080fd5b5061206687828801611fbc565b95989497509550505050565b60008060006060848603121561208757600080fd5b61209084611a7f565b925060208401356001600160401b03808211156120ac57600080fd5b6120b887838801611d17565b935060408601359150808211156120ce57600080fd5b506120db86828701611d17565b9150509250925092565b6020808252825182820181905260009190848201906040850190845b8181101561212057835160ff1683529284019291840191600101612101565b50909695505050505050565b6000806040838503121561213f57600080fd5b61214883611a7f565b91506020830135801515811461215d57600080fd5b809150509250929050565b6000806040838503121561217b57600080fd5b61218483611a7f565b915061219260208401611a7f565b90509250929050565b600080600080600060a086880312156121b357600080fd5b6121bc86611a7f565b94506121ca60208701611a7f565b9350604086013592506060860135915060808601356001600160401b038111156121f357600080fd5b611e9788828901611d88565b60008060006060848603121561221457600080fd5b61221d84611a7f565b95602085013595506040909401359392505050565b60008251612244818460208701611b89565b600360fc1b920191825250600101919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016122955761229561226d565b5060010190565b60208082526029908201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260408201526808185c1c1c9bdd995960ba1b606082015260800190565b600181811c908216806122f957607f821691505b60208210810361231957634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115610c1d57600081815260208120601f850160051c810160208610156123465750805b601f850160051c820191505b818110156116f957828155600101612352565b81516001600160401b0381111561237e5761237e611bec565b6123928161238c84546122e5565b8461231f565b602080601f8311600181146123c757600084156123af5750858301515b600019600386901b1c1916600185901b1785556116f9565b600085815260208120601f198616915b828110156123f6578886015182559484019460019091019084016123d7565b50858210156124145787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b8082018082111561070a5761070a61226d565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526024908201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604082015263616e636560e01b606082015260800190565b6040815260006125196040830185611f6e565b828103602084015261252b8185611f6e565b95945050505050565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090611cf190830184611bad565b60006020828403121561260f57600080fd5b8151611af881611ac5565b600060033d11156126335760046000803e5060005160e01c5b90565b600060443d10156126445790565b6040516003193d81016004833e81513d6001600160401b03816024840111818411171561267357505050505090565b828501915081518181111561268b5750505050505090565b843d87010160208285010111156126a55750505050505090565b6126b460208286010187611c02565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b0386811682528516602082015260a06040820181905260009061273390830186611f6e565b82810360608401526127458186611f6e565b905082810360808401526127598185611bad565b9897505050505050505056fea2646970667358221220c6fd2bcc2247d212a6e6893fd4e56be8008417259e7af09984799fa3e714837d64736f6c634300081100330000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000b697066733a2f2f3132332f000000000000000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106101e25760003560e01c80636724348211610102578063d7533f0211610095578063f2fde38b11610064578063f2fde38b146105fd578063f5298aca14610610578063fe52b11714610630578063fee81cf41461064557600080fd5b8063d7533f0214610563578063e985e9c514610581578063f04e283e146105ca578063f242432a146105dd57600080fd5b80638da5cb5b116100d15780638da5cb5b14610497578063996373c3146104c35780639dc29fac14610523578063a22cb4651461054357600080fd5b806367243482146104225780636b20c45414610442578063715018a6146104625780637359e41f1461046a57600080fd5b8063256929621161017a5780634a4ee7b1116101495780634a4ee7b1146103a35780634e1273f4146103b6578063514e62fc146103e357806354d1f13d1461041a57600080fd5b806325692962146103165780632de948071461031e5780632eb2c2d61461034f57806347edc4e31461036f57600080fd5b806313a661ed116101b657806313a661ed14610299578063183a4f6e146102b95780631c10893f146102cc5780631cd64df4146102df57600080fd5b8062fdd58e146101e757806301ffc9a71461021a57806302fe53051461024a5780630e89341c1461026c575b600080fd5b3480156101f357600080fd5b50610207610202366004611a9b565b610676565b6040519081526020015b60405180910390f35b34801561022657600080fd5b5061023a610235366004611adb565b610710565b6040519015158152602001610211565b34801561025657600080fd5b5061026a610265366004611aff565b610760565b005b34801561027857600080fd5b5061028c610287366004611b70565b6107be565b6040516102119190611bd9565b3480156102a557600080fd5b506102076102b4366004611c51565b61080f565b61026a6102c7366004611b70565b610842565b61026a6102da366004611a9b565b61084f565b3480156102eb57600080fd5b5061023a6102fa366004611a9b565b60609190911b638b78c6d8176000908152602090205481161490565b61026a610874565b34801561032a57600080fd5b50610207610339366004611cfc565b60601b638b78c6d8176000908152602090205490565b34801561035b57600080fd5b5061026a61036a366004611dfb565b6108c4565b34801561037b57600080fd5b506102077f6dfed56f3d168174131a4e9163c47d5ceb4882b561b6092a62ebfb58f2dc860481565b61026a6103b1366004611a9b565b610902565b3480156103c257600080fd5b506103d66103d1366004611ea4565b610927565b6040516102119190611fa9565b3480156103ef57600080fd5b5061023a6103fe366004611a9b565b60609190911b638b78c6d8176000908152602090205416151590565b61026a610a50565b34801561042e57600080fd5b5061026a61043d366004612007565b610a8d565b34801561044e57600080fd5b5061026a61045d366004612072565b610bda565b61026a610c22565b34801561047657600080fd5b5061048a610485366004611b70565b610c70565b60405161021191906120e5565b3480156104a357600080fd5b50638b78c6d819546040516001600160a01b039091168152602001610211565b3480156104cf57600080fd5b506003546104fb906001600160781b0380821691600160781b810490911690600160f01b900460ff1683565b604080516001600160781b039485168152939092166020840152151590820152606001610211565b34801561052f57600080fd5b5061026a61053e366004611a9b565b610cb8565b34801561054f57600080fd5b5061026a61055e36600461212c565b610d56565b34801561056f57600080fd5b506040516202a3008152602001610211565b34801561058d57600080fd5b5061023a61059c366004612168565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b61026a6105d8366004611cfc565b610e2c565b3480156105e957600080fd5b5061026a6105f836600461219b565b610eae565b61026a61060b366004611cfc565b610ee5565b34801561061c57600080fd5b5061026a61062b3660046121ff565b610f4c565b34801561063c57600080fd5b5061026a610f8f565b34801561065157600080fd5b50610207610660366004611cfc565b60601b63389a75e1176000908152602090205490565b60006001600160a01b0383166106e75760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b506000818152602081815260408083206001600160a01b03861684529091529020545b92915050565b60006001600160e01b03198216636cdb3d1360e11b148061074157506001600160e01b031982166303a24d0760e21b145b8061070a57506301ffc9a760e01b6001600160e01b031983161461070a565b638b78c6d81954331461077b576382b429006000526004601cfd5b6107ba82828080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610fcb92505050565b5050565b606081156107df57604051632f9d01c560e01b815260040160405180910390fd5b6107e96000610fd7565b6040516020016107f99190612232565b6040516020818303038152906040529050919050565b600060208201825160051b81015b80821461083b57600160ff8351161b8317925060208201915061081d565b5050919050565b61084c338261106b565b50565b638b78c6d81954331461086a576382b429006000526004601cfd5b6107ba82826110bc565b60006202a3006001600160401b03164201905063389a75e13360601b1760005280602060002055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d600080a250565b600354600160f01b900460ff166108ee576040516362d8c5ff60e01b815260040160405180910390fd5b6108fb8585858585611108565b5050505050565b638b78c6d81954331461091d576382b429006000526004601cfd5b6107ba828261106b565b6060815183511461098c5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016106de565b600083516001600160401b038111156109a7576109a7611bec565b6040519080825280602002602001820160405280156109d0578160200160208202803683370190505b50905060005b8451811015610a4857610a1b8582815181106109f4576109f4612257565b6020026020010151858381518110610a0e57610a0e612257565b6020026020010151610676565b828281518110610a2d57610a2d612257565b6020908102919091010152610a4181612283565b90506109d6565b509392505050565b63389a75e13360601b176000526000602060002055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92600080a2565b638b78c6d819543314610aa8576382b429006000526004601cfd5b6000839003610aca576040516348e0555160e11b815260040160405180910390fd5b828114610aea5760405163512509d360e11b815260040160405180910390fd5b6000805b84811015610bae57838382818110610b0857610b08612257565b90506020020135600003610b2f5760405163d627d38560e01b815260040160405180910390fd5b838382818110610b4157610b41612257565b9050602002013582019150610ba6868683818110610b6157610b61612257565b9050602002016020810190610b769190611cfc565b6000868685818110610b8a57610b8a612257565b9050602002013560405180602001604052806000815250611198565b600101610aee565b50600380546001600160781b031981166001600160781b03918216939093011691909117905550505050565b6001600160a01b038316331480610bf65750610bf6833361059c565b610c125760405162461bcd60e51b81526004016106de9061229c565b610c1d8383836112a2565b505050565b638b78c6d819543314610c3d576382b429006000526004601cfd5b6000337f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a36000638b78c6d81955565b606060206040510160005b8082526001841660051b820191508360011c93508315610c9d57600101610c7b565b5060405191508060405260208201810360051c825250919050565b7f6dfed56f3d168174131a4e9163c47d5ceb4882b561b6092a62ebfb58f2dc8604638b78c6d83360601b176000528060206000205416610d00576382b429006000526004601cfd5b60038054600160781b6001600160781b0380831686900381166001600160781b031984168117839004821687019091169091026001600160f01b03199092161717905581610d508460008361141e565b50505050565b6001600160a01b0382163303610dc05760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b60648201526084016106de565b3360008181526001602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b638b78c6d819543314610e47576382b429006000526004601cfd5b8060601b60601c905063389a75e18160601b1760005260206000208054421115610e7957636f5e88186000526004601cfd5b600081555080337f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3638b78c6d81955565b600354600160f01b900460ff16610ed8576040516362d8c5ff60e01b815260040160405180910390fd5b6108fb8585858585611520565b638b78c6d819543314610f00576382b429006000526004601cfd5b6001600160a01b031680610f1c57637448fbae6000526004601cfd5b80337f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3638b78c6d81955565b6001600160a01b038316331480610f685750610f68833361059c565b610f845760405162461bcd60e51b81526004016106de9061229c565b610c1d83838361141e565b638b78c6d819543314610faa576382b429006000526004601cfd5b6003805460ff60f01b198116600160f01b9182900460ff1615909102179055565b60026107ba8282612365565b606060028054610fe6906122e5565b80601f0160208091040260200160405190810160405280929190818152602001828054611012906122e5565b801561105f5780601f106110345761010080835404028352916020019161105f565b820191906000526020600020905b81548152906001019060200180831161104257829003601f168201915b50505050509050919050565b638b78c6d88260601b176000526020600020805482811681189050808255808460601b60601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe26600080a350505050565b638b78c6d88260601b17600052602060002081815417808255808460601b60601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe26600080a350505050565b6001600160a01b0385163314806111245750611124853361059c565b61118b5760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b60648201526084016106de565b6108fb8585858585611565565b6001600160a01b0384166111f85760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b60648201526084016106de565b336112128160008761120988611701565b6108fb88611701565b6000848152602081815260408083206001600160a01b038916845290915281208054859290611242908490612424565b909155505060408051858152602081018590526001600160a01b0380881692600092918516917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46108fb8160008787878761174c565b6001600160a01b0383166112c85760405162461bcd60e51b81526004016106de90612437565b80518251146112e95760405162461bcd60e51b81526004016106de9061247a565b604080516020810190915260009081905233905b83518110156113bf57600084828151811061131a5761131a612257565b60200260200101519050600084838151811061133857611338612257565b602090810291909101810151600084815280835260408082206001600160a01b038c1683529093529190912054909150818110156113885760405162461bcd60e51b81526004016106de906124c2565b6000928352602083815260408085206001600160a01b038b16865290915290922091039055806113b781612283565b9150506112fd565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8686604051611410929190612506565b60405180910390a450505050565b6001600160a01b0383166114445760405162461bcd60e51b81526004016106de90612437565b336114748185600061145587611701565b61145e87611701565b5050604080516020810190915260009052505050565b6000838152602081815260408083206001600160a01b0388168452909152902054828110156114b55760405162461bcd60e51b81526004016106de906124c2565b6000848152602081815260408083206001600160a01b03898116808652918452828520888703905582518981529384018890529092908616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a45050505050565b6001600160a01b03851633148061153c575061153c853361059c565b6115585760405162461bcd60e51b81526004016106de9061229c565b6108fb85858585856118b0565b81518351146115865760405162461bcd60e51b81526004016106de9061247a565b6001600160a01b0384166115ac5760405162461bcd60e51b81526004016106de90612534565b3360005b84518110156116935760008582815181106115cd576115cd612257565b6020026020010151905060008583815181106115eb576115eb612257565b602090810291909101810151600084815280835260408082206001600160a01b038e16835290935291909120549091508181101561163b5760405162461bcd60e51b81526004016106de90612579565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290611678908490612424565b925050819055505050508061168c90612283565b90506115b0565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516116e3929190612506565b60405180910390a46116f98187878787876119c4565b505050505050565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061173b5761173b612257565b602090810291909101015292915050565b6001600160a01b0384163b156116f95760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e619061179090899089908890889088906004016125c3565b6020604051808303816000875af19250505080156117cb575060408051601f3d908101601f191682019092526117c8918101906125fd565b60015b611877576117d761261a565b806308c379a00361181057506117eb612636565b806117f65750611812565b8060405162461bcd60e51b81526004016106de9190611bd9565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016106de565b6001600160e01b0319811663f23a6e6160e01b146118a75760405162461bcd60e51b81526004016106de906126bf565b50505050505050565b6001600160a01b0384166118d65760405162461bcd60e51b81526004016106de90612534565b336118e681878761120988611701565b6000848152602081815260408083206001600160a01b038a168452909152902054838110156119275760405162461bcd60e51b81526004016106de90612579565b6000858152602081815260408083206001600160a01b038b8116855292528083208785039055908816825281208054869290611964908490612424565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46118a782888888888861174c565b6001600160a01b0384163b156116f95760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190611a089089908990889088908890600401612707565b6020604051808303816000875af1925050508015611a43575060408051601f3d908101601f19168201909252611a40918101906125fd565b60015b611a4f576117d761261a565b6001600160e01b0319811663bc197c8160e01b146118a75760405162461bcd60e51b81526004016106de906126bf565b80356001600160a01b0381168114611a9657600080fd5b919050565b60008060408385031215611aae57600080fd5b611ab783611a7f565b946020939093013593505050565b6001600160e01b03198116811461084c57600080fd5b600060208284031215611aed57600080fd5b8135611af881611ac5565b9392505050565b60008060208385031215611b1257600080fd5b82356001600160401b0380821115611b2957600080fd5b818501915085601f830112611b3d57600080fd5b813581811115611b4c57600080fd5b866020828501011115611b5e57600080fd5b60209290920196919550909350505050565b600060208284031215611b8257600080fd5b5035919050565b60005b83811015611ba4578181015183820152602001611b8c565b50506000910152565b60008151808452611bc5816020860160208601611b89565b601f01601f19169290920160200192915050565b602081526000611af86020830184611bad565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b0381118282101715611c2757611c27611bec565b6040525050565b60006001600160401b03821115611c4757611c47611bec565b5060051b60200190565b60006020808385031215611c6457600080fd5b82356001600160401b03811115611c7a57600080fd5b8301601f81018513611c8b57600080fd5b8035611c9681611c2e565b604051611ca38282611c02565b82815260059290921b8301840191848101915087831115611cc357600080fd5b928401925b82841015611cf157833560ff81168114611ce25760008081fd5b82529284019290840190611cc8565b979650505050505050565b600060208284031215611d0e57600080fd5b611af882611a7f565b600082601f830112611d2857600080fd5b81356020611d3582611c2e565b604051611d428282611c02565b83815260059390931b8501820192828101915086841115611d6257600080fd5b8286015b84811015611d7d5780358352918301918301611d66565b509695505050505050565b600082601f830112611d9957600080fd5b81356001600160401b03811115611db257611db2611bec565b604051611dc9601f8301601f191660200182611c02565b818152846020838601011115611dde57600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a08688031215611e1357600080fd5b611e1c86611a7f565b9450611e2a60208701611a7f565b935060408601356001600160401b0380821115611e4657600080fd5b611e5289838a01611d17565b94506060880135915080821115611e6857600080fd5b611e7489838a01611d17565b93506080880135915080821115611e8a57600080fd5b50611e9788828901611d88565b9150509295509295909350565b60008060408385031215611eb757600080fd5b82356001600160401b0380821115611ece57600080fd5b818501915085601f830112611ee257600080fd5b81356020611eef82611c2e565b604051611efc8282611c02565b83815260059390931b8501820192828101915089841115611f1c57600080fd5b948201945b83861015611f4157611f3286611a7f565b82529482019490820190611f21565b96505086013592505080821115611f5757600080fd5b50611f6485828601611d17565b9150509250929050565b600081518084526020808501945080840160005b83811015611f9e57815187529582019590820190600101611f82565b509495945050505050565b602081526000611af86020830184611f6e565b60008083601f840112611fce57600080fd5b5081356001600160401b03811115611fe557600080fd5b6020830191508360208260051b850101111561200057600080fd5b9250929050565b6000806000806040858703121561201d57600080fd5b84356001600160401b038082111561203457600080fd5b61204088838901611fbc565b9096509450602087013591508082111561205957600080fd5b5061206687828801611fbc565b95989497509550505050565b60008060006060848603121561208757600080fd5b61209084611a7f565b925060208401356001600160401b03808211156120ac57600080fd5b6120b887838801611d17565b935060408601359150808211156120ce57600080fd5b506120db86828701611d17565b9150509250925092565b6020808252825182820181905260009190848201906040850190845b8181101561212057835160ff1683529284019291840191600101612101565b50909695505050505050565b6000806040838503121561213f57600080fd5b61214883611a7f565b91506020830135801515811461215d57600080fd5b809150509250929050565b6000806040838503121561217b57600080fd5b61218483611a7f565b915061219260208401611a7f565b90509250929050565b600080600080600060a086880312156121b357600080fd5b6121bc86611a7f565b94506121ca60208701611a7f565b9350604086013592506060860135915060808601356001600160401b038111156121f357600080fd5b611e9788828901611d88565b60008060006060848603121561221457600080fd5b61221d84611a7f565b95602085013595506040909401359392505050565b60008251612244818460208701611b89565b600360fc1b920191825250600101919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016122955761229561226d565b5060010190565b60208082526029908201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260408201526808185c1c1c9bdd995960ba1b606082015260800190565b600181811c908216806122f957607f821691505b60208210810361231957634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115610c1d57600081815260208120601f850160051c810160208610156123465750805b601f850160051c820191505b818110156116f957828155600101612352565b81516001600160401b0381111561237e5761237e611bec565b6123928161238c84546122e5565b8461231f565b602080601f8311600181146123c757600084156123af5750858301515b600019600386901b1c1916600185901b1785556116f9565b600085815260208120601f198616915b828110156123f6578886015182559484019460019091019084016123d7565b50858210156124145787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b8082018082111561070a5761070a61226d565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526024908201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604082015263616e636560e01b606082015260800190565b6040815260006125196040830185611f6e565b828103602084015261252b8185611f6e565b95945050505050565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090611cf190830184611bad565b60006020828403121561260f57600080fd5b8151611af881611ac5565b600060033d11156126335760046000803e5060005160e01c5b90565b600060443d10156126445790565b6040516003193d81016004833e81513d6001600160401b03816024840111818411171561267357505050505090565b828501915081518181111561268b5750505050505090565b843d87010160208285010111156126a55750505050505090565b6126b460208286010187611c02565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b0386811682528516602082015260a06040820181905260009061273390830186611f6e565b82810360608401526127458186611f6e565b905082810360808401526127598185611bad565b9897505050505050505056fea2646970667358221220c6fd2bcc2247d212a6e6893fd4e56be8008417259e7af09984799fa3e714837d64736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000b697066733a2f2f3132332f000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : uri_ (string): ipfs://123/
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000020
Arg [1] : 000000000000000000000000000000000000000000000000000000000000000b
Arg [2] : 697066733a2f2f3132332f000000000000000000000000000000000000000000
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.