NFT
Overview
TokenID
2161
Total Transfers
-
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
Boki
Compiler Version
v0.8.13+commit.abaa5c0e
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.13; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol"; contract Boki is ERC721A, Ownable, VRFConsumerBase { enum SaleStatus { PAUSED, DREAMERS, PUBLIC, ALLOWLIST, FINAL } using Strings for uint256; using ECDSA for bytes32; // ------ SET SALE AS PAUSED SaleStatus public saleStatus = SaleStatus.PAUSED; string private preRevealURI; string private postRevealBaseURI; // ------ Sale Settings uint256 private constant PRICE_BOKI = 0.066 ether; uint256 private constant MAX_BOKI = 7777; uint256 private constant DEPLOYER_RESERVED_BOKI = 150; uint256 private constant PUBLIC_BOKI_PER_TXN_LIMIT = 3; // Remaining public Bokis (7777-1263-3753-1263-150=1348) uint256 public publicBokiRemaining = 1348; bytes32 public dreamersMerkleRoot; bytes32 public allowlistMerkleRoot; address public publicMintSigner; mapping(address => bool) public dreamersPresalePurchased; mapping(address => bool) public allowlistSalePurchased; mapping(bytes => bool) public signaturesUsed; // ------ Reveal bool public revealed; uint256 public tokenOffset; // Chainlink VRF bytes32 public chainlinkKeyHash; uint256 public chainlinkFee; address private immutable withdrawalAddress; constructor( string memory _preRevealURI, address _withdrawalAddress, address _vrfCoordinator, address _linkAddress, bytes32 _chainlinkKeyHash, uint256 _chainlinkFee ) ERC721A("Boki", "BOKI") VRFConsumerBase(_vrfCoordinator, _linkAddress) { preRevealURI = _preRevealURI; withdrawalAddress = _withdrawalAddress; chainlinkKeyHash = _chainlinkKeyHash; chainlinkFee = _chainlinkFee; _mint(tx.origin, DEPLOYER_RESERVED_BOKI, "", false); } // ------ Prevention from minting off of Contract modifier callerIsUser() { require(tx.origin == msg.sender, "The caller is another contract"); _; } // ------ METADATA function setPreRevealURI(string memory _URI) external onlyOwner { preRevealURI = _URI; } function setPostRevealBaseURI(string memory _URI) external onlyOwner { postRevealBaseURI = _URI; } // ------ TOKEN URI // Before reveal, return same pre-reveal URI // After reveal, return post-reveal URI with random token offset from Chainlink function tokenURI(uint256 _tokenId) public view override returns (string memory) { require(_exists(_tokenId), "ERC721Metadata: URI query for nonexistent token"); if (!revealed) return preRevealURI; uint256 shiftedTokenId = (_tokenId + tokenOffset) % totalSupply(); return string(abi.encodePacked(postRevealBaseURI, shiftedTokenId.toString())); } // ------ SALE FUNCTION function setSaleStatus(SaleStatus _status) external onlyOwner { saleStatus = _status; } // ------ MERKLE ROOTS function setMerkleRoots(bytes32 _dreamersMerkleRoot, bytes32 _allowlistMerkleRoot) external onlyOwner { dreamersMerkleRoot = _dreamersMerkleRoot; allowlistMerkleRoot = _allowlistMerkleRoot; } function processMint(uint256 _quantity) internal { require(!revealed, "NO MINTS POSTREVEAL"); require(msg.value == PRICE_BOKI * _quantity, "INCORRECT ETH SENT"); require(totalSupply() + _quantity <= MAX_BOKI, "MAX CAP OF BOKI EXCEEDED"); _mint(msg.sender, _quantity, "", false); } // ------ DREAMER PRESALE + DREAMER ALLOW LIST SALE function dreamersSale(bytes32[] memory _proof) external payable callerIsUser { require(saleStatus == SaleStatus.DREAMERS || saleStatus == SaleStatus.ALLOWLIST, "DREAMERS SALE NOT ACTIVE"); require( MerkleProof.verify(_proof, dreamersMerkleRoot, keccak256(abi.encodePacked(msg.sender))), "MINTER IS NOT ON DREAMERS LIST" ); if (saleStatus == SaleStatus.DREAMERS) { require(!dreamersPresalePurchased[msg.sender], "DREAMER PRESALE TICKET ALREADY USED"); dreamersPresalePurchased[msg.sender] = true; } else { require(!allowlistSalePurchased[msg.sender], "DREAMER ALLOWLIST TICKET ALREADY USED"); allowlistSalePurchased[msg.sender] = true; } processMint(1); } // ------ ALLOWLIST SALE function allowlistSale(bytes32[] memory _proof) external payable callerIsUser { require(saleStatus == SaleStatus.ALLOWLIST, "ALLOW LIST MINTING IS NOT ACTIVE"); require( MerkleProof.verify(_proof, allowlistMerkleRoot, keccak256(abi.encodePacked(msg.sender))), "MINTER IS NOT ON ALLOW LIST" ); require(!allowlistSalePurchased[msg.sender], "ALLOWLIST TICKET ALREADY USED"); allowlistSalePurchased[msg.sender] = true; processMint(1); } // ------ BIRTH OF BOKI (PUBLIC SALE) function bokiBirth( uint256 _quantity, uint256 _nonce, bytes memory _signature ) external payable callerIsUser { require(saleStatus == SaleStatus.PUBLIC || saleStatus == SaleStatus.FINAL, "BIRTH OF BOKI IS NOT ON"); require(saleStatus == SaleStatus.FINAL || publicBokiRemaining - _quantity >= 0, "PUBLIC CAP EXCEEDED"); require(_quantity <= PUBLIC_BOKI_PER_TXN_LIMIT, "QUANTITY SURPASSES PER-TXN LIMIT"); validateSignature(msg.sender, _nonce, _signature); publicBokiRemaining -= _quantity; processMint(_quantity); } // ------ EDIT CHAINLINK CONFIG function setChainlinkConfig(uint256 _fee, bytes32 _keyhash) external onlyOwner { chainlinkFee = _fee; chainlinkKeyHash = _keyhash; } // ------ REQUEST TOKEN OFFSET // NOTE: contract must be approved for and own 2 LINK before calling this function function startReveal(string memory _newURI) external onlyOwner returns (bytes32 requestId) { require(!revealed, "ALREADY REVEALED"); postRevealBaseURI = _newURI; LINK.transferFrom(msg.sender, address(this), chainlinkFee); return requestRandomness(chainlinkKeyHash, chainlinkFee); } // ------ CHAINLINK CALLBACK FOR TOKEN OFFSET function fulfillRandomness(bytes32, uint256 _randomness) internal override { require(!revealed, "ALREADY REVEALED"); revealed = true; tokenOffset = _randomness % totalSupply(); } // ------ WITHDRAW FUNDS function withdrawFunds() external onlyOwner { payable(withdrawalAddress).transfer(address(this).balance); } // ------ SET PUBLIC KEY OF PUBLIC MINT SIGNATURE SIGNER function setPublicMintSigner(address _signer) external onlyOwner { publicMintSigner = _signer; } // ------ VERIFY SIGNATURE function validateSignature( address _sender, uint256 _nonce, bytes memory _signature ) internal { bytes32 signedHash = keccak256(abi.encodePacked(_sender, _nonce)).toEthSignedMessageHash(); require(!signaturesUsed[_signature], "SIGNATURE ALREADY USED"); require(signedHash.recover(_signature) == publicMintSigner, "NOT FROM BOKI FRONTEND"); signaturesUsed[_signature] = true; } function numberMinted(address _owner) public view returns (uint256) { return _numberMinted(_owner); } function getOwnershipData(uint256 _tokenId) external view returns (TokenOwnership memory) { return _ownershipOf(_tokenId); } }
// 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/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 MintToZeroAddress(); error MintZeroQuantity(); error OwnerQueryForNonexistentToken(); 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 _startTokenId() (defaults to 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_; _currentIndex = _startTokenId(); } /** * To change the starting tokenId, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { return 0; } /** * @dev Burned tokens are calculated here, use _totalMinted() if you want to count just minted tokens. */ function totalSupply() public view returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than _currentIndex - _startTokenId() times unchecked { return _currentIndex - _burnCounter - _startTokenId(); } } /** * Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view returns (uint256) { // Counter underflow is impossible as _currentIndex does not decrement, // and it is initialized to _startTokenId() unchecked { return _currentIndex - _startTokenId(); } } /** * @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) { 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) { 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) { 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 { _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 (_startTokenId() <= curr && 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 virtual 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 (to.isContract() && !_checkContractOnERC721Received(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 _startTokenId() <= tokenId && 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; uint256 end = updatedIndex + quantity; if (safe && to.isContract()) { do { emit Transfer(address(0), to, updatedIndex); if (!_checkContractOnERC721Received(address(0), to, updatedIndex++, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } while (updatedIndex != end); // Reentrancy protection if (_currentIndex != startTokenId) revert(); } else { do { emit Transfer(address(0), to, updatedIndex++); } while (updatedIndex != end); } _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); if (prevOwnership.addr != from) revert TransferFromIncorrectOwner(); bool isApprovedOrOwner = (_msgSender() == from || isApprovedForAll(from, _msgSender()) || getApproved(tokenId) == _msgSender()); if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, from); // 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; TokenOwnership storage currSlot = _ownerships[tokenId]; currSlot.addr = to; currSlot.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; TokenOwnership storage nextSlot = _ownerships[nextTokenId]; if (nextSlot.addr == address(0)) { // This will suffice for checking _exists(nextTokenId), // as a burned slot cannot contain the zero address. if (nextTokenId != _currentIndex) { nextSlot.addr = from; nextSlot.startTimestamp = prevOwnership.startTimestamp; } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev This is equivalent to _burn(tokenId, false) */ function _burn(uint256 tokenId) internal virtual { _burn(tokenId, false); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId, bool approvalCheck) internal virtual { TokenOwnership memory prevOwnership = _ownershipOf(tokenId); address from = prevOwnership.addr; if (approvalCheck) { bool isApprovedOrOwner = (_msgSender() == from || isApprovedForAll(from, _msgSender()) || getApproved(tokenId) == _msgSender()); if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved(); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, from); // 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 storage addressData = _addressData[from]; addressData.balance -= 1; addressData.numberBurned += 1; // Keep track of who burned the token, and the timestamp of burning. TokenOwnership storage currSlot = _ownerships[tokenId]; currSlot.addr = from; currSlot.startTimestamp = uint64(block.timestamp); currSlot.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; TokenOwnership storage nextSlot = _ownerships[nextTokenId]; if (nextSlot.addr == address(0)) { // This will suffice for checking _exists(nextTokenId), // as a burned slot cannot contain the zero address. if (nextTokenId != _currentIndex) { nextSlot.addr = from; nextSlot.startTimestamp = prevOwnership.startTimestamp; } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, 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 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 _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { 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)) } } } } /** * @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 (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 (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. * * WARNING: You should avoid using leaf values that are 64 bytes long prior to * hashing, or use a hash function other than keccak256 for hashing leaves. * This is because the concatenation of a sorted pair of internal nodes in * the merkle tree could be reinterpreted as a leaf value. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { 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 // 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 (last updated v4.5.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { // Check the signature length // - case 65: r,s,v signature (standard) // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._ if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else if (signature.length == 64) { bytes32 r; bytes32 vs; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) vs := mload(add(signature, 0x40)) } return tryRecover(hash, r, vs); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } if (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./interfaces/LinkTokenInterface.sol"; import "./VRFRequestIDBase.sol"; /** **************************************************************************** * @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. * ***************************************************************************** * @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, _link) 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), and have told you the minimum LINK * @dev price for VRF service. Make sure your contract has sufficient LINK, and * @dev call requestRandomness(keyHash, fee, seed), where seed is the input you * @dev want to generate randomness from. * * @dev Once the VRFCoordinator has received and validated the oracle's response * @dev to your request, it will call your contract's fulfillRandomness method. * * @dev The randomness argument to fulfillRandomness is the actual random value * @dev generated from your seed. * * @dev The requestId argument is generated from the keyHash and the seed by * @dev makeRequestId(keyHash, seed). If your contract could have concurrent * @dev requests open, you can use the requestId to track which seed is * @dev associated with which randomness. See VRFRequestIDBase.sol for more * @dev details. (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. (Which is critical to making unpredictable randomness! See the * @dev next section.) * * ***************************************************************************** * @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 ultimate input to the VRF is mixed with the block hash of the * @dev block in which the request is made, user-provided seeds have no impact * @dev on its economic security properties. They are only included for API * @dev compatability with previous versions of this contract. * * @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. */ abstract contract VRFConsumerBase is VRFRequestIDBase { /** * @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 VRFConsumerBase 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 randomness the VRF output */ function fulfillRandomness(bytes32 requestId, uint256 randomness) internal virtual; /** * @dev In order to keep backwards compatibility we have kept the user * seed field around. We remove the use of it because given that the blockhash * enters later, it overrides whatever randomness the used seed provides. * Given that it adds no security, and can easily lead to misunderstandings, * we have removed it from usage and can now provide a simpler API. */ uint256 private constant USER_SEED_PLACEHOLDER = 0; /** * @notice requestRandomness initiates a request for VRF output given _seed * * @dev The fulfillRandomness method receives the output, once it's provided * @dev by the Oracle, and verified by the vrfCoordinator. * * @dev The _keyHash must already be registered with the VRFCoordinator, and * @dev the _fee must exceed the fee specified during registration of the * @dev _keyHash. * * @dev The _seed parameter is vestigial, and is kept only for API * @dev compatibility with older versions. It can't *hurt* to mix in some of * @dev your own randomness, here, but it's not necessary because the VRF * @dev oracle will mix the hash of the block containing your request into the * @dev VRF seed it ultimately uses. * * @param _keyHash ID of public key against which randomness is generated * @param _fee The amount of LINK to send with the request * * @return requestId unique ID for this request * * @dev The returned requestId can be used to distinguish responses to * @dev concurrent requests. It is passed as the first argument to * @dev fulfillRandomness. */ function requestRandomness(bytes32 _keyHash, uint256 _fee) internal returns (bytes32 requestId) { LINK.transferAndCall(vrfCoordinator, _fee, abi.encode(_keyHash, USER_SEED_PLACEHOLDER)); // This is the seed passed to VRFCoordinator. The oracle will mix this with // the hash of the block containing this request to obtain the seed/input // which is finally passed to the VRF cryptographic machinery. uint256 vRFSeed = makeVRFInputSeed(_keyHash, USER_SEED_PLACEHOLDER, address(this), nonces[_keyHash]); // nonces[_keyHash] must stay in sync with // VRFCoordinator.nonces[_keyHash][this], which was incremented by the above // successful LINK.transferAndCall (in VRFCoordinator.randomnessRequest). // This provides protection against the user repeating their input seed, // which would result in a predictable/duplicate output, if multiple such // requests appeared in the same block. nonces[_keyHash] = nonces[_keyHash] + 1; return makeRequestId(_keyHash, vRFSeed); } LinkTokenInterface internal immutable LINK; address private immutable vrfCoordinator; // Nonces for each VRF key from which randomness has been requested. // // Must stay in sync with VRFCoordinator[_keyHash][this] mapping(bytes32 => uint256) /* keyHash */ /* nonce */ private nonces; /** * @param _vrfCoordinator address of VRFCoordinator contract * @param _link address of LINK token contract * * @dev https://docs.chain.link/docs/link-token-contracts */ constructor(address _vrfCoordinator, address _link) { vrfCoordinator = _vrfCoordinator; LINK = LinkTokenInterface(_link); } // rawFulfillRandomness is called by VRFCoordinator when it receives a valid VRF // proof. rawFulfillRandomness then calls fulfillRandomness, after validating // the origin of the call function rawFulfillRandomness(bytes32 requestId, uint256 randomness) external { require(msg.sender == vrfCoordinator, "Only VRFCoordinator can fulfill"); fulfillRandomness(requestId, randomness); } }
// 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`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must 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 Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts 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 `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT 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; contract VRFRequestIDBase { /** * @notice returns the seed which is actually input to the VRF coordinator * * @dev To prevent repetition of VRF output due to repetition of the * @dev user-supplied seed, that seed is combined in a hash with the * @dev user-specific nonce, and the address of the consuming contract. The * @dev risk of repetition is mostly mitigated by inclusion of a blockhash in * @dev the final seed, but the nonce does protect against repetition in * @dev requests which are included in a single block. * * @param _userSeed VRF seed input provided by user * @param _requester Address of the requesting contract * @param _nonce User-specific nonce at the time of the request */ function makeVRFInputSeed( bytes32 _keyHash, uint256 _userSeed, address _requester, uint256 _nonce ) internal pure returns (uint256) { return uint256(keccak256(abi.encode(_keyHash, _userSeed, _requester, _nonce))); } /** * @notice Returns the id for this request * @param _keyHash The serviceAgreement ID to be used for this request * @param _vRFInputSeed The seed to be passed directly to the VRF * @return The id for this request * * @dev Note that _vRFInputSeed is not the seed passed by the consuming * @dev contract, but the one generated by makeVRFInputSeed */ function makeRequestId(bytes32 _keyHash, uint256 _vRFInputSeed) internal pure returns (bytes32) { return keccak256(abi.encodePacked(_keyHash, _vRFInputSeed)); } }
// 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); }
{ "remappings": [ "@chainlink/=lib/chainlink/", "@openzeppelin/=lib/openzeppelin-contracts/", "ERC721A/=lib/ERC721A/contracts/", "chainlink/=lib/chainlink/", "ds-test/=lib/ds-test/src/", "erc721a/=lib/erc721a/", "forge-std/=lib/forge-std/src/", "openzeppelin-contracts/=lib/openzeppelin-contracts/", "src/=src/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "bytecodeHash": "ipfs" }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "london" }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"_preRevealURI","type":"string"},{"internalType":"address","name":"_withdrawalAddress","type":"address"},{"internalType":"address","name":"_vrfCoordinator","type":"address"},{"internalType":"address","name":"_linkAddress","type":"address"},{"internalType":"bytes32","name":"_chainlinkKeyHash","type":"bytes32"},{"internalType":"uint256","name":"_chainlinkFee","type":"uint256"}],"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":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"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":"allowlistMerkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_proof","type":"bytes32[]"}],"name":"allowlistSale","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"allowlistSalePurchased","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"uint256","name":"_nonce","type":"uint256"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"bokiBirth","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"chainlinkFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"chainlinkKeyHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dreamersMerkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"dreamersPresalePurchased","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_proof","type":"bytes32[]"}],"name":"dreamersSale","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getOwnershipData","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"}],"internalType":"struct ERC721A.TokenOwnership","name":"","type":"tuple"}],"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":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"numberMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"publicBokiRemaining","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicMintSigner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"requestId","type":"bytes32"},{"internalType":"uint256","name":"randomness","type":"uint256"}],"name":"rawFulfillRandomness","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revealed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":[],"name":"saleStatus","outputs":[{"internalType":"enum Boki.SaleStatus","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fee","type":"uint256"},{"internalType":"bytes32","name":"_keyhash","type":"bytes32"}],"name":"setChainlinkConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_dreamersMerkleRoot","type":"bytes32"},{"internalType":"bytes32","name":"_allowlistMerkleRoot","type":"bytes32"}],"name":"setMerkleRoots","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_URI","type":"string"}],"name":"setPostRevealBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_URI","type":"string"}],"name":"setPreRevealURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_signer","type":"address"}],"name":"setPublicMintSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum Boki.SaleStatus","name":"_status","type":"uint8"}],"name":"setSaleStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"","type":"bytes"}],"name":"signaturesUsed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_newURI","type":"string"}],"name":"startReveal","outputs":[{"internalType":"bytes32","name":"requestId","type":"bytes32"}],"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":"tokenOffset","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawFunds","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60e0604052600a805460ff19169055610544600d553480156200002157600080fd5b506040516200375b3803806200375b833981016040819052620000449162000553565b838360405180604001604052806004815260200163426f6b6960e01b81525060405180604001604052806004815260200163424f4b4960e01b8152508160029080519060200190620000989291906200044b565b508051620000ae9060039060208401906200044b565b50506000805550620000c0336200012c565b6001600160a01b0391821660a052166080528551620000e790600b9060208901906200044b565b506001600160a01b03851660c052601682905560178190556040805160208101909152600080825262000120913291609691906200017e565b5050505050506200071c565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000546001600160a01b038516620001a857604051622e076360e81b815260040160405180910390fd5b83600003620001ca5760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038516600081815260056020908152604080832080546001600160801b031981166001600160401b038083168c018116918217680100000000000000006001600160401b031990941690921783900481168c01811690920217909155858452600490925290912080546001600160e01b031916909217600160a01b42909216919091021790558080850183801562000283575062000283876001600160a01b03166200034860201b620016f51760201c565b1562000302575b60405182906001600160a01b038916906000906000805160206200373b833981519152908290a46001820191620002c79060009089908862000357565b620002e5576040516368d2bf6b60e11b815260040160405180910390fd5b8082036200028a578260005414620002fc57600080fd5b62000337565b5b6040516001830192906001600160a01b038916906000906000805160206200373b833981519152908290a480820362000303575b506000555050505050565b50505050565b6001600160a01b03163b151590565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a02906200038e90339089908890889060040162000657565b6020604051808303816000875af1925050508015620003cc575060408051601f3d908101601f19168201909252620003c991810190620006ad565b60015b6200042e573d808015620003fd576040519150601f19603f3d011682016040523d82523d6000602084013e62000402565b606091505b50805160000362000426576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b8280546200045990620006e0565b90600052602060002090601f0160209004810192826200047d5760008555620004c8565b82601f106200049857805160ff1916838001178555620004c8565b82800160010185558215620004c8579182015b82811115620004c8578251825591602001919060010190620004ab565b50620004d6929150620004da565b5090565b5b80821115620004d65760008155600101620004db565b634e487b7160e01b600052604160045260246000fd5b60005b83811015620005245781810151838201526020016200050a565b83811115620003425750506000910152565b80516001600160a01b03811681146200054e57600080fd5b919050565b60008060008060008060c087890312156200056d57600080fd5b86516001600160401b03808211156200058557600080fd5b818901915089601f8301126200059a57600080fd5b815181811115620005af57620005af620004f1565b604051601f8201601f19908116603f01168101908382118183101715620005da57620005da620004f1565b816040528281528c6020848701011115620005f457600080fd5b6200060783602083016020880162000507565b809a5050505050506200061d6020880162000536565b94506200062d6040880162000536565b93506200063d6060880162000536565b92506080870151915060a087015190509295509295509295565b600060018060a01b038087168352808616602084015250836040830152608060608301528251806080840152620006968160a085016020870162000507565b601f01601f19169190910160a00195945050505050565b600060208284031215620006c057600080fd5b81516001600160e01b031981168114620006d957600080fd5b9392505050565b600181811c90821680620006f557607f821691505b6020821081036200071657634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a05160c051612fe16200075a6000396000610a5a015260008181610f190152611b18015260008181610cca0152611ae90152612fe16000f3fe60806040526004361061025c5760003560e01c806375d7741b11610144578063b88d4fde116100b6578063db292e7f1161007a578063db292e7f14610728578063dc33e68114610748578063dc8c57b414610768578063e985e9c51461077e578063f2fde38b146107c7578063f9020e33146107e757600080fd5b8063b88d4fde14610685578063bef7d63b146106a5578063c87b56dd146106c5578063ce4fe56f146106e5578063d60cd6951461071557600080fd5b806394985ddd1161010857806394985ddd146105cd57806394c4303a146105ed57806394d15abb1461061d57806395d89b41146106305780639a48eb5114610645578063a22cb4651461066557600080fd5b806375d7741b14610510578063784754f4146105305780637ac98be1146105435780638da5cb5b146105595780639231ab2a1461057757600080fd5b806329d7871b116101dd5780634891ad88116101a15780634891ad881461046157806351830227146104815780636352211e1461049b5780636e569177146104bb57806370a08231146104db578063715018a6146104fb57600080fd5b806329d7871b146103ba5780632a85db55146103d05780633fe05a2c146103f057806342842e0e1461042b5780634586fb4e1461044b57600080fd5b8063161b7f9311610224578063161b7f931461033257806318160ddd1461035657806323b872dd1461036f57806324600fc31461038f578063293108e0146103a457600080fd5b806301ffc9a71461026157806306fdde0314610296578063081812fc146102b8578063095ea7b3146102f05780630c96549414610312575b600080fd5b34801561026d57600080fd5b5061028161027c3660046127eb565b61080e565b60405190151581526020015b60405180910390f35b3480156102a257600080fd5b506102ab610860565b60405161028d9190612867565b3480156102c457600080fd5b506102d86102d336600461287a565b6108f2565b6040516001600160a01b03909116815260200161028d565b3480156102fc57600080fd5b5061031061030b3660046128aa565b610936565b005b34801561031e57600080fd5b5061031061032d3660046128d4565b6109c3565b34801561033e57600080fd5b50610348600e5481565b60405190815260200161028d565b34801561036257600080fd5b5060015460005403610348565b34801561037b57600080fd5b5061031061038a3660046128ef565b610a18565b34801561039b57600080fd5b50610310610a23565b3480156103b057600080fd5b50610348600f5481565b3480156103c657600080fd5b50610348600d5481565b3480156103dc57600080fd5b506103106103eb3660046129c8565b610aa5565b3480156103fc57600080fd5b5061028161040b366004612a30565b805160208183018101805160138252928201919093012091525460ff1681565b34801561043757600080fd5b506103106104463660046128ef565b610ae6565b34801561045757600080fd5b5061034860165481565b34801561046d57600080fd5b5061031061047c366004612a64565b610b01565b34801561048d57600080fd5b506014546102819060ff1681565b3480156104a757600080fd5b506102d86104b636600461287a565b610b52565b3480156104c757600080fd5b506103106104d6366004612a85565b610b64565b3480156104e757600080fd5b506103486104f63660046128d4565b610b99565b34801561050757600080fd5b50610310610be7565b34801561051c57600080fd5b5061034861052b3660046129c8565b610c1d565b61031061053e366004612aa7565b610d53565b34801561054f57600080fd5b5061034860175481565b34801561056557600080fd5b506008546001600160a01b03166102d8565b34801561058357600080fd5b5061059761059236600461287a565b610ee8565b6040805182516001600160a01b031681526020808401516001600160401b0316908201529181015115159082015260600161028d565b3480156105d957600080fd5b506103106105e8366004612a85565b610f0e565b3480156105f957600080fd5b506102816106083660046128d4565b60126020526000908152604090205460ff1681565b61031061062b366004612aa7565b610f90565b34801561063c57600080fd5b506102ab6111ca565b34801561065157600080fd5b50610310610660366004612a85565b6111d9565b34801561067157600080fd5b50610310610680366004612b5a565b61120e565b34801561069157600080fd5b506103106106a0366004612b91565b6112a3565b3480156106b157600080fd5b506010546102d8906001600160a01b031681565b3480156106d157600080fd5b506102ab6106e036600461287a565b6112f4565b3480156106f157600080fd5b506102816107003660046128d4565b60116020526000908152604090205460ff1681565b610310610723366004612bf8565b61145a565b34801561073457600080fd5b506103106107433660046129c8565b6115f2565b34801561075457600080fd5b506103486107633660046128d4565b61162f565b34801561077457600080fd5b5061034860155481565b34801561078a57600080fd5b50610281610799366004612c47565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b3480156107d357600080fd5b506103106107e23660046128d4565b61165d565b3480156107f357600080fd5b50600a546108019060ff1681565b60405161028d9190612c90565b60006001600160e01b031982166380ac58cd60e01b148061083f57506001600160e01b03198216635b5e139f60e01b145b8061085a57506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606002805461086f90612cb8565b80601f016020809104026020016040519081016040528092919081815260200182805461089b90612cb8565b80156108e85780601f106108bd576101008083540402835291602001916108e8565b820191906000526020600020905b8154815290600101906020018083116108cb57829003601f168201915b5050505050905090565b60006108fd82611704565b61091a576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600061094182610b52565b9050806001600160a01b0316836001600160a01b0316036109755760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b0382161480159061099557506109938133610799565b155b156109b3576040516367d9dca160e11b815260040160405180910390fd5b6109be83838361172f565b505050565b6008546001600160a01b031633146109f65760405162461bcd60e51b81526004016109ed90612cf2565b60405180910390fd5b601080546001600160a01b0319166001600160a01b0392909216919091179055565b6109be83838361178b565b6008546001600160a01b03163314610a4d5760405162461bcd60e51b81526004016109ed90612cf2565b6040516001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016904780156108fc02916000818181858888f19350505050158015610aa2573d6000803e3d6000fd5b50565b6008546001600160a01b03163314610acf5760405162461bcd60e51b81526004016109ed90612cf2565b8051610ae290600b90602084019061273c565b5050565b6109be838383604051806020016040528060008152506112a3565b6008546001600160a01b03163314610b2b5760405162461bcd60e51b81526004016109ed90612cf2565b600a805482919060ff19166001836004811115610b4a57610b4a612c7a565b021790555050565b6000610b5d82611979565b5192915050565b6008546001600160a01b03163314610b8e5760405162461bcd60e51b81526004016109ed90612cf2565b601791909155601655565b60006001600160a01b038216610bc2576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600560205260409020546001600160401b031690565b6008546001600160a01b03163314610c115760405162461bcd60e51b81526004016109ed90612cf2565b610c1b6000611a93565b565b6008546000906001600160a01b03163314610c4a5760405162461bcd60e51b81526004016109ed90612cf2565b60145460ff1615610c905760405162461bcd60e51b815260206004820152601060248201526f1053149150511648149155915053115160821b60448201526064016109ed565b8151610ca390600c90602085019061273c565b506017546040516323b872dd60e01b815233600482015230602482015260448101919091527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af1158015610d1b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d3f9190612d27565b5061085a601654601754611ae5565b919050565b323314610d725760405162461bcd60e51b81526004016109ed90612d44565b6003600a5460ff166004811115610d8b57610d8b612c7a565b14610dd85760405162461bcd60e51b815260206004820181905260248201527f414c4c4f57204c495354204d494e54494e47204953204e4f542041435449564560448201526064016109ed565b600f546040516001600160601b03193360601b166020820152610e169183916034015b60405160208183030381529060405280519060200120611c69565b610e625760405162461bcd60e51b815260206004820152601b60248201527f4d494e544552204953204e4f54204f4e20414c4c4f57204c495354000000000060448201526064016109ed565b3360009081526012602052604090205460ff1615610ec25760405162461bcd60e51b815260206004820152601d60248201527f414c4c4f574c495354205449434b455420414c5245414459205553454400000060448201526064016109ed565b336000908152601260205260409020805460ff19166001908117909155610aa290611c7f565b604080516060810182526000808252602082018190529181019190915261085a82611979565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610f865760405162461bcd60e51b815260206004820152601f60248201527f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c0060448201526064016109ed565b610ae28282611da1565b323314610faf5760405162461bcd60e51b81526004016109ed90612d44565b6001600a5460ff166004811115610fc857610fc8612c7a565b1480610fea57506003600a5460ff166004811115610fe857610fe8612c7a565b145b6110365760405162461bcd60e51b815260206004820152601860248201527f445245414d4552532053414c45204e4f5420414354495645000000000000000060448201526064016109ed565b600e546040516001600160601b03193360601b16602082015261105d918391603401610dfb565b6110a95760405162461bcd60e51b815260206004820152601e60248201527f4d494e544552204953204e4f54204f4e20445245414d455253204c495354000060448201526064016109ed565b6001600a5460ff1660048111156110c2576110c2612c7a565b03611152573360009081526011602052604090205460ff16156111335760405162461bcd60e51b815260206004820152602360248201527f445245414d45522050524553414c45205449434b455420414c5245414459205560448201526214d15160ea1b60648201526084016109ed565b336000908152601160205260409020805460ff191660011790556111c0565b3360009081526012602052604090205460ff1615610ec25760405162461bcd60e51b815260206004820152602560248201527f445245414d455220414c4c4f574c495354205449434b455420414c5245414459604482015264081554d15160da1b60648201526084016109ed565b610aa26001611c7f565b60606003805461086f90612cb8565b6008546001600160a01b031633146112035760405162461bcd60e51b81526004016109ed90612cf2565b600e91909155600f55565b336001600160a01b038316036112375760405163b06307db60e01b815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6112ae84848461178b565b6001600160a01b0383163b151580156112d057506112ce84848484611e12565b155b156112ee576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b60606112ff82611704565b6113635760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084016109ed565b60145460ff166113ff57600b805461137a90612cb8565b80601f01602080910402602001604051908101604052809291908181526020018280546113a690612cb8565b80156113f35780601f106113c8576101008083540402835291602001916113f3565b820191906000526020600020905b8154815290600101906020018083116113d657829003601f168201915b50505050509050919050565b600061140e6001546000540390565b60155461141b9085612d91565b6114259190612dbf565b9050600c61143282611efd565b604051602001611443929190612def565b604051602081830303815290604052915050919050565b3233146114795760405162461bcd60e51b81526004016109ed90612d44565b6002600a5460ff16600481111561149257611492612c7a565b14806114b457506004600a5460ff1660048111156114b2576114b2612c7a565b145b6115005760405162461bcd60e51b815260206004820152601760248201527f4249525448204f4620424f4b49204953204e4f54204f4e00000000000000000060448201526064016109ed565b6004600a5460ff16600481111561151957611519612c7a565b14806115335750600083600d546115309190612e95565b10155b6115755760405162461bcd60e51b8152602060048201526013602482015272141550931250c810d05408115610d151511151606a1b60448201526064016109ed565b60038311156115c65760405162461bcd60e51b815260206004820181905260248201527f5155414e5449545920535552504153534553205045522d54584e204c494d495460448201526064016109ed565b6115d1338383611ffd565b82600d60008282546115e39190612e95565b909155506109be905083611c7f565b6008546001600160a01b0316331461161c5760405162461bcd60e51b81526004016109ed90612cf2565b8051610ae290600c90602084019061273c565b6001600160a01b038116600090815260056020526040812054600160401b90046001600160401b031661085a565b6008546001600160a01b031633146116875760405162461bcd60e51b81526004016109ed90612cf2565b6001600160a01b0381166116ec5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016109ed565b610aa281611a93565b6001600160a01b03163b151590565b600080548210801561085a575050600090815260046020526040902054600160e01b900460ff161590565b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600061179682611979565b9050836001600160a01b031681600001516001600160a01b0316146117cd5760405162a1148160e81b815260040160405180910390fd5b6000336001600160a01b03861614806117eb57506117eb8533610799565b806118065750336117fb846108f2565b6001600160a01b0316145b90508061182657604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b03841661184d57604051633a954ecd60e21b815260040160405180910390fd5b6118596000848761172f565b6001600160a01b038581166000908152600560209081526040808320805467ffffffffffffffff198082166001600160401b0392831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600490945282852080546001600160e01b031916909417600160a01b4290921691909102178355870180845292208054919390911661192d57600054821461192d57805460208601516001600160401b0316600160a01b026001600160e01b03199091166001600160a01b038a16171781555b50505082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b5050505050565b604080516060810182526000808252602082018190529181019190915281600054811015611a7a57600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff16151591810182905290611a785780516001600160a01b031615611a0f579392505050565b5060001901600081815260046020908152604091829020825160608101845290546001600160a01b038116808352600160a01b82046001600160401b031693830193909352600160e01b900460ff1615159281019290925215611a73579392505050565b611a0f565b505b604051636f96cda160e11b815260040160405180910390fd5b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316634000aea07f000000000000000000000000000000000000000000000000000000000000000084866000604051602001611b55929190918252602082015260400190565b6040516020818303038152906040526040518463ffffffff1660e01b8152600401611b8293929190612eac565b6020604051808303816000875af1158015611ba1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bc59190612d27565b50600083815260096020818152604080842054815180840189905280830186905230606082015260808082018390528351808303909101815260a090910190925281519183019190912093879052919052611c21906001612d91565b600085815260096020526040902055611c618482604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b949350505050565b600082611c768584612196565b14949350505050565b60145460ff1615611cc85760405162461bcd60e51b81526020600482015260136024820152721393c81352539514c81413d4d5149155915053606a1b60448201526064016109ed565b611cd98166ea7aa67b2d0000612ed3565b3414611d1c5760405162461bcd60e51b8152602060048201526012602482015271125390d3d4949150d5081155120814d1539560721b60448201526064016109ed565b611e6181611d2d6001546000540390565b611d379190612d91565b1115611d855760405162461bcd60e51b815260206004820152601860248201527f4d415820434150204f4620424f4b49204558434545444544000000000000000060448201526064016109ed565b610aa2338260405180602001604052806000815250600061220a565b60145460ff1615611de75760405162461bcd60e51b815260206004820152601060248201526f1053149150511648149155915053115160821b60448201526064016109ed565b6014805460ff19166001179055611e016001546000540390565b611e0b9082612dbf565b6015555050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290611e47903390899088908890600401612ef2565b6020604051808303816000875af1925050508015611e82575060408051601f3d908101601f19168201909252611e7f91810190612f2f565b60015b611ee0573d808015611eb0576040519150601f19603f3d011682016040523d82523d6000602084013e611eb5565b606091505b508051600003611ed8576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b606081600003611f245750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611f4e5780611f3881612f4c565b9150611f479050600a83612f65565b9150611f28565b6000816001600160401b03811115611f6857611f6861292b565b6040519080825280601f01601f191660200182016040528015611f92576020820181803683370190505b5090505b8415611c6157611fa7600183612e95565b9150611fb4600a86612dbf565b611fbf906030612d91565b60f81b818381518110611fd457611fd4612f79565b60200101906001600160f81b031916908160001a905350611ff6600a86612f65565b9450611f96565b6040516001600160601b0319606085901b1660208201526034810183905260009061208e90605401604051602081830303815290604052805190602001206040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b90506013826040516120a09190612f8f565b9081526040519081900360200190205460ff16156120f95760405162461bcd60e51b815260206004820152601660248201527514d251d390551554914810531491505116481554d15160521b60448201526064016109ed565b6010546001600160a01b031661210f82846123d6565b6001600160a01b03161461215e5760405162461bcd60e51b81526020600482015260166024820152751393d508119493d3481093d2d248119493d39511539160521b60448201526064016109ed565b60016013836040516121709190612f8f565b908152604051908190036020019020805491151560ff1990921691909117905550505050565b600081815b84518110156122025760008582815181106121b8576121b8612f79565b602002602001015190508083116121de57600083815260208290526040902092506121ef565b600081815260208490526040902092505b50806121fa81612f4c565b91505061219b565b509392505050565b6000546001600160a01b03851661223357604051622e076360e81b815260040160405180910390fd5b836000036122545760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038516600081815260056020908152604080832080546fffffffffffffffffffffffffffffffff1981166001600160401b038083168c018116918217600160401b67ffffffffffffffff1990941690921783900481168c01811690920217909155858452600490925290912080546001600160e01b031916909217600160a01b42909216919091021790558080850183801561230057506001600160a01b0387163b15155b15612388575b60405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a46123516000888480600101955088611e12565b61236e576040516368d2bf6b60e11b815260040160405180910390fd5b80820361230657826000541461238357600080fd5b6123cd565b5b6040516001830192906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4808203612389575b50600055611972565b60008060006123e585856123f2565b9150915061220281612460565b60008082516041036124285760208301516040840151606085015160001a61241c87828585612616565b94509450505050612459565b82516040036124515760208301516040840151612446868383612703565b935093505050612459565b506000905060025b9250929050565b600081600481111561247457612474612c7a565b0361247c5750565b600181600481111561249057612490612c7a565b036124dd5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016109ed565b60028160048111156124f1576124f1612c7a565b0361253e5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016109ed565b600381600481111561255257612552612c7a565b036125aa5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016109ed565b60048160048111156125be576125be612c7a565b03610aa25760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016109ed565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561264d57506000905060036126fa565b8460ff16601b1415801561266557508460ff16601c14155b1561267657506000905060046126fa565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156126ca573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166126f3576000600192509250506126fa565b9150600090505b94509492505050565b6000806001600160ff1b0383168161272060ff86901c601b612d91565b905061272e87828885612616565b935093505050935093915050565b82805461274890612cb8565b90600052602060002090601f01602090048101928261276a57600085556127b0565b82601f1061278357805160ff19168380011785556127b0565b828001600101855582156127b0579182015b828111156127b0578251825591602001919060010190612795565b506127bc9291506127c0565b5090565b5b808211156127bc57600081556001016127c1565b6001600160e01b031981168114610aa257600080fd5b6000602082840312156127fd57600080fd5b8135612808816127d5565b9392505050565b60005b8381101561282a578181015183820152602001612812565b838111156112ee5750506000910152565b6000815180845261285381602086016020860161280f565b601f01601f19169290920160200192915050565b602081526000612808602083018461283b565b60006020828403121561288c57600080fd5b5035919050565b80356001600160a01b0381168114610d4e57600080fd5b600080604083850312156128bd57600080fd5b6128c683612893565b946020939093013593505050565b6000602082840312156128e657600080fd5b61280882612893565b60008060006060848603121561290457600080fd5b61290d84612893565b925061291b60208501612893565b9150604084013590509250925092565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156129695761296961292b565b604052919050565b60006001600160401b0383111561298a5761298a61292b565b61299d601f8401601f1916602001612941565b90508281528383830111156129b157600080fd5b828260208301376000602084830101529392505050565b6000602082840312156129da57600080fd5b81356001600160401b038111156129f057600080fd5b8201601f81018413612a0157600080fd5b611c6184823560208401612971565b600082601f830112612a2157600080fd5b61280883833560208501612971565b600060208284031215612a4257600080fd5b81356001600160401b03811115612a5857600080fd5b611c6184828501612a10565b600060208284031215612a7657600080fd5b81356005811061280857600080fd5b60008060408385031215612a9857600080fd5b50508035926020909101359150565b60006020808385031215612aba57600080fd5b82356001600160401b0380821115612ad157600080fd5b818501915085601f830112612ae557600080fd5b813581811115612af757612af761292b565b8060051b9150612b08848301612941565b8181529183018401918481019088841115612b2257600080fd5b938501935b83851015612b4057843582529385019390850190612b27565b98975050505050505050565b8015158114610aa257600080fd5b60008060408385031215612b6d57600080fd5b612b7683612893565b91506020830135612b8681612b4c565b809150509250929050565b60008060008060808587031215612ba757600080fd5b612bb085612893565b9350612bbe60208601612893565b92506040850135915060608501356001600160401b03811115612be057600080fd5b612bec87828801612a10565b91505092959194509250565b600080600060608486031215612c0d57600080fd5b833592506020840135915060408401356001600160401b03811115612c3157600080fd5b612c3d86828701612a10565b9150509250925092565b60008060408385031215612c5a57600080fd5b612c6383612893565b9150612c7160208401612893565b90509250929050565b634e487b7160e01b600052602160045260246000fd5b6020810160058310612cb257634e487b7160e01b600052602160045260246000fd5b91905290565b600181811c90821680612ccc57607f821691505b602082108103612cec57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060208284031215612d3957600080fd5b815161280881612b4c565b6020808252601e908201527f5468652063616c6c657220697320616e6f7468657220636f6e74726163740000604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60008219821115612da457612da4612d7b565b500190565b634e487b7160e01b600052601260045260246000fd5b600082612dce57612dce612da9565b500690565b60008151612de581856020860161280f565b9290920192915050565b600080845481600182811c915080831680612e0b57607f831692505b60208084108203612e2a57634e487b7160e01b86526022600452602486fd5b818015612e3e5760018114612e4f57612e7c565b60ff19861689528489019650612e7c565b60008b81526020902060005b86811015612e745781548b820152908501908301612e5b565b505084890196505b505050505050612e8c8185612dd3565b95945050505050565b600082821015612ea757612ea7612d7b565b500390565b60018060a01b0384168152826020820152606060408201526000612e8c606083018461283b565b6000816000190483118215151615612eed57612eed612d7b565b500290565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612f259083018461283b565b9695505050505050565b600060208284031215612f4157600080fd5b8151612808816127d5565b600060018201612f5e57612f5e612d7b565b5060010190565b600082612f7457612f74612da9565b500490565b634e487b7160e01b600052603260045260246000fd5b60008251612fa181846020870161280f565b919091019291505056fea2646970667358221220cf069677dfaf9de6cfd160a8151f7b8dc5cd3d37b550e94c3883c533317c065364736f6c634300080d0033ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef00000000000000000000000000000000000000000000000000000000000000c00000000000000000000000006108702e2e5e7e2df587d6b15136239d92c4000c000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb7952000000000000000000000000514910771af9ca656af840dff83e8264ecf986caaa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af4450000000000000000000000000000000000000000000000001bc16d674ec80000000000000000000000000000000000000000000000000000000000000000004f68747470733a2f2f626f6b692e6d7970696e6174612e636c6f75642f697066732f516d59787062355562433271745a6a4b776e473967584337596a5172673637447567576770527a666476555472510000000000000000000000000000000000
Deployed Bytecode
0x60806040526004361061025c5760003560e01c806375d7741b11610144578063b88d4fde116100b6578063db292e7f1161007a578063db292e7f14610728578063dc33e68114610748578063dc8c57b414610768578063e985e9c51461077e578063f2fde38b146107c7578063f9020e33146107e757600080fd5b8063b88d4fde14610685578063bef7d63b146106a5578063c87b56dd146106c5578063ce4fe56f146106e5578063d60cd6951461071557600080fd5b806394985ddd1161010857806394985ddd146105cd57806394c4303a146105ed57806394d15abb1461061d57806395d89b41146106305780639a48eb5114610645578063a22cb4651461066557600080fd5b806375d7741b14610510578063784754f4146105305780637ac98be1146105435780638da5cb5b146105595780639231ab2a1461057757600080fd5b806329d7871b116101dd5780634891ad88116101a15780634891ad881461046157806351830227146104815780636352211e1461049b5780636e569177146104bb57806370a08231146104db578063715018a6146104fb57600080fd5b806329d7871b146103ba5780632a85db55146103d05780633fe05a2c146103f057806342842e0e1461042b5780634586fb4e1461044b57600080fd5b8063161b7f9311610224578063161b7f931461033257806318160ddd1461035657806323b872dd1461036f57806324600fc31461038f578063293108e0146103a457600080fd5b806301ffc9a71461026157806306fdde0314610296578063081812fc146102b8578063095ea7b3146102f05780630c96549414610312575b600080fd5b34801561026d57600080fd5b5061028161027c3660046127eb565b61080e565b60405190151581526020015b60405180910390f35b3480156102a257600080fd5b506102ab610860565b60405161028d9190612867565b3480156102c457600080fd5b506102d86102d336600461287a565b6108f2565b6040516001600160a01b03909116815260200161028d565b3480156102fc57600080fd5b5061031061030b3660046128aa565b610936565b005b34801561031e57600080fd5b5061031061032d3660046128d4565b6109c3565b34801561033e57600080fd5b50610348600e5481565b60405190815260200161028d565b34801561036257600080fd5b5060015460005403610348565b34801561037b57600080fd5b5061031061038a3660046128ef565b610a18565b34801561039b57600080fd5b50610310610a23565b3480156103b057600080fd5b50610348600f5481565b3480156103c657600080fd5b50610348600d5481565b3480156103dc57600080fd5b506103106103eb3660046129c8565b610aa5565b3480156103fc57600080fd5b5061028161040b366004612a30565b805160208183018101805160138252928201919093012091525460ff1681565b34801561043757600080fd5b506103106104463660046128ef565b610ae6565b34801561045757600080fd5b5061034860165481565b34801561046d57600080fd5b5061031061047c366004612a64565b610b01565b34801561048d57600080fd5b506014546102819060ff1681565b3480156104a757600080fd5b506102d86104b636600461287a565b610b52565b3480156104c757600080fd5b506103106104d6366004612a85565b610b64565b3480156104e757600080fd5b506103486104f63660046128d4565b610b99565b34801561050757600080fd5b50610310610be7565b34801561051c57600080fd5b5061034861052b3660046129c8565b610c1d565b61031061053e366004612aa7565b610d53565b34801561054f57600080fd5b5061034860175481565b34801561056557600080fd5b506008546001600160a01b03166102d8565b34801561058357600080fd5b5061059761059236600461287a565b610ee8565b6040805182516001600160a01b031681526020808401516001600160401b0316908201529181015115159082015260600161028d565b3480156105d957600080fd5b506103106105e8366004612a85565b610f0e565b3480156105f957600080fd5b506102816106083660046128d4565b60126020526000908152604090205460ff1681565b61031061062b366004612aa7565b610f90565b34801561063c57600080fd5b506102ab6111ca565b34801561065157600080fd5b50610310610660366004612a85565b6111d9565b34801561067157600080fd5b50610310610680366004612b5a565b61120e565b34801561069157600080fd5b506103106106a0366004612b91565b6112a3565b3480156106b157600080fd5b506010546102d8906001600160a01b031681565b3480156106d157600080fd5b506102ab6106e036600461287a565b6112f4565b3480156106f157600080fd5b506102816107003660046128d4565b60116020526000908152604090205460ff1681565b610310610723366004612bf8565b61145a565b34801561073457600080fd5b506103106107433660046129c8565b6115f2565b34801561075457600080fd5b506103486107633660046128d4565b61162f565b34801561077457600080fd5b5061034860155481565b34801561078a57600080fd5b50610281610799366004612c47565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b3480156107d357600080fd5b506103106107e23660046128d4565b61165d565b3480156107f357600080fd5b50600a546108019060ff1681565b60405161028d9190612c90565b60006001600160e01b031982166380ac58cd60e01b148061083f57506001600160e01b03198216635b5e139f60e01b145b8061085a57506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606002805461086f90612cb8565b80601f016020809104026020016040519081016040528092919081815260200182805461089b90612cb8565b80156108e85780601f106108bd576101008083540402835291602001916108e8565b820191906000526020600020905b8154815290600101906020018083116108cb57829003601f168201915b5050505050905090565b60006108fd82611704565b61091a576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600061094182610b52565b9050806001600160a01b0316836001600160a01b0316036109755760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b0382161480159061099557506109938133610799565b155b156109b3576040516367d9dca160e11b815260040160405180910390fd5b6109be83838361172f565b505050565b6008546001600160a01b031633146109f65760405162461bcd60e51b81526004016109ed90612cf2565b60405180910390fd5b601080546001600160a01b0319166001600160a01b0392909216919091179055565b6109be83838361178b565b6008546001600160a01b03163314610a4d5760405162461bcd60e51b81526004016109ed90612cf2565b6040516001600160a01b037f0000000000000000000000006108702e2e5e7e2df587d6b15136239d92c4000c16904780156108fc02916000818181858888f19350505050158015610aa2573d6000803e3d6000fd5b50565b6008546001600160a01b03163314610acf5760405162461bcd60e51b81526004016109ed90612cf2565b8051610ae290600b90602084019061273c565b5050565b6109be838383604051806020016040528060008152506112a3565b6008546001600160a01b03163314610b2b5760405162461bcd60e51b81526004016109ed90612cf2565b600a805482919060ff19166001836004811115610b4a57610b4a612c7a565b021790555050565b6000610b5d82611979565b5192915050565b6008546001600160a01b03163314610b8e5760405162461bcd60e51b81526004016109ed90612cf2565b601791909155601655565b60006001600160a01b038216610bc2576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600560205260409020546001600160401b031690565b6008546001600160a01b03163314610c115760405162461bcd60e51b81526004016109ed90612cf2565b610c1b6000611a93565b565b6008546000906001600160a01b03163314610c4a5760405162461bcd60e51b81526004016109ed90612cf2565b60145460ff1615610c905760405162461bcd60e51b815260206004820152601060248201526f1053149150511648149155915053115160821b60448201526064016109ed565b8151610ca390600c90602085019061273c565b506017546040516323b872dd60e01b815233600482015230602482015260448101919091527f000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca6001600160a01b0316906323b872dd906064016020604051808303816000875af1158015610d1b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d3f9190612d27565b5061085a601654601754611ae5565b919050565b323314610d725760405162461bcd60e51b81526004016109ed90612d44565b6003600a5460ff166004811115610d8b57610d8b612c7a565b14610dd85760405162461bcd60e51b815260206004820181905260248201527f414c4c4f57204c495354204d494e54494e47204953204e4f542041435449564560448201526064016109ed565b600f546040516001600160601b03193360601b166020820152610e169183916034015b60405160208183030381529060405280519060200120611c69565b610e625760405162461bcd60e51b815260206004820152601b60248201527f4d494e544552204953204e4f54204f4e20414c4c4f57204c495354000000000060448201526064016109ed565b3360009081526012602052604090205460ff1615610ec25760405162461bcd60e51b815260206004820152601d60248201527f414c4c4f574c495354205449434b455420414c5245414459205553454400000060448201526064016109ed565b336000908152601260205260409020805460ff19166001908117909155610aa290611c7f565b604080516060810182526000808252602082018190529181019190915261085a82611979565b336001600160a01b037f000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb79521614610f865760405162461bcd60e51b815260206004820152601f60248201527f4f6e6c7920565246436f6f7264696e61746f722063616e2066756c66696c6c0060448201526064016109ed565b610ae28282611da1565b323314610faf5760405162461bcd60e51b81526004016109ed90612d44565b6001600a5460ff166004811115610fc857610fc8612c7a565b1480610fea57506003600a5460ff166004811115610fe857610fe8612c7a565b145b6110365760405162461bcd60e51b815260206004820152601860248201527f445245414d4552532053414c45204e4f5420414354495645000000000000000060448201526064016109ed565b600e546040516001600160601b03193360601b16602082015261105d918391603401610dfb565b6110a95760405162461bcd60e51b815260206004820152601e60248201527f4d494e544552204953204e4f54204f4e20445245414d455253204c495354000060448201526064016109ed565b6001600a5460ff1660048111156110c2576110c2612c7a565b03611152573360009081526011602052604090205460ff16156111335760405162461bcd60e51b815260206004820152602360248201527f445245414d45522050524553414c45205449434b455420414c5245414459205560448201526214d15160ea1b60648201526084016109ed565b336000908152601160205260409020805460ff191660011790556111c0565b3360009081526012602052604090205460ff1615610ec25760405162461bcd60e51b815260206004820152602560248201527f445245414d455220414c4c4f574c495354205449434b455420414c5245414459604482015264081554d15160da1b60648201526084016109ed565b610aa26001611c7f565b60606003805461086f90612cb8565b6008546001600160a01b031633146112035760405162461bcd60e51b81526004016109ed90612cf2565b600e91909155600f55565b336001600160a01b038316036112375760405163b06307db60e01b815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6112ae84848461178b565b6001600160a01b0383163b151580156112d057506112ce84848484611e12565b155b156112ee576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b60606112ff82611704565b6113635760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084016109ed565b60145460ff166113ff57600b805461137a90612cb8565b80601f01602080910402602001604051908101604052809291908181526020018280546113a690612cb8565b80156113f35780601f106113c8576101008083540402835291602001916113f3565b820191906000526020600020905b8154815290600101906020018083116113d657829003601f168201915b50505050509050919050565b600061140e6001546000540390565b60155461141b9085612d91565b6114259190612dbf565b9050600c61143282611efd565b604051602001611443929190612def565b604051602081830303815290604052915050919050565b3233146114795760405162461bcd60e51b81526004016109ed90612d44565b6002600a5460ff16600481111561149257611492612c7a565b14806114b457506004600a5460ff1660048111156114b2576114b2612c7a565b145b6115005760405162461bcd60e51b815260206004820152601760248201527f4249525448204f4620424f4b49204953204e4f54204f4e00000000000000000060448201526064016109ed565b6004600a5460ff16600481111561151957611519612c7a565b14806115335750600083600d546115309190612e95565b10155b6115755760405162461bcd60e51b8152602060048201526013602482015272141550931250c810d05408115610d151511151606a1b60448201526064016109ed565b60038311156115c65760405162461bcd60e51b815260206004820181905260248201527f5155414e5449545920535552504153534553205045522d54584e204c494d495460448201526064016109ed565b6115d1338383611ffd565b82600d60008282546115e39190612e95565b909155506109be905083611c7f565b6008546001600160a01b0316331461161c5760405162461bcd60e51b81526004016109ed90612cf2565b8051610ae290600c90602084019061273c565b6001600160a01b038116600090815260056020526040812054600160401b90046001600160401b031661085a565b6008546001600160a01b031633146116875760405162461bcd60e51b81526004016109ed90612cf2565b6001600160a01b0381166116ec5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016109ed565b610aa281611a93565b6001600160a01b03163b151590565b600080548210801561085a575050600090815260046020526040902054600160e01b900460ff161590565b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600061179682611979565b9050836001600160a01b031681600001516001600160a01b0316146117cd5760405162a1148160e81b815260040160405180910390fd5b6000336001600160a01b03861614806117eb57506117eb8533610799565b806118065750336117fb846108f2565b6001600160a01b0316145b90508061182657604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b03841661184d57604051633a954ecd60e21b815260040160405180910390fd5b6118596000848761172f565b6001600160a01b038581166000908152600560209081526040808320805467ffffffffffffffff198082166001600160401b0392831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600490945282852080546001600160e01b031916909417600160a01b4290921691909102178355870180845292208054919390911661192d57600054821461192d57805460208601516001600160401b0316600160a01b026001600160e01b03199091166001600160a01b038a16171781555b50505082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b5050505050565b604080516060810182526000808252602082018190529181019190915281600054811015611a7a57600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff16151591810182905290611a785780516001600160a01b031615611a0f579392505050565b5060001901600081815260046020908152604091829020825160608101845290546001600160a01b038116808352600160a01b82046001600160401b031693830193909352600160e01b900460ff1615159281019290925215611a73579392505050565b611a0f565b505b604051636f96cda160e11b815260040160405180910390fd5b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60007f000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca6001600160a01b0316634000aea07f000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb795284866000604051602001611b55929190918252602082015260400190565b6040516020818303038152906040526040518463ffffffff1660e01b8152600401611b8293929190612eac565b6020604051808303816000875af1158015611ba1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bc59190612d27565b50600083815260096020818152604080842054815180840189905280830186905230606082015260808082018390528351808303909101815260a090910190925281519183019190912093879052919052611c21906001612d91565b600085815260096020526040902055611c618482604080516020808201949094528082019290925280518083038201815260609092019052805191012090565b949350505050565b600082611c768584612196565b14949350505050565b60145460ff1615611cc85760405162461bcd60e51b81526020600482015260136024820152721393c81352539514c81413d4d5149155915053606a1b60448201526064016109ed565b611cd98166ea7aa67b2d0000612ed3565b3414611d1c5760405162461bcd60e51b8152602060048201526012602482015271125390d3d4949150d5081155120814d1539560721b60448201526064016109ed565b611e6181611d2d6001546000540390565b611d379190612d91565b1115611d855760405162461bcd60e51b815260206004820152601860248201527f4d415820434150204f4620424f4b49204558434545444544000000000000000060448201526064016109ed565b610aa2338260405180602001604052806000815250600061220a565b60145460ff1615611de75760405162461bcd60e51b815260206004820152601060248201526f1053149150511648149155915053115160821b60448201526064016109ed565b6014805460ff19166001179055611e016001546000540390565b611e0b9082612dbf565b6015555050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290611e47903390899088908890600401612ef2565b6020604051808303816000875af1925050508015611e82575060408051601f3d908101601f19168201909252611e7f91810190612f2f565b60015b611ee0573d808015611eb0576040519150601f19603f3d011682016040523d82523d6000602084013e611eb5565b606091505b508051600003611ed8576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b606081600003611f245750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611f4e5780611f3881612f4c565b9150611f479050600a83612f65565b9150611f28565b6000816001600160401b03811115611f6857611f6861292b565b6040519080825280601f01601f191660200182016040528015611f92576020820181803683370190505b5090505b8415611c6157611fa7600183612e95565b9150611fb4600a86612dbf565b611fbf906030612d91565b60f81b818381518110611fd457611fd4612f79565b60200101906001600160f81b031916908160001a905350611ff6600a86612f65565b9450611f96565b6040516001600160601b0319606085901b1660208201526034810183905260009061208e90605401604051602081830303815290604052805190602001206040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b90506013826040516120a09190612f8f565b9081526040519081900360200190205460ff16156120f95760405162461bcd60e51b815260206004820152601660248201527514d251d390551554914810531491505116481554d15160521b60448201526064016109ed565b6010546001600160a01b031661210f82846123d6565b6001600160a01b03161461215e5760405162461bcd60e51b81526020600482015260166024820152751393d508119493d3481093d2d248119493d39511539160521b60448201526064016109ed565b60016013836040516121709190612f8f565b908152604051908190036020019020805491151560ff1990921691909117905550505050565b600081815b84518110156122025760008582815181106121b8576121b8612f79565b602002602001015190508083116121de57600083815260208290526040902092506121ef565b600081815260208490526040902092505b50806121fa81612f4c565b91505061219b565b509392505050565b6000546001600160a01b03851661223357604051622e076360e81b815260040160405180910390fd5b836000036122545760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038516600081815260056020908152604080832080546fffffffffffffffffffffffffffffffff1981166001600160401b038083168c018116918217600160401b67ffffffffffffffff1990941690921783900481168c01811690920217909155858452600490925290912080546001600160e01b031916909217600160a01b42909216919091021790558080850183801561230057506001600160a01b0387163b15155b15612388575b60405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a46123516000888480600101955088611e12565b61236e576040516368d2bf6b60e11b815260040160405180910390fd5b80820361230657826000541461238357600080fd5b6123cd565b5b6040516001830192906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4808203612389575b50600055611972565b60008060006123e585856123f2565b9150915061220281612460565b60008082516041036124285760208301516040840151606085015160001a61241c87828585612616565b94509450505050612459565b82516040036124515760208301516040840151612446868383612703565b935093505050612459565b506000905060025b9250929050565b600081600481111561247457612474612c7a565b0361247c5750565b600181600481111561249057612490612c7a565b036124dd5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016109ed565b60028160048111156124f1576124f1612c7a565b0361253e5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016109ed565b600381600481111561255257612552612c7a565b036125aa5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016109ed565b60048160048111156125be576125be612c7a565b03610aa25760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016109ed565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561264d57506000905060036126fa565b8460ff16601b1415801561266557508460ff16601c14155b1561267657506000905060046126fa565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156126ca573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166126f3576000600192509250506126fa565b9150600090505b94509492505050565b6000806001600160ff1b0383168161272060ff86901c601b612d91565b905061272e87828885612616565b935093505050935093915050565b82805461274890612cb8565b90600052602060002090601f01602090048101928261276a57600085556127b0565b82601f1061278357805160ff19168380011785556127b0565b828001600101855582156127b0579182015b828111156127b0578251825591602001919060010190612795565b506127bc9291506127c0565b5090565b5b808211156127bc57600081556001016127c1565b6001600160e01b031981168114610aa257600080fd5b6000602082840312156127fd57600080fd5b8135612808816127d5565b9392505050565b60005b8381101561282a578181015183820152602001612812565b838111156112ee5750506000910152565b6000815180845261285381602086016020860161280f565b601f01601f19169290920160200192915050565b602081526000612808602083018461283b565b60006020828403121561288c57600080fd5b5035919050565b80356001600160a01b0381168114610d4e57600080fd5b600080604083850312156128bd57600080fd5b6128c683612893565b946020939093013593505050565b6000602082840312156128e657600080fd5b61280882612893565b60008060006060848603121561290457600080fd5b61290d84612893565b925061291b60208501612893565b9150604084013590509250925092565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156129695761296961292b565b604052919050565b60006001600160401b0383111561298a5761298a61292b565b61299d601f8401601f1916602001612941565b90508281528383830111156129b157600080fd5b828260208301376000602084830101529392505050565b6000602082840312156129da57600080fd5b81356001600160401b038111156129f057600080fd5b8201601f81018413612a0157600080fd5b611c6184823560208401612971565b600082601f830112612a2157600080fd5b61280883833560208501612971565b600060208284031215612a4257600080fd5b81356001600160401b03811115612a5857600080fd5b611c6184828501612a10565b600060208284031215612a7657600080fd5b81356005811061280857600080fd5b60008060408385031215612a9857600080fd5b50508035926020909101359150565b60006020808385031215612aba57600080fd5b82356001600160401b0380821115612ad157600080fd5b818501915085601f830112612ae557600080fd5b813581811115612af757612af761292b565b8060051b9150612b08848301612941565b8181529183018401918481019088841115612b2257600080fd5b938501935b83851015612b4057843582529385019390850190612b27565b98975050505050505050565b8015158114610aa257600080fd5b60008060408385031215612b6d57600080fd5b612b7683612893565b91506020830135612b8681612b4c565b809150509250929050565b60008060008060808587031215612ba757600080fd5b612bb085612893565b9350612bbe60208601612893565b92506040850135915060608501356001600160401b03811115612be057600080fd5b612bec87828801612a10565b91505092959194509250565b600080600060608486031215612c0d57600080fd5b833592506020840135915060408401356001600160401b03811115612c3157600080fd5b612c3d86828701612a10565b9150509250925092565b60008060408385031215612c5a57600080fd5b612c6383612893565b9150612c7160208401612893565b90509250929050565b634e487b7160e01b600052602160045260246000fd5b6020810160058310612cb257634e487b7160e01b600052602160045260246000fd5b91905290565b600181811c90821680612ccc57607f821691505b602082108103612cec57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060208284031215612d3957600080fd5b815161280881612b4c565b6020808252601e908201527f5468652063616c6c657220697320616e6f7468657220636f6e74726163740000604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60008219821115612da457612da4612d7b565b500190565b634e487b7160e01b600052601260045260246000fd5b600082612dce57612dce612da9565b500690565b60008151612de581856020860161280f565b9290920192915050565b600080845481600182811c915080831680612e0b57607f831692505b60208084108203612e2a57634e487b7160e01b86526022600452602486fd5b818015612e3e5760018114612e4f57612e7c565b60ff19861689528489019650612e7c565b60008b81526020902060005b86811015612e745781548b820152908501908301612e5b565b505084890196505b505050505050612e8c8185612dd3565b95945050505050565b600082821015612ea757612ea7612d7b565b500390565b60018060a01b0384168152826020820152606060408201526000612e8c606083018461283b565b6000816000190483118215151615612eed57612eed612d7b565b500290565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612f259083018461283b565b9695505050505050565b600060208284031215612f4157600080fd5b8151612808816127d5565b600060018201612f5e57612f5e612d7b565b5060010190565b600082612f7457612f74612da9565b500490565b634e487b7160e01b600052603260045260246000fd5b60008251612fa181846020870161280f565b919091019291505056fea2646970667358221220cf069677dfaf9de6cfd160a8151f7b8dc5cd3d37b550e94c3883c533317c065364736f6c634300080d0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000c00000000000000000000000006108702e2e5e7e2df587d6b15136239d92c4000c000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb7952000000000000000000000000514910771af9ca656af840dff83e8264ecf986caaa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af4450000000000000000000000000000000000000000000000001bc16d674ec80000000000000000000000000000000000000000000000000000000000000000004f68747470733a2f2f626f6b692e6d7970696e6174612e636c6f75642f697066732f516d59787062355562433271745a6a4b776e473967584337596a5172673637447567576770527a666476555472510000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _preRevealURI (string): https://boki.mypinata.cloud/ipfs/QmYxpb5UbC2qtZjKwnG9gXC7YjQrg67DugWgpRzfdvUTrQ
Arg [1] : _withdrawalAddress (address): 0x6108702E2E5e7E2Df587D6b15136239D92C4000C
Arg [2] : _vrfCoordinator (address): 0xf0d54349aDdcf704F77AE15b96510dEA15cb7952
Arg [3] : _linkAddress (address): 0x514910771AF9Ca656af840dff83E8264EcF986CA
Arg [4] : _chainlinkKeyHash (bytes32): 0xaa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af445
Arg [5] : _chainlinkFee (uint256): 2000000000000000000
-----Encoded View---------------
10 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [1] : 0000000000000000000000006108702e2e5e7e2df587d6b15136239d92c4000c
Arg [2] : 000000000000000000000000f0d54349addcf704f77ae15b96510dea15cb7952
Arg [3] : 000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca
Arg [4] : aa77729d3466ca35ae8d28b3bbac7cc36a5031efdc430821c02bc31a238af445
Arg [5] : 0000000000000000000000000000000000000000000000001bc16d674ec80000
Arg [6] : 000000000000000000000000000000000000000000000000000000000000004f
Arg [7] : 68747470733a2f2f626f6b692e6d7970696e6174612e636c6f75642f69706673
Arg [8] : 2f516d59787062355562433271745a6a4b776e473967584337596a5172673637
Arg [9] : 447567576770527a666476555472510000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
[ 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.