Feature Tip: Add private address tag to any address under My Name Tag !
ERC-721
NFT
Overview
Max Total Supply
10,000 VDSC
Holders
987
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
6 VDSCLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
DragonNFT
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 1 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT OR Apache-2.0 // Author: Luca Di Domenico: twitter.com/luca_dd7 pragma solidity ^0.8.9; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Royalty.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@chainlink/contracts/src/v0.8/interfaces/VRFCoordinatorV2Interface.sol"; import "@chainlink/contracts/src/v0.8/VRFConsumerBaseV2.sol"; // import "hardhat/console.sol"; contract DragonNFT is ERC721Royalty, Ownable, AccessControl, VRFConsumerBaseV2 { using Counters for Counters.Counter; using Strings for uint256; Counters.Counter private _mintedNFTs; uint8 public step; uint256 public totalSupply = 10000; uint256 constant firstSaleMaxCnt = 2000; uint256 constant secondSaleMaxCnt = 6000; uint256 constant thirdSaleMaxCnt = 10000; string public baseURI = "ipfs://bafybeiazke2lkvece5tupum57nl2cnkxbujtxflia7wpn727glsnnzpaem/"; mapping(uint256 => address) receiving_addresses; address public royalty_receiver = 0xe0Cb4eECe898456B33ae9bc4042a64bdD86B3654; uint256 public royalty_amount = 500; //0.5% in bp bytes32 private _merkleRootWhitelisted = 0xedc55d223384f37b436e36643bbe403eb1aed4eeb2ab82d2f0f45894d28a0e8e; bytes32 public constant DEVELOPER = keccak256("DEVELOPER"); /* * Chainlink VRF config */ VRFCoordinatorV2Interface COORDINATOR; uint64 public s_subscriptionId; address vrfCoordinator = 0x271682DEB8C4E0901D1a1550aD2e64D568E69909; bytes32 keyHash = 0x8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef; uint32 public callbackGasLimit = 2000000; uint16 requestConfirmations = 3; event newNFTMinted(uint256, address); modifier onlyDeveloper() { require(hasRole(DEVELOPER, msg.sender), "The account does not have DEVELOPER role."); _; } constructor(uint64 _subscriptionId, uint8 _step) ERC721("VoltedDragonsSailorsClub", "VDSC") VRFConsumerBaseV2(vrfCoordinator) { _grantRole( DEFAULT_ADMIN_ROLE, 0xB1A6461A733215bE98f10fE6C30CaF0d7716615A ); _grantRole(DEVELOPER, 0xB1A6461A733215bE98f10fE6C30CaF0d7716615A); _grantRole(DEVELOPER, msg.sender); COORDINATOR = VRFCoordinatorV2Interface(vrfCoordinator); s_subscriptionId = _subscriptionId; step = _step; } function requestRandomWords(uint32 _quantity) internal { // Will revert if subscription is not set and funded. uint256 s_requestId = COORDINATOR.requestRandomWords( keyHash, s_subscriptionId, requestConfirmations, callbackGasLimit, _quantity ); receiving_addresses[s_requestId] = _msgSender(); } function fulfillRandomWords(uint256 requestId, uint256[] memory randomWords) internal override { for (uint256 i = 0; i < randomWords.length; i++) { uint256 newItemId = (randomWords[i] % totalSupply) + 1; _safeMint(receiving_addresses[requestId], newItemId); emit newNFTMinted(newItemId, receiving_addresses[requestId]); } delete receiving_addresses[requestId]; } function mintToken(uint256 _quantity, bytes32[] calldata _merkleProof) public payable { require(step > 0 && step < 4, "No Mint step"); require(_quantity <= 5, "Max 5 per transactions."); if (step == 1) { require( _mintedNFTs.current() + _quantity <= firstSaleMaxCnt, string( abi.encodePacked( (firstSaleMaxCnt - _mintedNFTs.current()).toString(), " remaining for the first round." ) ) ); require( msg.value >= (_quantity * 0.15 ether), "Cannot pass cuz less price: step 1" ); bytes32 leaf = keccak256(abi.encodePacked(msg.sender)); require( MerkleProof.verify(_merkleProof, _merkleRootWhitelisted, leaf), "You are not Whitelisted." ); } if (step == 2) { require( _mintedNFTs.current() + _quantity <= secondSaleMaxCnt, string( abi.encodePacked( (secondSaleMaxCnt - _mintedNFTs.current()).toString(), " remaining for the second round." ) ) ); require( msg.value >= (_quantity * 0.25 ether), "Cannot pass cuz less price: step 2" ); bytes32 leaf = keccak256(abi.encodePacked(msg.sender)); require( MerkleProof.verify(_merkleProof, _merkleRootWhitelisted, leaf), "You are not Whitelisted." ); } if (step == 3) { require( _mintedNFTs.current() + _quantity <= thirdSaleMaxCnt, string( abi.encodePacked( (thirdSaleMaxCnt - _mintedNFTs.current()).toString(), " remaining for the third round." ) ) ); require( msg.value >= (_quantity * 0.3 ether), "Cannot pass cuz less price: step 3" ); } for(uint256 i = _quantity; i > 0; i--) { _mintedNFTs.increment(); } requestRandomWords(uint32(_quantity)); } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721Royalty, AccessControl) returns (bool) { return super.supportsInterface(interfaceId); } function royaltyInfo( uint256, /* tokenId */ uint256 salePrice ) public view override returns (address receiver, uint256 royaltyAmount) { receiver = royalty_receiver; royaltyAmount = (royalty_amount * salePrice) / 10000; } function _baseURI() internal view override returns (string memory) { return baseURI; } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { _requireMinted(tokenId); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString(), ".json")) : ""; } function setBaseURI(string memory _newURI) public onlyDeveloper { baseURI = _newURI; } function setStep(uint8 _step) public onlyDeveloper { step = _step; } function setMerkleRoot(bytes32 _newRoot) public onlyDeveloper { _merkleRootWhitelisted = _newRoot; } /* this function can be used to: * - withdraw * - send refund to users in case something goes wrong with the Chainlink VRF function */ function sendEthToAddr(uint256 _amount, address payable _to) external payable onlyOwner { require( _amount <= address(this).balance, "amount must be <= than balance." ); (bool sent, ) = _to.call{value: _amount}(""); require(sent, "Failed to send Ether"); } function setRoyaltyReceiver(address _addr) public onlyOwner { royalty_receiver = _addr; } function setRoyaltyAmount(uint256 _amount) public onlyOwner { royalty_amount = _amount; } function setCallbackGasLimit(uint32 _limit) public onlyDeveloper { callbackGasLimit = _limit; } function setSubscriptionId(uint64 _id) public onlyDeveloper { s_subscriptionId = _id; } function setKeyHash(bytes32 _keyhash) public onlyDeveloper { keyHash = _keyhash; } function mintTo(uint256 _quantity, uint256[] memory _token_id, address _to) external onlyOwner { require(_quantity == _token_id.length, "must have same length"); for(uint i = 0; i < _quantity; i++) { _safeMint(_to, _token_id[i]); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (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 Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { 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 (last updated v4.7.0) (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; import "../utils/Context.sol"; import "../utils/Strings.sol"; import "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `_msgSender()` is missing `role`. * Overriding this function changes the behavior of the {onlyRole} modifier. * * Format of the revert message is described in {_checkRole}. * * _Available since v4.6._ */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(uint160(account), 20), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleGranted} event. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleRevoked} event. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. * * May emit a {RoleRevoked} event. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * May emit a {RoleGranted} event. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. * * May emit a {RoleGranted} event. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. * * May emit a {RoleRevoked} event. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Counters.sol) pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library Counters { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @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); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/ERC721Royalty.sol) pragma solidity ^0.8.0; import "../ERC721.sol"; import "../../common/ERC2981.sol"; import "../../../utils/introspection/ERC165.sol"; /** * @dev Extension of ERC721 with the ERC2981 NFT Royalty Standard, a standardized way to retrieve royalty payment * information. * * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first. * * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. * * _Available since v4.5._ */ abstract contract ERC721Royalty is ERC2981, ERC721 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC2981) returns (bool) { return super.supportsInterface(interfaceId); } /** * @dev See {ERC721-_burn}. This override additionally clears the royalty information for the token. */ function _burn(uint256 tokenId) internal virtual override { super._burn(tokenId); _resetTokenRoyalty(tokenId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Tree 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[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Calldata version of {verify} * * _Available since v4.7._ */ function verifyCalldata( bytes32[] calldata proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProofCalldata(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Calldata version of {processProof} * * _Available since v4.7._ */ function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Returns true if the `leaves` can be proved to be a part of a Merkle tree defined by * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. * * _Available since v4.7._ */ function multiProofVerify( bytes32[] memory proof, bool[] memory proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProof(proof, proofFlags, leaves) == root; } /** * @dev Calldata version of {multiProofVerify} * * _Available since v4.7._ */ function multiProofVerifyCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProofCalldata(proof, proofFlags, leaves) == root; } /** * @dev Returns the root of a tree reconstructed from `leaves` and the sibling nodes in `proof`, * consuming from one or the other at each step according to the instructions given by * `proofFlags`. * * _Available since v4.7._ */ function processMultiProof( bytes32[] memory proof, bool[] memory proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @dev Calldata version of {processMultiProof} * * _Available since v4.7._ */ function processMultiProofCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { return a < b ? _efficientHash(a, b) : _efficientHash(b, a); } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { /// @solidity memory-safe-assembly assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// 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; /* * @notice Check to see if there exists a request commitment consumers * for all consumers and keyhashes for a given sub. * @param subId - ID of the subscription * @return true if there exists at least one unfulfilled request for the subscription, false * otherwise. */ function pendingRequestExists(uint64 subId) external view returns (bool); }
// 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 (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 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: address zero is not a valid owner"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: invalid token ID"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { _requireMinted(tokenId); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not token owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { _requireMinted(tokenId); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner nor approved"); _safeTransfer(from, to, tokenId, data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { address owner = ERC721.ownerOf(tokenId); return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits an {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits an {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Reverts if the `tokenId` has not been minted yet. */ function _requireMinted(uint256 tokenId) internal view virtual { require(_exists(tokenId), "ERC721: invalid token ID"); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { /// @solidity memory-safe-assembly assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/common/ERC2981.sol) pragma solidity ^0.8.0; import "../../interfaces/IERC2981.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information. * * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first. * * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the * fee is specified in basis points by default. * * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. * * _Available since v4.5._ */ abstract contract ERC2981 is IERC2981, ERC165 { struct RoyaltyInfo { address receiver; uint96 royaltyFraction; } RoyaltyInfo private _defaultRoyaltyInfo; mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) { return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId); } /** * @inheritdoc IERC2981 */ function royaltyInfo(uint256 _tokenId, uint256 _salePrice) public view virtual override returns (address, uint256) { RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId]; if (royalty.receiver == address(0)) { royalty = _defaultRoyaltyInfo; } uint256 royaltyAmount = (_salePrice * royalty.royaltyFraction) / _feeDenominator(); return (royalty.receiver, royaltyAmount); } /** * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an * override. */ function _feeDenominator() internal pure virtual returns (uint96) { return 10000; } /** * @dev Sets the royalty information that all ids in this contract will default to. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: invalid receiver"); _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Removes default royalty information. */ function _deleteDefaultRoyalty() internal virtual { delete _defaultRoyaltyInfo; } /** * @dev Sets the royalty information for a specific token id, overriding the global default. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setTokenRoyalty( uint256 tokenId, address receiver, uint96 feeNumerator ) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: Invalid parameters"); _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Resets royalty information for the token id back to the global default. */ function _resetTokenRoyalty(uint256 tokenId) internal virtual { delete _tokenRoyaltyInfo[tokenId]; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.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 /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. * * _Available since v4.5._ */ interface IERC2981 is IERC165 { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be paid in that same unit of exchange. */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }
{ "optimizer": { "enabled": true, "runs": 1 }, "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"},{"internalType":"uint8","name":"_step","type":"uint8"}],"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":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","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":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"","type":"uint256"},{"indexed":false,"internalType":"address","name":"","type":"address"}],"name":"newNFTMinted","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEVELOPER","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"callbackGasLimit","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"uint256[]","name":"_token_id","type":"uint256[]"},{"internalType":"address","name":"_to","type":"address"}],"name":"mintTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"}],"name":"mintToken","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","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":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"royalty_amount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"royalty_receiver","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"s_subscriptionId","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address payable","name":"_to","type":"address"}],"name":"sendEthToAddr","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_limit","type":"uint32"}],"name":"setCallbackGasLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_keyhash","type":"bytes32"}],"name":"setKeyHash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_newRoot","type":"bytes32"}],"name":"setMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"setRoyaltyAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"setRoyaltyReceiver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_step","type":"uint8"}],"name":"setStep","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"_id","type":"uint64"}],"name":"setSubscriptionId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"step","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
612710600c55610120604052604360a0818152906200347460c03980516200003091600d9160209091019062000379565b50600f80546001600160a01b031990811673e0cb4eece898456b33ae9bc4042a64bdd86b3654179091556101f46010557fedc55d223384f37b436e36643bbe403eb1aed4eeb2ab82d2f0f45894d28a0e8e6011556013805490911673271682deb8c4e0901d1a1550ad2e64d568e699091790557f8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef601455601580546403001e848065ffffffffffff19909116179055348015620000ec57600080fd5b50604051620034b7380380620034b78339810160408190526200010f916200041f565b601354604080518082018252601881527f566f6c746564447261676f6e735361696c6f7273436c756200000000000000006020808301918252835180850190945260048452635644534360e01b9084015281516001600160a01b03909416939192916200017f9160029162000379565b5080516200019590600390602084019062000379565b505050620001b2620001ac6200027e60201b60201c565b62000282565b6001600160a01b0316608052620001df600073b1a6461a733215be98f10fe6c30caf0d7716615a620002d4565b6200020e6000805160206200345483398151915273b1a6461a733215be98f10fe6c30caf0d7716615a620002d4565b620002296000805160206200345483398151915233620002d4565b601354601280546001600160401b03909416600160a01b026001600160e01b03199094166001600160a01b039092169190911792909217909155600b805460ff90921660ff19909216919091179055620004ab565b3390565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60008281526009602090815260408083206001600160a01b038516845290915290205460ff16620003755760008281526009602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620003343390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b82805462000387906200046e565b90600052602060002090601f016020900481019282620003ab5760008555620003f6565b82601f10620003c657805160ff1916838001178555620003f6565b82800160010185558215620003f6579182015b82811115620003f6578251825591602001919060010190620003d9565b506200040492915062000408565b5090565b5b8082111562000404576000815560010162000409565b600080604083850312156200043357600080fd5b82516001600160401b03811681146200044b57600080fd5b602084015190925060ff811681146200046357600080fd5b809150509250929050565b600181811c908216806200048357607f821691505b60208210811415620004a557634e487b7160e01b600052602260045260246000fd5b50919050565b608051612f86620004ce6000396000818161097901526109bb0152612f866000f3fe6080604052600436106101ec5760003560e01c806301ffc9a7146101f157806306fdde0314610226578063081812fc14610248578063095ea7b31461028057806318160ddd146102a25780631fe543e3146102c657806323b872dd146102e6578063248a9ca31461030657806324f746971461032657806329cbab9f146103585780632a55205a1461036b5780632f2ff15d146103aa57806336568abe146103ca5780633c934ab3146103ea57806342842e0e1461040c5780634f07de091461042c57806355f804b31461044c5780635b44560a1461046c5780636352211e146104825780636c0360eb146104a257806370a08231146104b7578063715018a6146104d75780637cb64759146104ec578063893e77691461050c5780638ac000211461052c5780638da5cb5b1461056b5780638dc251e31461058057806391d14854146105a057806395d89b41146105c057806398544710146105d5578063a217fddf146105f5578063a22cb4651461060a578063a30b8fc21461062a578063a4eb718c1461064a578063ae7c122e1461066a578063b88d4fde1461067d578063c87b56dd1461069d578063d547741f146106bd578063e25fe175146106dd578063e985e9c514610709578063ea7b4f7714610729578063f2fde38b14610749578063f8b89dfb14610769575b600080fd5b3480156101fd57600080fd5b5061021161020c366004612484565b610789565b60405190151581526020015b60405180910390f35b34801561023257600080fd5b5061023b61079a565b60405161021d91906124f9565b34801561025457600080fd5b5061026861026336600461250c565b61082c565b6040516001600160a01b03909116815260200161021d565b34801561028c57600080fd5b506102a061029b36600461253a565b610853565b005b3480156102ae57600080fd5b506102b8600c5481565b60405190815260200161021d565b3480156102d257600080fd5b506102a06102e136600461262b565b61096e565b3480156102f257600080fd5b506102a0610301366004612671565b6109f6565b34801561031257600080fd5b506102b861032136600461250c565b610a27565b34801561033257600080fd5b506015546103439063ffffffff1681565b60405163ffffffff909116815260200161021d565b6102a06103663660046126b2565b610a3c565b34801561037757600080fd5b5061038b6103863660046126e2565b610b2e565b604080516001600160a01b03909316835260208301919091520161021d565b3480156103b657600080fd5b506102a06103c53660046126b2565b610b65565b3480156103d657600080fd5b506102a06103e53660046126b2565b610b81565b3480156103f657600080fd5b506102b8600080516020612f1183398151915281565b34801561041857600080fd5b506102a0610427366004612671565b610bfb565b34801561043857600080fd5b506102a061044736600461250c565b610c16565b34801561045857600080fd5b506102a061046736600461275b565b610c23565b34801561047857600080fd5b506102b860105481565b34801561048e57600080fd5b5061026861049d36600461250c565b610c6a565b3480156104ae57600080fd5b5061023b610c9f565b3480156104c357600080fd5b506102b86104d23660046127a3565b610d2d565b3480156104e357600080fd5b506102a0610db3565b3480156104f857600080fd5b506102a061050736600461250c565b610dc7565b34801561051857600080fd5b506102a06105273660046127c0565b610e00565b34801561053857600080fd5b5060125461055390600160a01b90046001600160401b031681565b6040516001600160401b03909116815260200161021d565b34801561057757600080fd5b50610268610e96565b34801561058c57600080fd5b506102a061059b3660046127a3565b610ea5565b3480156105ac57600080fd5b506102116105bb3660046126b2565b610ecf565b3480156105cc57600080fd5b5061023b610efa565b3480156105e157600080fd5b506102a06105f036600461250c565b610f09565b34801561060157600080fd5b506102b8600081565b34801561061657600080fd5b506102a061062536600461281a565b610f42565b34801561063657600080fd5b50600f54610268906001600160a01b031681565b34801561065657600080fd5b506102a061066536600461284d565b610f4d565b6102a0610678366004612873565b610f9d565b34801561068957600080fd5b506102a06106983660046128f1565b61140e565b3480156106a957600080fd5b5061023b6106b836600461250c565b611440565b3480156106c957600080fd5b506102a06106d83660046126b2565b6114a7565b3480156106e957600080fd5b50600b546106f79060ff1681565b60405160ff909116815260200161021d565b34801561071557600080fd5b50610211610724366004612970565b6114c3565b34801561073557600080fd5b506102a061074436600461299e565b6114f1565b34801561075557600080fd5b506102a06107643660046127a3565b611551565b34801561077557600080fd5b506102a06107843660046129c7565b6115ca565b600061079482611614565b92915050565b6060600280546107a9906129ea565b80601f01602080910402602001604051908101604052809291908181526020018280546107d5906129ea565b80156108225780601f106107f757610100808354040283529160200191610822565b820191906000526020600020905b81548152906001019060200180831161080557829003601f168201915b5050505050905090565b600061083782611639565b506000908152600660205260409020546001600160a01b031690565b600061085e82610c6a565b9050806001600160a01b0316836001600160a01b031614156108d15760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b03821614806108ed57506108ed81336114c3565b61095f5760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c000060648201526084016108c8565b610969838361165e565b505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109e85760405163073e64fd60e21b81523360048201526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001660248201526044016108c8565b6109f282826116cc565b5050565b610a0033826117b9565b610a1c5760405162461bcd60e51b81526004016108c890612a25565b610969838383611818565b60009081526009602052604090206001015490565b610a446119a2565b47821115610a945760405162461bcd60e51b815260206004820152601f60248201527f616d6f756e74206d757374206265203c3d207468616e2062616c616e63652e0060448201526064016108c8565b6000816001600160a01b03168360405160006040518083038185875af1925050503d8060008114610ae1576040519150601f19603f3d011682016040523d82523d6000602084013e610ae6565b606091505b50509050806109695760405162461bcd60e51b81526020600482015260146024820152732330b4b632b2103a379039b2b7321022ba3432b960611b60448201526064016108c8565b600f546010546001600160a01b039091169060009061271090610b52908590612a89565b610b5c9190612abe565b90509250929050565b610b6e82610a27565b610b7781611a01565b6109698383611a0b565b6001600160a01b0381163314610bf15760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016108c8565b6109f28282611a91565b6109698383836040518060200160405280600081525061140e565b610c1e6119a2565b601055565b610c3b600080516020612f1183398151915233610ecf565b610c575760405162461bcd60e51b81526004016108c890612ad2565b80516109f290600d9060208401906123d5565b6000818152600460205260408120546001600160a01b0316806107945760405162461bcd60e51b81526004016108c890612b1b565b600d8054610cac906129ea565b80601f0160208091040260200160405190810160405280929190818152602001828054610cd8906129ea565b8015610d255780601f10610cfa57610100808354040283529160200191610d25565b820191906000526020600020905b815481529060010190602001808311610d0857829003601f168201915b505050505081565b60006001600160a01b038216610d975760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b60648201526084016108c8565b506001600160a01b031660009081526005602052604090205490565b610dbb6119a2565b610dc56000611af8565b565b610ddf600080516020612f1183398151915233610ecf565b610dfb5760405162461bcd60e51b81526004016108c890612ad2565b601155565b610e086119a2565b81518314610e505760405162461bcd60e51b81526020600482015260156024820152740daeae6e840d0c2ecca40e6c2daca40d8cadccee8d605b1b60448201526064016108c8565b60005b83811015610e9057610e7e82848381518110610e7157610e71612b4d565b6020026020010151611b4a565b80610e8881612b63565b915050610e53565b50505050565b6008546001600160a01b031690565b610ead6119a2565b600f80546001600160a01b0319166001600160a01b0392909216919091179055565b60009182526009602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6060600380546107a9906129ea565b610f21600080516020612f1183398151915233610ecf565b610f3d5760405162461bcd60e51b81526004016108c890612ad2565b601455565b6109f2338383611b64565b610f65600080516020612f1183398151915233610ecf565b610f815760405162461bcd60e51b81526004016108c890612ad2565b6015805463ffffffff191663ffffffff92909216919091179055565b600b5460ff1615801590610fb85750600b54600460ff909116105b610ff35760405162461bcd60e51b815260206004820152600c60248201526b04e6f204d696e7420737465760a41b60448201526064016108c8565b600583111561103e5760405162461bcd60e51b815260206004820152601760248201527626b0bc101a903832b9103a3930b739b0b1ba34b7b7399760491b60448201526064016108c8565b600b5460ff16600114156111a4576107d083611059600a5490565b6110639190612b7e565b1115611082611071600a5490565b61107d906107d0612b96565b611c2f565b6040516020016110929190612bc9565b604051602081830303815290604052906110bf5760405162461bcd60e51b81526004016108c891906124f9565b506110d283670214e8348c4f0000612a89565b34101561111a5760405162461bcd60e51b81526020600482015260226024820152600080516020612ef1833981519152604482015261203160f01b60648201526084016108c8565b60003360405160200161112d9190612c0a565b604051602081830303815290604052805190602001209050611186838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506011549150849050611d2c565b6111a25760405162461bcd60e51b81526004016108c890612c22565b505b600b5460ff166002141561130557611770836111bf600a5490565b6111c99190612b7e565b11156111e36111d7600a5490565b61107d90611770612b96565b6040516020016111f39190612c54565b604051602081830303815290604052906112205760405162461bcd60e51b81526004016108c891906124f9565b50611233836703782dace9d90000612a89565b34101561127b5760405162461bcd60e51b81526020600482015260226024820152600080516020612ef1833981519152604482015261101960f11b60648201526084016108c8565b60003360405160200161128e9190612c0a565b6040516020818303038152906040528051906020012090506112e7838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506011549150849050611d2c565b6113035760405162461bcd60e51b81526004016108c890612c22565b505b600b5460ff16600314156113dc5761271083611320600a5490565b61132a9190612b7e565b1115611344611338600a5490565b61107d90612710612b96565b6040516020016113549190612c95565b604051602081830303815290604052906113815760405162461bcd60e51b81526004016108c891906124f9565b5061139483670429d069189e0000612a89565b3410156113dc5760405162461bcd60e51b81526020600482015260226024820152600080516020612ef1833981519152604482015261203360f01b60648201526084016108c8565b825b8015611404576113f2600a80546001019055565b806113fc81612cd6565b9150506113de565b5061096983611d42565b61141833836117b9565b6114345760405162461bcd60e51b81526004016108c890612a25565b610e9084848484611e23565b606061144b82611639565b6000600d805461145a906129ea565b9050116114765760405180602001604052806000815250610794565b600d61148183611c2f565b604051602001611492929190612ced565b60405160208183030381529060405292915050565b6114b082610a27565b6114b981611a01565b6109698383611a91565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b611509600080516020612f1183398151915233610ecf565b6115255760405162461bcd60e51b81526004016108c890612ad2565b601280546001600160401b03909216600160a01b02600160a01b600160e01b0319909216919091179055565b6115596119a2565b6001600160a01b0381166115be5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016108c8565b6115c781611af8565b50565b6115e2600080516020612f1183398151915233610ecf565b6115fe5760405162461bcd60e51b81526004016108c890612ad2565b600b805460ff191660ff92909216919091179055565b60006001600160e01b03198216637965db0b60e01b1480610794575061079482611e56565b61164281611e61565b6115c75760405162461bcd60e51b81526004016108c890612b1b565b600081815260066020526040902080546001600160a01b0319166001600160a01b038416908117909155819061169382610c6a565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60005b8151811015611799576000600c548383815181106116ef576116ef612b4d565b60200260200101516117019190612da8565b61170c906001612b7e565b6000858152600e6020526040902054909150611731906001600160a01b031682611b4a565b6000848152600e60209081526040918290205482518481526001600160a01b03909116918101919091527f1949238c809a066bd92c57bb0094f41e2a27706514b3a220ada4656b09f50c07910160405180910390a1508061179181612b63565b9150506116cf565b50506000908152600e6020526040902080546001600160a01b0319169055565b6000806117c583610c6a565b9050806001600160a01b0316846001600160a01b031614806117ec57506117ec81856114c3565b806118105750836001600160a01b03166118058461082c565b6001600160a01b0316145b949350505050565b826001600160a01b031661182b82610c6a565b6001600160a01b03161461188f5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b60648201526084016108c8565b6001600160a01b0382166118f15760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016108c8565b6118fc60008261165e565b6001600160a01b0383166000908152600560205260408120805460019290611925908490612b96565b90915550506001600160a01b0382166000908152600560205260408120805460019290611953908490612b7e565b909155505060008181526004602052604080822080546001600160a01b0319166001600160a01b038681169182179092559151849391871691600080516020612f3183398151915291a4505050565b336119ab610e96565b6001600160a01b031614610dc55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108c8565b6115c78133611e7e565b611a158282610ecf565b6109f25760008281526009602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611a4d3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611a9b8282610ecf565b156109f25760008281526009602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6109f2828260405180602001604052806000815250611ee2565b816001600160a01b0316836001600160a01b03161415611bc25760405162461bcd60e51b815260206004820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b60448201526064016108c8565b6001600160a01b03838116600081815260076020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b606081611c535750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611c7d5780611c6781612b63565b9150611c769050600a83612abe565b9150611c57565b6000816001600160401b03811115611c9757611c97612566565b6040519080825280601f01601f191660200182016040528015611cc1576020820181803683370190505b5090505b841561181057611cd6600183612b96565b9150611ce3600a86612da8565b611cee906030612b7e565b60f81b818381518110611d0357611d03612b4d565b60200101906001600160f81b031916908160001a905350611d25600a86612abe565b9450611cc5565b600082611d398584611f15565b14949350505050565b6012546014546015546040516305d3b1d360e41b81526004810192909252600160a01b83046001600160401b03166024830152600160201b810461ffff16604483015263ffffffff9081166064830152831660848201526000916001600160a01b031690635d3b1d309060a401602060405180830381600087803b158015611dc957600080fd5b505af1158015611ddd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e019190612dbc565b6000908152600e6020526040902080546001600160a01b031916331790555050565b611e2e848484611818565b611e3a84848484611f62565b610e905760405162461bcd60e51b81526004016108c890612dd5565b60006107948261206f565b6000908152600460205260409020546001600160a01b0316151590565b611e888282610ecf565b6109f257611ea0816001600160a01b031660146120af565b611eab8360206120af565b604051602001611ebc929190612e27565b60408051601f198184030181529082905262461bcd60e51b82526108c8916004016124f9565b611eec8383612251565b611ef96000848484611f62565b6109695760405162461bcd60e51b81526004016108c890612dd5565b600081815b8451811015611f5a57611f4682868381518110611f3957611f39612b4d565b6020026020010151612371565b915080611f5281612b63565b915050611f1a565b509392505050565b60006001600160a01b0384163b1561206457604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611fa6903390899088908890600401612e96565b602060405180830381600087803b158015611fc057600080fd5b505af1925050508015611ff0575060408051601f3d908101601f19168201909252611fed91810190612ed3565b60015b61204a573d80801561201e576040519150601f19603f3d011682016040523d82523d6000602084013e612023565b606091505b5080516120425760405162461bcd60e51b81526004016108c890612dd5565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611810565b506001949350505050565b60006001600160e01b031982166380ac58cd60e01b14806120a057506001600160e01b03198216635b5e139f60e01b145b806107945750610794826123a0565b606060006120be836002612a89565b6120c9906002612b7e565b6001600160401b038111156120e0576120e0612566565b6040519080825280601f01601f19166020018201604052801561210a576020820181803683370190505b509050600360fc1b8160008151811061212557612125612b4d565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061215457612154612b4d565b60200101906001600160f81b031916908160001a9053506000612178846002612a89565b612183906001612b7e565b90505b60018111156121fb576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106121b7576121b7612b4d565b1a60f81b8282815181106121cd576121cd612b4d565b60200101906001600160f81b031916908160001a90535060049490941c936121f481612cd6565b9050612186565b50831561224a5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016108c8565b9392505050565b6001600160a01b0382166122a75760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016108c8565b6122b081611e61565b156122fc5760405162461bcd60e51b815260206004820152601c60248201527b115490cdcc8c4e881d1bdad95b88185b1c9958591e481b5a5b9d195960221b60448201526064016108c8565b6001600160a01b0382166000908152600560205260408120805460019290612325908490612b7e565b909155505060008181526004602052604080822080546001600160a01b0319166001600160a01b0386169081179091559051839290600080516020612f31833981519152908290a45050565b600081831061238d57600082815260208490526040902061224a565b600083815260208390526040902061224a565b60006001600160e01b0319821663152a902d60e11b148061079457506301ffc9a760e01b6001600160e01b0319831614610794565b8280546123e1906129ea565b90600052602060002090601f0160209004810192826124035760008555612449565b82601f1061241c57805160ff1916838001178555612449565b82800160010185558215612449579182015b8281111561244957825182559160200191906001019061242e565b50612455929150612459565b5090565b5b80821115612455576000815560010161245a565b6001600160e01b0319811681146115c757600080fd5b60006020828403121561249657600080fd5b813561224a8161246e565b60005b838110156124bc5781810151838201526020016124a4565b83811115610e905750506000910152565b600081518084526124e58160208601602086016124a1565b601f01601f19169290920160200192915050565b60208152600061224a60208301846124cd565b60006020828403121561251e57600080fd5b5035919050565b6001600160a01b03811681146115c757600080fd5b6000806040838503121561254d57600080fd5b823561255881612525565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156125a4576125a4612566565b604052919050565b600082601f8301126125bd57600080fd5b813560206001600160401b038211156125d8576125d8612566565b8160051b6125e782820161257c565b928352848101820192828101908785111561260157600080fd5b83870192505b8483101561262057823582529183019190830190612607565b979650505050505050565b6000806040838503121561263e57600080fd5b8235915060208301356001600160401b0381111561265b57600080fd5b612667858286016125ac565b9150509250929050565b60008060006060848603121561268657600080fd5b833561269181612525565b925060208401356126a181612525565b929592945050506040919091013590565b600080604083850312156126c557600080fd5b8235915060208301356126d781612525565b809150509250929050565b600080604083850312156126f557600080fd5b50508035926020909101359150565b60006001600160401b0383111561271d5761271d612566565b612730601f8401601f191660200161257c565b905082815283838301111561274457600080fd5b828260208301376000602084830101529392505050565b60006020828403121561276d57600080fd5b81356001600160401b0381111561278357600080fd5b8201601f8101841361279457600080fd5b61181084823560208401612704565b6000602082840312156127b557600080fd5b813561224a81612525565b6000806000606084860312156127d557600080fd5b8335925060208401356001600160401b038111156127f257600080fd5b6127fe868287016125ac565b925050604084013561280f81612525565b809150509250925092565b6000806040838503121561282d57600080fd5b823561283881612525565b9150602083013580151581146126d757600080fd5b60006020828403121561285f57600080fd5b813563ffffffff8116811461224a57600080fd5b60008060006040848603121561288857600080fd5b8335925060208401356001600160401b03808211156128a657600080fd5b818601915086601f8301126128ba57600080fd5b8135818111156128c957600080fd5b8760208260051b85010111156128de57600080fd5b6020830194508093505050509250925092565b6000806000806080858703121561290757600080fd5b843561291281612525565b9350602085013561292281612525565b92506040850135915060608501356001600160401b0381111561294457600080fd5b8501601f8101871361295557600080fd5b61296487823560208401612704565b91505092959194509250565b6000806040838503121561298357600080fd5b823561298e81612525565b915060208301356126d781612525565b6000602082840312156129b057600080fd5b81356001600160401b038116811461224a57600080fd5b6000602082840312156129d957600080fd5b813560ff8116811461224a57600080fd5b600181811c908216806129fe57607f821691505b60208210811415612a1f57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602e908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526d1c881b9bdc88185c1c1c9bdd995960921b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615612aa357612aa3612a73565b500290565b634e487b7160e01b600052601260045260246000fd5b600082612acd57612acd612aa8565b500490565b60208082526029908201527f546865206163636f756e7420646f6573206e6f74206861766520444556454c4f6040820152682822a9103937b6329760b91b606082015260800190565b602080825260189082015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6000600019821415612b7757612b77612a73565b5060010190565b60008219821115612b9157612b91612a73565b500190565b600082821015612ba857612ba8612a73565b500390565b60008151612bbf8185602086016124a1565b9290920192915050565b60008251612bdb8184602087016124a1565b7f2072656d61696e696e6720666f722074686520666972737420726f756e642e00920191825250601f01919050565b60609190911b6001600160601b031916815260140190565b6020808252601890820152772cb7ba9030b932903737ba102bb434ba32b634b9ba32b21760411b604082015260600190565b60008251612c668184602087016124a1565b7f2072656d61696e696e6720666f7220746865207365636f6e6420726f756e642e920191825250602001919050565b60008251612ca78184602087016124a1565b7f2072656d61696e696e6720666f722074686520746869726420726f756e642e00920191825250601f01919050565b600081612ce557612ce5612a73565b506000190190565b600080845481600182811c915080831680612d0957607f831692505b6020808410821415612d2957634e487b7160e01b86526022600452602486fd5b818015612d3d5760018114612d4e57612d7b565b60ff19861689528489019650612d7b565b60008b81526020902060005b86811015612d735781548b820152908501908301612d5a565b505084890196505b505050505050612d9f612d8e8286612bad565b64173539b7b760d91b815260050190565b95945050505050565b600082612db757612db7612aa8565b500690565b600060208284031215612dce57600080fd5b5051919050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b815260008351612e598160178501602088016124a1565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612e8a8160288401602088016124a1565b01602801949350505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612ec9908301846124cd565b9695505050505050565b600060208284031215612ee557600080fd5b815161224a8161246e56fe43616e6e6f7420706173732063757a206c6573732070726963653a20737465702714cbbaddbb71bcae9366d8bf7770636ec7ae63227b573986d2f54fffacb39dddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220d20803185c1dbd45e59be05843a85b3a8a2ac83e35b48186372d085ffc24686e64736f6c634300080900332714cbbaddbb71bcae9366d8bf7770636ec7ae63227b573986d2f54fffacb39d697066733a2f2f62616679626569617a6b65326c6b7665636535747570756d35376e6c32636e6b7862756a7478666c69613777706e373237676c736e6e7a7061656d2f00000000000000000000000000000000000000000000000000000000000001020000000000000000000000000000000000000000000000000000000000000001
Deployed Bytecode
0x6080604052600436106101ec5760003560e01c806301ffc9a7146101f157806306fdde0314610226578063081812fc14610248578063095ea7b31461028057806318160ddd146102a25780631fe543e3146102c657806323b872dd146102e6578063248a9ca31461030657806324f746971461032657806329cbab9f146103585780632a55205a1461036b5780632f2ff15d146103aa57806336568abe146103ca5780633c934ab3146103ea57806342842e0e1461040c5780634f07de091461042c57806355f804b31461044c5780635b44560a1461046c5780636352211e146104825780636c0360eb146104a257806370a08231146104b7578063715018a6146104d75780637cb64759146104ec578063893e77691461050c5780638ac000211461052c5780638da5cb5b1461056b5780638dc251e31461058057806391d14854146105a057806395d89b41146105c057806398544710146105d5578063a217fddf146105f5578063a22cb4651461060a578063a30b8fc21461062a578063a4eb718c1461064a578063ae7c122e1461066a578063b88d4fde1461067d578063c87b56dd1461069d578063d547741f146106bd578063e25fe175146106dd578063e985e9c514610709578063ea7b4f7714610729578063f2fde38b14610749578063f8b89dfb14610769575b600080fd5b3480156101fd57600080fd5b5061021161020c366004612484565b610789565b60405190151581526020015b60405180910390f35b34801561023257600080fd5b5061023b61079a565b60405161021d91906124f9565b34801561025457600080fd5b5061026861026336600461250c565b61082c565b6040516001600160a01b03909116815260200161021d565b34801561028c57600080fd5b506102a061029b36600461253a565b610853565b005b3480156102ae57600080fd5b506102b8600c5481565b60405190815260200161021d565b3480156102d257600080fd5b506102a06102e136600461262b565b61096e565b3480156102f257600080fd5b506102a0610301366004612671565b6109f6565b34801561031257600080fd5b506102b861032136600461250c565b610a27565b34801561033257600080fd5b506015546103439063ffffffff1681565b60405163ffffffff909116815260200161021d565b6102a06103663660046126b2565b610a3c565b34801561037757600080fd5b5061038b6103863660046126e2565b610b2e565b604080516001600160a01b03909316835260208301919091520161021d565b3480156103b657600080fd5b506102a06103c53660046126b2565b610b65565b3480156103d657600080fd5b506102a06103e53660046126b2565b610b81565b3480156103f657600080fd5b506102b8600080516020612f1183398151915281565b34801561041857600080fd5b506102a0610427366004612671565b610bfb565b34801561043857600080fd5b506102a061044736600461250c565b610c16565b34801561045857600080fd5b506102a061046736600461275b565b610c23565b34801561047857600080fd5b506102b860105481565b34801561048e57600080fd5b5061026861049d36600461250c565b610c6a565b3480156104ae57600080fd5b5061023b610c9f565b3480156104c357600080fd5b506102b86104d23660046127a3565b610d2d565b3480156104e357600080fd5b506102a0610db3565b3480156104f857600080fd5b506102a061050736600461250c565b610dc7565b34801561051857600080fd5b506102a06105273660046127c0565b610e00565b34801561053857600080fd5b5060125461055390600160a01b90046001600160401b031681565b6040516001600160401b03909116815260200161021d565b34801561057757600080fd5b50610268610e96565b34801561058c57600080fd5b506102a061059b3660046127a3565b610ea5565b3480156105ac57600080fd5b506102116105bb3660046126b2565b610ecf565b3480156105cc57600080fd5b5061023b610efa565b3480156105e157600080fd5b506102a06105f036600461250c565b610f09565b34801561060157600080fd5b506102b8600081565b34801561061657600080fd5b506102a061062536600461281a565b610f42565b34801561063657600080fd5b50600f54610268906001600160a01b031681565b34801561065657600080fd5b506102a061066536600461284d565b610f4d565b6102a0610678366004612873565b610f9d565b34801561068957600080fd5b506102a06106983660046128f1565b61140e565b3480156106a957600080fd5b5061023b6106b836600461250c565b611440565b3480156106c957600080fd5b506102a06106d83660046126b2565b6114a7565b3480156106e957600080fd5b50600b546106f79060ff1681565b60405160ff909116815260200161021d565b34801561071557600080fd5b50610211610724366004612970565b6114c3565b34801561073557600080fd5b506102a061074436600461299e565b6114f1565b34801561075557600080fd5b506102a06107643660046127a3565b611551565b34801561077557600080fd5b506102a06107843660046129c7565b6115ca565b600061079482611614565b92915050565b6060600280546107a9906129ea565b80601f01602080910402602001604051908101604052809291908181526020018280546107d5906129ea565b80156108225780601f106107f757610100808354040283529160200191610822565b820191906000526020600020905b81548152906001019060200180831161080557829003601f168201915b5050505050905090565b600061083782611639565b506000908152600660205260409020546001600160a01b031690565b600061085e82610c6a565b9050806001600160a01b0316836001600160a01b031614156108d15760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b03821614806108ed57506108ed81336114c3565b61095f5760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c000060648201526084016108c8565b610969838361165e565b505050565b336001600160a01b037f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e6990916146109e85760405163073e64fd60e21b81523360048201526001600160a01b037f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e699091660248201526044016108c8565b6109f282826116cc565b5050565b610a0033826117b9565b610a1c5760405162461bcd60e51b81526004016108c890612a25565b610969838383611818565b60009081526009602052604090206001015490565b610a446119a2565b47821115610a945760405162461bcd60e51b815260206004820152601f60248201527f616d6f756e74206d757374206265203c3d207468616e2062616c616e63652e0060448201526064016108c8565b6000816001600160a01b03168360405160006040518083038185875af1925050503d8060008114610ae1576040519150601f19603f3d011682016040523d82523d6000602084013e610ae6565b606091505b50509050806109695760405162461bcd60e51b81526020600482015260146024820152732330b4b632b2103a379039b2b7321022ba3432b960611b60448201526064016108c8565b600f546010546001600160a01b039091169060009061271090610b52908590612a89565b610b5c9190612abe565b90509250929050565b610b6e82610a27565b610b7781611a01565b6109698383611a0b565b6001600160a01b0381163314610bf15760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016108c8565b6109f28282611a91565b6109698383836040518060200160405280600081525061140e565b610c1e6119a2565b601055565b610c3b600080516020612f1183398151915233610ecf565b610c575760405162461bcd60e51b81526004016108c890612ad2565b80516109f290600d9060208401906123d5565b6000818152600460205260408120546001600160a01b0316806107945760405162461bcd60e51b81526004016108c890612b1b565b600d8054610cac906129ea565b80601f0160208091040260200160405190810160405280929190818152602001828054610cd8906129ea565b8015610d255780601f10610cfa57610100808354040283529160200191610d25565b820191906000526020600020905b815481529060010190602001808311610d0857829003601f168201915b505050505081565b60006001600160a01b038216610d975760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b60648201526084016108c8565b506001600160a01b031660009081526005602052604090205490565b610dbb6119a2565b610dc56000611af8565b565b610ddf600080516020612f1183398151915233610ecf565b610dfb5760405162461bcd60e51b81526004016108c890612ad2565b601155565b610e086119a2565b81518314610e505760405162461bcd60e51b81526020600482015260156024820152740daeae6e840d0c2ecca40e6c2daca40d8cadccee8d605b1b60448201526064016108c8565b60005b83811015610e9057610e7e82848381518110610e7157610e71612b4d565b6020026020010151611b4a565b80610e8881612b63565b915050610e53565b50505050565b6008546001600160a01b031690565b610ead6119a2565b600f80546001600160a01b0319166001600160a01b0392909216919091179055565b60009182526009602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6060600380546107a9906129ea565b610f21600080516020612f1183398151915233610ecf565b610f3d5760405162461bcd60e51b81526004016108c890612ad2565b601455565b6109f2338383611b64565b610f65600080516020612f1183398151915233610ecf565b610f815760405162461bcd60e51b81526004016108c890612ad2565b6015805463ffffffff191663ffffffff92909216919091179055565b600b5460ff1615801590610fb85750600b54600460ff909116105b610ff35760405162461bcd60e51b815260206004820152600c60248201526b04e6f204d696e7420737465760a41b60448201526064016108c8565b600583111561103e5760405162461bcd60e51b815260206004820152601760248201527626b0bc101a903832b9103a3930b739b0b1ba34b7b7399760491b60448201526064016108c8565b600b5460ff16600114156111a4576107d083611059600a5490565b6110639190612b7e565b1115611082611071600a5490565b61107d906107d0612b96565b611c2f565b6040516020016110929190612bc9565b604051602081830303815290604052906110bf5760405162461bcd60e51b81526004016108c891906124f9565b506110d283670214e8348c4f0000612a89565b34101561111a5760405162461bcd60e51b81526020600482015260226024820152600080516020612ef1833981519152604482015261203160f01b60648201526084016108c8565b60003360405160200161112d9190612c0a565b604051602081830303815290604052805190602001209050611186838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506011549150849050611d2c565b6111a25760405162461bcd60e51b81526004016108c890612c22565b505b600b5460ff166002141561130557611770836111bf600a5490565b6111c99190612b7e565b11156111e36111d7600a5490565b61107d90611770612b96565b6040516020016111f39190612c54565b604051602081830303815290604052906112205760405162461bcd60e51b81526004016108c891906124f9565b50611233836703782dace9d90000612a89565b34101561127b5760405162461bcd60e51b81526020600482015260226024820152600080516020612ef1833981519152604482015261101960f11b60648201526084016108c8565b60003360405160200161128e9190612c0a565b6040516020818303038152906040528051906020012090506112e7838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506011549150849050611d2c565b6113035760405162461bcd60e51b81526004016108c890612c22565b505b600b5460ff16600314156113dc5761271083611320600a5490565b61132a9190612b7e565b1115611344611338600a5490565b61107d90612710612b96565b6040516020016113549190612c95565b604051602081830303815290604052906113815760405162461bcd60e51b81526004016108c891906124f9565b5061139483670429d069189e0000612a89565b3410156113dc5760405162461bcd60e51b81526020600482015260226024820152600080516020612ef1833981519152604482015261203360f01b60648201526084016108c8565b825b8015611404576113f2600a80546001019055565b806113fc81612cd6565b9150506113de565b5061096983611d42565b61141833836117b9565b6114345760405162461bcd60e51b81526004016108c890612a25565b610e9084848484611e23565b606061144b82611639565b6000600d805461145a906129ea565b9050116114765760405180602001604052806000815250610794565b600d61148183611c2f565b604051602001611492929190612ced565b60405160208183030381529060405292915050565b6114b082610a27565b6114b981611a01565b6109698383611a91565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b611509600080516020612f1183398151915233610ecf565b6115255760405162461bcd60e51b81526004016108c890612ad2565b601280546001600160401b03909216600160a01b02600160a01b600160e01b0319909216919091179055565b6115596119a2565b6001600160a01b0381166115be5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016108c8565b6115c781611af8565b50565b6115e2600080516020612f1183398151915233610ecf565b6115fe5760405162461bcd60e51b81526004016108c890612ad2565b600b805460ff191660ff92909216919091179055565b60006001600160e01b03198216637965db0b60e01b1480610794575061079482611e56565b61164281611e61565b6115c75760405162461bcd60e51b81526004016108c890612b1b565b600081815260066020526040902080546001600160a01b0319166001600160a01b038416908117909155819061169382610c6a565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60005b8151811015611799576000600c548383815181106116ef576116ef612b4d565b60200260200101516117019190612da8565b61170c906001612b7e565b6000858152600e6020526040902054909150611731906001600160a01b031682611b4a565b6000848152600e60209081526040918290205482518481526001600160a01b03909116918101919091527f1949238c809a066bd92c57bb0094f41e2a27706514b3a220ada4656b09f50c07910160405180910390a1508061179181612b63565b9150506116cf565b50506000908152600e6020526040902080546001600160a01b0319169055565b6000806117c583610c6a565b9050806001600160a01b0316846001600160a01b031614806117ec57506117ec81856114c3565b806118105750836001600160a01b03166118058461082c565b6001600160a01b0316145b949350505050565b826001600160a01b031661182b82610c6a565b6001600160a01b03161461188f5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b60648201526084016108c8565b6001600160a01b0382166118f15760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016108c8565b6118fc60008261165e565b6001600160a01b0383166000908152600560205260408120805460019290611925908490612b96565b90915550506001600160a01b0382166000908152600560205260408120805460019290611953908490612b7e565b909155505060008181526004602052604080822080546001600160a01b0319166001600160a01b038681169182179092559151849391871691600080516020612f3183398151915291a4505050565b336119ab610e96565b6001600160a01b031614610dc55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108c8565b6115c78133611e7e565b611a158282610ecf565b6109f25760008281526009602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611a4d3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611a9b8282610ecf565b156109f25760008281526009602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6109f2828260405180602001604052806000815250611ee2565b816001600160a01b0316836001600160a01b03161415611bc25760405162461bcd60e51b815260206004820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b60448201526064016108c8565b6001600160a01b03838116600081815260076020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b606081611c535750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611c7d5780611c6781612b63565b9150611c769050600a83612abe565b9150611c57565b6000816001600160401b03811115611c9757611c97612566565b6040519080825280601f01601f191660200182016040528015611cc1576020820181803683370190505b5090505b841561181057611cd6600183612b96565b9150611ce3600a86612da8565b611cee906030612b7e565b60f81b818381518110611d0357611d03612b4d565b60200101906001600160f81b031916908160001a905350611d25600a86612abe565b9450611cc5565b600082611d398584611f15565b14949350505050565b6012546014546015546040516305d3b1d360e41b81526004810192909252600160a01b83046001600160401b03166024830152600160201b810461ffff16604483015263ffffffff9081166064830152831660848201526000916001600160a01b031690635d3b1d309060a401602060405180830381600087803b158015611dc957600080fd5b505af1158015611ddd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e019190612dbc565b6000908152600e6020526040902080546001600160a01b031916331790555050565b611e2e848484611818565b611e3a84848484611f62565b610e905760405162461bcd60e51b81526004016108c890612dd5565b60006107948261206f565b6000908152600460205260409020546001600160a01b0316151590565b611e888282610ecf565b6109f257611ea0816001600160a01b031660146120af565b611eab8360206120af565b604051602001611ebc929190612e27565b60408051601f198184030181529082905262461bcd60e51b82526108c8916004016124f9565b611eec8383612251565b611ef96000848484611f62565b6109695760405162461bcd60e51b81526004016108c890612dd5565b600081815b8451811015611f5a57611f4682868381518110611f3957611f39612b4d565b6020026020010151612371565b915080611f5281612b63565b915050611f1a565b509392505050565b60006001600160a01b0384163b1561206457604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611fa6903390899088908890600401612e96565b602060405180830381600087803b158015611fc057600080fd5b505af1925050508015611ff0575060408051601f3d908101601f19168201909252611fed91810190612ed3565b60015b61204a573d80801561201e576040519150601f19603f3d011682016040523d82523d6000602084013e612023565b606091505b5080516120425760405162461bcd60e51b81526004016108c890612dd5565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611810565b506001949350505050565b60006001600160e01b031982166380ac58cd60e01b14806120a057506001600160e01b03198216635b5e139f60e01b145b806107945750610794826123a0565b606060006120be836002612a89565b6120c9906002612b7e565b6001600160401b038111156120e0576120e0612566565b6040519080825280601f01601f19166020018201604052801561210a576020820181803683370190505b509050600360fc1b8160008151811061212557612125612b4d565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061215457612154612b4d565b60200101906001600160f81b031916908160001a9053506000612178846002612a89565b612183906001612b7e565b90505b60018111156121fb576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106121b7576121b7612b4d565b1a60f81b8282815181106121cd576121cd612b4d565b60200101906001600160f81b031916908160001a90535060049490941c936121f481612cd6565b9050612186565b50831561224a5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016108c8565b9392505050565b6001600160a01b0382166122a75760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016108c8565b6122b081611e61565b156122fc5760405162461bcd60e51b815260206004820152601c60248201527b115490cdcc8c4e881d1bdad95b88185b1c9958591e481b5a5b9d195960221b60448201526064016108c8565b6001600160a01b0382166000908152600560205260408120805460019290612325908490612b7e565b909155505060008181526004602052604080822080546001600160a01b0319166001600160a01b0386169081179091559051839290600080516020612f31833981519152908290a45050565b600081831061238d57600082815260208490526040902061224a565b600083815260208390526040902061224a565b60006001600160e01b0319821663152a902d60e11b148061079457506301ffc9a760e01b6001600160e01b0319831614610794565b8280546123e1906129ea565b90600052602060002090601f0160209004810192826124035760008555612449565b82601f1061241c57805160ff1916838001178555612449565b82800160010185558215612449579182015b8281111561244957825182559160200191906001019061242e565b50612455929150612459565b5090565b5b80821115612455576000815560010161245a565b6001600160e01b0319811681146115c757600080fd5b60006020828403121561249657600080fd5b813561224a8161246e565b60005b838110156124bc5781810151838201526020016124a4565b83811115610e905750506000910152565b600081518084526124e58160208601602086016124a1565b601f01601f19169290920160200192915050565b60208152600061224a60208301846124cd565b60006020828403121561251e57600080fd5b5035919050565b6001600160a01b03811681146115c757600080fd5b6000806040838503121561254d57600080fd5b823561255881612525565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156125a4576125a4612566565b604052919050565b600082601f8301126125bd57600080fd5b813560206001600160401b038211156125d8576125d8612566565b8160051b6125e782820161257c565b928352848101820192828101908785111561260157600080fd5b83870192505b8483101561262057823582529183019190830190612607565b979650505050505050565b6000806040838503121561263e57600080fd5b8235915060208301356001600160401b0381111561265b57600080fd5b612667858286016125ac565b9150509250929050565b60008060006060848603121561268657600080fd5b833561269181612525565b925060208401356126a181612525565b929592945050506040919091013590565b600080604083850312156126c557600080fd5b8235915060208301356126d781612525565b809150509250929050565b600080604083850312156126f557600080fd5b50508035926020909101359150565b60006001600160401b0383111561271d5761271d612566565b612730601f8401601f191660200161257c565b905082815283838301111561274457600080fd5b828260208301376000602084830101529392505050565b60006020828403121561276d57600080fd5b81356001600160401b0381111561278357600080fd5b8201601f8101841361279457600080fd5b61181084823560208401612704565b6000602082840312156127b557600080fd5b813561224a81612525565b6000806000606084860312156127d557600080fd5b8335925060208401356001600160401b038111156127f257600080fd5b6127fe868287016125ac565b925050604084013561280f81612525565b809150509250925092565b6000806040838503121561282d57600080fd5b823561283881612525565b9150602083013580151581146126d757600080fd5b60006020828403121561285f57600080fd5b813563ffffffff8116811461224a57600080fd5b60008060006040848603121561288857600080fd5b8335925060208401356001600160401b03808211156128a657600080fd5b818601915086601f8301126128ba57600080fd5b8135818111156128c957600080fd5b8760208260051b85010111156128de57600080fd5b6020830194508093505050509250925092565b6000806000806080858703121561290757600080fd5b843561291281612525565b9350602085013561292281612525565b92506040850135915060608501356001600160401b0381111561294457600080fd5b8501601f8101871361295557600080fd5b61296487823560208401612704565b91505092959194509250565b6000806040838503121561298357600080fd5b823561298e81612525565b915060208301356126d781612525565b6000602082840312156129b057600080fd5b81356001600160401b038116811461224a57600080fd5b6000602082840312156129d957600080fd5b813560ff8116811461224a57600080fd5b600181811c908216806129fe57607f821691505b60208210811415612a1f57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602e908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526d1c881b9bdc88185c1c1c9bdd995960921b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615612aa357612aa3612a73565b500290565b634e487b7160e01b600052601260045260246000fd5b600082612acd57612acd612aa8565b500490565b60208082526029908201527f546865206163636f756e7420646f6573206e6f74206861766520444556454c4f6040820152682822a9103937b6329760b91b606082015260800190565b602080825260189082015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6000600019821415612b7757612b77612a73565b5060010190565b60008219821115612b9157612b91612a73565b500190565b600082821015612ba857612ba8612a73565b500390565b60008151612bbf8185602086016124a1565b9290920192915050565b60008251612bdb8184602087016124a1565b7f2072656d61696e696e6720666f722074686520666972737420726f756e642e00920191825250601f01919050565b60609190911b6001600160601b031916815260140190565b6020808252601890820152772cb7ba9030b932903737ba102bb434ba32b634b9ba32b21760411b604082015260600190565b60008251612c668184602087016124a1565b7f2072656d61696e696e6720666f7220746865207365636f6e6420726f756e642e920191825250602001919050565b60008251612ca78184602087016124a1565b7f2072656d61696e696e6720666f722074686520746869726420726f756e642e00920191825250601f01919050565b600081612ce557612ce5612a73565b506000190190565b600080845481600182811c915080831680612d0957607f831692505b6020808410821415612d2957634e487b7160e01b86526022600452602486fd5b818015612d3d5760018114612d4e57612d7b565b60ff19861689528489019650612d7b565b60008b81526020902060005b86811015612d735781548b820152908501908301612d5a565b505084890196505b505050505050612d9f612d8e8286612bad565b64173539b7b760d91b815260050190565b95945050505050565b600082612db757612db7612aa8565b500690565b600060208284031215612dce57600080fd5b5051919050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b815260008351612e598160178501602088016124a1565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351612e8a8160288401602088016124a1565b01602801949350505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612ec9908301846124cd565b9695505050505050565b600060208284031215612ee557600080fd5b815161224a8161246e56fe43616e6e6f7420706173732063757a206c6573732070726963653a20737465702714cbbaddbb71bcae9366d8bf7770636ec7ae63227b573986d2f54fffacb39dddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220d20803185c1dbd45e59be05843a85b3a8a2ac83e35b48186372d085ffc24686e64736f6c63430008090033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000001020000000000000000000000000000000000000000000000000000000000000001
-----Decoded View---------------
Arg [0] : _subscriptionId (uint64): 258
Arg [1] : _step (uint8): 1
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000102
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000001
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.