Overview
TokenID
3
Total Transfers
-
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0xa52C0308...BA9d4efec The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
GameItems
Compiler Version
v0.8.22+commit.4fc1097e
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/access/Ownable2Step.sol"; contract GameItems is ERC1155, Ownable2Step { uint256 public constant GOLD = 0; uint256 public constant SILVER = 1; uint256 public constant THORS_HAMMER = 2; uint256 public constant SWORD = 3; uint256 public constant SHIELD = 4; uint256 public constant AXE = 5; uint256 public constant STAFF = 6; mapping(address => bool) public forgers; // https://testnets.opensea.io/collection/unidentified-contract-7fb2878c-4986-4083-92da-adc8 constructor(address admin) ERC1155("ipfs://QmR3yuSGXTvvLZuTn2JAvsUuDxaPtcReAgHTtvAt3Urnof/{id}.json") Ownable(admin) { _mint(msg.sender, GOLD, 10**18, ""); _mint(msg.sender, SILVER, 10**27, ""); _mint(msg.sender, THORS_HAMMER, 1, ""); _mint(msg.sender, SWORD, 10**9, ""); _mint(msg.sender, SHIELD, 10**9, ""); } function addForger (address forger) external onlyOwner { forgers[forger] = true; } function mint(address to, uint256 tokenId) external { require(forgers[msg.sender], "Address not approved to mint."); _mint(to, tokenId, 1, ""); } function burn(address to, uint256 tokenId) external { require(forgers[msg.sender], "Address not approved to mint."); _burn(to, tokenId, 1); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable2Step.sol) pragma solidity ^0.8.20; import {Ownable} from "./Ownable.sol"; /** * @dev Contract module which provides access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * The initial owner is specified at deployment time in the constructor for `Ownable`. This * can later be changed with {transferOwnership} and {acceptOwnership}. * * This module is used through inheritance. It will make available all functions * from parent (Ownable). */ abstract contract Ownable2Step is Ownable { address private _pendingOwner; event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner); /** * @dev Returns the address of the pending owner. */ function pendingOwner() public view virtual returns (address) { return _pendingOwner; } /** * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual override onlyOwner { _pendingOwner = newOwner; emit OwnershipTransferStarted(owner(), newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner. * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual override { delete _pendingOwner; super._transferOwnership(newOwner); } /** * @dev The new owner accepts the ownership transfer. */ function acceptOwnership() public virtual { address sender = _msgSender(); if (pendingOwner() != sender) { revert OwnableUnauthorizedAccount(sender); } _transferOwnership(sender); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/ERC1155.sol) pragma solidity ^0.8.20; import {IERC1155} from "./IERC1155.sol"; import {IERC1155Receiver} from "./IERC1155Receiver.sol"; import {IERC1155MetadataURI} from "./extensions/IERC1155MetadataURI.sol"; import {Context} from "../../utils/Context.sol"; import {IERC165, ERC165} from "../../utils/introspection/ERC165.sol"; import {Arrays} from "../../utils/Arrays.sol"; import {IERC1155Errors} from "../../interfaces/draft-IERC6093.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 */ abstract contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI, IERC1155Errors { using Arrays for uint256[]; using Arrays for address[]; mapping(uint256 id => mapping(address account => uint256)) private _balances; mapping(address account => mapping(address operator => 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 /* id */) public view virtual returns (string memory) { return _uri; } /** * @dev See {IERC1155-balanceOf}. */ function balanceOf(address account, uint256 id) public view virtual returns (uint256) { 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 returns (uint256[] memory) { if (accounts.length != ids.length) { revert ERC1155InvalidArrayLength(ids.length, accounts.length); } uint256[] memory batchBalances = new uint256[](accounts.length); for (uint256 i = 0; i < accounts.length; ++i) { batchBalances[i] = balanceOf(accounts.unsafeMemoryAccess(i), ids.unsafeMemoryAccess(i)); } return batchBalances; } /** * @dev See {IERC1155-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC1155-isApprovedForAll}. */ function isApprovedForAll(address account, address operator) public view virtual returns (bool) { return _operatorApprovals[account][operator]; } /** * @dev See {IERC1155-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 id, uint256 value, bytes memory data) public virtual { address sender = _msgSender(); if (from != sender && !isApprovedForAll(from, sender)) { revert ERC1155MissingApprovalForAll(sender, from); } _safeTransferFrom(from, to, id, value, data); } /** * @dev See {IERC1155-safeBatchTransferFrom}. */ function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory values, bytes memory data ) public virtual { address sender = _msgSender(); if (from != sender && !isApprovedForAll(from, sender)) { revert ERC1155MissingApprovalForAll(sender, from); } _safeBatchTransferFrom(from, to, ids, values, data); } /** * @dev Transfers a `value` amount of tokens of type `id` from `from` to `to`. Will mint (or burn) if `from` * (or `to`) is the zero address. * * Emits a {TransferSingle} event if the arrays contain one element, and {TransferBatch} otherwise. * * Requirements: * * - If `to` refers to a smart contract, it must implement either {IERC1155Receiver-onERC1155Received} * or {IERC1155Receiver-onERC1155BatchReceived} and return the acceptance magic value. * - `ids` and `values` must have the same length. * * NOTE: The ERC-1155 acceptance check is not performed in this function. See {_updateWithAcceptanceCheck} instead. */ function _update(address from, address to, uint256[] memory ids, uint256[] memory values) internal virtual { if (ids.length != values.length) { revert ERC1155InvalidArrayLength(ids.length, values.length); } address operator = _msgSender(); for (uint256 i = 0; i < ids.length; ++i) { uint256 id = ids.unsafeMemoryAccess(i); uint256 value = values.unsafeMemoryAccess(i); if (from != address(0)) { uint256 fromBalance = _balances[id][from]; if (fromBalance < value) { revert ERC1155InsufficientBalance(from, fromBalance, value, id); } unchecked { // Overflow not possible: value <= fromBalance _balances[id][from] = fromBalance - value; } } if (to != address(0)) { _balances[id][to] += value; } } if (ids.length == 1) { uint256 id = ids.unsafeMemoryAccess(0); uint256 value = values.unsafeMemoryAccess(0); emit TransferSingle(operator, from, to, id, value); } else { emit TransferBatch(operator, from, to, ids, values); } } /** * @dev Version of {_update} that performs the token acceptance check by calling * {IERC1155Receiver-onERC1155Received} or {IERC1155Receiver-onERC1155BatchReceived} on the receiver address if it * contains code (eg. is a smart contract at the moment of execution). * * IMPORTANT: Overriding this function is discouraged because it poses a reentrancy risk from the receiver. So any * update to the contract state after this function would break the check-effect-interaction pattern. Consider * overriding {_update} instead. */ function _updateWithAcceptanceCheck( address from, address to, uint256[] memory ids, uint256[] memory values, bytes memory data ) internal virtual { _update(from, to, ids, values); if (to != address(0)) { address operator = _msgSender(); if (ids.length == 1) { uint256 id = ids.unsafeMemoryAccess(0); uint256 value = values.unsafeMemoryAccess(0); _doSafeTransferAcceptanceCheck(operator, from, to, id, value, data); } else { _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, values, data); } } } /** * @dev Transfers a `value` 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 `value` 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 value, bytes memory data) internal { if (to == address(0)) { revert ERC1155InvalidReceiver(address(0)); } if (from == address(0)) { revert ERC1155InvalidSender(address(0)); } (uint256[] memory ids, uint256[] memory values) = _asSingletonArrays(id, value); _updateWithAcceptanceCheck(from, to, ids, values, 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. * - `ids` and `values` must have the same length. */ function _safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory values, bytes memory data ) internal { if (to == address(0)) { revert ERC1155InvalidReceiver(address(0)); } if (from == address(0)) { revert ERC1155InvalidSender(address(0)); } _updateWithAcceptanceCheck(from, to, ids, values, 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 values 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 a `value` amount of tokens of type `id`, and assigns them to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mint(address to, uint256 id, uint256 value, bytes memory data) internal { if (to == address(0)) { revert ERC1155InvalidReceiver(address(0)); } (uint256[] memory ids, uint256[] memory values) = _asSingletonArrays(id, value); _updateWithAcceptanceCheck(address(0), to, ids, values, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `values` must have the same length. * - `to` cannot be the zero address. * - 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 values, bytes memory data) internal { if (to == address(0)) { revert ERC1155InvalidReceiver(address(0)); } _updateWithAcceptanceCheck(address(0), to, ids, values, data); } /** * @dev Destroys a `value` amount of tokens of type `id` from `from` * * Emits a {TransferSingle} event. * * Requirements: * * - `from` cannot be the zero address. * - `from` must have at least `value` amount of tokens of type `id`. */ function _burn(address from, uint256 id, uint256 value) internal { if (from == address(0)) { revert ERC1155InvalidSender(address(0)); } (uint256[] memory ids, uint256[] memory values) = _asSingletonArrays(id, value); _updateWithAcceptanceCheck(from, address(0), ids, values, ""); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}. * * Emits a {TransferBatch} event. * * Requirements: * * - `from` cannot be the zero address. * - `from` must have at least `value` amount of tokens of type `id`. * - `ids` and `values` must have the same length. */ function _burnBatch(address from, uint256[] memory ids, uint256[] memory values) internal { if (from == address(0)) { revert ERC1155InvalidSender(address(0)); } _updateWithAcceptanceCheck(from, address(0), ids, values, ""); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the zero address. */ function _setApprovalForAll(address owner, address operator, bool approved) internal virtual { if (operator == address(0)) { revert ERC1155InvalidOperator(address(0)); } _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Performs an acceptance check by calling {IERC1155-onERC1155Received} on the `to` address * if it contains code at the moment of execution. */ function _doSafeTransferAcceptanceCheck( address operator, address from, address to, uint256 id, uint256 value, bytes memory data ) private { if (to.code.length > 0) { try IERC1155Receiver(to).onERC1155Received(operator, from, id, value, data) returns (bytes4 response) { if (response != IERC1155Receiver.onERC1155Received.selector) { // Tokens rejected revert ERC1155InvalidReceiver(to); } } catch (bytes memory reason) { if (reason.length == 0) { // non-ERC1155Receiver implementer revert ERC1155InvalidReceiver(to); } else { /// @solidity memory-safe-assembly assembly { revert(add(32, reason), mload(reason)) } } } } } /** * @dev Performs a batch acceptance check by calling {IERC1155-onERC1155BatchReceived} on the `to` address * if it contains code at the moment of execution. */ function _doSafeBatchTransferAcceptanceCheck( address operator, address from, address to, uint256[] memory ids, uint256[] memory values, bytes memory data ) private { if (to.code.length > 0) { try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, values, data) returns ( bytes4 response ) { if (response != IERC1155Receiver.onERC1155BatchReceived.selector) { // Tokens rejected revert ERC1155InvalidReceiver(to); } } catch (bytes memory reason) { if (reason.length == 0) { // non-ERC1155Receiver implementer revert ERC1155InvalidReceiver(to); } else { /// @solidity memory-safe-assembly assembly { revert(add(32, reason), mload(reason)) } } } } } /** * @dev Creates an array in memory with only one value for each of the elements provided. */ function _asSingletonArrays( uint256 element1, uint256 element2 ) private pure returns (uint256[] memory array1, uint256[] memory array2) { /// @solidity memory-safe-assembly assembly { // Load the free memory pointer array1 := mload(0x40) // Set array length to 1 mstore(array1, 1) // Store the single element at the next word after the length (where content starts) mstore(add(array1, 0x20), element1) // Repeat for next array locating it right after the first array array2 := add(array1, 0x40) mstore(array2, 1) mstore(add(array2, 0x20), element2) // Update the free memory pointer by pointing after the second array mstore(0x40, add(array2, 0x40)) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol) pragma solidity ^0.8.20; /** * @dev Standard ERC20 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens. */ interface IERC20Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC20InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC20InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers. * @param spender Address that may be allowed to operate on tokens without being their owner. * @param allowance Amount of tokens a `spender` is allowed to operate with. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC20InvalidApprover(address approver); /** * @dev Indicates a failure with the `spender` to be approved. Used in approvals. * @param spender Address that may be allowed to operate on tokens without being their owner. */ error ERC20InvalidSpender(address spender); } /** * @dev Standard ERC721 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens. */ interface IERC721Errors { /** * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20. * Used in balance queries. * @param owner Address of the current owner of a token. */ error ERC721InvalidOwner(address owner); /** * @dev Indicates a `tokenId` whose `owner` is the zero address. * @param tokenId Identifier number of a token. */ error ERC721NonexistentToken(uint256 tokenId); /** * @dev Indicates an error related to the ownership over a particular token. Used in transfers. * @param sender Address whose tokens are being transferred. * @param tokenId Identifier number of a token. * @param owner Address of the current owner of a token. */ error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC721InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC721InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param tokenId Identifier number of a token. */ error ERC721InsufficientApproval(address operator, uint256 tokenId); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC721InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC721InvalidOperator(address operator); } /** * @dev Standard ERC1155 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens. */ interface IERC1155Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. * @param tokenId Identifier number of a token. */ error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC1155InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC1155InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param owner Address of the current owner of a token. */ error ERC1155MissingApprovalForAll(address operator, address owner); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC1155InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC1155InvalidOperator(address operator); /** * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation. * Used in batch transfers. * @param idsLength Length of the array of token identifiers * @param valuesLength Length of the array of token amounts */ error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Arrays.sol) pragma solidity ^0.8.20; import {StorageSlot} from "./StorageSlot.sol"; import {Math} from "./math/Math.sol"; /** * @dev Collection of functions related to array types. */ library Arrays { using StorageSlot for bytes32; /** * @dev Searches a sorted `array` and returns the first index that contains * a value greater or equal to `element`. If no such index exists (i.e. all * values in the array are strictly less than `element`), the array length is * returned. Time complexity O(log n). * * `array` is expected to be sorted in ascending order, and to contain no * repeated elements. */ function findUpperBound(uint256[] storage array, uint256 element) internal view returns (uint256) { uint256 low = 0; uint256 high = array.length; if (high == 0) { return 0; } while (low < high) { uint256 mid = Math.average(low, high); // Note that mid will always be strictly less than high (i.e. it will be a valid array index) // because Math.average rounds towards zero (it does integer division with truncation). if (unsafeAccess(array, mid).value > element) { high = mid; } else { low = mid + 1; } } // At this point `low` is the exclusive upper bound. We will return the inclusive upper bound. if (low > 0 && unsafeAccess(array, low - 1).value == element) { return low - 1; } else { return low; } } /** * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check. * * WARNING: Only use if you are certain `pos` is lower than the array length. */ function unsafeAccess(address[] storage arr, uint256 pos) internal pure returns (StorageSlot.AddressSlot storage) { bytes32 slot; // We use assembly to calculate the storage slot of the element at index `pos` of the dynamic array `arr` // following https://docs.soliditylang.org/en/v0.8.20/internals/layout_in_storage.html#mappings-and-dynamic-arrays. /// @solidity memory-safe-assembly assembly { mstore(0, arr.slot) slot := add(keccak256(0, 0x20), pos) } return slot.getAddressSlot(); } /** * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check. * * WARNING: Only use if you are certain `pos` is lower than the array length. */ function unsafeAccess(bytes32[] storage arr, uint256 pos) internal pure returns (StorageSlot.Bytes32Slot storage) { bytes32 slot; // We use assembly to calculate the storage slot of the element at index `pos` of the dynamic array `arr` // following https://docs.soliditylang.org/en/v0.8.20/internals/layout_in_storage.html#mappings-and-dynamic-arrays. /// @solidity memory-safe-assembly assembly { mstore(0, arr.slot) slot := add(keccak256(0, 0x20), pos) } return slot.getBytes32Slot(); } /** * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check. * * WARNING: Only use if you are certain `pos` is lower than the array length. */ function unsafeAccess(uint256[] storage arr, uint256 pos) internal pure returns (StorageSlot.Uint256Slot storage) { bytes32 slot; // We use assembly to calculate the storage slot of the element at index `pos` of the dynamic array `arr` // following https://docs.soliditylang.org/en/v0.8.20/internals/layout_in_storage.html#mappings-and-dynamic-arrays. /// @solidity memory-safe-assembly assembly { mstore(0, arr.slot) slot := add(keccak256(0, 0x20), pos) } return slot.getUint256Slot(); } /** * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check. * * WARNING: Only use if you are certain `pos` is lower than the array length. */ function unsafeMemoryAccess(uint256[] memory arr, uint256 pos) internal pure returns (uint256 res) { assembly { res := mload(add(add(arr, 0x20), mul(pos, 0x20))) } } /** * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check. * * WARNING: Only use if you are certain `pos` is lower than the array length. */ function unsafeMemoryAccess(address[] memory arr, uint256 pos) internal pure returns (address res) { assembly { res := mload(add(add(arr, 0x20), mul(pos, 0x20))) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol) pragma solidity ^0.8.20; import {IERC165} from "./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); * } * ``` */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; /** * @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; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/extensions/IERC1155MetadataURI.sol) pragma solidity ^0.8.20; import {IERC1155} from "../IERC1155.sol"; /** * @dev Interface of the optional ERC1155MetadataExtension interface, as defined * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP]. */ interface IERC1155MetadataURI is IERC1155 { /** * @dev Returns the URI for token type `id`. * * If the `\{id\}` substring is present in the URI, it must be replaced by * clients with the actual token type ID. */ function uri(uint256 id) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/IERC1155Receiver.sol) pragma solidity ^0.8.20; import {IERC165} from "../../utils/introspection/IERC165.sol"; /** * @dev Interface that must be implemented by smart contracts in order to receive * ERC-1155 token transfers. */ 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. * * NOTE: To accept the transfer, this must return * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` * (i.e. 0xf23a6e61, or its own function selector). * * @param operator The address which initiated the transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param id The ID of the token being transferred * @param value The amount of tokens being transferred * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed */ function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external returns (bytes4); /** * @dev Handles the receipt of a multiple ERC1155 token types. This function * is called at the end of a `safeBatchTransferFrom` after the balances have * been updated. * * NOTE: To accept the transfer(s), this must return * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` * (i.e. 0xbc197c81, or its own function selector). * * @param operator The address which initiated the batch transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param ids An array containing ids of each token being transferred (order and length must match values array) * @param values An array containing amounts of each token being transferred (order and length must match ids array) * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed */ function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (token/ERC1155/IERC1155.sol) pragma solidity ^0.8.20; import {IERC165} from "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. */ interface IERC1155 is IERC165 { /** * @dev Emitted when `value` amount of tokens of 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 value 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 a `value` amount of tokens of type `id` from `from` to `to`. * * WARNING: This function can potentially allow a reentrancy attack when transferring tokens * to an untrusted contract, when invoking {onERC1155Received} on the receiver. * Ensure to follow the checks-effects-interactions pattern and consider employing * reentrancy guards when interacting with untrusted contracts. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `value` 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 value, bytes calldata data) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * WARNING: This function can potentially allow a reentrancy attack when transferring tokens * to an untrusted contract, when invoking {onERC1155BatchReceived} on the receiver. * Ensure to follow the checks-effects-interactions pattern and consider employing * reentrancy guards when interacting with untrusted contracts. * * Emits either a {TransferSingle} or a {TransferBatch} event, depending on the length of the array arguments. * * Requirements: * * - `ids` and `values` 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 values, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; import {Context} from "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * The initial owner is set to the address provided by the deployer. This can * later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ constructor(address initialOwner) { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol) pragma solidity ^0.8.20; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { /** * @dev Muldiv operation overflow. */ error MathOverflowedMulDiv(); enum Rounding { Floor, // Toward negative infinity Ceil, // Toward positive infinity Trunc, // Toward zero Expand // Away from zero } /** * @dev Returns the addition of two unsigned integers, with an overflow flag. */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an overflow flag. */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds towards infinity instead * of rounding towards zero. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { if (b == 0) { // Guarantee the same behavior as in a regular Solidity division. return a / b; } // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or * denominator == 0. * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by * Uniswap Labs also under MIT license. */ function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0 = x * y; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. if (denominator <= prod1) { revert MathOverflowedMulDiv(); } /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. // Always >= 1. See https://cs.stackexchange.com/q/138556/92363. uint256 twos = denominator & (0 - denominator); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also // works in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded * towards zero. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2 of a positive value rounded towards zero. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10 of a positive value rounded towards zero. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10 ** 64) { value /= 10 ** 64; result += 64; } if (value >= 10 ** 32) { value /= 10 ** 32; result += 32; } if (value >= 10 ** 16) { value /= 10 ** 16; result += 16; } if (value >= 10 ** 8) { value /= 10 ** 8; result += 8; } if (value >= 10 ** 4) { value /= 10 ** 4; result += 4; } if (value >= 10 ** 2) { value /= 10 ** 2; result += 2; } if (value >= 10 ** 1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256 of a positive value rounded towards zero. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 256, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0); } } /** * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers. */ function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) { return uint8(rounding) % 2 == 1; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/StorageSlot.sol) // This file was procedurally generated from scripts/generate/templates/StorageSlot.js. pragma solidity ^0.8.20; /** * @dev Library for reading and writing primitive types to specific storage slots. * * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. * This library helps with reading and writing to such slots without the need for inline assembly. * * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. * * Example usage to set ERC1967 implementation slot: * ```solidity * contract ERC1967 { * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; * * function _getImplementation() internal view returns (address) { * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; * } * * function _setImplementation(address newImplementation) internal { * require(newImplementation.code.length > 0); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` */ library StorageSlot { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } struct StringSlot { string value; } struct BytesSlot { bytes value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` with member `value` located at `slot`. */ function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` representation of the string storage pointer `store`. */ function getStringSlot(string storage store) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } } /** * @dev Returns an `BytesSlot` with member `value` located at `slot`. */ function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`. */ function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } } }
{ "optimizer": { "enabled": false, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
[{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ERC1155InsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC1155InvalidApprover","type":"error"},{"inputs":[{"internalType":"uint256","name":"idsLength","type":"uint256"},{"internalType":"uint256","name":"valuesLength","type":"uint256"}],"name":"ERC1155InvalidArrayLength","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"ERC1155InvalidOperator","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC1155InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC1155InvalidSender","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"address","name":"owner","type":"address"}],"name":"ERC1155MissingApprovalForAll","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","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":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"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":"AXE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"GOLD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SHIELD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SILVER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STAFF","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SWORD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"THORS_HAMMER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"forger","type":"address"}],"name":"addForger","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":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"forgers","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","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":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405234801562000010575f80fd5b5060405162003b7f38038062003b7f833981810160405281019062000036919062000c22565b806040518060600160405280603f815260200162003b40603f91396200006281620001ba60201b60201c565b505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603620000d6575f6040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401620000cd919062000c63565b60405180910390fd5b620000e781620001cf60201b60201c565b5062000112335f670de0b6b3a764000060405180602001604052805f8152506200020760201b60201c565b620001413360016b033b2e3c9fd0803ce800000060405180602001604052805f8152506200020760201b60201c565b62000165336002600160405180602001604052805f8152506200020760201b60201c565b6200018c336003633b9aca0060405180602001604052805f8152506200020760201b60201c565b620001b3336004633b9aca0060405180602001604052805f8152506200020760201b60201c565b50620013a4565b8060029081620001cb919062000ee2565b5050565b60045f6101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556200020481620002af60201b60201c565b50565b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16036200027a575f6040517f57f447ce00000000000000000000000000000000000000000000000000000000815260040162000271919062000c63565b60405180910390fd5b5f806200028e85856200037260201b60201c565b91509150620002a75f87848487620003a260201b60201c565b505050505050565b5f60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60608060405191506001825283602083015260408201905060018152826020820152604081016040529250929050565b620003b6858585856200047560201b60201c565b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16146200046e575f620003fb6200082760201b60201c565b9050600184510362000455575f6200041d5f866200082e60201b90919060201c565b90505f620004355f866200082e60201b90919060201c565b90506200044d8389898585896200084160201b60201c565b50506200046c565b6200046b818787878787620009ff60201b60201c565b5b505b5050505050565b8051825114620004c257815181516040517f5b059991000000000000000000000000000000000000000000000000000000008152600401620004b992919062000fd7565b60405180910390fd5b5f620004d36200082760201b60201c565b90505f5b8351811015620006dc575f620004f782866200082e60201b90919060201c565b90505f6200050f83866200082e60201b90919060201c565b90505f73ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff161462000636575f805f8481526020019081526020015f205f8a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905081811015620005e257888183856040517f03dee4c5000000000000000000000000000000000000000000000000000000008152600401620005d9949392919062001002565b60405180910390fd5b8181035f808581526020019081526020015f205f8b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550505b5f73ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff1614620006ce57805f808481526020019081526020015f205f8973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f828254620006c691906200107a565b925050819055505b5050806001019050620004d7565b5060018351036200079f575f620006fd5f856200082e60201b90919060201c565b90505f620007155f856200082e60201b90919060201c565b90508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6285856040516200078f92919062000fd7565b60405180910390a4505062000820565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8686604051620008179291906200117b565b60405180910390a45b5050505050565b5f33905090565b5f60208202602084010151905092915050565b5f8473ffffffffffffffffffffffffffffffffffffffff163b1115620009f7578373ffffffffffffffffffffffffffffffffffffffff1663f23a6e6187878686866040518663ffffffff1660e01b8152600401620008a495949392919062001248565b6020604051808303815f875af1925050508015620008e257506040513d601f19601f82011682018060405250810190620008df919062001304565b60015b62000969573d805f811462000913576040519150601f19603f3d011682016040523d82523d5f602084013e62000918565b606091505b505f8151036200096157846040517f57f447ce00000000000000000000000000000000000000000000000000000000815260040162000958919062000c63565b60405180910390fd5b805181602001fd5b63f23a6e6160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614620009f557846040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401620009ec919062000c63565b60405180910390fd5b505b505050505050565b5f8473ffffffffffffffffffffffffffffffffffffffff163b111562000bb5578373ffffffffffffffffffffffffffffffffffffffff1663bc197c8187878686866040518663ffffffff1660e01b815260040162000a6295949392919062001334565b6020604051808303815f875af192505050801562000aa057506040513d601f19601f8201168201806040525081019062000a9d919062001304565b60015b62000b27573d805f811462000ad1576040519150601f19603f3d011682016040523d82523d5f602084013e62000ad6565b606091505b505f81510362000b1f57846040517f57f447ce00000000000000000000000000000000000000000000000000000000815260040162000b16919062000c63565b60405180910390fd5b805181602001fd5b63bc197c8160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161462000bb357846040517f57f447ce00000000000000000000000000000000000000000000000000000000815260040162000baa919062000c63565b60405180910390fd5b505b505050505050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f62000bec8262000bc1565b9050919050565b62000bfe8162000be0565b811462000c09575f80fd5b50565b5f8151905062000c1c8162000bf3565b92915050565b5f6020828403121562000c3a5762000c3962000bbd565b5b5f62000c498482850162000c0c565b91505092915050565b62000c5d8162000be0565b82525050565b5f60208201905062000c785f83018462000c52565b92915050565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168062000cfa57607f821691505b60208210810362000d105762000d0f62000cb5565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f6008830262000d747fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8262000d37565b62000d80868362000d37565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f62000dca62000dc462000dbe8462000d98565b62000da1565b62000d98565b9050919050565b5f819050919050565b62000de58362000daa565b62000dfd62000df48262000dd1565b84845462000d43565b825550505050565b5f90565b62000e1362000e05565b62000e2081848462000dda565b505050565b5b8181101562000e475762000e3b5f8262000e09565b60018101905062000e26565b5050565b601f82111562000e965762000e608162000d16565b62000e6b8462000d28565b8101602085101562000e7b578190505b62000e9362000e8a8562000d28565b83018262000e25565b50505b505050565b5f82821c905092915050565b5f62000eb85f198460080262000e9b565b1980831691505092915050565b5f62000ed2838362000ea7565b9150826002028217905092915050565b62000eed8262000c7e565b67ffffffffffffffff81111562000f095762000f0862000c88565b5b62000f15825462000ce2565b62000f2282828562000e4b565b5f60209050601f83116001811462000f58575f841562000f43578287015190505b62000f4f858262000ec5565b86555062000fbe565b601f19841662000f688662000d16565b5f5b8281101562000f915784890151825560018201915060208501945060208101905062000f6a565b8683101562000fb1578489015162000fad601f89168262000ea7565b8355505b6001600288020188555050505b505050505050565b62000fd18162000d98565b82525050565b5f60408201905062000fec5f83018562000fc6565b62000ffb602083018462000fc6565b9392505050565b5f608082019050620010175f83018762000c52565b62001026602083018662000fc6565b62001035604083018562000fc6565b62001044606083018462000fc6565b95945050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f620010868262000d98565b9150620010938362000d98565b9250828201905080821115620010ae57620010ad6200104d565b5b92915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b620010e88162000d98565b82525050565b5f620010fb8383620010dd565b60208301905092915050565b5f602082019050919050565b5f6200111f82620010b4565b6200112b8185620010be565b93506200113883620010ce565b805f5b838110156200116e578151620011528882620010ee565b97506200115f8362001107565b9250506001810190506200113b565b5085935050505092915050565b5f6040820190508181035f83015262001195818562001113565b90508181036020830152620011ab818462001113565b90509392505050565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015620011ed578082015181840152602081019050620011d0565b5f8484015250505050565b5f601f19601f8301169050919050565b5f6200121482620011b4565b620012208185620011be565b935062001232818560208601620011ce565b6200123d81620011f8565b840191505092915050565b5f60a0820190506200125d5f83018862000c52565b6200126c602083018762000c52565b6200127b604083018662000fc6565b6200128a606083018562000fc6565b81810360808301526200129e818462001208565b90509695505050505050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b620012e081620012aa565b8114620012eb575f80fd5b50565b5f81519050620012fe81620012d5565b92915050565b5f602082840312156200131c576200131b62000bbd565b5b5f6200132b84828501620012ee565b91505092915050565b5f60a082019050620013495f83018862000c52565b62001358602083018762000c52565b81810360408301526200136c818662001113565b9050818103606083015262001382818562001113565b9050818103608083015262001398818462001208565b90509695505050505050565b61278e80620013b25f395ff3fe608060405234801561000f575f80fd5b5060043610610155575f3560e01c8063715018a6116100c1578063d562e2041161007a578063d562e2041461039d578063e30c3978146103bb578063e3e55f08146103d9578063e985e9c5146103f7578063f242432a14610427578063f2fde38b1461044357610155565b8063715018a61461031557806379ba50971461031f5780637dd2a0ee146103295780638da5cb5b146103475780639dc29fac14610365578063a22cb4651461038157610155565b80633e4bee38116101135780633e4bee381461024157806340c10f191461025f5780634e1273f41461027b5780635a39a05e146102ab5780635b2725ed146102db5780635d6f4fa0146102f957610155565b8062fdd58e1461015957806301ffc9a7146101895780630e89341c146101b957806313dc989f146101e957806323c6dcf1146102075780632eb2c2d614610225575b5f80fd5b610173600480360381019061016e9190611baf565b61045f565b6040516101809190611bfc565b60405180910390f35b6101a3600480360381019061019e9190611c6a565b6104b4565b6040516101b09190611caf565b60405180910390f35b6101d360048036038101906101ce9190611cc8565b610595565b6040516101e09190611d7d565b60405180910390f35b6101f1610627565b6040516101fe9190611bfc565b60405180910390f35b61020f61062c565b60405161021c9190611bfc565b60405180910390f35b61023f600480360381019061023a9190611f8d565b610631565b005b6102496106d8565b6040516102569190611bfc565b60405180910390f35b61027960048036038101906102749190611baf565b6106dc565b005b61029560048036038101906102909190612118565b610784565b6040516102a29190612245565b60405180910390f35b6102c560048036038101906102c09190612265565b61088b565b6040516102d29190611caf565b60405180910390f35b6102e36108a8565b6040516102f09190611bfc565b60405180910390f35b610313600480360381019061030e9190612265565b6108ad565b005b61031d61090d565b005b610327610920565b005b6103316109ae565b60405161033e9190611bfc565b60405180910390f35b61034f6109b3565b60405161035c919061229f565b60405180910390f35b61037f600480360381019061037a9190611baf565b6109db565b005b61039b600480360381019061039691906122e2565b610a74565b005b6103a5610a8a565b6040516103b29190611bfc565b60405180910390f35b6103c3610a8f565b6040516103d0919061229f565b60405180910390f35b6103e1610ab7565b6040516103ee9190611bfc565b60405180910390f35b610411600480360381019061040c9190612320565b610abc565b60405161041e9190611caf565b60405180910390f35b610441600480360381019061043c919061235e565b610b4a565b005b61045d60048036038101906104589190612265565b610bf1565b005b5f805f8381526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905092915050565b5f7fd9b67a26000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061057e57507f0e89341c000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061058e575061058d82610c9d565b5b9050919050565b6060600280546105a49061241e565b80601f01602080910402602001604051908101604052809291908181526020018280546105d09061241e565b801561061b5780601f106105f25761010080835404028352916020019161061b565b820191905f5260205f20905b8154815290600101906020018083116105fe57829003601f168201915b50505050509050919050565b600381565b600681565b5f61063a610d06565b90508073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161415801561067f575061067d8682610abc565b155b156106c35780866040517fe237d9220000000000000000000000000000000000000000000000000000000081526004016106ba92919061244e565b60405180910390fd5b6106d08686868686610d0d565b505050505050565b5f81565b60055f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16610765576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161075c906124bf565b60405180910390fd5b6107808282600160405180602001604052805f815250610e01565b5050565b606081518351146107d057815183516040517f5b0599910000000000000000000000000000000000000000000000000000000081526004016107c79291906124dd565b60405180910390fd5b5f835167ffffffffffffffff8111156107ec576107eb611da1565b5b60405190808252806020026020018201604052801561081a5781602001602082028036833780820191505090505b5090505f5b84518110156108805761085661083e8287610e9690919063ffffffff16565b6108518387610ea990919063ffffffff16565b61045f565b82828151811061086957610868612504565b5b60200260200101818152505080600101905061081f565b508091505092915050565b6005602052805f5260405f205f915054906101000a900460ff1681565b600481565b6108b5610ebc565b600160055f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff02191690831515021790555050565b610915610ebc565b61091e5f610f43565b565b5f610929610d06565b90508073ffffffffffffffffffffffffffffffffffffffff1661094a610a8f565b73ffffffffffffffffffffffffffffffffffffffff16146109a257806040517f118cdaa7000000000000000000000000000000000000000000000000000000008152600401610999919061229f565b60405180910390fd5b6109ab81610f43565b50565b600581565b5f60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60055f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16610a64576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a5b906124bf565b60405180910390fd5b610a7082826001610f73565b5050565b610a86610a7f610d06565b8383611015565b5050565b600281565b5f60045f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600181565b5f60015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16905092915050565b5f610b53610d06565b90508073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614158015610b985750610b968682610abc565b155b15610bdc5780866040517fe237d922000000000000000000000000000000000000000000000000000000008152600401610bd392919061244e565b60405180910390fd5b610be9868686868661117e565b505050505050565b610bf9610ebc565b8060045f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16610c586109b3565b73ffffffffffffffffffffffffffffffffffffffff167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f33905090565b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603610d7d575f6040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401610d74919061229f565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1603610ded575f6040517f01a83514000000000000000000000000000000000000000000000000000000008152600401610de4919061229f565b60405180910390fd5b610dfa8585858585611284565b5050505050565b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603610e71575f6040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401610e68919061229f565b60405180910390fd5b5f80610e7d8585611330565b91509150610e8e5f87848487611284565b505050505050565b5f60208202602084010151905092915050565b5f60208202602084010151905092915050565b610ec4610d06565b73ffffffffffffffffffffffffffffffffffffffff16610ee26109b3565b73ffffffffffffffffffffffffffffffffffffffff1614610f4157610f05610d06565b6040517f118cdaa7000000000000000000000000000000000000000000000000000000008152600401610f38919061229f565b60405180910390fd5b565b60045f6101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055610f7081611360565b50565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610fe3575f6040517f01a83514000000000000000000000000000000000000000000000000000000008152600401610fda919061229f565b60405180910390fd5b5f80610fef8484611330565b9150915061100e855f848460405180602001604052805f815250611284565b5050505050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611085575f6040517fced3e10000000000000000000000000000000000000000000000000000000000815260040161107c919061229f565b60405180910390fd5b8060015f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516111719190611caf565b60405180910390a3505050565b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16036111ee575f6040517f57f447ce0000000000000000000000000000000000000000000000000000000081526004016111e5919061229f565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff160361125e575f6040517f01a83514000000000000000000000000000000000000000000000000000000008152600401611255919061229f565b60405180910390fd5b5f8061126a8585611330565b9150915061127b8787848487611284565b50505050505050565b61129085858585611423565b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614611329575f6112cc610d06565b90506001845103611318575f6112eb5f86610ea990919063ffffffff16565b90505f6113015f86610ea990919063ffffffff16565b90506113118389898585896117b3565b5050611327565b611326818787878787611962565b5b505b5050505050565b60608060405191506001825283602083015260408201905060018152826020820152604081016040529250929050565b5f60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b805182511461146d57815181516040517f5b0599910000000000000000000000000000000000000000000000000000000081526004016114649291906124dd565b60405180910390fd5b5f611476610d06565b90505f5b8351811015611672575f6114978286610ea990919063ffffffff16565b90505f6114ad8386610ea990919063ffffffff16565b90505f73ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff16146115d0575f805f8481526020019081526020015f205f8a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205490508181101561157c57888183856040517f03dee4c50000000000000000000000000000000000000000000000000000000081526004016115739493929190612531565b60405180910390fd5b8181035f808581526020019081526020015f205f8b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550505b5f73ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff161461166557805f808481526020019081526020015f205f8973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825461165d91906125a1565b925050819055505b505080600101905061147a565b50600183510361172d575f6116905f85610ea990919063ffffffff16565b90505f6116a65f85610ea990919063ffffffff16565b90508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62858560405161171e9291906124dd565b60405180910390a450506117ac565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb86866040516117a39291906125d4565b60405180910390a45b5050505050565b5f8473ffffffffffffffffffffffffffffffffffffffff163b111561195a578373ffffffffffffffffffffffffffffffffffffffff1663f23a6e6187878686866040518663ffffffff1660e01b815260040161181395949392919061265b565b6020604051808303815f875af192505050801561184e57506040513d601f19601f8201168201806040525081019061184b91906126c7565b60015b6118cf573d805f811461187c576040519150601f19603f3d011682016040523d82523d5f602084013e611881565b606091505b505f8151036118c757846040517f57f447ce0000000000000000000000000000000000000000000000000000000081526004016118be919061229f565b60405180910390fd5b805181602001fd5b63f23a6e6160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161461195857846040517f57f447ce00000000000000000000000000000000000000000000000000000000815260040161194f919061229f565b60405180910390fd5b505b505050505050565b5f8473ffffffffffffffffffffffffffffffffffffffff163b1115611b09578373ffffffffffffffffffffffffffffffffffffffff1663bc197c8187878686866040518663ffffffff1660e01b81526004016119c29594939291906126f2565b6020604051808303815f875af19250505080156119fd57506040513d601f19601f820116820180604052508101906119fa91906126c7565b60015b611a7e573d805f8114611a2b576040519150601f19603f3d011682016040523d82523d5f602084013e611a30565b606091505b505f815103611a7657846040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401611a6d919061229f565b60405180910390fd5b805181602001fd5b63bc197c8160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614611b0757846040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401611afe919061229f565b60405180910390fd5b505b505050505050565b5f604051905090565b5f80fd5b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f611b4b82611b22565b9050919050565b611b5b81611b41565b8114611b65575f80fd5b50565b5f81359050611b7681611b52565b92915050565b5f819050919050565b611b8e81611b7c565b8114611b98575f80fd5b50565b5f81359050611ba981611b85565b92915050565b5f8060408385031215611bc557611bc4611b1a565b5b5f611bd285828601611b68565b9250506020611be385828601611b9b565b9150509250929050565b611bf681611b7c565b82525050565b5f602082019050611c0f5f830184611bed565b92915050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b611c4981611c15565b8114611c53575f80fd5b50565b5f81359050611c6481611c40565b92915050565b5f60208284031215611c7f57611c7e611b1a565b5b5f611c8c84828501611c56565b91505092915050565b5f8115159050919050565b611ca981611c95565b82525050565b5f602082019050611cc25f830184611ca0565b92915050565b5f60208284031215611cdd57611cdc611b1a565b5b5f611cea84828501611b9b565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015611d2a578082015181840152602081019050611d0f565b5f8484015250505050565b5f601f19601f8301169050919050565b5f611d4f82611cf3565b611d598185611cfd565b9350611d69818560208601611d0d565b611d7281611d35565b840191505092915050565b5f6020820190508181035f830152611d958184611d45565b905092915050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b611dd782611d35565b810181811067ffffffffffffffff82111715611df657611df5611da1565b5b80604052505050565b5f611e08611b11565b9050611e148282611dce565b919050565b5f67ffffffffffffffff821115611e3357611e32611da1565b5b602082029050602081019050919050565b5f80fd5b5f611e5a611e5584611e19565b611dff565b90508083825260208201905060208402830185811115611e7d57611e7c611e44565b5b835b81811015611ea65780611e928882611b9b565b845260208401935050602081019050611e7f565b5050509392505050565b5f82601f830112611ec457611ec3611d9d565b5b8135611ed4848260208601611e48565b91505092915050565b5f80fd5b5f67ffffffffffffffff821115611efb57611efa611da1565b5b611f0482611d35565b9050602081019050919050565b828183375f83830152505050565b5f611f31611f2c84611ee1565b611dff565b905082815260208101848484011115611f4d57611f4c611edd565b5b611f58848285611f11565b509392505050565b5f82601f830112611f7457611f73611d9d565b5b8135611f84848260208601611f1f565b91505092915050565b5f805f805f60a08688031215611fa657611fa5611b1a565b5b5f611fb388828901611b68565b9550506020611fc488828901611b68565b945050604086013567ffffffffffffffff811115611fe557611fe4611b1e565b5b611ff188828901611eb0565b935050606086013567ffffffffffffffff81111561201257612011611b1e565b5b61201e88828901611eb0565b925050608086013567ffffffffffffffff81111561203f5761203e611b1e565b5b61204b88828901611f60565b9150509295509295909350565b5f67ffffffffffffffff82111561207257612071611da1565b5b602082029050602081019050919050565b5f61209561209084612058565b611dff565b905080838252602082019050602084028301858111156120b8576120b7611e44565b5b835b818110156120e157806120cd8882611b68565b8452602084019350506020810190506120ba565b5050509392505050565b5f82601f8301126120ff576120fe611d9d565b5b813561210f848260208601612083565b91505092915050565b5f806040838503121561212e5761212d611b1a565b5b5f83013567ffffffffffffffff81111561214b5761214a611b1e565b5b612157858286016120eb565b925050602083013567ffffffffffffffff81111561217857612177611b1e565b5b61218485828601611eb0565b9150509250929050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b6121c081611b7c565b82525050565b5f6121d183836121b7565b60208301905092915050565b5f602082019050919050565b5f6121f38261218e565b6121fd8185612198565b9350612208836121a8565b805f5b8381101561223857815161221f88826121c6565b975061222a836121dd565b92505060018101905061220b565b5085935050505092915050565b5f6020820190508181035f83015261225d81846121e9565b905092915050565b5f6020828403121561227a57612279611b1a565b5b5f61228784828501611b68565b91505092915050565b61229981611b41565b82525050565b5f6020820190506122b25f830184612290565b92915050565b6122c181611c95565b81146122cb575f80fd5b50565b5f813590506122dc816122b8565b92915050565b5f80604083850312156122f8576122f7611b1a565b5b5f61230585828601611b68565b9250506020612316858286016122ce565b9150509250929050565b5f806040838503121561233657612335611b1a565b5b5f61234385828601611b68565b925050602061235485828601611b68565b9150509250929050565b5f805f805f60a0868803121561237757612376611b1a565b5b5f61238488828901611b68565b955050602061239588828901611b68565b94505060406123a688828901611b9b565b93505060606123b788828901611b9b565b925050608086013567ffffffffffffffff8111156123d8576123d7611b1e565b5b6123e488828901611f60565b9150509295509295909350565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061243557607f821691505b602082108103612448576124476123f1565b5b50919050565b5f6040820190506124615f830185612290565b61246e6020830184612290565b9392505050565b7f41646472657373206e6f7420617070726f76656420746f206d696e742e0000005f82015250565b5f6124a9601d83611cfd565b91506124b482612475565b602082019050919050565b5f6020820190508181035f8301526124d68161249d565b9050919050565b5f6040820190506124f05f830185611bed565b6124fd6020830184611bed565b9392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f6080820190506125445f830187612290565b6125516020830186611bed565b61255e6040830185611bed565b61256b6060830184611bed565b95945050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6125ab82611b7c565b91506125b683611b7c565b92508282019050808211156125ce576125cd612574565b5b92915050565b5f6040820190508181035f8301526125ec81856121e9565b9050818103602083015261260081846121e9565b90509392505050565b5f81519050919050565b5f82825260208201905092915050565b5f61262d82612609565b6126378185612613565b9350612647818560208601611d0d565b61265081611d35565b840191505092915050565b5f60a08201905061266e5f830188612290565b61267b6020830187612290565b6126886040830186611bed565b6126956060830185611bed565b81810360808301526126a78184612623565b90509695505050505050565b5f815190506126c181611c40565b92915050565b5f602082840312156126dc576126db611b1a565b5b5f6126e9848285016126b3565b91505092915050565b5f60a0820190506127055f830188612290565b6127126020830187612290565b818103604083015261272481866121e9565b9050818103606083015261273881856121e9565b9050818103608083015261274c8184612623565b9050969550505050505056fea26469706673582212203ebbd72b4e9fd461decbce4c21222afed166cbb4dde34105b36fabf8504e4d4c64736f6c63430008160033697066733a2f2f516d523379755347585476764c5a75546e324a4176735575447861507463526541674854747641743355726e6f662f7b69647d2e6a736f6e000000000000000000000000bcceef0d47a77a1e332fd387b2455370c4f3eeee
Deployed Bytecode
0x608060405234801561000f575f80fd5b5060043610610155575f3560e01c8063715018a6116100c1578063d562e2041161007a578063d562e2041461039d578063e30c3978146103bb578063e3e55f08146103d9578063e985e9c5146103f7578063f242432a14610427578063f2fde38b1461044357610155565b8063715018a61461031557806379ba50971461031f5780637dd2a0ee146103295780638da5cb5b146103475780639dc29fac14610365578063a22cb4651461038157610155565b80633e4bee38116101135780633e4bee381461024157806340c10f191461025f5780634e1273f41461027b5780635a39a05e146102ab5780635b2725ed146102db5780635d6f4fa0146102f957610155565b8062fdd58e1461015957806301ffc9a7146101895780630e89341c146101b957806313dc989f146101e957806323c6dcf1146102075780632eb2c2d614610225575b5f80fd5b610173600480360381019061016e9190611baf565b61045f565b6040516101809190611bfc565b60405180910390f35b6101a3600480360381019061019e9190611c6a565b6104b4565b6040516101b09190611caf565b60405180910390f35b6101d360048036038101906101ce9190611cc8565b610595565b6040516101e09190611d7d565b60405180910390f35b6101f1610627565b6040516101fe9190611bfc565b60405180910390f35b61020f61062c565b60405161021c9190611bfc565b60405180910390f35b61023f600480360381019061023a9190611f8d565b610631565b005b6102496106d8565b6040516102569190611bfc565b60405180910390f35b61027960048036038101906102749190611baf565b6106dc565b005b61029560048036038101906102909190612118565b610784565b6040516102a29190612245565b60405180910390f35b6102c560048036038101906102c09190612265565b61088b565b6040516102d29190611caf565b60405180910390f35b6102e36108a8565b6040516102f09190611bfc565b60405180910390f35b610313600480360381019061030e9190612265565b6108ad565b005b61031d61090d565b005b610327610920565b005b6103316109ae565b60405161033e9190611bfc565b60405180910390f35b61034f6109b3565b60405161035c919061229f565b60405180910390f35b61037f600480360381019061037a9190611baf565b6109db565b005b61039b600480360381019061039691906122e2565b610a74565b005b6103a5610a8a565b6040516103b29190611bfc565b60405180910390f35b6103c3610a8f565b6040516103d0919061229f565b60405180910390f35b6103e1610ab7565b6040516103ee9190611bfc565b60405180910390f35b610411600480360381019061040c9190612320565b610abc565b60405161041e9190611caf565b60405180910390f35b610441600480360381019061043c919061235e565b610b4a565b005b61045d60048036038101906104589190612265565b610bf1565b005b5f805f8381526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905092915050565b5f7fd9b67a26000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061057e57507f0e89341c000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061058e575061058d82610c9d565b5b9050919050565b6060600280546105a49061241e565b80601f01602080910402602001604051908101604052809291908181526020018280546105d09061241e565b801561061b5780601f106105f25761010080835404028352916020019161061b565b820191905f5260205f20905b8154815290600101906020018083116105fe57829003601f168201915b50505050509050919050565b600381565b600681565b5f61063a610d06565b90508073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161415801561067f575061067d8682610abc565b155b156106c35780866040517fe237d9220000000000000000000000000000000000000000000000000000000081526004016106ba92919061244e565b60405180910390fd5b6106d08686868686610d0d565b505050505050565b5f81565b60055f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16610765576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161075c906124bf565b60405180910390fd5b6107808282600160405180602001604052805f815250610e01565b5050565b606081518351146107d057815183516040517f5b0599910000000000000000000000000000000000000000000000000000000081526004016107c79291906124dd565b60405180910390fd5b5f835167ffffffffffffffff8111156107ec576107eb611da1565b5b60405190808252806020026020018201604052801561081a5781602001602082028036833780820191505090505b5090505f5b84518110156108805761085661083e8287610e9690919063ffffffff16565b6108518387610ea990919063ffffffff16565b61045f565b82828151811061086957610868612504565b5b60200260200101818152505080600101905061081f565b508091505092915050565b6005602052805f5260405f205f915054906101000a900460ff1681565b600481565b6108b5610ebc565b600160055f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff02191690831515021790555050565b610915610ebc565b61091e5f610f43565b565b5f610929610d06565b90508073ffffffffffffffffffffffffffffffffffffffff1661094a610a8f565b73ffffffffffffffffffffffffffffffffffffffff16146109a257806040517f118cdaa7000000000000000000000000000000000000000000000000000000008152600401610999919061229f565b60405180910390fd5b6109ab81610f43565b50565b600581565b5f60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60055f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16610a64576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a5b906124bf565b60405180910390fd5b610a7082826001610f73565b5050565b610a86610a7f610d06565b8383611015565b5050565b600281565b5f60045f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600181565b5f60015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16905092915050565b5f610b53610d06565b90508073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614158015610b985750610b968682610abc565b155b15610bdc5780866040517fe237d922000000000000000000000000000000000000000000000000000000008152600401610bd392919061244e565b60405180910390fd5b610be9868686868661117e565b505050505050565b610bf9610ebc565b8060045f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16610c586109b3565b73ffffffffffffffffffffffffffffffffffffffff167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b5f33905090565b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603610d7d575f6040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401610d74919061229f565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1603610ded575f6040517f01a83514000000000000000000000000000000000000000000000000000000008152600401610de4919061229f565b60405180910390fd5b610dfa8585858585611284565b5050505050565b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603610e71575f6040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401610e68919061229f565b60405180910390fd5b5f80610e7d8585611330565b91509150610e8e5f87848487611284565b505050505050565b5f60208202602084010151905092915050565b5f60208202602084010151905092915050565b610ec4610d06565b73ffffffffffffffffffffffffffffffffffffffff16610ee26109b3565b73ffffffffffffffffffffffffffffffffffffffff1614610f4157610f05610d06565b6040517f118cdaa7000000000000000000000000000000000000000000000000000000008152600401610f38919061229f565b60405180910390fd5b565b60045f6101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055610f7081611360565b50565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610fe3575f6040517f01a83514000000000000000000000000000000000000000000000000000000008152600401610fda919061229f565b60405180910390fd5b5f80610fef8484611330565b9150915061100e855f848460405180602001604052805f815250611284565b5050505050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611085575f6040517fced3e10000000000000000000000000000000000000000000000000000000000815260040161107c919061229f565b60405180910390fd5b8060015f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516111719190611caf565b60405180910390a3505050565b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16036111ee575f6040517f57f447ce0000000000000000000000000000000000000000000000000000000081526004016111e5919061229f565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff160361125e575f6040517f01a83514000000000000000000000000000000000000000000000000000000008152600401611255919061229f565b60405180910390fd5b5f8061126a8585611330565b9150915061127b8787848487611284565b50505050505050565b61129085858585611423565b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614611329575f6112cc610d06565b90506001845103611318575f6112eb5f86610ea990919063ffffffff16565b90505f6113015f86610ea990919063ffffffff16565b90506113118389898585896117b3565b5050611327565b611326818787878787611962565b5b505b5050505050565b60608060405191506001825283602083015260408201905060018152826020820152604081016040529250929050565b5f60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b805182511461146d57815181516040517f5b0599910000000000000000000000000000000000000000000000000000000081526004016114649291906124dd565b60405180910390fd5b5f611476610d06565b90505f5b8351811015611672575f6114978286610ea990919063ffffffff16565b90505f6114ad8386610ea990919063ffffffff16565b90505f73ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff16146115d0575f805f8481526020019081526020015f205f8a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205490508181101561157c57888183856040517f03dee4c50000000000000000000000000000000000000000000000000000000081526004016115739493929190612531565b60405180910390fd5b8181035f808581526020019081526020015f205f8b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550505b5f73ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff161461166557805f808481526020019081526020015f205f8973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825461165d91906125a1565b925050819055505b505080600101905061147a565b50600183510361172d575f6116905f85610ea990919063ffffffff16565b90505f6116a65f85610ea990919063ffffffff16565b90508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62858560405161171e9291906124dd565b60405180910390a450506117ac565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb86866040516117a39291906125d4565b60405180910390a45b5050505050565b5f8473ffffffffffffffffffffffffffffffffffffffff163b111561195a578373ffffffffffffffffffffffffffffffffffffffff1663f23a6e6187878686866040518663ffffffff1660e01b815260040161181395949392919061265b565b6020604051808303815f875af192505050801561184e57506040513d601f19601f8201168201806040525081019061184b91906126c7565b60015b6118cf573d805f811461187c576040519150601f19603f3d011682016040523d82523d5f602084013e611881565b606091505b505f8151036118c757846040517f57f447ce0000000000000000000000000000000000000000000000000000000081526004016118be919061229f565b60405180910390fd5b805181602001fd5b63f23a6e6160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161461195857846040517f57f447ce00000000000000000000000000000000000000000000000000000000815260040161194f919061229f565b60405180910390fd5b505b505050505050565b5f8473ffffffffffffffffffffffffffffffffffffffff163b1115611b09578373ffffffffffffffffffffffffffffffffffffffff1663bc197c8187878686866040518663ffffffff1660e01b81526004016119c29594939291906126f2565b6020604051808303815f875af19250505080156119fd57506040513d601f19601f820116820180604052508101906119fa91906126c7565b60015b611a7e573d805f8114611a2b576040519150601f19603f3d011682016040523d82523d5f602084013e611a30565b606091505b505f815103611a7657846040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401611a6d919061229f565b60405180910390fd5b805181602001fd5b63bc197c8160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614611b0757846040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401611afe919061229f565b60405180910390fd5b505b505050505050565b5f604051905090565b5f80fd5b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f611b4b82611b22565b9050919050565b611b5b81611b41565b8114611b65575f80fd5b50565b5f81359050611b7681611b52565b92915050565b5f819050919050565b611b8e81611b7c565b8114611b98575f80fd5b50565b5f81359050611ba981611b85565b92915050565b5f8060408385031215611bc557611bc4611b1a565b5b5f611bd285828601611b68565b9250506020611be385828601611b9b565b9150509250929050565b611bf681611b7c565b82525050565b5f602082019050611c0f5f830184611bed565b92915050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b611c4981611c15565b8114611c53575f80fd5b50565b5f81359050611c6481611c40565b92915050565b5f60208284031215611c7f57611c7e611b1a565b5b5f611c8c84828501611c56565b91505092915050565b5f8115159050919050565b611ca981611c95565b82525050565b5f602082019050611cc25f830184611ca0565b92915050565b5f60208284031215611cdd57611cdc611b1a565b5b5f611cea84828501611b9b565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015611d2a578082015181840152602081019050611d0f565b5f8484015250505050565b5f601f19601f8301169050919050565b5f611d4f82611cf3565b611d598185611cfd565b9350611d69818560208601611d0d565b611d7281611d35565b840191505092915050565b5f6020820190508181035f830152611d958184611d45565b905092915050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b611dd782611d35565b810181811067ffffffffffffffff82111715611df657611df5611da1565b5b80604052505050565b5f611e08611b11565b9050611e148282611dce565b919050565b5f67ffffffffffffffff821115611e3357611e32611da1565b5b602082029050602081019050919050565b5f80fd5b5f611e5a611e5584611e19565b611dff565b90508083825260208201905060208402830185811115611e7d57611e7c611e44565b5b835b81811015611ea65780611e928882611b9b565b845260208401935050602081019050611e7f565b5050509392505050565b5f82601f830112611ec457611ec3611d9d565b5b8135611ed4848260208601611e48565b91505092915050565b5f80fd5b5f67ffffffffffffffff821115611efb57611efa611da1565b5b611f0482611d35565b9050602081019050919050565b828183375f83830152505050565b5f611f31611f2c84611ee1565b611dff565b905082815260208101848484011115611f4d57611f4c611edd565b5b611f58848285611f11565b509392505050565b5f82601f830112611f7457611f73611d9d565b5b8135611f84848260208601611f1f565b91505092915050565b5f805f805f60a08688031215611fa657611fa5611b1a565b5b5f611fb388828901611b68565b9550506020611fc488828901611b68565b945050604086013567ffffffffffffffff811115611fe557611fe4611b1e565b5b611ff188828901611eb0565b935050606086013567ffffffffffffffff81111561201257612011611b1e565b5b61201e88828901611eb0565b925050608086013567ffffffffffffffff81111561203f5761203e611b1e565b5b61204b88828901611f60565b9150509295509295909350565b5f67ffffffffffffffff82111561207257612071611da1565b5b602082029050602081019050919050565b5f61209561209084612058565b611dff565b905080838252602082019050602084028301858111156120b8576120b7611e44565b5b835b818110156120e157806120cd8882611b68565b8452602084019350506020810190506120ba565b5050509392505050565b5f82601f8301126120ff576120fe611d9d565b5b813561210f848260208601612083565b91505092915050565b5f806040838503121561212e5761212d611b1a565b5b5f83013567ffffffffffffffff81111561214b5761214a611b1e565b5b612157858286016120eb565b925050602083013567ffffffffffffffff81111561217857612177611b1e565b5b61218485828601611eb0565b9150509250929050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b6121c081611b7c565b82525050565b5f6121d183836121b7565b60208301905092915050565b5f602082019050919050565b5f6121f38261218e565b6121fd8185612198565b9350612208836121a8565b805f5b8381101561223857815161221f88826121c6565b975061222a836121dd565b92505060018101905061220b565b5085935050505092915050565b5f6020820190508181035f83015261225d81846121e9565b905092915050565b5f6020828403121561227a57612279611b1a565b5b5f61228784828501611b68565b91505092915050565b61229981611b41565b82525050565b5f6020820190506122b25f830184612290565b92915050565b6122c181611c95565b81146122cb575f80fd5b50565b5f813590506122dc816122b8565b92915050565b5f80604083850312156122f8576122f7611b1a565b5b5f61230585828601611b68565b9250506020612316858286016122ce565b9150509250929050565b5f806040838503121561233657612335611b1a565b5b5f61234385828601611b68565b925050602061235485828601611b68565b9150509250929050565b5f805f805f60a0868803121561237757612376611b1a565b5b5f61238488828901611b68565b955050602061239588828901611b68565b94505060406123a688828901611b9b565b93505060606123b788828901611b9b565b925050608086013567ffffffffffffffff8111156123d8576123d7611b1e565b5b6123e488828901611f60565b9150509295509295909350565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061243557607f821691505b602082108103612448576124476123f1565b5b50919050565b5f6040820190506124615f830185612290565b61246e6020830184612290565b9392505050565b7f41646472657373206e6f7420617070726f76656420746f206d696e742e0000005f82015250565b5f6124a9601d83611cfd565b91506124b482612475565b602082019050919050565b5f6020820190508181035f8301526124d68161249d565b9050919050565b5f6040820190506124f05f830185611bed565b6124fd6020830184611bed565b9392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f6080820190506125445f830187612290565b6125516020830186611bed565b61255e6040830185611bed565b61256b6060830184611bed565b95945050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6125ab82611b7c565b91506125b683611b7c565b92508282019050808211156125ce576125cd612574565b5b92915050565b5f6040820190508181035f8301526125ec81856121e9565b9050818103602083015261260081846121e9565b90509392505050565b5f81519050919050565b5f82825260208201905092915050565b5f61262d82612609565b6126378185612613565b9350612647818560208601611d0d565b61265081611d35565b840191505092915050565b5f60a08201905061266e5f830188612290565b61267b6020830187612290565b6126886040830186611bed565b6126956060830185611bed565b81810360808301526126a78184612623565b90509695505050505050565b5f815190506126c181611c40565b92915050565b5f602082840312156126dc576126db611b1a565b5b5f6126e9848285016126b3565b91505092915050565b5f60a0820190506127055f830188612290565b6127126020830187612290565b818103604083015261272481866121e9565b9050818103606083015261273881856121e9565b9050818103608083015261274c8184612623565b9050969550505050505056fea26469706673582212203ebbd72b4e9fd461decbce4c21222afed166cbb4dde34105b36fabf8504e4d4c64736f6c63430008160033
[ 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.