ERC-1155
Overview
Max Total Supply
1,000
Holders
269
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
Emotons
Compiler Version
v0.8.14+commit.80d49f37
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "./MerkleProofOpt.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@chainlink/contracts/src/v0.8/interfaces/VRFCoordinatorV2Interface.sol"; import "@chainlink/contracts/src/v0.8/VRFConsumerBaseV2.sol"; contract Emotons is ERC1155, Ownable, VRFConsumerBaseV2 { using Strings for uint256; uint8 _phase; uint256 _supply = 10000; uint256 _currentTokenId; uint256 _provenance; uint256 public _price = 0.03 ether; bytes32 public _root; string public _ipfsGateway = "https://ipfs.infura.io/ipfs/"; string public _ipfsCid; mapping(uint256 => uint256) public _vouchersTracker; bytes32 public _secretLockKey; uint256 public _secretToken; string public _secretIpfsCid; uint64 _subscriptionId; VRFCoordinatorV2Interface _COORDINATOR; address _vrfCoordinator = 0x271682DEB8C4E0901D1a1550aD2e64D568E69909; bytes32 _keyHash = 0x8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef; uint256[] public _randomWords; uint256 public _requestId; constructor(uint64 subscriptionId) ERC1155("") VRFConsumerBaseV2(_vrfCoordinator) { _COORDINATOR = VRFCoordinatorV2Interface(_vrfCoordinator); _subscriptionId = subscriptionId; } function setIpfsGateway(string memory ipfsGateway) public onlyOwner { _ipfsGateway = ipfsGateway; } function setIpfsCid(string memory ipfsCid) public onlyOwner { _ipfsCid = ipfsCid; } function setSecretLockKey(bytes32 secretLockKey, uint256 secretToken) external onlyOwner { _secretLockKey = secretLockKey; _secretToken = secretToken; } function setPrice(uint256 price) external onlyOwner { _price = price; } function setRoot(bytes32 root) external onlyOwner { _root = root; } function setCurrentPhase(uint8 phase) external onlyOwner { _phase = phase; } function finalize( uint256 supply, uint256 provenance, uint32 gasLimit ) external onlyOwner { _supply = supply; _provenance = provenance; if (gasLimit > 0) { _requestId = _COORDINATOR.requestRandomWords( _keyHash, _subscriptionId, 3, gasLimit, 1 ); } } function withdraw(address to) external onlyOwner { (bool success, ) = to.call{value: address(this).balance}(""); require(success, "Transfer failed"); } function uri(uint256 tokenId) public view virtual override returns (string memory) { if (tokenId == _secretToken) { return string(abi.encodePacked(_ipfsGateway, _secretIpfsCid)); } return string( abi.encodePacked( _ipfsGateway, _ipfsCid, "/", tokenId.toString(), ".json" ) ); } function mintPrivate( address[] calldata recipients, uint256[] calldata amounts ) external onlyOwner { uint256 recipientLength = recipients.length; require(amounts.length == recipientLength, "Lengths mismatch"); for (uint256 i = 0; i < recipientLength; ) { require( _currentTokenId + amounts[i] <= _supply, "Amount exceeds supply" ); _mintAmount(amounts[i], recipients[i]); unchecked { i++; } } } function mintPreSale(bytes32 leaf, bytes32[] calldata proof) public payable { require(_phase == 1, "Pre-sale not open"); (uint8 paid, uint8 free, uint16 index, address account) = _unpackleaf( leaf ); uint256 amount = paid + free; require( MerkleProof.verify(proof, _root, keccak256(abi.encodePacked(leaf))), "Invalid proof" ); require(amount > 0, "Invalid leaf"); require(_currentTokenId + amount <= _supply, "Max supply reached"); require(account == msg.sender, "You are not the owner"); uint256 cluster; uint256 bitMask; uint256 voucherBitmap; unchecked { cluster = index >> 8; bitMask = 1 << (index % 256); voucherBitmap = _vouchersTracker[cluster]; require(voucherBitmap & bitMask == 0, "Already claimed"); require(_price * paid <= msg.value, "Not enough ether"); } _vouchersTracker[cluster] = voucherBitmap | bitMask; if (amount == 1) { _mint(account, ++_currentTokenId, 1, ""); } else { _mintAmount(amount, msg.sender); } } function isClaimed(uint256 index) public view returns (bool) { uint256 cluster = index >> 8; uint256 bitMask = 1 << (index % 256); uint256 voucherBitmap = _vouchersTracker[cluster]; return voucherBitmap & bitMask != 0; } function mintSale( bytes32 leaf, bytes32[] calldata proof, uint256 amount ) public payable { require(_phase == 2, "Sale not open"); require(_currentTokenId + amount <= _supply, "Amount exceeds supply"); require( MerkleProof.verify(proof, _root, keccak256(abi.encodePacked(leaf))), "Invalid proof" ); (uint8 paid, uint8 free, , address account) = _unpackleaf(leaf); require(account == msg.sender, "You are not the owner"); require(paid + free == 0, "Invalid leaf"); require(_price * amount <= msg.value, "Not enough ether"); _mintAmount(amount, msg.sender); } function mintPublic(uint256 amount) public payable { require(_phase == 3, "Public sale not open"); require(_currentTokenId + amount <= _supply, "Amount exceeds supply"); require(_price * amount <= msg.value, "Not enough ether"); _mintAmount(amount, msg.sender); } function mintPlaceholder(uint256 placeholderId) external onlyOwner { require(placeholderId > _supply, "Conflict with supply"); _mint(msg.sender, placeholderId, 1, ""); } function burnPlaceholder(uint256 placeholderId) external onlyOwner { require(placeholderId > _supply, "Conflict with supply"); _burn(msg.sender, placeholderId, 1); } function _mintAmount(uint256 amount, address account) internal { uint256[] memory ids = new uint256[](amount); uint256[] memory amounts = new uint256[](amount); uint256 newCurrentTokenId = _currentTokenId; for (uint256 i = 0; i < amount; ) { unchecked { ids[i] = ++newCurrentTokenId; amounts[i] = 1; ++i; } } _currentTokenId = newCurrentTokenId; _mintBatch(account, ids, amounts, ""); } function _unpackleaf(bytes32 leaf) internal pure returns ( uint8 paid, uint8 free, uint16 index, address account ) { paid = uint8(uint256(leaf) >> 248); free = uint8(uint256(leaf) >> 240); index = uint16(uint256(leaf) >> 224); account = address(uint160(uint256(leaf))); } function mintSecret(string calldata ipfsCid) public { require( _secretLockKey == keccak256(abi.encodePacked(ipfsCid)), "Wrong key" ); _mint(msg.sender, _secretToken, 1, ""); _secretIpfsCid = ipfsCid; _secretLockKey = 0; } // Randomness function fulfillRandomWords( uint256, /* requestId */ uint256[] memory randomWords ) internal override { _randomWords = randomWords; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Trees proofs. * * The proofs can be generated using the JavaScript library * https://github.com/miguelmota/merkletreejs[merkletreejs]. * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled. * * See `test/utils/cryptography/MerkleProof.test.js` for some examples. * * WARNING: You should avoid using leaf values that are 64 bytes long prior to * hashing, or use a hash function other than keccak256 for hashing leaves. * This is because the concatenation of a sorted pair of internal nodes in * the merkle tree could be reinterpreted as a leaf value. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] calldata proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { bytes32 computedHash = leaf; uint256 length = proof.length; for (uint256 i = 0; i < length; ) { bytes32 proofElement = proof[i]; if (computedHash <= proofElement) { // Hash(current computed hash + current element of the proof) assembly { mstore(0x00, computedHash) mstore(0x20, proofElement) computedHash := keccak256(0x00, 0x40) } } else { // Hash(current element of the proof + current computed hash) assembly { mstore(0x00, proofElement) mstore(0x20, computedHash) computedHash := keccak256(0x00, 0x40) } } unchecked { ++i; } } return computedHash == root; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC1155/ERC1155.sol) pragma solidity ^0.8.0; import "./IERC1155.sol"; import "./IERC1155Receiver.sol"; import "./extensions/IERC1155MetadataURI.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of the basic standard multi-token. * See https://eips.ethereum.org/EIPS/eip-1155 * Originally based on code by Enjin: https://github.com/enjin/erc-1155 * * _Available since v3.1._ */ contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI { using Address for address; // Mapping from token ID to account balances mapping(uint256 => mapping(address => uint256)) private _balances; // Mapping from account to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json string private _uri; /** * @dev See {_setURI}. */ constructor(string memory uri_) { _setURI(uri_); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC1155).interfaceId || interfaceId == type(IERC1155MetadataURI).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256) public view virtual override returns (string memory) { return _uri; } /** * @dev See {IERC1155-balanceOf}. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) public view virtual override returns (uint256) { require(account != address(0), "ERC1155: balance query for the zero address"); return _balances[id][account]; } /** * @dev See {IERC1155-balanceOfBatch}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] memory accounts, uint256[] memory ids) public view virtual override returns (uint256[] memory) { require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch"); uint256[] memory batchBalances = new uint256[](accounts.length); for (uint256 i = 0; i < accounts.length; ++i) { batchBalances[i] = balanceOf(accounts[i], ids[i]); } return batchBalances; } /** * @dev See {IERC1155-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC1155-isApprovedForAll}. */ function isApprovedForAll(address account, address operator) public view virtual override returns (bool) { return _operatorApprovals[account][operator]; } /** * @dev See {IERC1155-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: caller is not owner nor approved" ); _safeTransferFrom(from, to, id, amount, data); } /** * @dev See {IERC1155-safeBatchTransferFrom}. */ function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: transfer caller is not owner nor approved" ); _safeBatchTransferFrom(from, to, ids, amounts, data); } /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, from, to, ids, amounts, data); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; emit TransferSingle(operator, from, to, id, amount); _afterTokenTransfer(operator, from, to, ids, amounts, data); _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, to, ids, amounts, data); for (uint256 i = 0; i < ids.length; ++i) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; } emit TransferBatch(operator, from, to, ids, amounts); _afterTokenTransfer(operator, from, to, ids, amounts, data); _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data); } /** * @dev Sets a new URI for all token types, by relying on the token type ID * substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * By this mechanism, any occurrence of the `\{id\}` substring in either the * URI or any of the amounts in the JSON file at said URI will be replaced by * clients with the token type ID. * * For example, the `https://token-cdn-domain/\{id\}.json` URI would be * interpreted by clients as * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json` * for token type ID 0x4cce0. * * See {uri}. * * Because these URIs cannot be meaningfully represented by the {URI} event, * this function emits no events. */ function _setURI(string memory newuri) internal virtual { _uri = newuri; } /** * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mint( address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); _balances[id][to] += amount; emit TransferSingle(operator, address(0), to, id, amount); _afterTokenTransfer(operator, address(0), to, ids, amounts, data); _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _mintBatch( address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); for (uint256 i = 0; i < ids.length; i++) { _balances[ids[i]][to] += amounts[i]; } emit TransferBatch(operator, address(0), to, ids, amounts); _afterTokenTransfer(operator, address(0), to, ids, amounts, data); _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data); } /** * @dev Destroys `amount` tokens of token type `id` from `from` * * Requirements: * * - `from` cannot be the zero address. * - `from` must have at least `amount` tokens of token type `id`. */ function _burn( address from, uint256 id, uint256 amount ) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][from] = fromBalance - amount; } emit TransferSingle(operator, from, address(0), id, amount); _afterTokenTransfer(operator, from, address(0), ids, amounts, ""); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}. * * Requirements: * * - `ids` and `amounts` must have the same length. */ function _burnBatch( address from, uint256[] memory ids, uint256[] memory amounts ) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); for (uint256 i = 0; i < ids.length; i++) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][from] = fromBalance - amount; } } emit TransferBatch(operator, from, address(0), ids, amounts); _afterTokenTransfer(operator, from, address(0), ids, amounts, ""); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC1155: setting approval status for self"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Hook that is called before any token transfer. This includes minting * and burning, as well as batched variants. * * The same hook is called on both single and batched variants. For single * transfers, the length of the `id` and `amount` arrays will be 1. * * Calling conditions (for each `id` and `amount` pair): * * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens * of token type `id` will be transferred to `to`. * - When `from` is zero, `amount` tokens of token type `id` will be minted * for `to`. * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` * will be burned. * - `from` and `to` are never both zero. * - `ids` and `amounts` have the same, non-zero length. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual {} /** * @dev Hook that is called after any token transfer. This includes minting * and burning, as well as batched variants. * * The same hook is called on both single and batched variants. For single * transfers, the length of the `id` and `amount` arrays will be 1. * * Calling conditions (for each `id` and `amount` pair): * * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens * of token type `id` will be transferred to `to`. * - When `from` is zero, `amount` tokens of token type `id` will be minted * for `to`. * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` * will be burned. * - `from` and `to` are never both zero. * - `ids` and `amounts` have the same, non-zero length. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual {} function _doSafeTransferAcceptanceCheck( address operator, address from, address to, uint256 id, uint256 amount, bytes memory data ) private { if (to.isContract()) { try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) { if (response != IERC1155Receiver.onERC1155Received.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non ERC1155Receiver implementer"); } } } function _doSafeBatchTransferAcceptanceCheck( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) private { if (to.isContract()) { try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns ( bytes4 response ) { if (response != IERC1155Receiver.onERC1155BatchReceived.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non ERC1155Receiver implementer"); } } } function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) { uint256[] memory array = new uint256[](1); array[0] = element; return array; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../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. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface VRFCoordinatorV2Interface { /** * @notice Get configuration relevant for making requests * @return minimumRequestConfirmations global min for request confirmations * @return maxGasLimit global max for request gas limit * @return s_provingKeyHashes list of registered key hashes */ function getRequestConfig() external view returns ( uint16, uint32, bytes32[] memory ); /** * @notice Request a set of random words. * @param keyHash - Corresponds to a particular oracle job which uses * that key for generating the VRF proof. Different keyHash's have different gas price * ceilings, so you can select a specific one to bound your maximum per request cost. * @param subId - The ID of the VRF subscription. Must be funded * with the minimum subscription balance required for the selected keyHash. * @param minimumRequestConfirmations - How many blocks you'd like the * oracle to wait before responding to the request. See SECURITY CONSIDERATIONS * for why you may want to request more. The acceptable range is * [minimumRequestBlockConfirmations, 200]. * @param callbackGasLimit - How much gas you'd like to receive in your * fulfillRandomWords callback. Note that gasleft() inside fulfillRandomWords * may be slightly less than this amount because of gas used calling the function * (argument decoding etc.), so you may need to request slightly more than you expect * to have inside fulfillRandomWords. The acceptable range is * [0, maxGasLimit] * @param numWords - The number of uint256 random values you'd like to receive * in your fulfillRandomWords callback. Note these numbers are expanded in a * secure way by the VRFCoordinator from a single random value supplied by the oracle. * @return requestId - A unique identifier of the request. Can be used to match * a request to a response in fulfillRandomWords. */ function requestRandomWords( bytes32 keyHash, uint64 subId, uint16 minimumRequestConfirmations, uint32 callbackGasLimit, uint32 numWords ) external returns (uint256 requestId); /** * @notice Create a VRF subscription. * @return subId - A unique subscription id. * @dev You can manage the consumer set dynamically with addConsumer/removeConsumer. * @dev Note to fund the subscription, use transferAndCall. For example * @dev LINKTOKEN.transferAndCall( * @dev address(COORDINATOR), * @dev amount, * @dev abi.encode(subId)); */ function createSubscription() external returns (uint64 subId); /** * @notice Get a VRF subscription. * @param subId - ID of the subscription * @return balance - LINK balance of the subscription in juels. * @return reqCount - number of requests for this subscription, determines fee tier. * @return owner - owner of the subscription. * @return consumers - list of consumer address which are able to use this subscription. */ function getSubscription(uint64 subId) external view returns ( uint96 balance, uint64 reqCount, address owner, address[] memory consumers ); /** * @notice Request subscription owner transfer. * @param subId - ID of the subscription * @param newOwner - proposed new owner of the subscription */ function requestSubscriptionOwnerTransfer(uint64 subId, address newOwner) external; /** * @notice Request subscription owner transfer. * @param subId - ID of the subscription * @dev will revert if original owner of subId has * not requested that msg.sender become the new owner. */ function acceptSubscriptionOwnerTransfer(uint64 subId) external; /** * @notice Add a consumer to a VRF subscription. * @param subId - ID of the subscription * @param consumer - New consumer which can use the subscription */ function addConsumer(uint64 subId, address consumer) external; /** * @notice Remove a consumer from a VRF subscription. * @param subId - ID of the subscription * @param consumer - Consumer to remove from the subscription */ function removeConsumer(uint64 subId, address consumer) external; /** * @notice Cancel a subscription * @param subId - ID of the subscription * @param to - Where to send the remaining LINK to */ function cancelSubscription(uint64 subId, address to) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; /** **************************************************************************** * @notice Interface for contracts using VRF randomness * ***************************************************************************** * @dev PURPOSE * * @dev Reggie the Random Oracle (not his real job) wants to provide randomness * @dev to Vera the verifier in such a way that Vera can be sure he's not * @dev making his output up to suit himself. Reggie provides Vera a public key * @dev to which he knows the secret key. Each time Vera provides a seed to * @dev Reggie, he gives back a value which is computed completely * @dev deterministically from the seed and the secret key. * * @dev Reggie provides a proof by which Vera can verify that the output was * @dev correctly computed once Reggie tells it to her, but without that proof, * @dev the output is indistinguishable to her from a uniform random sample * @dev from the output space. * * @dev The purpose of this contract is to make it easy for unrelated contracts * @dev to talk to Vera the verifier about the work Reggie is doing, to provide * @dev simple access to a verifiable source of randomness. It ensures 2 things: * @dev 1. The fulfillment came from the VRFCoordinator * @dev 2. The consumer contract implements fulfillRandomWords. * ***************************************************************************** * @dev USAGE * * @dev Calling contracts must inherit from VRFConsumerBase, and can * @dev initialize VRFConsumerBase's attributes in their constructor as * @dev shown: * * @dev contract VRFConsumer { * @dev constructor(<other arguments>, address _vrfCoordinator, address _link) * @dev VRFConsumerBase(_vrfCoordinator) public { * @dev <initialization with other arguments goes here> * @dev } * @dev } * * @dev The oracle will have given you an ID for the VRF keypair they have * @dev committed to (let's call it keyHash). Create subscription, fund it * @dev and your consumer contract as a consumer of it (see VRFCoordinatorInterface * @dev subscription management functions). * @dev Call requestRandomWords(keyHash, subId, minimumRequestConfirmations, * @dev callbackGasLimit, numWords), * @dev see (VRFCoordinatorInterface for a description of the arguments). * * @dev Once the VRFCoordinator has received and validated the oracle's response * @dev to your request, it will call your contract's fulfillRandomWords method. * * @dev The randomness argument to fulfillRandomWords is a set of random words * @dev generated from your requestId and the blockHash of the request. * * @dev If your contract could have concurrent requests open, you can use the * @dev requestId returned from requestRandomWords to track which response is associated * @dev with which randomness request. * @dev See "SECURITY CONSIDERATIONS" for principles to keep in mind, * @dev if your contract could have multiple requests in flight simultaneously. * * @dev Colliding `requestId`s are cryptographically impossible as long as seeds * @dev differ. * * ***************************************************************************** * @dev SECURITY CONSIDERATIONS * * @dev A method with the ability to call your fulfillRandomness method directly * @dev could spoof a VRF response with any random value, so it's critical that * @dev it cannot be directly called by anything other than this base contract * @dev (specifically, by the VRFConsumerBase.rawFulfillRandomness method). * * @dev For your users to trust that your contract's random behavior is free * @dev from malicious interference, it's best if you can write it so that all * @dev behaviors implied by a VRF response are executed *during* your * @dev fulfillRandomness method. If your contract must store the response (or * @dev anything derived from it) and use it later, you must ensure that any * @dev user-significant behavior which depends on that stored value cannot be * @dev manipulated by a subsequent VRF request. * * @dev Similarly, both miners and the VRF oracle itself have some influence * @dev over the order in which VRF responses appear on the blockchain, so if * @dev your contract could have multiple VRF requests in flight simultaneously, * @dev you must ensure that the order in which the VRF responses arrive cannot * @dev be used to manipulate your contract's user-significant behavior. * * @dev Since the block hash of the block which contains the requestRandomness * @dev call is mixed into the input to the VRF *last*, a sufficiently powerful * @dev miner could, in principle, fork the blockchain to evict the block * @dev containing the request, forcing the request to be included in a * @dev different block with a different hash, and therefore a different input * @dev to the VRF. However, such an attack would incur a substantial economic * @dev cost. This cost scales with the number of blocks the VRF oracle waits * @dev until it calls responds to a request. It is for this reason that * @dev that you can signal to an oracle you'd like them to wait longer before * @dev responding to the request (however this is not enforced in the contract * @dev and so remains effective only in the case of unmodified oracle software). */ abstract contract VRFConsumerBaseV2 { error OnlyCoordinatorCanFulfill(address have, address want); address private immutable vrfCoordinator; /** * @param _vrfCoordinator address of VRFCoordinator contract */ constructor(address _vrfCoordinator) { vrfCoordinator = _vrfCoordinator; } /** * @notice fulfillRandomness handles the VRF response. Your contract must * @notice implement it. See "SECURITY CONSIDERATIONS" above for important * @notice principles to keep in mind when implementing your fulfillRandomness * @notice method. * * @dev VRFConsumerBaseV2 expects its subcontracts to have a method with this * @dev signature, and will call it once it has verified the proof * @dev associated with the randomness. (It is triggered via a call to * @dev rawFulfillRandomness, below.) * * @param requestId The Id initially returned by requestRandomness * @param randomWords the VRF output expanded to the requested number of words */ function fulfillRandomWords(uint256 requestId, uint256[] memory randomWords) internal virtual; // rawFulfillRandomness is called by VRFCoordinator when it receives a valid VRF // proof. rawFulfillRandomness then calls fulfillRandomness, after validating // the origin of the call function rawFulfillRandomWords(uint256 requestId, uint256[] memory randomWords) external { if (msg.sender != vrfCoordinator) { revert OnlyCoordinatorCanFulfill(msg.sender, vrfCoordinator); } fulfillRandomWords(requestId, randomWords); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */ interface IERC1155 is IERC165 { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes calldata data ) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev _Available since v3.1._ */ interface IERC1155Receiver is IERC165 { /** * @dev Handles the receipt of a single ERC1155 token type. This function is * called at the end of a `safeTransferFrom` after the balance has been updated. * * NOTE: To accept the transfer, this must return * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` * (i.e. 0xf23a6e61, or its own function selector). * * @param operator The address which initiated the transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param id The ID of the token being transferred * @param value The amount of tokens being transferred * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed */ function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external returns (bytes4); /** * @dev Handles the receipt of a multiple ERC1155 token types. This function * is called at the end of a `safeBatchTransferFrom` after the balances have * been updated. * * NOTE: To accept the transfer(s), this must return * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` * (i.e. 0xbc197c81, or its own function selector). * * @param operator The address which initiated the batch transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param ids An array containing ids of each token being transferred (order and length must match values array) * @param values An array containing amounts of each token being transferred (order and length must match ids array) * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed */ function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol) pragma solidity ^0.8.0; import "../IERC1155.sol"; /** * @dev Interface of the optional ERC1155MetadataExtension interface, as defined * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP]. * * _Available since v3.1._ */ interface IERC1155MetadataURI is IERC1155 { /** * @dev Returns the URI for token type `id`. * * If the `\{id\}` substring is present in the URI, it must be replaced by * clients with the actual token type ID. */ function uri(uint256 id) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface 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); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"uint64","name":"subscriptionId","type":"uint64"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"have","type":"address"},{"internalType":"address","name":"want","type":"address"}],"name":"OnlyCoordinatorCanFulfill","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":"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":"_ipfsCid","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_ipfsGateway","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"_randomWords","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_requestId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_root","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_secretIpfsCid","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_secretLockKey","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_secretToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"_vouchersTracker","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"placeholderId","type":"uint256"}],"name":"burnPlaceholder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"supply","type":"uint256"},{"internalType":"uint256","name":"provenance","type":"uint256"},{"internalType":"uint32","name":"gasLimit","type":"uint32"}],"name":"finalize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"isClaimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"placeholderId","type":"uint256"}],"name":"mintPlaceholder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"leaf","type":"bytes32"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"mintPreSale","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address[]","name":"recipients","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"mintPrivate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mintPublic","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"leaf","type":"bytes32"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mintSale","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"string","name":"ipfsCid","type":"string"}],"name":"mintSecret","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"requestId","type":"uint256"},{"internalType":"uint256[]","name":"randomWords","type":"uint256[]"}],"name":"rawFulfillRandomWords","outputs":[],"stateMutability":"nonpayable","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":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"phase","type":"uint8"}],"name":"setCurrentPhase","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"ipfsCid","type":"string"}],"name":"setIpfsCid","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"ipfsGateway","type":"string"}],"name":"setIpfsGateway","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"price","type":"uint256"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"root","type":"bytes32"}],"name":"setRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"secretLockKey","type":"bytes32"},{"internalType":"uint256","name":"secretToken","type":"uint256"}],"name":"setSecretLockKey","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":"tokenId","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
612710600455666a94d74f43000060075560e0604052601c60a08190527f68747470733a2f2f697066732e696e667572612e696f2f697066732f0000000060c0908152620000519160099190620001bd565b50601080546001600160a01b03191673271682deb8c4e0901d1a1550ad2e64d568e699091790557f8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef601155348015620000a957600080fd5b506040516200364638038062003646833981016040819052620000cc9162000263565b6010546040805160208101909152600081526001600160a01b0390911690620000f58162000152565b5062000101336200016b565b6001600160a01b03908116608052601054600f80546001600160e01b0319169190921668010000000000000000026001600160401b031916176001600160401b0392909216919091179055620002d1565b805162000167906002906020840190620001bd565b5050565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620001cb9062000295565b90600052602060002090601f016020900481019282620001ef57600085556200023a565b82601f106200020a57805160ff19168380011785556200023a565b828001600101855582156200023a579182015b828111156200023a5782518255916020019190600101906200021d565b50620002489291506200024c565b5090565b5b808211156200024857600081556001016200024d565b6000602082840312156200027657600080fd5b81516001600160401b03811681146200028e57600080fd5b9392505050565b600181811c90821680620002aa57607f821691505b602082108103620002cb57634e487b7160e01b600052602260045260246000fd5b50919050565b608051613352620002f460003960008181610ae20152610b2401526133526000f3fe6080604052600436106102245760003560e01c80638da5cb5b11610123578063cb303a1e116100ab578063efd0cbf91161006f578063efd0cbf914610659578063f242432a1461066c578063f2fde38b1461068c578063f7b18e41146106ac578063fae08e6f146106cc57600080fd5b8063cb303a1e1461059a578063cd3f2910146105b0578063d16830f1146105d0578063dab5f340146105f0578063e985e9c51461061057600080fd5b8063ab4ca8f6116100f2578063ab4ca8f614610511578063af52cd7114610531578063c197a21014610551578063c61b586214610571578063c73cd11e1461058757600080fd5b80638da5cb5b1461048957806391b7f5ed146104b15780639e34070f146104d1578063a22cb465146104f157600080fd5b8063400a0c2e116101b15780635b4425d5116101755780635b4425d5146104095780635c9ad97a1461041f5780636a9b80d41461043f578063715018a614610454578063851042f21461046957600080fd5b8063400a0c2e1461036757806344e1748a146103875780634e1273f4146103a75780634e4399b4146103d457806351cff8d9146103e957600080fd5b80631fe543e3116101f85780631fe543e3146102ce578063235b6ea1146102ee5780632774aacd146103045780632eb2c2d61461031a5780633a2332391461033a57600080fd5b8062fdd58e1461022957806301ffc9a71461025c5780630dbcb4bc1461028c5780630e89341c146102a1575b600080fd5b34801561023557600080fd5b50610249610244366004612589565b6106e1565b6040519081526020015b60405180910390f35b34801561026857600080fd5b5061027c6102773660046125c9565b610778565b6040519015158152602001610253565b61029f61029a366004612638565b6107ca565b005b3480156102ad57600080fd5b506102c16102bc366004612683565b610a82565b60405161025391906126f8565b3480156102da57600080fd5b5061029f6102e93660046127e1565b610ad7565b3480156102fa57600080fd5b5061024960075481565b34801561031057600080fd5b50610249600d5481565b34801561032657600080fd5b5061029f6103353660046128a4565b610b5f565b34801561034657600080fd5b50610249610355366004612683565b600b6020526000908152604090205481565b34801561037357600080fd5b5061029f61038236600461294d565b610bf6565b34801561039357600080fd5b5061029f6103a236600461298f565b610ce6565b3480156103b357600080fd5b506103c76103c23660046129d7565b610d23565b6040516102539190612ad2565b3480156103e057600080fd5b506102c1610e4c565b3480156103f557600080fd5b5061029f610404366004612ae5565b610eda565b34801561041557600080fd5b5061024960135481565b34801561042b57600080fd5b5061029f61043a366004612683565b610f99565b34801561044b57600080fd5b506102c161101a565b34801561046057600080fd5b5061029f611027565b34801561047557600080fd5b5061029f610484366004612b00565b61105d565b34801561049557600080fd5b506003546040516001600160a01b039091168152602001610253565b3480156104bd57600080fd5b5061029f6104cc366004612683565b611174565b3480156104dd57600080fd5b5061027c6104ec366004612683565b6111a3565b3480156104fd57600080fd5b5061029f61050c366004612b6b565b6111d8565b34801561051d57600080fd5b5061029f61052c366004612683565b6111e3565b34801561053d57600080fd5b5061024961054c366004612683565b611271565b34801561055d57600080fd5b5061029f61056c366004612ba7565b611292565b34801561057d57600080fd5b5061024960085481565b61029f610595366004612bc9565b6112c7565b3480156105a657600080fd5b50610249600c5481565b3480156105bc57600080fd5b5061029f6105cb366004612c1b565b61147d565b3480156105dc57600080fd5b5061029f6105eb36600461298f565b6114c7565b3480156105fc57600080fd5b5061029f61060b366004612683565b611504565b34801561061c57600080fd5b5061027c61062b366004612c3e565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b61029f610667366004612683565b611533565b34801561067857600080fd5b5061029f610687366004612c71565b6115eb565b34801561069857600080fd5b5061029f6106a7366004612ae5565b611672565b3480156106b857600080fd5b5061029f6106c7366004612cd5565b61170a565b3480156106d857600080fd5b506102c16117a3565b60006001600160a01b0383166107525760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b506000908152602081815260408083206001600160a01b03949094168352929052205490565b60006001600160e01b03198216636cdb3d1360e11b14806107a957506001600160e01b031982166303a24d0760e21b145b806107c457506301ffc9a760e01b6001600160e01b03198316145b92915050565b600354600160a01b900460ff1660011461081a5760405162461bcd60e51b815260206004820152601160248201527028393296b9b0b632903737ba1037b832b760791b6044820152606401610749565b60f883901c60f084901c60e085901c8560006108368486612d5c565b60ff16905061087187876008548b60405160200161085691815260200190565b604051602081830303815290604052805190602001206117b0565b6108ad5760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b210383937b7b360991b6044820152606401610749565b600081116108ec5760405162461bcd60e51b815260206004820152600c60248201526b24b73b30b634b2103632b0b360a11b6044820152606401610749565b600454816005546108fd9190612d81565b11156109405760405162461bcd60e51b815260206004820152601260248201527113585e081cdd5c1c1b1e481c995858da195960721b6044820152606401610749565b6001600160a01b03821633146109905760405162461bcd60e51b81526020600482015260156024820152742cb7ba9030b932903737ba103a34329037bbb732b960591b6044820152606401610749565b60ff600884901c81166000818152600b6020526040902054909160019086161b90818116156109f35760405162461bcd60e51b815260206004820152600f60248201526e105b1c9958591e4818db185a5b5959608a1b6044820152606401610749565b348860ff16600754021115610a1a5760405162461bcd60e51b815260040161074990612daf565b6000838152600b6020526040902081831790556001849003610a6b57610a6685600560008154610a4990612dd9565b91905081905560016040518060200160405280600081525061181c565b610a75565b610a7584336118ed565b5050505050505050505050565b6060600d548203610ab8576009600e604051602001610aa2929190612ec5565b6040516020818303038152906040529050919050565b6009600a610ac5846119f7565b604051602001610aa293929190612eda565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610b515760405163073e64fd60e21b81523360048201526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166024820152604401610749565b610b5b8282611aff565b5050565b6001600160a01b038516331480610b7b5750610b7b853361062b565b610be25760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b6064820152608401610749565b610bef8585858585611b12565b5050505050565b6003546001600160a01b03163314610c205760405162461bcd60e51b815260040161074990612f28565b6004839055600682905563ffffffff811615610ce157600f546011546040516305d3b1d360e41b815260048101919091526001600160401b03821660248201526003604482015263ffffffff8316606482015260016084820152680100000000000000009091046001600160a01b031690635d3b1d309060a4016020604051808303816000875af1158015610cb9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cdd9190612f5d565b6013555b505050565b6003546001600160a01b03163314610d105760405162461bcd60e51b815260040161074990612f28565b8051610b5b906009906020840190612426565b60608151835114610d885760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610749565b600083516001600160401b03811115610da357610da361270b565b604051908082528060200260200182016040528015610dcc578160200160208202803683370190505b50905060005b8451811015610e4457610e17858281518110610df057610df0612f76565b6020026020010151858381518110610e0a57610e0a612f76565b60200260200101516106e1565b828281518110610e2957610e29612f76565b6020908102919091010152610e3d81612dd9565b9050610dd2565b509392505050565b60098054610e5990612df2565b80601f0160208091040260200160405190810160405280929190818152602001828054610e8590612df2565b8015610ed25780601f10610ea757610100808354040283529160200191610ed2565b820191906000526020600020905b815481529060010190602001808311610eb557829003601f168201915b505050505081565b6003546001600160a01b03163314610f045760405162461bcd60e51b815260040161074990612f28565b6000816001600160a01b03164760405160006040518083038185875af1925050503d8060008114610f51576040519150601f19603f3d011682016040523d82523d6000602084013e610f56565b606091505b5050905080610b5b5760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b6044820152606401610749565b6003546001600160a01b03163314610fc35760405162461bcd60e51b815260040161074990612f28565b600454811161100b5760405162461bcd60e51b8152602060048201526014602482015273436f6e666c696374207769746820737570706c7960601b6044820152606401610749565b61101733826001611ca6565b50565b600a8054610e5990612df2565b6003546001600160a01b031633146110515760405162461bcd60e51b815260040161074990612f28565b61105b6000611e22565b565b6003546001600160a01b031633146110875760405162461bcd60e51b815260040161074990612f28565b828181146110ca5760405162461bcd60e51b815260206004820152601060248201526f098cadccee8d0e640dad2e6dac2e8c6d60831b6044820152606401610749565b60005b8181101561116c576004548484838181106110ea576110ea612f76565b905060200201356005546110fe9190612d81565b111561111c5760405162461bcd60e51b815260040161074990612f8c565b61116484848381811061113157611131612f76565b9050602002013587878481811061114a5761114a612f76565b905060200201602081019061115f9190612ae5565b6118ed565b6001016110cd565b505050505050565b6003546001600160a01b0316331461119e5760405162461bcd60e51b815260040161074990612f28565b600755565b6000600882901c816111b761010085612fbb565b6000928352600b602052604090922054600190921b90911615159392505050565b610b5b338383611e74565b6003546001600160a01b0316331461120d5760405162461bcd60e51b815260040161074990612f28565b60045481116112555760405162461bcd60e51b8152602060048201526014602482015273436f6e666c696374207769746820737570706c7960601b6044820152606401610749565b611017338260016040518060200160405280600081525061181c565b6012818154811061128157600080fd5b600091825260209091200154905081565b6003546001600160a01b031633146112bc5760405162461bcd60e51b815260040161074990612f28565b600c91909155600d55565b600354600160a01b900460ff166002146113135760405162461bcd60e51b815260206004820152600d60248201526c29b0b632903737ba1037b832b760991b6044820152606401610749565b600454816005546113249190612d81565b11156113425760405162461bcd60e51b815260040161074990612f8c565b61135d83836008548760405160200161085691815260200190565b6113995760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b210383937b7b360991b6044820152606401610749565b60f884901c60f085901c856001600160a01b03811633146113f45760405162461bcd60e51b81526020600482015260156024820152742cb7ba9030b932903737ba103a34329037bbb732b960591b6044820152606401610749565b6113fe8284612d5c565b60ff161561143d5760405162461bcd60e51b815260206004820152600c60248201526b24b73b30b634b2103632b0b360a11b6044820152606401610749565b348460075461144c9190612fcf565b111561146a5760405162461bcd60e51b815260040161074990612daf565b61147484336118ed565b50505050505050565b6003546001600160a01b031633146114a75760405162461bcd60e51b815260040161074990612f28565b6003805460ff909216600160a01b0260ff60a01b19909216919091179055565b6003546001600160a01b031633146114f15760405162461bcd60e51b815260040161074990612f28565b8051610b5b90600a906020840190612426565b6003546001600160a01b0316331461152e5760405162461bcd60e51b815260040161074990612f28565b600855565b60038054600160a01b900460ff16146115855760405162461bcd60e51b8152602060048201526014602482015273283ab13634b19039b0b632903737ba1037b832b760611b6044820152606401610749565b600454816005546115969190612d81565b11156115b45760405162461bcd60e51b815260040161074990612f8c565b34816007546115c39190612fcf565b11156115e15760405162461bcd60e51b815260040161074990612daf565b61101781336118ed565b6001600160a01b0385163314806116075750611607853361062b565b6116655760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b6064820152608401610749565b610bef8585858585611f54565b6003546001600160a01b0316331461169c5760405162461bcd60e51b815260040161074990612f28565b6001600160a01b0381166117015760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610749565b61101781611e22565b818160405160200161171d929190612fee565b60405160208183030381529060405280519060200120600c541461176f5760405162461bcd60e51b815260206004820152600960248201526857726f6e67206b657960b81b6044820152606401610749565b61178d33600d5460016040518060200160405280600081525061181c565b611799600e83836124aa565b50506000600c5550565b600e8054610e5990612df2565b60008184825b8181101561180f5760008888838181106117d2576117d2612f76565b9050602002013590508084116117f657836000528060205260406000209350611806565b8060005283602052604060002093505b506001016117b6565b5050909214949350505050565b6001600160a01b0384166118425760405162461bcd60e51b815260040161074990612ffe565b33600061184e8561207e565b9050600061185b8561207e565b90506000868152602081815260408083206001600160a01b038b1684529091528120805487929061188d908490612d81565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4611474836000898989896120c9565b6000826001600160401b038111156119075761190761270b565b604051908082528060200260200182016040528015611930578160200160208202803683370190505b5090506000836001600160401b0381111561194d5761194d61270b565b604051908082528060200260200182016040528015611976578160200160208202803683370190505b5060055490915060005b858110156119d457816001019150818482815181106119a1576119a1612f76565b60200260200101818152505060018382815181106119c1576119c1612f76565b6020908102919091010152600101611980565b5080600581905550610bef84848460405180602001604052806000815250612224565b606081600003611a1e5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611a485780611a3281612dd9565b9150611a419050600a8361303f565b9150611a22565b6000816001600160401b03811115611a6257611a6261270b565b6040519080825280601f01601f191660200182016040528015611a8c576020820181803683370190505b5090505b8415611af757611aa1600183613053565b9150611aae600a86612fbb565b611ab9906030612d81565b60f81b818381518110611ace57611ace612f76565b60200101906001600160f81b031916908160001a905350611af0600a8661303f565b9450611a90565b949350505050565b8051610ce190601290602084019061251e565b8151835114611b335760405162461bcd60e51b81526004016107499061306a565b6001600160a01b038416611b595760405162461bcd60e51b8152600401610749906130b2565b3360005b8451811015611c40576000858281518110611b7a57611b7a612f76565b602002602001015190506000858381518110611b9857611b98612f76565b602090810291909101810151600084815280835260408082206001600160a01b038e168352909352919091205490915081811015611be85760405162461bcd60e51b8152600401610749906130f7565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290611c25908490612d81565b9250508190555050505080611c3990612dd9565b9050611b5d565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051611c90929190613141565b60405180910390a461116c81878787878761236b565b6001600160a01b038316611d085760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b6064820152608401610749565b336000611d148461207e565b90506000611d218461207e565b60408051602080820183526000918290528882528181528282206001600160a01b038b1683529052205490915084811015611daa5760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b6064820152608401610749565b6000868152602081815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a90529092908816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4604080516020810190915260009052611474565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b031603611ee75760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610749565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b038416611f7a5760405162461bcd60e51b8152600401610749906130b2565b336000611f868561207e565b90506000611f938561207e565b90506000868152602081815260408083206001600160a01b038c16845290915290205485811015611fd65760405162461bcd60e51b8152600401610749906130f7565b6000878152602081815260408083206001600160a01b038d8116855292528083208985039055908a16825281208054889290612013908490612d81565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4612073848a8a8a8a8a6120c9565b505050505050505050565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106120b8576120b8612f76565b602090810291909101015292915050565b6001600160a01b0384163b1561116c5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e619061210d908990899088908890889060040161316f565b6020604051808303816000875af1925050508015612148575060408051601f3d908101601f19168201909252612145918101906131b4565b60015b6121f4576121546131d1565b806308c379a00361218d57506121686131ed565b80612173575061218f565b8060405162461bcd60e51b815260040161074991906126f8565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610749565b6001600160e01b0319811663f23a6e6160e01b146114745760405162461bcd60e51b815260040161074990613276565b6001600160a01b03841661224a5760405162461bcd60e51b815260040161074990612ffe565b815183511461226b5760405162461bcd60e51b81526004016107499061306a565b3360005b84518110156123075783818151811061228a5761228a612f76565b60200260200101516000808784815181106122a7576122a7612f76565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b0316815260200190815260200160002060008282546122ef9190612d81565b909155508190506122ff81612dd9565b91505061226f565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051612358929190613141565b60405180910390a4610bef816000878787875b6001600160a01b0384163b1561116c5760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906123af90899089908890889088906004016132be565b6020604051808303816000875af19250505080156123ea575060408051601f3d908101601f191682019092526123e7918101906131b4565b60015b6123f6576121546131d1565b6001600160e01b0319811663bc197c8160e01b146114745760405162461bcd60e51b815260040161074990613276565b82805461243290612df2565b90600052602060002090601f016020900481019282612454576000855561249a565b82601f1061246d57805160ff191683800117855561249a565b8280016001018555821561249a579182015b8281111561249a57825182559160200191906001019061247f565b506124a6929150612558565b5090565b8280546124b690612df2565b90600052602060002090601f0160209004810192826124d8576000855561249a565b82601f106124f15782800160ff1982351617855561249a565b8280016001018555821561249a579182015b8281111561249a578235825591602001919060010190612503565b82805482825590600052602060002090810192821561249a579160200282018281111561249a57825182559160200191906001019061247f565b5b808211156124a65760008155600101612559565b80356001600160a01b038116811461258457600080fd5b919050565b6000806040838503121561259c57600080fd5b6125a58361256d565b946020939093013593505050565b6001600160e01b03198116811461101757600080fd5b6000602082840312156125db57600080fd5b81356125e6816125b3565b9392505050565b60008083601f8401126125ff57600080fd5b5081356001600160401b0381111561261657600080fd5b6020830191508360208260051b850101111561263157600080fd5b9250929050565b60008060006040848603121561264d57600080fd5b8335925060208401356001600160401b0381111561266a57600080fd5b612676868287016125ed565b9497909650939450505050565b60006020828403121561269557600080fd5b5035919050565b60005b838110156126b757818101518382015260200161269f565b838111156126c6576000848401525b50505050565b600081518084526126e481602086016020860161269c565b601f01601f19169290920160200192915050565b6020815260006125e660208301846126cc565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b03811182821017156127465761274661270b565b6040525050565b60006001600160401b038211156127665761276661270b565b5060051b60200190565b600082601f83011261278157600080fd5b8135602061278e8261274d565b60405161279b8282612721565b83815260059390931b85018201928281019150868411156127bb57600080fd5b8286015b848110156127d657803583529183019183016127bf565b509695505050505050565b600080604083850312156127f457600080fd5b8235915060208301356001600160401b0381111561281157600080fd5b61281d85828601612770565b9150509250929050565b60006001600160401b038311156128405761284061270b565b604051612857601f8501601f191660200182612721565b80915083815284848401111561286c57600080fd5b83836020830137600060208583010152509392505050565b600082601f83011261289557600080fd5b6125e683833560208501612827565b600080600080600060a086880312156128bc57600080fd5b6128c58661256d565b94506128d36020870161256d565b935060408601356001600160401b03808211156128ef57600080fd5b6128fb89838a01612770565b9450606088013591508082111561291157600080fd5b61291d89838a01612770565b9350608088013591508082111561293357600080fd5b5061294088828901612884565b9150509295509295909350565b60008060006060848603121561296257600080fd5b8335925060208401359150604084013563ffffffff8116811461298457600080fd5b809150509250925092565b6000602082840312156129a157600080fd5b81356001600160401b038111156129b757600080fd5b8201601f810184136129c857600080fd5b611af784823560208401612827565b600080604083850312156129ea57600080fd5b82356001600160401b0380821115612a0157600080fd5b818501915085601f830112612a1557600080fd5b81356020612a228261274d565b604051612a2f8282612721565b83815260059390931b8501820192828101915089841115612a4f57600080fd5b948201945b83861015612a7457612a658661256d565b82529482019490820190612a54565b96505086013592505080821115612a8a57600080fd5b5061281d85828601612770565b600081518084526020808501945080840160005b83811015612ac757815187529582019590820190600101612aab565b509495945050505050565b6020815260006125e66020830184612a97565b600060208284031215612af757600080fd5b6125e68261256d565b60008060008060408587031215612b1657600080fd5b84356001600160401b0380821115612b2d57600080fd5b612b39888389016125ed565b90965094506020870135915080821115612b5257600080fd5b50612b5f878288016125ed565b95989497509550505050565b60008060408385031215612b7e57600080fd5b612b878361256d565b915060208301358015158114612b9c57600080fd5b809150509250929050565b60008060408385031215612bba57600080fd5b50508035926020909101359150565b60008060008060608587031215612bdf57600080fd5b8435935060208501356001600160401b03811115612bfc57600080fd5b612c08878288016125ed565b9598909750949560400135949350505050565b600060208284031215612c2d57600080fd5b813560ff811681146125e657600080fd5b60008060408385031215612c5157600080fd5b612c5a8361256d565b9150612c686020840161256d565b90509250929050565b600080600080600060a08688031215612c8957600080fd5b612c928661256d565b9450612ca06020870161256d565b9350604086013592506060860135915060808601356001600160401b03811115612cc957600080fd5b61294088828901612884565b60008060208385031215612ce857600080fd5b82356001600160401b0380821115612cff57600080fd5b818501915085601f830112612d1357600080fd5b813581811115612d2257600080fd5b866020828501011115612d3457600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052601160045260246000fd5b600060ff821660ff84168060ff03821115612d7957612d79612d46565b019392505050565b60008219821115612d9457612d94612d46565b500190565b634e487b7160e01b600052601260045260246000fd5b60208082526010908201526f2737ba1032b737bab3b41032ba3432b960811b604082015260600190565b600060018201612deb57612deb612d46565b5060010190565b600181811c90821680612e0657607f821691505b602082108103612e2657634e487b7160e01b600052602260045260246000fd5b50919050565b8054600090600181811c9080831680612e4657607f831692505b60208084108203612e6757634e487b7160e01b600052602260045260246000fd5b818015612e7b5760018114612e8c57612eb9565b60ff19861689528489019650612eb9565b60008881526020902060005b86811015612eb15781548b820152908501908301612e98565b505084890196505b50505050505092915050565b6000611af7612ed48386612e2c565b84612e2c565b6000612eef612ee98387612e2c565b85612e2c565b602f60f81b81528351612f0981600184016020880161269c565b64173539b7b760d91b6001929091019182015260060195945050505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060208284031215612f6f57600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b602080825260159082015274416d6f756e74206578636565647320737570706c7960581b604082015260600190565b600082612fca57612fca612d99565b500690565b6000816000190483118215151615612fe957612fe9612d46565b500290565b8183823760009101908152919050565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60008261304e5761304e612d99565b500490565b60008282101561306557613065612d46565b500390565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6040815260006131546040830185612a97565b82810360208401526131668185612a97565b95945050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906131a9908301846126cc565b979650505050505050565b6000602082840312156131c657600080fd5b81516125e6816125b3565b600060033d11156131ea5760046000803e5060005160e01c5b90565b600060443d10156131fb5790565b6040516003193d81016004833e81513d6001600160401b03816024840111818411171561322a57505050505090565b82850191508151818111156132425750505050505090565b843d870101602082850101111561325c5750505050505090565b61326b60208286010187612721565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b0386811682528516602082015260a0604082018190526000906132ea90830186612a97565b82810360608401526132fc8186612a97565b9050828103608084015261331081856126cc565b9897505050505050505056fea26469706673582212207c345b25b94aa13561bc5088e44675c975fb6180605fea139a0806f47548c9e664736f6c634300080e003300000000000000000000000000000000000000000000000000000000000000b3
Deployed Bytecode
0x6080604052600436106102245760003560e01c80638da5cb5b11610123578063cb303a1e116100ab578063efd0cbf91161006f578063efd0cbf914610659578063f242432a1461066c578063f2fde38b1461068c578063f7b18e41146106ac578063fae08e6f146106cc57600080fd5b8063cb303a1e1461059a578063cd3f2910146105b0578063d16830f1146105d0578063dab5f340146105f0578063e985e9c51461061057600080fd5b8063ab4ca8f6116100f2578063ab4ca8f614610511578063af52cd7114610531578063c197a21014610551578063c61b586214610571578063c73cd11e1461058757600080fd5b80638da5cb5b1461048957806391b7f5ed146104b15780639e34070f146104d1578063a22cb465146104f157600080fd5b8063400a0c2e116101b15780635b4425d5116101755780635b4425d5146104095780635c9ad97a1461041f5780636a9b80d41461043f578063715018a614610454578063851042f21461046957600080fd5b8063400a0c2e1461036757806344e1748a146103875780634e1273f4146103a75780634e4399b4146103d457806351cff8d9146103e957600080fd5b80631fe543e3116101f85780631fe543e3146102ce578063235b6ea1146102ee5780632774aacd146103045780632eb2c2d61461031a5780633a2332391461033a57600080fd5b8062fdd58e1461022957806301ffc9a71461025c5780630dbcb4bc1461028c5780630e89341c146102a1575b600080fd5b34801561023557600080fd5b50610249610244366004612589565b6106e1565b6040519081526020015b60405180910390f35b34801561026857600080fd5b5061027c6102773660046125c9565b610778565b6040519015158152602001610253565b61029f61029a366004612638565b6107ca565b005b3480156102ad57600080fd5b506102c16102bc366004612683565b610a82565b60405161025391906126f8565b3480156102da57600080fd5b5061029f6102e93660046127e1565b610ad7565b3480156102fa57600080fd5b5061024960075481565b34801561031057600080fd5b50610249600d5481565b34801561032657600080fd5b5061029f6103353660046128a4565b610b5f565b34801561034657600080fd5b50610249610355366004612683565b600b6020526000908152604090205481565b34801561037357600080fd5b5061029f61038236600461294d565b610bf6565b34801561039357600080fd5b5061029f6103a236600461298f565b610ce6565b3480156103b357600080fd5b506103c76103c23660046129d7565b610d23565b6040516102539190612ad2565b3480156103e057600080fd5b506102c1610e4c565b3480156103f557600080fd5b5061029f610404366004612ae5565b610eda565b34801561041557600080fd5b5061024960135481565b34801561042b57600080fd5b5061029f61043a366004612683565b610f99565b34801561044b57600080fd5b506102c161101a565b34801561046057600080fd5b5061029f611027565b34801561047557600080fd5b5061029f610484366004612b00565b61105d565b34801561049557600080fd5b506003546040516001600160a01b039091168152602001610253565b3480156104bd57600080fd5b5061029f6104cc366004612683565b611174565b3480156104dd57600080fd5b5061027c6104ec366004612683565b6111a3565b3480156104fd57600080fd5b5061029f61050c366004612b6b565b6111d8565b34801561051d57600080fd5b5061029f61052c366004612683565b6111e3565b34801561053d57600080fd5b5061024961054c366004612683565b611271565b34801561055d57600080fd5b5061029f61056c366004612ba7565b611292565b34801561057d57600080fd5b5061024960085481565b61029f610595366004612bc9565b6112c7565b3480156105a657600080fd5b50610249600c5481565b3480156105bc57600080fd5b5061029f6105cb366004612c1b565b61147d565b3480156105dc57600080fd5b5061029f6105eb36600461298f565b6114c7565b3480156105fc57600080fd5b5061029f61060b366004612683565b611504565b34801561061c57600080fd5b5061027c61062b366004612c3e565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b61029f610667366004612683565b611533565b34801561067857600080fd5b5061029f610687366004612c71565b6115eb565b34801561069857600080fd5b5061029f6106a7366004612ae5565b611672565b3480156106b857600080fd5b5061029f6106c7366004612cd5565b61170a565b3480156106d857600080fd5b506102c16117a3565b60006001600160a01b0383166107525760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b506000908152602081815260408083206001600160a01b03949094168352929052205490565b60006001600160e01b03198216636cdb3d1360e11b14806107a957506001600160e01b031982166303a24d0760e21b145b806107c457506301ffc9a760e01b6001600160e01b03198316145b92915050565b600354600160a01b900460ff1660011461081a5760405162461bcd60e51b815260206004820152601160248201527028393296b9b0b632903737ba1037b832b760791b6044820152606401610749565b60f883901c60f084901c60e085901c8560006108368486612d5c565b60ff16905061087187876008548b60405160200161085691815260200190565b604051602081830303815290604052805190602001206117b0565b6108ad5760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b210383937b7b360991b6044820152606401610749565b600081116108ec5760405162461bcd60e51b815260206004820152600c60248201526b24b73b30b634b2103632b0b360a11b6044820152606401610749565b600454816005546108fd9190612d81565b11156109405760405162461bcd60e51b815260206004820152601260248201527113585e081cdd5c1c1b1e481c995858da195960721b6044820152606401610749565b6001600160a01b03821633146109905760405162461bcd60e51b81526020600482015260156024820152742cb7ba9030b932903737ba103a34329037bbb732b960591b6044820152606401610749565b60ff600884901c81166000818152600b6020526040902054909160019086161b90818116156109f35760405162461bcd60e51b815260206004820152600f60248201526e105b1c9958591e4818db185a5b5959608a1b6044820152606401610749565b348860ff16600754021115610a1a5760405162461bcd60e51b815260040161074990612daf565b6000838152600b6020526040902081831790556001849003610a6b57610a6685600560008154610a4990612dd9565b91905081905560016040518060200160405280600081525061181c565b610a75565b610a7584336118ed565b5050505050505050505050565b6060600d548203610ab8576009600e604051602001610aa2929190612ec5565b6040516020818303038152906040529050919050565b6009600a610ac5846119f7565b604051602001610aa293929190612eda565b336001600160a01b037f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e699091614610b515760405163073e64fd60e21b81523360048201526001600160a01b037f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e69909166024820152604401610749565b610b5b8282611aff565b5050565b6001600160a01b038516331480610b7b5750610b7b853361062b565b610be25760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b6064820152608401610749565b610bef8585858585611b12565b5050505050565b6003546001600160a01b03163314610c205760405162461bcd60e51b815260040161074990612f28565b6004839055600682905563ffffffff811615610ce157600f546011546040516305d3b1d360e41b815260048101919091526001600160401b03821660248201526003604482015263ffffffff8316606482015260016084820152680100000000000000009091046001600160a01b031690635d3b1d309060a4016020604051808303816000875af1158015610cb9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cdd9190612f5d565b6013555b505050565b6003546001600160a01b03163314610d105760405162461bcd60e51b815260040161074990612f28565b8051610b5b906009906020840190612426565b60608151835114610d885760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610749565b600083516001600160401b03811115610da357610da361270b565b604051908082528060200260200182016040528015610dcc578160200160208202803683370190505b50905060005b8451811015610e4457610e17858281518110610df057610df0612f76565b6020026020010151858381518110610e0a57610e0a612f76565b60200260200101516106e1565b828281518110610e2957610e29612f76565b6020908102919091010152610e3d81612dd9565b9050610dd2565b509392505050565b60098054610e5990612df2565b80601f0160208091040260200160405190810160405280929190818152602001828054610e8590612df2565b8015610ed25780601f10610ea757610100808354040283529160200191610ed2565b820191906000526020600020905b815481529060010190602001808311610eb557829003601f168201915b505050505081565b6003546001600160a01b03163314610f045760405162461bcd60e51b815260040161074990612f28565b6000816001600160a01b03164760405160006040518083038185875af1925050503d8060008114610f51576040519150601f19603f3d011682016040523d82523d6000602084013e610f56565b606091505b5050905080610b5b5760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b6044820152606401610749565b6003546001600160a01b03163314610fc35760405162461bcd60e51b815260040161074990612f28565b600454811161100b5760405162461bcd60e51b8152602060048201526014602482015273436f6e666c696374207769746820737570706c7960601b6044820152606401610749565b61101733826001611ca6565b50565b600a8054610e5990612df2565b6003546001600160a01b031633146110515760405162461bcd60e51b815260040161074990612f28565b61105b6000611e22565b565b6003546001600160a01b031633146110875760405162461bcd60e51b815260040161074990612f28565b828181146110ca5760405162461bcd60e51b815260206004820152601060248201526f098cadccee8d0e640dad2e6dac2e8c6d60831b6044820152606401610749565b60005b8181101561116c576004548484838181106110ea576110ea612f76565b905060200201356005546110fe9190612d81565b111561111c5760405162461bcd60e51b815260040161074990612f8c565b61116484848381811061113157611131612f76565b9050602002013587878481811061114a5761114a612f76565b905060200201602081019061115f9190612ae5565b6118ed565b6001016110cd565b505050505050565b6003546001600160a01b0316331461119e5760405162461bcd60e51b815260040161074990612f28565b600755565b6000600882901c816111b761010085612fbb565b6000928352600b602052604090922054600190921b90911615159392505050565b610b5b338383611e74565b6003546001600160a01b0316331461120d5760405162461bcd60e51b815260040161074990612f28565b60045481116112555760405162461bcd60e51b8152602060048201526014602482015273436f6e666c696374207769746820737570706c7960601b6044820152606401610749565b611017338260016040518060200160405280600081525061181c565b6012818154811061128157600080fd5b600091825260209091200154905081565b6003546001600160a01b031633146112bc5760405162461bcd60e51b815260040161074990612f28565b600c91909155600d55565b600354600160a01b900460ff166002146113135760405162461bcd60e51b815260206004820152600d60248201526c29b0b632903737ba1037b832b760991b6044820152606401610749565b600454816005546113249190612d81565b11156113425760405162461bcd60e51b815260040161074990612f8c565b61135d83836008548760405160200161085691815260200190565b6113995760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b210383937b7b360991b6044820152606401610749565b60f884901c60f085901c856001600160a01b03811633146113f45760405162461bcd60e51b81526020600482015260156024820152742cb7ba9030b932903737ba103a34329037bbb732b960591b6044820152606401610749565b6113fe8284612d5c565b60ff161561143d5760405162461bcd60e51b815260206004820152600c60248201526b24b73b30b634b2103632b0b360a11b6044820152606401610749565b348460075461144c9190612fcf565b111561146a5760405162461bcd60e51b815260040161074990612daf565b61147484336118ed565b50505050505050565b6003546001600160a01b031633146114a75760405162461bcd60e51b815260040161074990612f28565b6003805460ff909216600160a01b0260ff60a01b19909216919091179055565b6003546001600160a01b031633146114f15760405162461bcd60e51b815260040161074990612f28565b8051610b5b90600a906020840190612426565b6003546001600160a01b0316331461152e5760405162461bcd60e51b815260040161074990612f28565b600855565b60038054600160a01b900460ff16146115855760405162461bcd60e51b8152602060048201526014602482015273283ab13634b19039b0b632903737ba1037b832b760611b6044820152606401610749565b600454816005546115969190612d81565b11156115b45760405162461bcd60e51b815260040161074990612f8c565b34816007546115c39190612fcf565b11156115e15760405162461bcd60e51b815260040161074990612daf565b61101781336118ed565b6001600160a01b0385163314806116075750611607853361062b565b6116655760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b6064820152608401610749565b610bef8585858585611f54565b6003546001600160a01b0316331461169c5760405162461bcd60e51b815260040161074990612f28565b6001600160a01b0381166117015760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610749565b61101781611e22565b818160405160200161171d929190612fee565b60405160208183030381529060405280519060200120600c541461176f5760405162461bcd60e51b815260206004820152600960248201526857726f6e67206b657960b81b6044820152606401610749565b61178d33600d5460016040518060200160405280600081525061181c565b611799600e83836124aa565b50506000600c5550565b600e8054610e5990612df2565b60008184825b8181101561180f5760008888838181106117d2576117d2612f76565b9050602002013590508084116117f657836000528060205260406000209350611806565b8060005283602052604060002093505b506001016117b6565b5050909214949350505050565b6001600160a01b0384166118425760405162461bcd60e51b815260040161074990612ffe565b33600061184e8561207e565b9050600061185b8561207e565b90506000868152602081815260408083206001600160a01b038b1684529091528120805487929061188d908490612d81565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4611474836000898989896120c9565b6000826001600160401b038111156119075761190761270b565b604051908082528060200260200182016040528015611930578160200160208202803683370190505b5090506000836001600160401b0381111561194d5761194d61270b565b604051908082528060200260200182016040528015611976578160200160208202803683370190505b5060055490915060005b858110156119d457816001019150818482815181106119a1576119a1612f76565b60200260200101818152505060018382815181106119c1576119c1612f76565b6020908102919091010152600101611980565b5080600581905550610bef84848460405180602001604052806000815250612224565b606081600003611a1e5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611a485780611a3281612dd9565b9150611a419050600a8361303f565b9150611a22565b6000816001600160401b03811115611a6257611a6261270b565b6040519080825280601f01601f191660200182016040528015611a8c576020820181803683370190505b5090505b8415611af757611aa1600183613053565b9150611aae600a86612fbb565b611ab9906030612d81565b60f81b818381518110611ace57611ace612f76565b60200101906001600160f81b031916908160001a905350611af0600a8661303f565b9450611a90565b949350505050565b8051610ce190601290602084019061251e565b8151835114611b335760405162461bcd60e51b81526004016107499061306a565b6001600160a01b038416611b595760405162461bcd60e51b8152600401610749906130b2565b3360005b8451811015611c40576000858281518110611b7a57611b7a612f76565b602002602001015190506000858381518110611b9857611b98612f76565b602090810291909101810151600084815280835260408082206001600160a01b038e168352909352919091205490915081811015611be85760405162461bcd60e51b8152600401610749906130f7565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290611c25908490612d81565b9250508190555050505080611c3990612dd9565b9050611b5d565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051611c90929190613141565b60405180910390a461116c81878787878761236b565b6001600160a01b038316611d085760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b6064820152608401610749565b336000611d148461207e565b90506000611d218461207e565b60408051602080820183526000918290528882528181528282206001600160a01b038b1683529052205490915084811015611daa5760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b6064820152608401610749565b6000868152602081815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a90529092908816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4604080516020810190915260009052611474565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b031603611ee75760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610749565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b038416611f7a5760405162461bcd60e51b8152600401610749906130b2565b336000611f868561207e565b90506000611f938561207e565b90506000868152602081815260408083206001600160a01b038c16845290915290205485811015611fd65760405162461bcd60e51b8152600401610749906130f7565b6000878152602081815260408083206001600160a01b038d8116855292528083208985039055908a16825281208054889290612013908490612d81565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4612073848a8a8a8a8a6120c9565b505050505050505050565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106120b8576120b8612f76565b602090810291909101015292915050565b6001600160a01b0384163b1561116c5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e619061210d908990899088908890889060040161316f565b6020604051808303816000875af1925050508015612148575060408051601f3d908101601f19168201909252612145918101906131b4565b60015b6121f4576121546131d1565b806308c379a00361218d57506121686131ed565b80612173575061218f565b8060405162461bcd60e51b815260040161074991906126f8565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610749565b6001600160e01b0319811663f23a6e6160e01b146114745760405162461bcd60e51b815260040161074990613276565b6001600160a01b03841661224a5760405162461bcd60e51b815260040161074990612ffe565b815183511461226b5760405162461bcd60e51b81526004016107499061306a565b3360005b84518110156123075783818151811061228a5761228a612f76565b60200260200101516000808784815181106122a7576122a7612f76565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b0316815260200190815260200160002060008282546122ef9190612d81565b909155508190506122ff81612dd9565b91505061226f565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051612358929190613141565b60405180910390a4610bef816000878787875b6001600160a01b0384163b1561116c5760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906123af90899089908890889088906004016132be565b6020604051808303816000875af19250505080156123ea575060408051601f3d908101601f191682019092526123e7918101906131b4565b60015b6123f6576121546131d1565b6001600160e01b0319811663bc197c8160e01b146114745760405162461bcd60e51b815260040161074990613276565b82805461243290612df2565b90600052602060002090601f016020900481019282612454576000855561249a565b82601f1061246d57805160ff191683800117855561249a565b8280016001018555821561249a579182015b8281111561249a57825182559160200191906001019061247f565b506124a6929150612558565b5090565b8280546124b690612df2565b90600052602060002090601f0160209004810192826124d8576000855561249a565b82601f106124f15782800160ff1982351617855561249a565b8280016001018555821561249a579182015b8281111561249a578235825591602001919060010190612503565b82805482825590600052602060002090810192821561249a579160200282018281111561249a57825182559160200191906001019061247f565b5b808211156124a65760008155600101612559565b80356001600160a01b038116811461258457600080fd5b919050565b6000806040838503121561259c57600080fd5b6125a58361256d565b946020939093013593505050565b6001600160e01b03198116811461101757600080fd5b6000602082840312156125db57600080fd5b81356125e6816125b3565b9392505050565b60008083601f8401126125ff57600080fd5b5081356001600160401b0381111561261657600080fd5b6020830191508360208260051b850101111561263157600080fd5b9250929050565b60008060006040848603121561264d57600080fd5b8335925060208401356001600160401b0381111561266a57600080fd5b612676868287016125ed565b9497909650939450505050565b60006020828403121561269557600080fd5b5035919050565b60005b838110156126b757818101518382015260200161269f565b838111156126c6576000848401525b50505050565b600081518084526126e481602086016020860161269c565b601f01601f19169290920160200192915050565b6020815260006125e660208301846126cc565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b03811182821017156127465761274661270b565b6040525050565b60006001600160401b038211156127665761276661270b565b5060051b60200190565b600082601f83011261278157600080fd5b8135602061278e8261274d565b60405161279b8282612721565b83815260059390931b85018201928281019150868411156127bb57600080fd5b8286015b848110156127d657803583529183019183016127bf565b509695505050505050565b600080604083850312156127f457600080fd5b8235915060208301356001600160401b0381111561281157600080fd5b61281d85828601612770565b9150509250929050565b60006001600160401b038311156128405761284061270b565b604051612857601f8501601f191660200182612721565b80915083815284848401111561286c57600080fd5b83836020830137600060208583010152509392505050565b600082601f83011261289557600080fd5b6125e683833560208501612827565b600080600080600060a086880312156128bc57600080fd5b6128c58661256d565b94506128d36020870161256d565b935060408601356001600160401b03808211156128ef57600080fd5b6128fb89838a01612770565b9450606088013591508082111561291157600080fd5b61291d89838a01612770565b9350608088013591508082111561293357600080fd5b5061294088828901612884565b9150509295509295909350565b60008060006060848603121561296257600080fd5b8335925060208401359150604084013563ffffffff8116811461298457600080fd5b809150509250925092565b6000602082840312156129a157600080fd5b81356001600160401b038111156129b757600080fd5b8201601f810184136129c857600080fd5b611af784823560208401612827565b600080604083850312156129ea57600080fd5b82356001600160401b0380821115612a0157600080fd5b818501915085601f830112612a1557600080fd5b81356020612a228261274d565b604051612a2f8282612721565b83815260059390931b8501820192828101915089841115612a4f57600080fd5b948201945b83861015612a7457612a658661256d565b82529482019490820190612a54565b96505086013592505080821115612a8a57600080fd5b5061281d85828601612770565b600081518084526020808501945080840160005b83811015612ac757815187529582019590820190600101612aab565b509495945050505050565b6020815260006125e66020830184612a97565b600060208284031215612af757600080fd5b6125e68261256d565b60008060008060408587031215612b1657600080fd5b84356001600160401b0380821115612b2d57600080fd5b612b39888389016125ed565b90965094506020870135915080821115612b5257600080fd5b50612b5f878288016125ed565b95989497509550505050565b60008060408385031215612b7e57600080fd5b612b878361256d565b915060208301358015158114612b9c57600080fd5b809150509250929050565b60008060408385031215612bba57600080fd5b50508035926020909101359150565b60008060008060608587031215612bdf57600080fd5b8435935060208501356001600160401b03811115612bfc57600080fd5b612c08878288016125ed565b9598909750949560400135949350505050565b600060208284031215612c2d57600080fd5b813560ff811681146125e657600080fd5b60008060408385031215612c5157600080fd5b612c5a8361256d565b9150612c686020840161256d565b90509250929050565b600080600080600060a08688031215612c8957600080fd5b612c928661256d565b9450612ca06020870161256d565b9350604086013592506060860135915060808601356001600160401b03811115612cc957600080fd5b61294088828901612884565b60008060208385031215612ce857600080fd5b82356001600160401b0380821115612cff57600080fd5b818501915085601f830112612d1357600080fd5b813581811115612d2257600080fd5b866020828501011115612d3457600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052601160045260246000fd5b600060ff821660ff84168060ff03821115612d7957612d79612d46565b019392505050565b60008219821115612d9457612d94612d46565b500190565b634e487b7160e01b600052601260045260246000fd5b60208082526010908201526f2737ba1032b737bab3b41032ba3432b960811b604082015260600190565b600060018201612deb57612deb612d46565b5060010190565b600181811c90821680612e0657607f821691505b602082108103612e2657634e487b7160e01b600052602260045260246000fd5b50919050565b8054600090600181811c9080831680612e4657607f831692505b60208084108203612e6757634e487b7160e01b600052602260045260246000fd5b818015612e7b5760018114612e8c57612eb9565b60ff19861689528489019650612eb9565b60008881526020902060005b86811015612eb15781548b820152908501908301612e98565b505084890196505b50505050505092915050565b6000611af7612ed48386612e2c565b84612e2c565b6000612eef612ee98387612e2c565b85612e2c565b602f60f81b81528351612f0981600184016020880161269c565b64173539b7b760d91b6001929091019182015260060195945050505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060208284031215612f6f57600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b602080825260159082015274416d6f756e74206578636565647320737570706c7960581b604082015260600190565b600082612fca57612fca612d99565b500690565b6000816000190483118215151615612fe957612fe9612d46565b500290565b8183823760009101908152919050565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60008261304e5761304e612d99565b500490565b60008282101561306557613065612d46565b500390565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6040815260006131546040830185612a97565b82810360208401526131668185612a97565b95945050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906131a9908301846126cc565b979650505050505050565b6000602082840312156131c657600080fd5b81516125e6816125b3565b600060033d11156131ea5760046000803e5060005160e01c5b90565b600060443d10156131fb5790565b6040516003193d81016004833e81513d6001600160401b03816024840111818411171561322a57505050505090565b82850191508151818111156132425750505050505090565b843d870101602082850101111561325c5750505050505090565b61326b60208286010187612721565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b0386811682528516602082015260a0604082018190526000906132ea90830186612a97565b82810360608401526132fc8186612a97565b9050828103608084015261331081856126cc565b9897505050505050505056fea26469706673582212207c345b25b94aa13561bc5088e44675c975fb6180605fea139a0806f47548c9e664736f6c634300080e0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000b3
-----Decoded View---------------
Arg [0] : subscriptionId (uint64): 179
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000b3
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.