ERC-721
Overview
Max Total Supply
48 POP
Holders
24
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
3 POPLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
Poppables
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "./ERC721A.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import {MerkleProof} from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@chainlink/contracts/src/v0.8/interfaces/LinkTokenInterface.sol"; import "@chainlink/contracts/src/v0.8/interfaces/VRFCoordinatorV2Interface.sol"; import "@chainlink/contracts/src/v0.8/VRFConsumerBaseV2.sol"; contract Poppables is ERC721A, Ownable, ReentrancyGuard, AccessControl, VRFConsumerBaseV2 { using SafeMath for uint256; VRFCoordinatorV2Interface COORDINATOR; LinkTokenInterface LINKTOKEN; bool public poppablesActive = false; uint256 public price; bytes32 public giftRoot; bytes32 public constant DEV_ROLE = keccak256("DEV_ROLE"); address private account1; address private account2; address private account3; address private account4; uint256 private maxMintableSupply; uint256 private maxSupply; uint256 private _seed = 0; string private _contractURI; string private _tokenBaseURI; uint64 private s_subscriptionId; address vrfCoordinator = 0x271682DEB8C4E0901D1a1550aD2e64D568E69909; address link = 0x514910771AF9Ca656af840dff83E8264EcF986CA; bytes32 keyHash = 0x8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef; uint32 private callbackGasLimit = 100000; uint16 private requestConfirmations = 3; uint32 private numWords = 1; uint256 public s_requestId; event NFTMinted(bool state, uint256 quantity); event GiftNFTMinted(bool state); event NFTAirdropped(bool state); event NFTRandomnessRequest(uint256 timestamp); event NFTRandomnessFullfill(uint256 timestamp); event NFTChainlinkError(uint256 timestamp, uint256 requestId); constructor( address _account1, address _account2, address _account3, address _account4, address devRoleAdress, uint64 subscriptionId ) ERC721A("Poppables", "POP") VRFConsumerBaseV2(vrfCoordinator) { COORDINATOR = VRFCoordinatorV2Interface(vrfCoordinator); LINKTOKEN = LinkTokenInterface(link); s_subscriptionId = subscriptionId; price = 50000000000000000; //0.05 ETH maxMintableSupply = 1600; maxSupply = 9599; account1 = _account1; account2 = _account2; account3 = _account3; account4 = _account4; _contractURI = "https://www.poppables.io/opensea.json"; _tokenBaseURI = "https://poppables.mypinata.cloud/ipfs/QmbQfWj7y6QeAAU4ibzAG94JFYThaH9NR2ktSEAjmMAnCU/"; _setupRole(DEFAULT_ADMIN_ROLE, msg.sender); _setupRole(DEV_ROLE, devRoleAdress); } function mintNFTs(uint256 quantity) external payable nonReentrant { require(poppablesActive, "Not active"); require(quantity >= 1 && quantity < 23, "Wrong quantity"); require( totalSupply() + quantity <= maxMintableSupply, "Cannot mint more" ); require(msg.value >= price.mul(quantity), "Not enough ETH"); _safeMint(msg.sender, quantity); emit NFTMinted(true, quantity); } function mintGiftNFTs(address minter, bytes32[] calldata proof) external payable nonReentrant { require(poppablesActive, "Not active"); require(totalSupply() + 1 <= maxMintableSupply, "Cannot mint more"); bytes32 leaf = keccak256(abi.encodePacked(minter)); bool inTheList = MerkleProof.verify(proof, giftRoot, leaf); require(inTheList, "Not in the git list"); _safeMint(msg.sender, 1); emit GiftNFTMinted(true); } function airdrop(address receiver) external nonReentrant onlyRole(DEV_ROLE) { require(poppablesActive, "Not active"); require(totalSupply() + 1 <= maxMintableSupply, "Cannot mint more"); _safeMint(receiver, 1); emit NFTAirdropped(true); } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); return string( abi.encodePacked(_tokenBaseURI, metadataOf(tokenId), ".json") ); } function metadataOf(uint256 tokenId) internal view returns (string memory) { uint256[] memory metaIds = new uint256[](maxSupply); uint256 ss = _seed; for (uint256 i = 0; i < maxSupply; i += 1) { metaIds[i] = i; } for (uint256 i = 0; i < maxSupply; i += 1) { uint256 j = (uint256(keccak256(abi.encode(ss, i))) % (maxSupply)); (metaIds[i], metaIds[j]) = (metaIds[j], metaIds[i]); } return Strings.toString(metaIds[tokenId]); } function toggleActive() external onlyRole(DEV_ROLE) { poppablesActive = !poppablesActive; } function contractURI() public view returns (string memory) { return _contractURI; } function setContractURI(string memory contractUri) external onlyRole(DEV_ROLE) { _contractURI = contractUri; } function setBaseURI(string memory baseURI) external onlyRole(DEV_ROLE) { _tokenBaseURI = baseURI; } function setSeed(uint256 randomNumber) public onlyRole(DEV_ROLE) { _seed = randomNumber; } function updateGiftRoot(bytes32 _merkleGiftRoot) external onlyRole(DEV_ROLE) { giftRoot = _merkleGiftRoot; } function withdraw() external onlyOwner nonReentrant { uint256 balance = address(this).balance; payable(account1).transfer(balance.mul(15).div(100)); payable(account2).transfer(balance.mul(15).div(100)); payable(account3).transfer(balance.mul(20).div(100)); payable(account4).transfer(balance.mul(50).div(100)); } function updateKeyHash(bytes32 _keyHash) external onlyRole(DEV_ROLE) { keyHash = _keyHash; } function requestRandomWords() external onlyRole(DEV_ROLE) { s_requestId = COORDINATOR.requestRandomWords( keyHash, s_subscriptionId, requestConfirmations, callbackGasLimit, numWords ); emit NFTRandomnessRequest(block.timestamp); } function fulfillRandomWords(uint256 requestId, uint256[] memory randomWords) internal override { uint256 randomNumber = randomWords[0]; if (randomNumber > 0) { _seed = randomNumber; emit NFTRandomnessFullfill(block.timestamp); } else { emit NFTChainlinkError(block.timestamp, requestId); } } function supportsInterface(bytes4 interfaceId) public view override(ERC721A, AccessControl) returns (bool) { return super.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // Creator: Chiru Labs pragma solidity ^0.8.4; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; error ApprovalCallerNotOwnerNorApproved(); error ApprovalQueryForNonexistentToken(); error ApproveToCaller(); error ApprovalToCurrentOwner(); error BalanceQueryForZeroAddress(); error MintedQueryForZeroAddress(); error BurnedQueryForZeroAddress(); error AuxQueryForZeroAddress(); error MintToZeroAddress(); error MintZeroQuantity(); error OwnerIndexOutOfBounds(); error OwnerQueryForNonexistentToken(); error TokenIndexOutOfBounds(); error TransferCallerNotOwnerNorApproved(); error TransferFromIncorrectOwner(); error TransferToNonERC721ReceiverImplementer(); error TransferToZeroAddress(); error URIQueryForNonexistentToken(); /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..). * * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * * Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721A is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps track of the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; } // Compiler will pack this into a single 256bit word. struct AddressData { // Realistically, 2**64-1 is more than enough. uint64 balance; // Keeps track of mint count with minimal overhead for tokenomics. uint64 numberMinted; // Keeps track of burn count with minimal overhead for tokenomics. uint64 numberBurned; // For miscellaneous variable(s) pertaining to the address // (e.g. number of whitelist mint slots used). // If there are multiple variables, please pack them into a uint64. uint64 aux; } // The tokenId of the next token to be minted. uint256 internal _currentIndex; // The number of tokens burned. uint256 internal _burnCounter; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. See ownershipOf implementation for details. mapping(uint256 => TokenOwnership) internal _ownerships; // Mapping owner address to address data mapping(address => AddressData) private _addressData; // 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; constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than _currentIndex times unchecked { return _currentIndex - _burnCounter; } } /** * @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 override returns (uint256) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return uint256(_addressData[owner].balance); } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { if (owner == address(0)) revert MintedQueryForZeroAddress(); return uint256(_addressData[owner].numberMinted); } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { if (owner == address(0)) revert BurnedQueryForZeroAddress(); return uint256(_addressData[owner].numberBurned); } /** * Returns the auxillary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { if (owner == address(0)) revert AuxQueryForZeroAddress(); return _addressData[owner].aux; } /** * Sets the auxillary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal { if (owner == address(0)) revert AuxQueryForZeroAddress(); _addressData[owner].aux = aux; } /** * Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around in the collection over time. */ function ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) { uint256 curr = tokenId; unchecked { if (curr < _currentIndex) { TokenOwnership memory ownership = _ownerships[curr]; if (!ownership.burned) { if (ownership.addr != address(0)) { return ownership; } // Invariant: // There will always be an ownership that has an address and is not burned // before an ownership that does not have an address and is not burned. // Hence, curr will not underflow. while (true) { curr--; ownership = _ownerships[curr]; if (ownership.addr != address(0)) { return ownership; } } } } } revert OwnerQueryForNonexistentToken(); } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view override returns (address) { return ownershipOf(tokenId).addr; } /** * @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) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); 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 overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public override { address owner = ERC721A.ownerOf(tokenId); if (to == owner) revert ApprovalToCurrentOwner(); if (_msgSender() != owner && !isApprovedForAll(owner, _msgSender())) { revert ApprovalCallerNotOwnerNorApproved(); } _approve(to, tokenId, owner); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public override { if (operator == _msgSender()) revert ApproveToCaller(); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_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 { _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 { _transfer(from, to, tokenId); if (!_checkOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @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`), */ function _exists(uint256 tokenId) internal view returns (bool) { return tokenId < _currentIndex && !_ownerships[tokenId].burned; } function _safeMint(address to, uint256 quantity) internal { _safeMint(to, quantity, ""); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal { _mint(to, quantity, _data, true); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _mint( address to, uint256 quantity, bytes memory _data, bool safe ) internal { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1 // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1 unchecked { _addressData[to].balance += uint64(quantity); _addressData[to].numberMinted += uint64(quantity); _ownerships[startTokenId].addr = to; _ownerships[startTokenId].startTimestamp = uint64(block.timestamp); uint256 updatedIndex = startTokenId; for (uint256 i; i < quantity; i++) { emit Transfer(address(0), to, updatedIndex); if ( safe && !_checkOnERC721Received(address(0), to, updatedIndex, _data) ) { revert TransferToNonERC721ReceiverImplementer(); } updatedIndex++; } _currentIndex = updatedIndex; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Transfers `tokenId` from `from` to `to`. * * 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 ) private { TokenOwnership memory prevOwnership = ownershipOf(tokenId); bool isApprovedOrOwner = (_msgSender() == prevOwnership.addr || isApprovedForAll(prevOwnership.addr, _msgSender()) || getApproved(tokenId) == _msgSender()); if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved(); if (prevOwnership.addr != from) revert TransferFromIncorrectOwner(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, prevOwnership.addr); // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256. unchecked { _addressData[from].balance -= 1; _addressData[to].balance += 1; _ownerships[tokenId].addr = to; _ownerships[tokenId].startTimestamp = uint64(block.timestamp); // If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it. // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls. uint256 nextTokenId = tokenId + 1; if (_ownerships[nextTokenId].addr == address(0)) { // This will suffice for checking _exists(nextTokenId), // as a burned slot cannot contain the zero address. if (nextTokenId < _currentIndex) { _ownerships[nextTokenId].addr = prevOwnership.addr; _ownerships[nextTokenId].startTimestamp = prevOwnership .startTimestamp; } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @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 { TokenOwnership memory prevOwnership = ownershipOf(tokenId); _beforeTokenTransfers(prevOwnership.addr, address(0), tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, prevOwnership.addr); // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256. unchecked { _addressData[prevOwnership.addr].balance -= 1; _addressData[prevOwnership.addr].numberBurned += 1; // Keep track of who burned the token, and the timestamp of burning. _ownerships[tokenId].addr = prevOwnership.addr; _ownerships[tokenId].startTimestamp = uint64(block.timestamp); _ownerships[tokenId].burned = true; // If the ownership slot of tokenId+1 is not explicitly set, that means the burn initiator owns it. // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls. uint256 nextTokenId = tokenId + 1; if (_ownerships[nextTokenId].addr == address(0)) { // This will suffice for checking _exists(nextTokenId), // as a burned slot cannot contain the zero address. if (nextTokenId < _currentIndex) { _ownerships[nextTokenId].addr = prevOwnership.addr; _ownerships[nextTokenId].startTimestamp = prevOwnership .startTimestamp; } } } emit Transfer(prevOwnership.addr, address(0), tokenId); _afterTokenTransfers(prevOwnership.addr, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve( address to, uint256 tokenId, address owner ) private { _tokenApprovals[tokenId] = to; emit Approval(owner, to, tokenId); } /** * @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(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting. * And also called before burning one token. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * 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, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes * minting. * And also called after one token has been burned. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol) pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; import "../utils/Context.sol"; import "../utils/Strings.sol"; import "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role, _msgSender()); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view 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. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Trees proofs. * * The proofs can be generated using the JavaScript library * https://github.com/miguelmota/merkletreejs[merkletreejs]. * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled. * * See `test/utils/cryptography/MerkleProof.test.js` for some examples. */ 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 Returns the rebuilt hash obtained by traversing a Merklee 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++) { bytes32 proofElement = proof[i]; if (computedHash <= proofElement) { // Hash(current computed hash + current element of the proof) computedHash = _efficientHash(computedHash, proofElement); } else { // Hash(current element of the proof + current computed hash) computedHash = _efficientHash(proofElement, computedHash); } } return computedHash; } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface LinkTokenInterface { function allowance(address owner, address spender) external view returns (uint256 remaining); function approve(address spender, uint256 value) external returns (bool success); function balanceOf(address owner) external view returns (uint256 balance); function decimals() external view returns (uint8 decimalPlaces); function decreaseApproval(address spender, uint256 addedValue) external returns (bool success); function increaseApproval(address spender, uint256 subtractedValue) external; function name() external view returns (string memory tokenName); function symbol() external view returns (string memory tokenSymbol); function totalSupply() external view returns (uint256 totalTokensIssued); function transfer(address to, uint256 value) external returns (bool success); function transferAndCall( address to, uint256 value, bytes calldata data ) external returns (bool success); function transferFrom( address from, address to, uint256 value ) external returns (bool success); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface VRFCoordinatorV2Interface { /** * @notice Get configuration relevant for making requests * @return minimumRequestConfirmations global min for request confirmations * @return maxGasLimit global max for request gas limit * @return s_provingKeyHashes list of registered key hashes */ function getRequestConfig() external view returns ( uint16, uint32, bytes32[] memory ); /** * @notice Request a set of random words. * @param keyHash - Corresponds to a particular oracle job which uses * that key for generating the VRF proof. Different keyHash's have different gas price * ceilings, so you can select a specific one to bound your maximum per request cost. * @param subId - The ID of the VRF subscription. Must be funded * with the minimum subscription balance required for the selected keyHash. * @param minimumRequestConfirmations - How many blocks you'd like the * oracle to wait before responding to the request. See SECURITY CONSIDERATIONS * for why you may want to request more. The acceptable range is * [minimumRequestBlockConfirmations, 200]. * @param callbackGasLimit - How much gas you'd like to receive in your * fulfillRandomWords callback. Note that gasleft() inside fulfillRandomWords * may be slightly less than this amount because of gas used calling the function * (argument decoding etc.), so you may need to request slightly more than you expect * to have inside fulfillRandomWords. The acceptable range is * [0, maxGasLimit] * @param numWords - The number of uint256 random values you'd like to receive * in your fulfillRandomWords callback. Note these numbers are expanded in a * secure way by the VRFCoordinator from a single random value supplied by the oracle. * @return requestId - A unique identifier of the request. Can be used to match * a request to a response in fulfillRandomWords. */ function requestRandomWords( bytes32 keyHash, uint64 subId, uint16 minimumRequestConfirmations, uint32 callbackGasLimit, uint32 numWords ) external returns (uint256 requestId); /** * @notice Create a VRF subscription. * @return subId - A unique subscription id. * @dev You can manage the consumer set dynamically with addConsumer/removeConsumer. * @dev Note to fund the subscription, use transferAndCall. For example * @dev LINKTOKEN.transferAndCall( * @dev address(COORDINATOR), * @dev amount, * @dev abi.encode(subId)); */ function createSubscription() external returns (uint64 subId); /** * @notice Get a VRF subscription. * @param subId - ID of the subscription * @return balance - LINK balance of the subscription in juels. * @return reqCount - number of requests for this subscription, determines fee tier. * @return owner - owner of the subscription. * @return consumers - list of consumer address which are able to use this subscription. */ function getSubscription(uint64 subId) external view returns ( uint96 balance, uint64 reqCount, address owner, address[] memory consumers ); /** * @notice Request subscription owner transfer. * @param subId - ID of the subscription * @param newOwner - proposed new owner of the subscription */ function requestSubscriptionOwnerTransfer(uint64 subId, address newOwner) external; /** * @notice Request subscription owner transfer. * @param subId - ID of the subscription * @dev will revert if original owner of subId has * not requested that msg.sender become the new owner. */ function acceptSubscriptionOwnerTransfer(uint64 subId) external; /** * @notice Add a consumer to a VRF subscription. * @param subId - ID of the subscription * @param consumer - New consumer which can use the subscription */ function addConsumer(uint64 subId, address consumer) external; /** * @notice Remove a consumer from a VRF subscription. * @param subId - ID of the subscription * @param consumer - Consumer to remove from the subscription */ function removeConsumer(uint64 subId, address consumer) external; /** * @notice Cancel a subscription * @param subId - ID of the subscription * @param to - Where to send the remaining LINK to */ function cancelSubscription(uint64 subId, address to) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** **************************************************************************** * @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 (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`, 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 be 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 Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @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 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); /** * @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; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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 `IERC721.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.5.0) (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/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 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; }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_account1","type":"address"},{"internalType":"address","name":"_account2","type":"address"},{"internalType":"address","name":"_account3","type":"address"},{"internalType":"address","name":"_account4","type":"address"},{"internalType":"address","name":"devRoleAdress","type":"address"},{"internalType":"uint64","name":"subscriptionId","type":"uint64"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApprovalToCurrentOwner","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[{"internalType":"address","name":"have","type":"address"},{"internalType":"address","name":"want","type":"address"}],"name":"OnlyCoordinatorCanFulfill","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","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":false,"internalType":"bool","name":"state","type":"bool"}],"name":"GiftNFTMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"state","type":"bool"}],"name":"NFTAirdropped","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"requestId","type":"uint256"}],"name":"NFTChainlinkError","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"state","type":"bool"},{"indexed":false,"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"NFTMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"NFTRandomnessFullfill","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"NFTRandomnessRequest","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"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEV_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"airdrop","outputs":[],"stateMutability":"nonpayable","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":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"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":[],"name":"giftRoot","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":"address","name":"minter","type":"address"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"mintGiftNFTs","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"mintNFTs","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":[],"name":"poppablesActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":[],"name":"requestRandomWords","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"s_requestId","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":"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":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"contractUri","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"randomNumber","type":"uint256"}],"name":"setSeed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"toggleActive","outputs":[],"stateMutability":"nonpayable","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"},{"inputs":[{"internalType":"bytes32","name":"_merkleGiftRoot","type":"bytes32"}],"name":"updateGiftRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_keyHash","type":"bytes32"}],"name":"updateKeyHash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60a0604052600c805460ff60a01b19169055600060155560188054600160401b600160e01b0319167b271682deb8c4e0901d1a1550ad2e64d568e6990900000000000000001790556019805473514910771af9ca656af840dff83e8264ecf986ca6001600160a01b03199091161790557f8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef601a55601b80546001600160501b03191666010003000186a0179055348015620000b957600080fd5b506040516200313938038062003139833981016040819052620000dc9162000499565b6018546040805180820182526009815268506f707061626c657360b81b6020808301918252835180850190945260038452620504f560ec1b908401528151680100000000000000009094046001600160a01b0316939192916200014291600291620003d6565b50805162000158906003906020840190620003d6565b505050620001756200016f620002cc60201b60201c565b620002d0565b60016009556001600160a01b0390811660805260188054600b805468010000000000000000830485166001600160a01b031991821617909155601954600c80549186169183169190911790556001600160401b03199091166001600160401b0385161790915566b1a2bc2ec50000600d5561064060135561257f601455600f80548216898416179055601080548216888416179055601180548216878416179055601280549091169185169190911790556040805160608101909152602580825262003114602083013980516200025591601691602090910190620003d6565b50604051806080016040528060558152602001620030bf6055913980516200028691601791602090910190620003d6565b506200029460003362000322565b620002c07f51b355059847d158e68950419dbcd54fad00bdfd0634c2515a5c533288c7f0a28362000322565b50505050505062000567565b3390565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6200032e828262000332565b5050565b6000828152600a602090815260408083206001600160a01b038516845290915290205460ff166200032e576000828152600a602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620003923390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b828054620003e4906200052a565b90600052602060002090601f01602090048101928262000408576000855562000453565b82601f106200042357805160ff191683800117855562000453565b8280016001018555821562000453579182015b828111156200045357825182559160200191906001019062000436565b506200046192915062000465565b5090565b5b8082111562000461576000815560010162000466565b80516001600160a01b03811681146200049457600080fd5b919050565b60008060008060008060c08789031215620004b357600080fd5b620004be876200047c565b9550620004ce602088016200047c565b9450620004de604088016200047c565b9350620004ee606088016200047c565b9250620004fe608088016200047c565b60a08801519092506001600160401b03811681146200051c57600080fd5b809150509295509295509295565b600181811c908216806200053f57607f821691505b602082108114156200056157634e487b7160e01b600052602260045260246000fd5b50919050565b608051612b356200058a600039600081816108d401526109160152612b356000f3fe6080604052600436106102465760003560e01c806370a0823111610139578063c32a50f9116100b6578063e7fa67e51161007a578063e7fa67e51461067e578063e89e106a1461069e578063e8a3d485146106b4578063e985e9c5146106c9578063f2fde38b14610712578063fcf0f0d31461073257600080fd5b8063c32a50f9146105f3578063c87b56dd14610613578063d547741f14610633578063e0c8628914610653578063e491736f1461066857600080fd5b806395d89b41116100fd57806395d89b4114610573578063a035b1fe14610588578063a217fddf1461059e578063a22cb465146105b3578063b88d4fde146105d357600080fd5b806370a08231146104e0578063715018a6146105005780638da5cb5b1461051557806391d1485414610533578063938e3d7b1461055357600080fd5b80632f2ff15d116101c757806342842e0e1161018b57806342842e0e1461043f57806355f804b31461045f578063627b35ec1461047f5780636352211e1461049f578063666a6665146104bf57600080fd5b80632f2ff15d146103c457806336568abe146103e4578063379f0ba3146104045780633b4b1381146104175780633ccfd60b1461042a57600080fd5b80631fe543e31161020e5780631fe543e31461031f57806321860a051461033f57806323b872dd1461035f578063248a9ca31461037f57806329c68dc1146103af57600080fd5b806301ffc9a71461024b57806306fdde0314610280578063081812fc146102a2578063095ea7b3146102da57806318160ddd146102fc575b600080fd5b34801561025757600080fd5b5061026b6102663660046122db565b610754565b60405190151581526020015b60405180910390f35b34801561028c57600080fd5b50610295610765565b6040516102779190612350565b3480156102ae57600080fd5b506102c26102bd366004612363565b6107f7565b6040516001600160a01b039091168152602001610277565b3480156102e657600080fd5b506102fa6102f5366004612398565b61083b565b005b34801561030857600080fd5b50600154600054035b604051908152602001610277565b34801561032b57600080fd5b506102fa61033a366004612408565b6108c9565b34801561034b57600080fd5b506102fa61035a3660046124b9565b610956565b34801561036b57600080fd5b506102fa61037a3660046124d4565b610a3b565b34801561038b57600080fd5b5061031161039a366004612363565b6000908152600a602052604090206001015490565b3480156103bb57600080fd5b506102fa610a46565b3480156103d057600080fd5b506102fa6103df366004612510565b610a81565b3480156103f057600080fd5b506102fa6103ff366004612510565b610aa7565b6102fa61041236600461253c565b610b21565b6102fa610425366004612363565b610cb2565b34801561043657600080fd5b506102fa610e23565b34801561044b57600080fd5b506102fa61045a3660046124d4565b610fac565b34801561046b57600080fd5b506102fa61047a366004612618565b610fc7565b34801561048b57600080fd5b506102fa61049a366004612363565b610ff3565b3480156104ab57600080fd5b506102c26104ba366004612363565b611012565b3480156104cb57600080fd5b50600c5461026b90600160a01b900460ff1681565b3480156104ec57600080fd5b506103116104fb3660046124b9565b611024565b34801561050c57600080fd5b506102fa611072565b34801561052157600080fd5b506008546001600160a01b03166102c2565b34801561053f57600080fd5b5061026b61054e366004612510565b6110a8565b34801561055f57600080fd5b506102fa61056e366004612618565b6110d3565b34801561057f57600080fd5b506102956110ff565b34801561059457600080fd5b50610311600d5481565b3480156105aa57600080fd5b50610311600081565b3480156105bf57600080fd5b506102fa6105ce366004612660565b61110e565b3480156105df57600080fd5b506102fa6105ee36600461269c565b6111a4565b3480156105ff57600080fd5b506102fa61060e366004612363565b6111de565b34801561061f57600080fd5b5061029561062e366004612363565b6111fd565b34801561063f57600080fd5b506102fa61064e366004612510565b611257565b34801561065f57600080fd5b506102fa61127d565b34801561067457600080fd5b50610311600e5481565b34801561068a57600080fd5b506102fa610699366004612363565b611396565b3480156106aa57600080fd5b50610311601c5481565b3480156106c057600080fd5b506102956113b5565b3480156106d557600080fd5b5061026b6106e4366004612717565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b34801561071e57600080fd5b506102fa61072d3660046124b9565b6113c4565b34801561073e57600080fd5b50610311600080516020612ae083398151915281565b600061075f8261145f565b92915050565b60606002805461077490612741565b80601f01602080910402602001604051908101604052809291908181526020018280546107a090612741565b80156107ed5780601f106107c2576101008083540402835291602001916107ed565b820191906000526020600020905b8154815290600101906020018083116107d057829003601f168201915b5050505050905090565b600061080282611484565b61081f576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600061084682611012565b9050806001600160a01b0316836001600160a01b0316141561087b5760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b0382161480159061089b575061089981336106e4565b155b156108b9576040516367d9dca160e11b815260040160405180910390fd5b6108c48383836114af565b505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109485760405163073e64fd60e21b81523360048201526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001660248201526044015b60405180910390fd5b610952828261150b565b5050565b600260095414156109795760405162461bcd60e51b815260040161093f9061277c565b6002600955600080516020612ae083398151915261099781336115a7565b600c54600160a01b900460ff166109c05760405162461bcd60e51b815260040161093f906127b3565b601354600154600054036109d59060016127ed565b11156109f35760405162461bcd60e51b815260040161093f90612805565b6109fe82600161160b565b604051600181527ffdbcacddf2c6cf9a8ed4e0fe7adb69ab30921fdb2d785534cb3390a8a75db3569060200160405180910390a150506001600955565b6108c4838383611625565b600080516020612ae0833981519152610a5f81336115a7565b50600c805460ff60a01b198116600160a01b9182900460ff1615909102179055565b6000828152600a6020526040902060010154610a9d81336115a7565b6108c48383611839565b6001600160a01b0381163314610b175760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b606482015260840161093f565b61095282826118bf565b60026009541415610b445760405162461bcd60e51b815260040161093f9061277c565b6002600955600c54600160a01b900460ff16610b725760405162461bcd60e51b815260040161093f906127b3565b60135460015460005403610b879060016127ed565b1115610ba55760405162461bcd60e51b815260040161093f90612805565b6040516bffffffffffffffffffffffff19606085901b1660208201526000906034016040516020818303038152906040528051906020012090506000610c2284848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600e549150859050611926565b905080610c675760405162461bcd60e51b8152602060048201526013602482015272139bdd081a5b881d1a194819da5d081b1a5cdd606a1b604482015260640161093f565b610c7233600161160b565b604051600181527fd79f7406317637d24bcee850b87827e248381cb0f77c3054606491ec2cfad4309060200160405180910390a150506001600955505050565b60026009541415610cd55760405162461bcd60e51b815260040161093f9061277c565b6002600955600c54600160a01b900460ff16610d035760405162461bcd60e51b815260040161093f906127b3565b60018110158015610d145750601781105b610d515760405162461bcd60e51b815260206004820152600e60248201526d57726f6e67207175616e7469747960901b604482015260640161093f565b60135481610d626001546000540390565b610d6c91906127ed565b1115610d8a5760405162461bcd60e51b815260040161093f90612805565b600d54610d97908261193c565b341015610dd75760405162461bcd60e51b815260206004820152600e60248201526d09cdee840cadcdeeaced0408aa8960931b604482015260640161093f565b610de1338261160b565b6040805160018152602081018390527f6b85ee3c94149773969bdc4885dd1539cc3e3bd9f912cd11d8b70cdd181848c0910160405180910390a1506001600955565b6008546001600160a01b03163314610e4d5760405162461bcd60e51b815260040161093f9061282f565b60026009541415610e705760405162461bcd60e51b815260040161093f9061277c565b6002600955600f805447916001600160a01b03909116906108fc90610ea390606490610e9d90869061193c565b9061194f565b6040518115909202916000818181858888f19350505050158015610ecb573d6000803e3d6000fd5b506010546001600160a01b03166108fc610eeb6064610e9d85600f61193c565b6040518115909202916000818181858888f19350505050158015610f13573d6000803e3d6000fd5b506011546001600160a01b03166108fc610f336064610e9d85601461193c565b6040518115909202916000818181858888f19350505050158015610f5b573d6000803e3d6000fd5b506012546001600160a01b03166108fc610f7b6064610e9d85603261193c565b6040518115909202916000818181858888f19350505050158015610fa3573d6000803e3d6000fd5b50506001600955565b6108c4838383604051806020016040528060008152506111a4565b600080516020612ae0833981519152610fe081336115a7565b81516108c490601790602085019061222c565b600080516020612ae083398151915261100c81336115a7565b50600e55565b600061101d8261195b565b5192915050565b60006001600160a01b03821661104d576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600560205260409020546001600160401b031690565b6008546001600160a01b0316331461109c5760405162461bcd60e51b815260040161093f9061282f565b6110a66000611a74565b565b6000918252600a602090815260408084206001600160a01b0393909316845291905290205460ff1690565b600080516020612ae08339815191526110ec81336115a7565b81516108c490601690602085019061222c565b60606003805461077490612741565b6001600160a01b0382163314156111385760405163b06307db60e01b815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6111af848484611625565b6111bb84848484611ac6565b6111d8576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b600080516020612ae08339815191526111f781336115a7565b50601555565b606061120882611484565b61122557604051630a14c4b560e41b815260040160405180910390fd5b601761123083611bd5565b604051602001611241929190612880565b6040516020818303038152906040529050919050565b6000828152600a602052604090206001015461127381336115a7565b6108c483836118bf565b600080516020612ae083398151915261129681336115a7565b600b54601a54601854601b546040516305d3b1d360e41b815260048101939093526001600160401b039091166024830152640100000000810461ffff16604483015263ffffffff808216606484015266010000000000009091041660848201526001600160a01b0390911690635d3b1d309060a401602060405180830381600087803b15801561132557600080fd5b505af1158015611339573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061135d919061293b565b601c556040514281527ffd89e9df5be6b94f35a699b3790a5cdda814585db327d861e29f441adf83462b9060200160405180910390a150565b600080516020612ae08339815191526113af81336115a7565b50601a55565b60606016805461077490612741565b6008546001600160a01b031633146113ee5760405162461bcd60e51b815260040161093f9061282f565b6001600160a01b0381166114535760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161093f565b61145c81611a74565b50565b60006001600160e01b03198216637965db0b60e01b148061075f575061075f82611d58565b600080548210801561075f575050600090815260046020526040902054600160e01b900460ff161590565b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b60008160008151811061152057611520612954565b6020026020010151905060008111156115715760158190556040514281527f1b1e11bd507adbf6e69145615682798efdd6954fa58489cd8d6ec962f0450331906020015b60405180910390a1505050565b60408051428152602081018590527f4da97a438acd3f0987f9a63b1e44d74ceea072451482a113fff4180daf92b7df9101611564565b6115b182826110a8565b610952576115c9816001600160a01b03166014611da8565b6115d4836020611da8565b6040516020016115e592919061296a565b60408051601f198184030181529082905262461bcd60e51b825261093f91600401612350565b610952828260405180602001604052806000815250611f43565b60006116308261195b565b80519091506000906001600160a01b0316336001600160a01b0316148061165e5750815161165e90336106e4565b8061167957503361166e846107f7565b6001600160a01b0316145b90508061169957604051632ce44b5f60e11b815260040160405180910390fd5b846001600160a01b031682600001516001600160a01b0316146116ce5760405162a1148160e81b815260040160405180910390fd5b6001600160a01b0384166116f557604051633a954ecd60e21b815260040160405180910390fd5b61170560008484600001516114af565b6001600160a01b038581166000908152600560209081526040808320805467ffffffffffffffff198082166001600160401b0392831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600490945282852080546001600160e01b031916909417600160a01b4290921691909102179092559086018083529120549091166117ef576000548110156117ef57825160008281526004602090815260409091208054918601516001600160401b0316600160a01b026001600160e01b03199092166001600160a01b03909316929092171790555b5082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b5050505050565b61184382826110a8565b610952576000828152600a602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561187b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6118c982826110a8565b15610952576000828152600a602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000826119338584611f50565b14949350505050565b600061194882846129df565b9392505050565b60006119488284612a14565b6040805160608101825260008082526020820181905291810182905290548290811015611a5b57600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff16151591810182905290611a595780516001600160a01b0316156119f0579392505050565b5060001901600081815260046020908152604091829020825160608101845290546001600160a01b038116808352600160a01b82046001600160401b031693830193909352600160e01b900460ff1615159281019290925215611a54579392505050565b6119f0565b505b604051636f96cda160e11b815260040160405180910390fd5b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006001600160a01b0384163b15611bc957604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611b0a903390899088908890600401612a28565b602060405180830381600087803b158015611b2457600080fd5b505af1925050508015611b54575060408051601f3d908101601f19168201909252611b5191810190612a65565b60015b611baf573d808015611b82576040519150601f19603f3d011682016040523d82523d6000602084013e611b87565b606091505b508051611ba7576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611bcd565b5060015b949350505050565b606060006014546001600160401b03811115611bf357611bf36123c2565b604051908082528060200260200182016040528015611c1c578160200160208202803683370190505b5060155490915060005b601454811015611c605780838281518110611c4357611c43612954565b6020908102919091010152611c596001826127ed565b9050611c26565b5060005b601454811015611d355760006014548383604051602001611c8f929190918252602082015260400190565b6040516020818303038152906040528051906020012060001c611cb29190612a82565b9050838181518110611cc657611cc6612954565b6020026020010151848381518110611ce057611ce0612954565b6020026020010151858481518110611cfa57611cfa612954565b60200260200101868481518110611d1357611d13612954565b60209081029190910101919091525250611d2e6001826127ed565b9050611c64565b50611bcd828581518110611d4b57611d4b612954565b6020026020010151611fc4565b60006001600160e01b031982166380ac58cd60e01b1480611d8957506001600160e01b03198216635b5e139f60e01b145b8061075f57506301ffc9a760e01b6001600160e01b031983161461075f565b60606000611db78360026129df565b611dc29060026127ed565b6001600160401b03811115611dd957611dd96123c2565b6040519080825280601f01601f191660200182016040528015611e03576020820181803683370190505b509050600360fc1b81600081518110611e1e57611e1e612954565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611e4d57611e4d612954565b60200101906001600160f81b031916908160001a9053506000611e718460026129df565b611e7c9060016127ed565b90505b6001811115611ef4576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611eb057611eb0612954565b1a60f81b828281518110611ec657611ec6612954565b60200101906001600160f81b031916908160001a90535060049490941c93611eed81612a96565b9050611e7f565b5083156119485760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161093f565b6108c483838360016120c1565b600081815b8451811015611fbc576000858281518110611f7257611f72612954565b60200260200101519050808311611f985760008381526020829052604090209250611fa9565b600081815260208490526040902092505b5080611fb481612aad565b915050611f55565b509392505050565b606081611fe85750506040805180820190915260018152600360fc1b602082015290565b8160005b81156120125780611ffc81612aad565b915061200b9050600a83612a14565b9150611fec565b6000816001600160401b0381111561202c5761202c6123c2565b6040519080825280601f01601f191660200182016040528015612056576020820181803683370190505b5090505b8415611bcd5761206b600183612ac8565b9150612078600a86612a82565b6120839060306127ed565b60f81b81838151811061209857612098612954565b60200101906001600160f81b031916908160001a9053506120ba600a86612a14565b945061205a565b6000546001600160a01b0385166120ea57604051622e076360e81b815260040160405180910390fd5b836121085760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038516600081815260056020908152604080832080546fffffffffffffffffffffffffffffffff1981166001600160401b038083168c0181169182176801000000000000000067ffffffffffffffff1990941690921783900481168c018116909202179091558584526004909252822080546001600160e01b031916909317600160a01b42909216919091021790915581905b858110156122235760405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a48380156121f957506121f76000888488611ac6565b155b15612217576040516368d2bf6b60e11b815260040160405180910390fd5b600191820191016121a2565b50600055611832565b82805461223890612741565b90600052602060002090601f01602090048101928261225a57600085556122a0565b82601f1061227357805160ff19168380011785556122a0565b828001600101855582156122a0579182015b828111156122a0578251825591602001919060010190612285565b506122ac9291506122b0565b5090565b5b808211156122ac57600081556001016122b1565b6001600160e01b03198116811461145c57600080fd5b6000602082840312156122ed57600080fd5b8135611948816122c5565b60005b838110156123135781810151838201526020016122fb565b838111156111d85750506000910152565b6000815180845261233c8160208601602086016122f8565b601f01601f19169290920160200192915050565b6020815260006119486020830184612324565b60006020828403121561237557600080fd5b5035919050565b80356001600160a01b038116811461239357600080fd5b919050565b600080604083850312156123ab57600080fd5b6123b48361237c565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715612400576124006123c2565b604052919050565b6000806040838503121561241b57600080fd5b823591506020808401356001600160401b038082111561243a57600080fd5b818601915086601f83011261244e57600080fd5b813581811115612460576124606123c2565b8060051b91506124718483016123d8565b818152918301840191848101908984111561248b57600080fd5b938501935b838510156124a957843582529385019390850190612490565b8096505050505050509250929050565b6000602082840312156124cb57600080fd5b6119488261237c565b6000806000606084860312156124e957600080fd5b6124f28461237c565b92506125006020850161237c565b9150604084013590509250925092565b6000806040838503121561252357600080fd5b823591506125336020840161237c565b90509250929050565b60008060006040848603121561255157600080fd5b61255a8461237c565b925060208401356001600160401b038082111561257657600080fd5b818601915086601f83011261258a57600080fd5b81358181111561259957600080fd5b8760208260051b85010111156125ae57600080fd5b6020830194508093505050509250925092565b60006001600160401b038311156125da576125da6123c2565b6125ed601f8401601f19166020016123d8565b905082815283838301111561260157600080fd5b828260208301376000602084830101529392505050565b60006020828403121561262a57600080fd5b81356001600160401b0381111561264057600080fd5b8201601f8101841361265157600080fd5b611bcd848235602084016125c1565b6000806040838503121561267357600080fd5b61267c8361237c565b91506020830135801515811461269157600080fd5b809150509250929050565b600080600080608085870312156126b257600080fd5b6126bb8561237c565b93506126c96020860161237c565b92506040850135915060608501356001600160401b038111156126eb57600080fd5b8501601f810187136126fc57600080fd5b61270b878235602084016125c1565b91505092959194509250565b6000806040838503121561272a57600080fd5b6127338361237c565b91506125336020840161237c565b600181811c9082168061275557607f821691505b6020821081141561277657634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6020808252600a90820152694e6f742061637469766560b01b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60008219821115612800576128006127d7565b500190565b60208082526010908201526f43616e6e6f74206d696e74206d6f726560801b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600081516128768185602086016122f8565b9290920192915050565b600080845481600182811c91508083168061289c57607f831692505b60208084108214156128bc57634e487b7160e01b86526022600452602486fd5b8180156128d057600181146128e15761290e565b60ff1986168952848901965061290e565b60008b81526020902060005b868110156129065781548b8201529085019083016128ed565b505084890196505b5050505050506129326129218286612864565b64173539b7b760d91b815260050190565b95945050505050565b60006020828403121561294d57600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516129a28160178501602088016122f8565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516129d38160288401602088016122f8565b01602801949350505050565b60008160001904831182151516156129f9576129f96127d7565b500290565b634e487b7160e01b600052601260045260246000fd5b600082612a2357612a236129fe565b500490565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612a5b90830184612324565b9695505050505050565b600060208284031215612a7757600080fd5b8151611948816122c5565b600082612a9157612a916129fe565b500690565b600081612aa557612aa56127d7565b506000190190565b6000600019821415612ac157612ac16127d7565b5060010190565b600082821015612ada57612ada6127d7565b50039056fe51b355059847d158e68950419dbcd54fad00bdfd0634c2515a5c533288c7f0a2a26469706673582212202b6323f156bb68f624d60fb121e99617cbf9c0704031f18f74e8230ab5c282ee64736f6c6343000809003368747470733a2f2f706f707061626c65732e6d7970696e6174612e636c6f75642f697066732f516d625166576a37793651654141553469627a414739344a465954686148394e52326b745345416a6d4d416e43552f68747470733a2f2f7777772e706f707061626c65732e696f2f6f70656e7365612e6a736f6e000000000000000000000000507b281e73e03ae440f39b47336cd69a1dfb7eda00000000000000000000000046a91cd85daeb45ff7f2babdfd6ff1285975bed2000000000000000000000000589a74945647e5a4dc4a1fe239ba90a8be71c3690000000000000000000000006e87f77d690435598cb0d30434030c59fd912e4b0000000000000000000000006809dddfd52cbe21aa514041c4a0ca0a646e27030000000000000000000000000000000000000000000000000000000000000006
Deployed Bytecode
0x6080604052600436106102465760003560e01c806370a0823111610139578063c32a50f9116100b6578063e7fa67e51161007a578063e7fa67e51461067e578063e89e106a1461069e578063e8a3d485146106b4578063e985e9c5146106c9578063f2fde38b14610712578063fcf0f0d31461073257600080fd5b8063c32a50f9146105f3578063c87b56dd14610613578063d547741f14610633578063e0c8628914610653578063e491736f1461066857600080fd5b806395d89b41116100fd57806395d89b4114610573578063a035b1fe14610588578063a217fddf1461059e578063a22cb465146105b3578063b88d4fde146105d357600080fd5b806370a08231146104e0578063715018a6146105005780638da5cb5b1461051557806391d1485414610533578063938e3d7b1461055357600080fd5b80632f2ff15d116101c757806342842e0e1161018b57806342842e0e1461043f57806355f804b31461045f578063627b35ec1461047f5780636352211e1461049f578063666a6665146104bf57600080fd5b80632f2ff15d146103c457806336568abe146103e4578063379f0ba3146104045780633b4b1381146104175780633ccfd60b1461042a57600080fd5b80631fe543e31161020e5780631fe543e31461031f57806321860a051461033f57806323b872dd1461035f578063248a9ca31461037f57806329c68dc1146103af57600080fd5b806301ffc9a71461024b57806306fdde0314610280578063081812fc146102a2578063095ea7b3146102da57806318160ddd146102fc575b600080fd5b34801561025757600080fd5b5061026b6102663660046122db565b610754565b60405190151581526020015b60405180910390f35b34801561028c57600080fd5b50610295610765565b6040516102779190612350565b3480156102ae57600080fd5b506102c26102bd366004612363565b6107f7565b6040516001600160a01b039091168152602001610277565b3480156102e657600080fd5b506102fa6102f5366004612398565b61083b565b005b34801561030857600080fd5b50600154600054035b604051908152602001610277565b34801561032b57600080fd5b506102fa61033a366004612408565b6108c9565b34801561034b57600080fd5b506102fa61035a3660046124b9565b610956565b34801561036b57600080fd5b506102fa61037a3660046124d4565b610a3b565b34801561038b57600080fd5b5061031161039a366004612363565b6000908152600a602052604090206001015490565b3480156103bb57600080fd5b506102fa610a46565b3480156103d057600080fd5b506102fa6103df366004612510565b610a81565b3480156103f057600080fd5b506102fa6103ff366004612510565b610aa7565b6102fa61041236600461253c565b610b21565b6102fa610425366004612363565b610cb2565b34801561043657600080fd5b506102fa610e23565b34801561044b57600080fd5b506102fa61045a3660046124d4565b610fac565b34801561046b57600080fd5b506102fa61047a366004612618565b610fc7565b34801561048b57600080fd5b506102fa61049a366004612363565b610ff3565b3480156104ab57600080fd5b506102c26104ba366004612363565b611012565b3480156104cb57600080fd5b50600c5461026b90600160a01b900460ff1681565b3480156104ec57600080fd5b506103116104fb3660046124b9565b611024565b34801561050c57600080fd5b506102fa611072565b34801561052157600080fd5b506008546001600160a01b03166102c2565b34801561053f57600080fd5b5061026b61054e366004612510565b6110a8565b34801561055f57600080fd5b506102fa61056e366004612618565b6110d3565b34801561057f57600080fd5b506102956110ff565b34801561059457600080fd5b50610311600d5481565b3480156105aa57600080fd5b50610311600081565b3480156105bf57600080fd5b506102fa6105ce366004612660565b61110e565b3480156105df57600080fd5b506102fa6105ee36600461269c565b6111a4565b3480156105ff57600080fd5b506102fa61060e366004612363565b6111de565b34801561061f57600080fd5b5061029561062e366004612363565b6111fd565b34801561063f57600080fd5b506102fa61064e366004612510565b611257565b34801561065f57600080fd5b506102fa61127d565b34801561067457600080fd5b50610311600e5481565b34801561068a57600080fd5b506102fa610699366004612363565b611396565b3480156106aa57600080fd5b50610311601c5481565b3480156106c057600080fd5b506102956113b5565b3480156106d557600080fd5b5061026b6106e4366004612717565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b34801561071e57600080fd5b506102fa61072d3660046124b9565b6113c4565b34801561073e57600080fd5b50610311600080516020612ae083398151915281565b600061075f8261145f565b92915050565b60606002805461077490612741565b80601f01602080910402602001604051908101604052809291908181526020018280546107a090612741565b80156107ed5780601f106107c2576101008083540402835291602001916107ed565b820191906000526020600020905b8154815290600101906020018083116107d057829003601f168201915b5050505050905090565b600061080282611484565b61081f576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600061084682611012565b9050806001600160a01b0316836001600160a01b0316141561087b5760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b0382161480159061089b575061089981336106e4565b155b156108b9576040516367d9dca160e11b815260040160405180910390fd5b6108c48383836114af565b505050565b336001600160a01b037f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e6990916146109485760405163073e64fd60e21b81523360048201526001600160a01b037f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e699091660248201526044015b60405180910390fd5b610952828261150b565b5050565b600260095414156109795760405162461bcd60e51b815260040161093f9061277c565b6002600955600080516020612ae083398151915261099781336115a7565b600c54600160a01b900460ff166109c05760405162461bcd60e51b815260040161093f906127b3565b601354600154600054036109d59060016127ed565b11156109f35760405162461bcd60e51b815260040161093f90612805565b6109fe82600161160b565b604051600181527ffdbcacddf2c6cf9a8ed4e0fe7adb69ab30921fdb2d785534cb3390a8a75db3569060200160405180910390a150506001600955565b6108c4838383611625565b600080516020612ae0833981519152610a5f81336115a7565b50600c805460ff60a01b198116600160a01b9182900460ff1615909102179055565b6000828152600a6020526040902060010154610a9d81336115a7565b6108c48383611839565b6001600160a01b0381163314610b175760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b606482015260840161093f565b61095282826118bf565b60026009541415610b445760405162461bcd60e51b815260040161093f9061277c565b6002600955600c54600160a01b900460ff16610b725760405162461bcd60e51b815260040161093f906127b3565b60135460015460005403610b879060016127ed565b1115610ba55760405162461bcd60e51b815260040161093f90612805565b6040516bffffffffffffffffffffffff19606085901b1660208201526000906034016040516020818303038152906040528051906020012090506000610c2284848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600e549150859050611926565b905080610c675760405162461bcd60e51b8152602060048201526013602482015272139bdd081a5b881d1a194819da5d081b1a5cdd606a1b604482015260640161093f565b610c7233600161160b565b604051600181527fd79f7406317637d24bcee850b87827e248381cb0f77c3054606491ec2cfad4309060200160405180910390a150506001600955505050565b60026009541415610cd55760405162461bcd60e51b815260040161093f9061277c565b6002600955600c54600160a01b900460ff16610d035760405162461bcd60e51b815260040161093f906127b3565b60018110158015610d145750601781105b610d515760405162461bcd60e51b815260206004820152600e60248201526d57726f6e67207175616e7469747960901b604482015260640161093f565b60135481610d626001546000540390565b610d6c91906127ed565b1115610d8a5760405162461bcd60e51b815260040161093f90612805565b600d54610d97908261193c565b341015610dd75760405162461bcd60e51b815260206004820152600e60248201526d09cdee840cadcdeeaced0408aa8960931b604482015260640161093f565b610de1338261160b565b6040805160018152602081018390527f6b85ee3c94149773969bdc4885dd1539cc3e3bd9f912cd11d8b70cdd181848c0910160405180910390a1506001600955565b6008546001600160a01b03163314610e4d5760405162461bcd60e51b815260040161093f9061282f565b60026009541415610e705760405162461bcd60e51b815260040161093f9061277c565b6002600955600f805447916001600160a01b03909116906108fc90610ea390606490610e9d90869061193c565b9061194f565b6040518115909202916000818181858888f19350505050158015610ecb573d6000803e3d6000fd5b506010546001600160a01b03166108fc610eeb6064610e9d85600f61193c565b6040518115909202916000818181858888f19350505050158015610f13573d6000803e3d6000fd5b506011546001600160a01b03166108fc610f336064610e9d85601461193c565b6040518115909202916000818181858888f19350505050158015610f5b573d6000803e3d6000fd5b506012546001600160a01b03166108fc610f7b6064610e9d85603261193c565b6040518115909202916000818181858888f19350505050158015610fa3573d6000803e3d6000fd5b50506001600955565b6108c4838383604051806020016040528060008152506111a4565b600080516020612ae0833981519152610fe081336115a7565b81516108c490601790602085019061222c565b600080516020612ae083398151915261100c81336115a7565b50600e55565b600061101d8261195b565b5192915050565b60006001600160a01b03821661104d576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600560205260409020546001600160401b031690565b6008546001600160a01b0316331461109c5760405162461bcd60e51b815260040161093f9061282f565b6110a66000611a74565b565b6000918252600a602090815260408084206001600160a01b0393909316845291905290205460ff1690565b600080516020612ae08339815191526110ec81336115a7565b81516108c490601690602085019061222c565b60606003805461077490612741565b6001600160a01b0382163314156111385760405163b06307db60e01b815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6111af848484611625565b6111bb84848484611ac6565b6111d8576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b600080516020612ae08339815191526111f781336115a7565b50601555565b606061120882611484565b61122557604051630a14c4b560e41b815260040160405180910390fd5b601761123083611bd5565b604051602001611241929190612880565b6040516020818303038152906040529050919050565b6000828152600a602052604090206001015461127381336115a7565b6108c483836118bf565b600080516020612ae083398151915261129681336115a7565b600b54601a54601854601b546040516305d3b1d360e41b815260048101939093526001600160401b039091166024830152640100000000810461ffff16604483015263ffffffff808216606484015266010000000000009091041660848201526001600160a01b0390911690635d3b1d309060a401602060405180830381600087803b15801561132557600080fd5b505af1158015611339573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061135d919061293b565b601c556040514281527ffd89e9df5be6b94f35a699b3790a5cdda814585db327d861e29f441adf83462b9060200160405180910390a150565b600080516020612ae08339815191526113af81336115a7565b50601a55565b60606016805461077490612741565b6008546001600160a01b031633146113ee5760405162461bcd60e51b815260040161093f9061282f565b6001600160a01b0381166114535760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161093f565b61145c81611a74565b50565b60006001600160e01b03198216637965db0b60e01b148061075f575061075f82611d58565b600080548210801561075f575050600090815260046020526040902054600160e01b900460ff161590565b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b60008160008151811061152057611520612954565b6020026020010151905060008111156115715760158190556040514281527f1b1e11bd507adbf6e69145615682798efdd6954fa58489cd8d6ec962f0450331906020015b60405180910390a1505050565b60408051428152602081018590527f4da97a438acd3f0987f9a63b1e44d74ceea072451482a113fff4180daf92b7df9101611564565b6115b182826110a8565b610952576115c9816001600160a01b03166014611da8565b6115d4836020611da8565b6040516020016115e592919061296a565b60408051601f198184030181529082905262461bcd60e51b825261093f91600401612350565b610952828260405180602001604052806000815250611f43565b60006116308261195b565b80519091506000906001600160a01b0316336001600160a01b0316148061165e5750815161165e90336106e4565b8061167957503361166e846107f7565b6001600160a01b0316145b90508061169957604051632ce44b5f60e11b815260040160405180910390fd5b846001600160a01b031682600001516001600160a01b0316146116ce5760405162a1148160e81b815260040160405180910390fd5b6001600160a01b0384166116f557604051633a954ecd60e21b815260040160405180910390fd5b61170560008484600001516114af565b6001600160a01b038581166000908152600560209081526040808320805467ffffffffffffffff198082166001600160401b0392831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600490945282852080546001600160e01b031916909417600160a01b4290921691909102179092559086018083529120549091166117ef576000548110156117ef57825160008281526004602090815260409091208054918601516001600160401b0316600160a01b026001600160e01b03199092166001600160a01b03909316929092171790555b5082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b5050505050565b61184382826110a8565b610952576000828152600a602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561187b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6118c982826110a8565b15610952576000828152600a602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000826119338584611f50565b14949350505050565b600061194882846129df565b9392505050565b60006119488284612a14565b6040805160608101825260008082526020820181905291810182905290548290811015611a5b57600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff16151591810182905290611a595780516001600160a01b0316156119f0579392505050565b5060001901600081815260046020908152604091829020825160608101845290546001600160a01b038116808352600160a01b82046001600160401b031693830193909352600160e01b900460ff1615159281019290925215611a54579392505050565b6119f0565b505b604051636f96cda160e11b815260040160405180910390fd5b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006001600160a01b0384163b15611bc957604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611b0a903390899088908890600401612a28565b602060405180830381600087803b158015611b2457600080fd5b505af1925050508015611b54575060408051601f3d908101601f19168201909252611b5191810190612a65565b60015b611baf573d808015611b82576040519150601f19603f3d011682016040523d82523d6000602084013e611b87565b606091505b508051611ba7576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611bcd565b5060015b949350505050565b606060006014546001600160401b03811115611bf357611bf36123c2565b604051908082528060200260200182016040528015611c1c578160200160208202803683370190505b5060155490915060005b601454811015611c605780838281518110611c4357611c43612954565b6020908102919091010152611c596001826127ed565b9050611c26565b5060005b601454811015611d355760006014548383604051602001611c8f929190918252602082015260400190565b6040516020818303038152906040528051906020012060001c611cb29190612a82565b9050838181518110611cc657611cc6612954565b6020026020010151848381518110611ce057611ce0612954565b6020026020010151858481518110611cfa57611cfa612954565b60200260200101868481518110611d1357611d13612954565b60209081029190910101919091525250611d2e6001826127ed565b9050611c64565b50611bcd828581518110611d4b57611d4b612954565b6020026020010151611fc4565b60006001600160e01b031982166380ac58cd60e01b1480611d8957506001600160e01b03198216635b5e139f60e01b145b8061075f57506301ffc9a760e01b6001600160e01b031983161461075f565b60606000611db78360026129df565b611dc29060026127ed565b6001600160401b03811115611dd957611dd96123c2565b6040519080825280601f01601f191660200182016040528015611e03576020820181803683370190505b509050600360fc1b81600081518110611e1e57611e1e612954565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110611e4d57611e4d612954565b60200101906001600160f81b031916908160001a9053506000611e718460026129df565b611e7c9060016127ed565b90505b6001811115611ef4576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110611eb057611eb0612954565b1a60f81b828281518110611ec657611ec6612954565b60200101906001600160f81b031916908160001a90535060049490941c93611eed81612a96565b9050611e7f565b5083156119485760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161093f565b6108c483838360016120c1565b600081815b8451811015611fbc576000858281518110611f7257611f72612954565b60200260200101519050808311611f985760008381526020829052604090209250611fa9565b600081815260208490526040902092505b5080611fb481612aad565b915050611f55565b509392505050565b606081611fe85750506040805180820190915260018152600360fc1b602082015290565b8160005b81156120125780611ffc81612aad565b915061200b9050600a83612a14565b9150611fec565b6000816001600160401b0381111561202c5761202c6123c2565b6040519080825280601f01601f191660200182016040528015612056576020820181803683370190505b5090505b8415611bcd5761206b600183612ac8565b9150612078600a86612a82565b6120839060306127ed565b60f81b81838151811061209857612098612954565b60200101906001600160f81b031916908160001a9053506120ba600a86612a14565b945061205a565b6000546001600160a01b0385166120ea57604051622e076360e81b815260040160405180910390fd5b836121085760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038516600081815260056020908152604080832080546fffffffffffffffffffffffffffffffff1981166001600160401b038083168c0181169182176801000000000000000067ffffffffffffffff1990941690921783900481168c018116909202179091558584526004909252822080546001600160e01b031916909317600160a01b42909216919091021790915581905b858110156122235760405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a48380156121f957506121f76000888488611ac6565b155b15612217576040516368d2bf6b60e11b815260040160405180910390fd5b600191820191016121a2565b50600055611832565b82805461223890612741565b90600052602060002090601f01602090048101928261225a57600085556122a0565b82601f1061227357805160ff19168380011785556122a0565b828001600101855582156122a0579182015b828111156122a0578251825591602001919060010190612285565b506122ac9291506122b0565b5090565b5b808211156122ac57600081556001016122b1565b6001600160e01b03198116811461145c57600080fd5b6000602082840312156122ed57600080fd5b8135611948816122c5565b60005b838110156123135781810151838201526020016122fb565b838111156111d85750506000910152565b6000815180845261233c8160208601602086016122f8565b601f01601f19169290920160200192915050565b6020815260006119486020830184612324565b60006020828403121561237557600080fd5b5035919050565b80356001600160a01b038116811461239357600080fd5b919050565b600080604083850312156123ab57600080fd5b6123b48361237c565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715612400576124006123c2565b604052919050565b6000806040838503121561241b57600080fd5b823591506020808401356001600160401b038082111561243a57600080fd5b818601915086601f83011261244e57600080fd5b813581811115612460576124606123c2565b8060051b91506124718483016123d8565b818152918301840191848101908984111561248b57600080fd5b938501935b838510156124a957843582529385019390850190612490565b8096505050505050509250929050565b6000602082840312156124cb57600080fd5b6119488261237c565b6000806000606084860312156124e957600080fd5b6124f28461237c565b92506125006020850161237c565b9150604084013590509250925092565b6000806040838503121561252357600080fd5b823591506125336020840161237c565b90509250929050565b60008060006040848603121561255157600080fd5b61255a8461237c565b925060208401356001600160401b038082111561257657600080fd5b818601915086601f83011261258a57600080fd5b81358181111561259957600080fd5b8760208260051b85010111156125ae57600080fd5b6020830194508093505050509250925092565b60006001600160401b038311156125da576125da6123c2565b6125ed601f8401601f19166020016123d8565b905082815283838301111561260157600080fd5b828260208301376000602084830101529392505050565b60006020828403121561262a57600080fd5b81356001600160401b0381111561264057600080fd5b8201601f8101841361265157600080fd5b611bcd848235602084016125c1565b6000806040838503121561267357600080fd5b61267c8361237c565b91506020830135801515811461269157600080fd5b809150509250929050565b600080600080608085870312156126b257600080fd5b6126bb8561237c565b93506126c96020860161237c565b92506040850135915060608501356001600160401b038111156126eb57600080fd5b8501601f810187136126fc57600080fd5b61270b878235602084016125c1565b91505092959194509250565b6000806040838503121561272a57600080fd5b6127338361237c565b91506125336020840161237c565b600181811c9082168061275557607f821691505b6020821081141561277657634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6020808252600a90820152694e6f742061637469766560b01b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60008219821115612800576128006127d7565b500190565b60208082526010908201526f43616e6e6f74206d696e74206d6f726560801b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600081516128768185602086016122f8565b9290920192915050565b600080845481600182811c91508083168061289c57607f831692505b60208084108214156128bc57634e487b7160e01b86526022600452602486fd5b8180156128d057600181146128e15761290e565b60ff1986168952848901965061290e565b60008b81526020902060005b868110156129065781548b8201529085019083016128ed565b505084890196505b5050505050506129326129218286612864565b64173539b7b760d91b815260050190565b95945050505050565b60006020828403121561294d57600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516129a28160178501602088016122f8565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516129d38160288401602088016122f8565b01602801949350505050565b60008160001904831182151516156129f9576129f96127d7565b500290565b634e487b7160e01b600052601260045260246000fd5b600082612a2357612a236129fe565b500490565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612a5b90830184612324565b9695505050505050565b600060208284031215612a7757600080fd5b8151611948816122c5565b600082612a9157612a916129fe565b500690565b600081612aa557612aa56127d7565b506000190190565b6000600019821415612ac157612ac16127d7565b5060010190565b600082821015612ada57612ada6127d7565b50039056fe51b355059847d158e68950419dbcd54fad00bdfd0634c2515a5c533288c7f0a2a26469706673582212202b6323f156bb68f624d60fb121e99617cbf9c0704031f18f74e8230ab5c282ee64736f6c63430008090033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000507b281e73e03ae440f39b47336cd69a1dfb7eda00000000000000000000000046a91cd85daeb45ff7f2babdfd6ff1285975bed2000000000000000000000000589a74945647e5a4dc4a1fe239ba90a8be71c3690000000000000000000000006e87f77d690435598cb0d30434030c59fd912e4b0000000000000000000000006809dddfd52cbe21aa514041c4a0ca0a646e27030000000000000000000000000000000000000000000000000000000000000006
-----Decoded View---------------
Arg [0] : _account1 (address): 0x507b281e73E03ae440F39B47336cD69a1DFB7edA
Arg [1] : _account2 (address): 0x46a91CD85dAeB45ff7f2bAbdFD6Ff1285975bed2
Arg [2] : _account3 (address): 0x589a74945647e5A4Dc4A1fe239BA90A8Be71C369
Arg [3] : _account4 (address): 0x6E87f77d690435598Cb0d30434030C59fD912E4b
Arg [4] : devRoleAdress (address): 0x6809DdDfD52cBE21AA514041C4a0CA0a646e2703
Arg [5] : subscriptionId (uint64): 6
-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 000000000000000000000000507b281e73e03ae440f39b47336cd69a1dfb7eda
Arg [1] : 00000000000000000000000046a91cd85daeb45ff7f2babdfd6ff1285975bed2
Arg [2] : 000000000000000000000000589a74945647e5a4dc4a1fe239ba90a8be71c369
Arg [3] : 0000000000000000000000006e87f77d690435598cb0d30434030c59fd912e4b
Arg [4] : 0000000000000000000000006809dddfd52cbe21aa514041c4a0ca0a646e2703
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000006
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.