Overview
TokenID
6113
Total Transfers
-
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0xDe06f95F...86967d0EC The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
RFOXNFTWhitelist
Compiler Version
v0.8.4+commit.c7e474f2
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.4; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "./lib/RFOXNFTPresale.sol"; import "./structs/ParamStructs.sol"; contract RFOXNFTWhitelist is RFOXNFTPresale { /** * @dev Initialization of the RFOX NFT with presale / whitelist mechanism. * Can only be called by the factory. * * Features: * Public sale. * Presale / whitelisted address. * No Bot Prevention. * * @param params Struct for whitelist parameters. */ function initialize(ParamStructs.WhitelistParams calldata params) external { require(msg.sender == address(factory), "Forbidden"); require( params.publicSaleStartTime >= params.saleStartTime, "Invalid public sale time" ); publicSaleStartTime = params.publicSaleStartTime; isWhitelistActivated = true; maxMintedPresalePerAddress = params.maxMintedPresalePerAddress; TOKEN_PRICE_PRESALE = params.pricePresale; initializeBase( params.name, params.symbol, params.baseURI, params.saleToken, params.price, params.maxNft, params.maxTokensPerTransaction, params.saleStartTime, params.saleEndTime, params.owner ); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Trees proofs. * * The proofs can be generated using the JavaScript library * https://github.com/miguelmota/merkletreejs[merkletreejs]. * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled. * * See `test/utils/cryptography/MerkleProof.test.js` for some examples. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merklee tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { bytes32 proofElement = proof[i]; if (computedHash <= proofElement) { // Hash(current computed hash + current element of the proof) computedHash = _efficientHash(computedHash, proofElement); } else { // Hash(current element of the proof + current computed hash) computedHash = _efficientHash(proofElement, computedHash); } } return computedHash; } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.4; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "./RFOXNFTSale.sol"; import "./base/BaseRFOXNFTPresale.sol"; contract RFOXNFTPresale is RFOXNFTSale, BaseRFOXNFTPresale { /** * @dev Overwrite the authorizePublicSale modifier from the base RFOX NFT contract. * In the standard sale contract, the saleStartTime is the starting time of the public sale. * In the presale contract, the saleStartTime will be considered as the starting time of the presale. * and the publicSaleStartTime will be the starting time of the public sale. */ modifier authorizePublicSale() override { require( block.timestamp >= publicSaleStartTime, "Sale has not been started" ); _; } /** * @dev Each whitelisted address has quota to mint for the presale. * There is limit amount of token that can be minted during the presale. * * @param tokensNumber How many NFTs for buying this round * @param proof The bytes32 array from the offchain whitelist address. */ function buyNFTsPresale(uint256 tokensNumber, bytes32[] calldata proof) external payable whenNotPaused callerIsUser authorizePresale(proof) { _buyNFTsPresale(tokensNumber); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.4; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; library ParamStructs { /** * @dev Parameters for Standard Feature. * * @param name NFT name. * @param symbol NFT symbol. * @param baseURI NFT base uri. * @param saleToken Purchase medium. Zero address will be considered as native token. * @param price Price per token. * @param maxNft Max total supply of NFT. * @param maxTokensPerTransaction Max NFT per transaction. * @param saleStartTime Starting time of the presale (whitelisted address). * @param saleEndTime End time of the public sale. * @param ownership The owner of the token. */ struct StandardParams { string name; string symbol; string baseURI; IERC20 saleToken; uint256 price; uint256 maxNft; uint256 maxTokensPerTransaction; uint256 saleStartTime; uint256 saleEndTime; address owner; } /** * @dev Parameters for Whitelist / Presale Feature. * * @param name NFT name. * @param symbol NFT symbol. * @param baseURI NFT base uri. * @param saleToken Purchase medium. Zero address will be considered as native token. * @param price Price per token. * @param maxNft Max total supply of NFT. * @param maxTokensPerTransaction Max NFT per transaction. * @param saleStartTime Starting time of the presale (whitelisted address). * @param saleEndTime End time of the public sale. * @param publicSaleStartTime Starting time of the public sale * @param maxMintedPresalePerAddress Maximum mint per whitelisted address during presale. * @param pricePresale Price for minting during presale. * @param ownership The owner of the token. */ struct WhitelistParams { string name; string symbol; string baseURI; IERC20 saleToken; uint256 price; uint256 maxNft; uint256 maxTokensPerTransaction; uint256 saleStartTime; uint256 saleEndTime; uint256 publicSaleStartTime; uint256 maxMintedPresalePerAddress; uint256 pricePresale; address owner; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.4; import "./base/BaseRFOXNFT.sol"; contract RFOXNFTSale is BaseRFOXNFT { /** * @dev Public sale. * * @param tokensNumber How many NFTs for buying this round */ function buyNFTsPublic(uint256 tokensNumber) public payable whenNotPaused callerIsUser maxPurchasePerTx(tokensNumber) authorizePublicSale { _buyNFTs(tokensNumber); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.4; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "./BaseRFOXNFT.sol"; /** * @dev The extension of the BaseRFOX standard. * This is the base contract for the presale / whitelist mechanism. */ contract BaseRFOXNFTPresale is BaseRFOXNFT { using SafeMath for uint256; using SafeERC20 for IERC20; // How many NFTs can be minted per address during presale uint256 public maxMintedPresalePerAddress; // Timestamp of selling started for public uint256 public publicSaleStartTime; // Price for presale minting uint256 public TOKEN_PRICE_PRESALE; // Flag for total NFT minted during presale mapping(address => uint256) totalPresaleMintedPerAddress; // Merkle root for whitelist proof bytes32 public merkleRoot; // The flag for whitelist activation bool public isWhitelistActivated; event MaxMintedPresalePerAddress(address indexed sender, uint256 oldMaxMintedPresalePerAddress, uint256 newMaxMintedPresalePerAddress); event ActivateWhitelist(address indexed sender); event DeactivateWhitelist(address indexed sender); event UpdateMerkleRoot( address indexed sender, bytes32 oldMerkleRoot, bytes32 newMerkleRoot ); event UpdateTokenPricePresale( address indexed sender, uint256 oldTokenPrice, uint256 newTokenPrice ); /** * @dev Check if the whitelist feature is activated. */ modifier whenWhitelistActivated() { require(isWhitelistActivated, "Whitelist is not active"); _; } /** * @dev Check if the whitelist feature is disabled. */ modifier whenWhitelistDeactivated() { require(!isWhitelistActivated, "Whitelist is active"); _; } /** * @dev The rules are: * 1. If whitelist activated: - Only whitelisted address can mint the NFT after the saleEndTime (presale start time). * 2. If whitelist is not activated: - If users is not whitelisted & whitelisted, they can only mint after the publicSaleStartTime and before the saleEndTime. * * @param proof Array of the merkle tree proof, to check if the sender is whitelisted or not. */ modifier authorizePresale(bytes32[] calldata proof) { if (isWhitelistActivated) { require( (checkWhitelisted(msg.sender, proof) && block.timestamp >= saleStartTime), "Unauthorized to join the presale" ); } else { require( block.timestamp >= publicSaleStartTime, "Sale has not been started" ); } _; } /** * @notice Base function to process the presale transaction submitted by the whitelisted address. * Each whitelisted address has quota to mint for the presale. * There is limit amount of token that can be minted during the presale. * * @param tokensNumber How many NFTs for buying this round */ /// @param tokensNumber How many NFTs for buying this round function _buyNFTsPresale(uint256 tokensNumber) internal tokenInSupply(tokensNumber) { require(totalPresaleMintedPerAddress[msg.sender].add(tokensNumber) <= maxMintedPresalePerAddress, "Exceed the limit"); totalPresaleMintedPerAddress[msg.sender] = totalPresaleMintedPerAddress[msg.sender].add(tokensNumber); if (saleEndTime > 0) require(block.timestamp <= saleEndTime, "Sale has been finished"); if (address(saleToken) == address(0)) { require( msg.value == TOKEN_PRICE_PRESALE.mul(tokensNumber), "Invalid eth for purchasing" ); } else { require(msg.value == 0, "ETH_NOT_ALLOWED"); saleToken.safeTransferFrom( msg.sender, address(this), TOKEN_PRICE_PRESALE.mul(tokensNumber) ); } _safeMint(msg.sender, tokensNumber); } /** * @dev setting whitelist purposes * * @param _maxMintedPresalePerAddress how many token can be minted per address during the presale */ function updateMaxMintedPresalePerAddress(uint256 _maxMintedPresalePerAddress) external onlyOwner { require(_maxMintedPresalePerAddress <= MAX_NFT, "Invalid max mint per address"); uint256 oldMaxMintedPresalePerAddress = maxMintedPresalePerAddress; maxMintedPresalePerAddress = _maxMintedPresalePerAddress; emit MaxMintedPresalePerAddress(msg.sender, oldMaxMintedPresalePerAddress, maxMintedPresalePerAddress); } /** * @dev Activate whitelist feature */ function activateWhitelist() external onlyOwner whenWhitelistDeactivated { isWhitelistActivated = true; emit ActivateWhitelist(msg.sender); } /** * @dev Deactivate whitelist feature */ function deactivateWhitelist() external onlyOwner whenWhitelistActivated { isWhitelistActivated = false; emit DeactivateWhitelist(msg.sender); } /** * @dev Update the merkle root for the whitelist tree. * If the whitelist changed, then need to update the hash root. * * @param _merkleRoot new hash of the root. */ function updateMerkleRoot(bytes32 _merkleRoot) external onlyOwner { bytes32 oldMerkleRoot = merkleRoot; merkleRoot = _merkleRoot; emit UpdateMerkleRoot(msg.sender, oldMerkleRoot, merkleRoot); } /** * @dev Getter for the hash of the address. * * @param account The address to be checked. * * @return The hash of the address */ function _leaf(address account) internal pure returns (bytes32) { return keccak256(abi.encodePacked(account)); } /** * @dev Check if the particular address is whitelisted or not. * * @param account The address to be checked. * @param proof The bytes32 array from the offchain whitelist address. * * @return true / false. */ function checkWhitelisted(address account, bytes32[] memory proof) public view returns (bool) { bytes32 leaf = _leaf(account); return MerkleProof.verify(proof, merkleRoot, leaf); } /** * @dev Update the token price. * * @param newTokenPricePresale The new token price during presale. */ function setTokenPricePresale(uint256 newTokenPricePresale) external onlyOwner { uint256 oldTokenPricePresale = TOKEN_PRICE_PRESALE; TOKEN_PRICE_PRESALE = newTokenPricePresale; emit UpdateTokenPricePresale(msg.sender, oldTokenPricePresale, TOKEN_PRICE_PRESALE); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.4; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "erc721a/contracts/ERC721A.sol"; import "../../../interfaces/IRFOXFactory.sol"; /** * @dev Base Contract of RFOX NFT, which extend ERC721A * @dev All function stated here will become the global function which can be used by any version of RFOX NFT */ contract BaseRFOXNFT is ERC721A, Pausable, Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // Override token name string private _name; // Override token symbol string private _symbol; // Override the base token URI string private _baseURIPrefix; // How many NFTs can buy per transaction uint256 public maxTokensPerTransaction; // NFTs Price uint256 public TOKEN_PRICE; // Max total supply of NFTs uint256 public MAX_NFT; // NFTs sale's currency IERC20 public saleToken; // NFT Factory IRFOXFactory public factory; // NFTs can not min exceed MAX_NFT // Timestamp of selling started for whitelisted addresses uint256 public saleStartTime; // Timestamp of selling ended for both public & whitelisted addresses uint256 public saleEndTime; event UpdateTokenPrice( address indexed sender, uint256 oldTokenPrice, uint256 newTokenPrice ); event UpdateURI(address indexed sender, string oldURI, string newURI); event Withdraw( address indexed sender, address saleToken, uint256 totalWithdrawn ); event MaxTokensPerTransaction( address indexed sender, uint256 oldValue, uint256 newValue ); /** * @dev Check if the caller is an EOA, will revert if called by contract. */ modifier callerIsUser() { require(tx.origin == msg.sender, "Caller must be EOA"); _; } /** * @dev Check if the total mint target will exceed the total suply of NFT. * * @param totalMintTarget total token that will be minted. */ modifier tokenInSupply(uint256 totalMintTarget) { require(totalSupply().add(totalMintTarget) <= MAX_NFT, "Exceeded Max NFTs" ); _; } /** * @dev Check if total mint NFT exceed the limit or not. * * @param tokensNumber total token that will be minted. */ modifier maxPurchasePerTx(uint256 tokensNumber) { require( tokensNumber <= maxTokensPerTransaction, "Max purchase per one transaction exceeded" ); _; } /** * @dev Check if the public sale is opened or not. * This modifier will can be overwritten. * In this case, it's overwritten in the presale contract, * since the starting time between public & presale is different. */ modifier authorizePublicSale() virtual { require( block.timestamp >= saleStartTime, "Sale has not been started" ); _; } constructor() ERC721A("", "") { factory = IRFOXFactory(msg.sender); } /** * @dev Initialize function to setup initial value of several settings. * * @param name_ NFT Name. * @param symbol_ NFT Symbol. * @param baseURI_ NFT Base URI. * @param token Token address for the payment, Zero address will be considered as the native token (ETH, BNB, MATIC, etc). * @param price Price per token for the payment. * @param maxNft Max total supply of the NFT * @param maxTokensPerTransaction_ Max total token per purchased. * @param saleStartTime_ In the standard sale, this is the starting time of public sale. In the whitelist / presale, this is the starting time of the private sale. * @param saleEndTime_ The end time of the sale (public and presale). Can be 0 if we don't want to have expiration time. * @param ownership The owner of the NFT. */ function initializeBase( string memory name_, string memory symbol_, string memory baseURI_, IERC20 token, uint256 price, uint256 maxNft, uint256 maxTokensPerTransaction_, /// Max NFT per transaction uint256 saleStartTime_, uint256 saleEndTime_, address ownership ) internal { require(saleStartTime_ > 0, "Invalid start time"); require(maxTokensPerTransaction_ > 0, "Max tokens per tx cannot be 0"); _name = name_; _symbol = symbol_; _baseURIPrefix = baseURI_; saleToken = token; TOKEN_PRICE = price; MAX_NFT = maxNft; maxTokensPerTransaction = maxTokensPerTransaction_; saleStartTime = saleStartTime_; saleEndTime = saleEndTime_; transferOwnership(ownership); } /** * @dev Getter for the NFT name. * * @return NFT name. */ function name() public view override returns (string memory) { return _name; } /** * @dev Getter for the NFT symbol. * * @return NFT symbol */ function symbol() public view override returns (string memory) { return _symbol; } /** * @dev Only owner can migrate base URI * * @param newBaseURIPrefix string prefix of start URI */ function setBaseURI(string memory newBaseURIPrefix) external onlyOwner { string memory _oldUri = _baseURIPrefix; _baseURIPrefix = newBaseURIPrefix; emit UpdateURI(msg.sender, _oldUri, _baseURIPrefix); } function _baseURI() internal view override returns (string memory) { return _baseURIPrefix; } /** * @dev Getter for the base URI. * * @return Base URI of the NFT. */ function baseURI() external view returns (string memory) { return _baseURI(); } /** * @dev Update the value for max purchased token per tx. * * @param newMaxTokensPerTransaction new max token per purchased. */ function setMaxTokensPerTransaction(uint256 newMaxTokensPerTransaction) external onlyOwner { require(newMaxTokensPerTransaction > 0, "INVALID_ZERO_VALUE"); uint256 _oldMaxTokensPerTransaction = maxTokensPerTransaction; maxTokensPerTransaction = newMaxTokensPerTransaction; emit MaxTokensPerTransaction( msg.sender, _oldMaxTokensPerTransaction, maxTokensPerTransaction ); } /** * @dev Owner can safe mint to address. * Limited to only 1 token per minting. * * @param to Receiver address. */ /// @param to Address of receiver function safeMint(address to) external onlyOwner tokenInSupply(1) { _safeMint(to, 1); } /** * @dev Owner can pause the contract in emergency */ function pause() external onlyOwner { _pause(); } /** * @dev Owner can unpause the contract in emergency */ function unpause() external onlyOwner { _unpause(); } /** * @dev getter for the spesific token's URI -- ID of NFTs. * * @param tokenId NFT ID. * * @return Return the token URL link. */ function tokenURI(uint256 tokenId) public view override(ERC721A) returns (string memory) { return super.tokenURI(tokenId); } /** * @dev Owner withdraw revenue from Sales */ function withdraw() external onlyOwner { uint256 balance; if (address(saleToken) == address(0)) { balance = address(this).balance; (bool succeed,) = msg.sender.call{value: balance}( "" ); require(succeed, "Failed to withdraw Ether"); } else { balance = saleToken.balanceOf(address(this)); saleToken.safeTransfer(msg.sender, balance); } emit Withdraw(msg.sender, address(saleToken), balance); } /** * @dev The base function for purchasing. * Check if the token still in supply. * Check the end of sale time. * * @notice Every contract that implement this function responsible to check the starting sale time * and any other conditional check. * * @param tokensNumber total purchased token. */ function _buyNFTs(uint256 tokensNumber) internal tokenInSupply(tokensNumber) { if (saleEndTime > 0) require(block.timestamp <= saleEndTime, "Sale has been finished"); if (address(saleToken) == address(0)) { require( msg.value == TOKEN_PRICE.mul(tokensNumber), "Invalid eth for purchasing" ); } else { require(msg.value == 0, "ETH_NOT_ALLOWED"); saleToken.safeTransferFrom( msg.sender, address(this), TOKEN_PRICE.mul(tokensNumber) ); } _safeMint(msg.sender, tokensNumber); } /** * @dev Update the token price. * * @param newTokenPrice The new token price. */ function setTokenPrice(uint256 newTokenPrice) external onlyOwner { uint256 oldTokenPrice = TOKEN_PRICE; TOKEN_PRICE = newTokenPrice; emit UpdateTokenPrice(msg.sender, oldTokenPrice, TOKEN_PRICE); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol) pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // Creator: Chiru Labs pragma solidity ^0.8.0; import '@openzeppelin/contracts/token/ERC721/IERC721.sol'; import '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol'; import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol'; import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol'; import '@openzeppelin/contracts/utils/Address.sol'; import '@openzeppelin/contracts/utils/Context.sol'; import '@openzeppelin/contracts/utils/Strings.sol'; import '@openzeppelin/contracts/utils/introspection/ERC165.sol'; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..). * * Does not support burning tokens to address(0). * * Assumes that an owner cannot have more than the 2**128 - 1 (max value of uint128) of supply */ contract ERC721A is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; struct TokenOwnership { address addr; uint64 startTimestamp; } struct AddressData { uint128 balance; uint128 numberMinted; } uint256 internal currentIndex; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. See ownershipOf implementation for details. mapping(uint256 => TokenOwnership) internal _ownerships; // Mapping owner address to address data mapping(address => AddressData) private _addressData; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view override returns (uint256) { return currentIndex; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view override returns (uint256) { require(index < totalSupply(), 'ERC721A: global index out of bounds'); return index; } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. * This read function is O(totalSupply). If calling from a separate contract, be sure to test gas first. * It may also degrade with extremely large collection sizes (e.g >> 10000), test for your use case. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view override returns (uint256) { require(index < balanceOf(owner), 'ERC721A: owner index out of bounds'); uint256 numMintedSoFar = totalSupply(); uint256 tokenIdsIdx; address currOwnershipAddr; // Counter overflow is impossible as the loop breaks when uint256 i is equal to another uint256 numMintedSoFar. unchecked { for (uint256 i; i < numMintedSoFar; i++) { TokenOwnership memory ownership = _ownerships[i]; if (ownership.addr != address(0)) { currOwnershipAddr = ownership.addr; } if (currOwnershipAddr == owner) { if (tokenIdsIdx == index) { return i; } tokenIdsIdx++; } } } revert('ERC721A: unable to get token of owner by index'); } /** * @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 || interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view override returns (uint256) { require(owner != address(0), 'ERC721A: balance query for the zero address'); return uint256(_addressData[owner].balance); } function _numberMinted(address owner) internal view returns (uint256) { require(owner != address(0), 'ERC721A: number minted query for the zero address'); return uint256(_addressData[owner].numberMinted); } /** * 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) { require(_exists(tokenId), 'ERC721A: owner query for nonexistent token'); unchecked { for (uint256 curr = tokenId; curr >= 0; curr--) { TokenOwnership memory ownership = _ownerships[curr]; if (ownership.addr != address(0)) { return ownership; } } } revert('ERC721A: unable to determine the owner of token'); } /** * @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) { require(_exists(tokenId), 'ERC721Metadata: URI query for nonexistent token'); 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); require(to != owner, 'ERC721A: approval to current owner'); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), 'ERC721A: approve caller is not owner nor approved for all' ); _approve(to, tokenId, owner); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view override returns (address) { require(_exists(tokenId), 'ERC721A: approved query for nonexistent token'); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public override { require(operator != _msgSender(), 'ERC721A: approve to caller'); _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 override { _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public override { safeTransferFrom(from, to, tokenId, ''); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public override { _transfer(from, to, tokenId); require( _checkOnERC721Received(from, to, tokenId, _data), 'ERC721A: transfer to non ERC721Receiver implementer' ); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), */ function _exists(uint256 tokenId) internal view returns (bool) { return tokenId < currentIndex; } 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; require(to != address(0), 'ERC721A: mint to the zero address'); require(quantity != 0, 'ERC721A: quantity must be greater than 0'); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // balance or numberMinted overflow if current value of either + quantity > 3.4e38 (2**128) - 1 // updatedIndex overflows if currentIndex + quantity > 1.56e77 (2**256) - 1 unchecked { _addressData[to].balance += uint128(quantity); _addressData[to].numberMinted += uint128(quantity); _ownerships[startTokenId].addr = to; _ownerships[startTokenId].startTimestamp = uint64(block.timestamp); uint256 updatedIndex = startTokenId; for (uint256 i; i < quantity; i++) { emit Transfer(address(0), to, updatedIndex); if (safe) { require( _checkOnERC721Received(address(0), to, updatedIndex, _data), 'ERC721A: transfer to non ERC721Receiver implementer' ); } updatedIndex++; } currentIndex = updatedIndex; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) private { TokenOwnership memory prevOwnership = ownershipOf(tokenId); bool isApprovedOrOwner = (_msgSender() == prevOwnership.addr || getApproved(tokenId) == _msgSender() || isApprovedForAll(prevOwnership.addr, _msgSender())); require(isApprovedOrOwner, 'ERC721A: transfer caller is not owner nor approved'); require(prevOwnership.addr == from, 'ERC721A: transfer from incorrect owner'); require(to != address(0), 'ERC721A: transfer to the zero address'); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, prevOwnership.addr); // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256. unchecked { _addressData[from].balance -= 1; _addressData[to].balance += 1; _ownerships[tokenId].addr = to; _ownerships[tokenId].startTimestamp = uint64(block.timestamp); // If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it. // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls. uint256 nextTokenId = tokenId + 1; if (_ownerships[nextTokenId].addr == address(0)) { if (_exists(nextTokenId)) { _ownerships[nextTokenId].addr = prevOwnership.addr; _ownerships[nextTokenId].startTimestamp = prevOwnership.startTimestamp; } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve( address to, uint256 tokenId, address owner ) private { _tokenApprovals[tokenId] = to; emit Approval(owner, to, tokenId); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert('ERC721A: transfer to non ERC721Receiver implementer'); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting. * * 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`. */ 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. * * 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` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} }
// SPDX-License-Identifier: MIT pragma solidity 0.8.4; interface IRFOXFactory { function createNFT() external returns (address pair); }
// 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 (last updated v4.5.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// 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 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"ActivateWhitelist","type":"event"},{"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":"sender","type":"address"}],"name":"DeactivateWhitelist","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"oldMaxMintedPresalePerAddress","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newMaxMintedPresalePerAddress","type":"uint256"}],"name":"MaxMintedPresalePerAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"oldValue","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newValue","type":"uint256"}],"name":"MaxTokensPerTransaction","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":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"bytes32","name":"oldMerkleRoot","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"newMerkleRoot","type":"bytes32"}],"name":"UpdateMerkleRoot","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"oldTokenPrice","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newTokenPrice","type":"uint256"}],"name":"UpdateTokenPrice","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"oldTokenPrice","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newTokenPrice","type":"uint256"}],"name":"UpdateTokenPricePresale","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"string","name":"oldURI","type":"string"},{"indexed":false,"internalType":"string","name":"newURI","type":"string"}],"name":"UpdateURI","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"address","name":"saleToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"totalWithdrawn","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"MAX_NFT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOKEN_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOKEN_PRICE_PRESALE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"activateWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokensNumber","type":"uint256"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"buyNFTsPresale","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokensNumber","type":"uint256"}],"name":"buyNFTsPublic","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"checkWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"deactivateWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"contract IRFOXFactory","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"string","name":"baseURI","type":"string"},{"internalType":"contract IERC20","name":"saleToken","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"maxNft","type":"uint256"},{"internalType":"uint256","name":"maxTokensPerTransaction","type":"uint256"},{"internalType":"uint256","name":"saleStartTime","type":"uint256"},{"internalType":"uint256","name":"saleEndTime","type":"uint256"},{"internalType":"uint256","name":"publicSaleStartTime","type":"uint256"},{"internalType":"uint256","name":"maxMintedPresalePerAddress","type":"uint256"},{"internalType":"uint256","name":"pricePresale","type":"uint256"},{"internalType":"address","name":"owner","type":"address"}],"internalType":"struct ParamStructs.WhitelistParams","name":"params","type":"tuple"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","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":"isWhitelistActivated","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxMintedPresalePerAddress","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxTokensPerTransaction","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicSaleStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"safeMint","outputs":[],"stateMutability":"nonpayable","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":"saleEndTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"saleStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"saleToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"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":"string","name":"newBaseURIPrefix","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newMaxTokensPerTransaction","type":"uint256"}],"name":"setMaxTokensPerTransaction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newTokenPrice","type":"uint256"}],"name":"setTokenPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newTokenPricePresale","type":"uint256"}],"name":"setTokenPricePresale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","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":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxMintedPresalePerAddress","type":"uint256"}],"name":"updateMaxMintedPresalePerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"}],"name":"updateMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b50604080516020808201808452600080845284519283019094529281528151919290916200004291600191620000e2565b50805162000058906002906020840190620000e2565b50506007805460ff1916905550620000703362000088565b600f80546001600160a01b03191633179055620001c5565b600780546001600160a01b03838116610100818102610100600160a81b031985161790945560405193909204169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620000f09062000188565b90600052602060002090601f0160209004810192826200011457600085556200015f565b82601f106200012f57805160ff19168380011785556200015f565b828001600101855582156200015f579182015b828111156200015f57825182559160200191906001019062000142565b506200016d92915062000171565b5090565b5b808211156200016d576000815560010162000172565b600181811c908216806200019d57607f821691505b60208210811415620001bf57634e487b7160e01b600052602260045260246000fd5b50919050565b61372780620001d56000396000f3fe6080604052600436106102ae5760003560e01c80636352211e116101755780639a70f6f2116100dc578063d2d8cb6711610095578063ed338ff11161006f578063ed338ff1146107e9578063f2fde38b146107ff578063f85aff941461081f578063f8e6b54d1461083557600080fd5b8063d2d8cb671461076a578063e985e36714610780578063e985e9c5146107a057600080fd5b80639a70f6f2146106be578063a22cb465146106d4578063a69890f0146106f4578063b88d4fde1461070a578063c45a01551461072a578063c87b56dd1461074a57600080fd5b8063715018a61161012e578063715018a61461063457806384506786146106495780638456cb591461065c57806389e877a3146106715780638da5cb5b1461068657806395d89b41146106a957600080fd5b80636352211e146105935780636a61e5fc146105b35780636bb7b1d9146105d35780636c0360eb146105e95780636fdaddf1146105fe57806370a082311461061457600080fd5b80632f745c591161021957806342842e0e116101d257806342842e0e146104e15780634783f0ef146105015780634f6ccce71461052157806355f804b31461054157806355fcd367146105615780635c975abb1461057b57600080fd5b80632f745c5914610442578063311df29a146104625780633597d7f3146104825780633ccfd60b146104975780633f4ba83a146104ac57806340d097c3146104c157600080fd5b80631471c8cb1161026b5780631471c8cb1461039757806318160ddd146103b75780631cbaee2d146103d657806321c3cdd3146103ec57806323b872dd1461040c5780632eb4a7ab1461042c57600080fd5b806301ffc9a7146102b357806306fdde03146102e8578063081812fc1461030a578063095ea7b3146103425780630ed013fb146103645780631449d3e614610377575b600080fd5b3480156102bf57600080fd5b506102d36102ce36600461315d565b610855565b60405190151581526020015b60405180910390f35b3480156102f457600080fd5b506102fd6108c2565b6040516102df9190613357565b34801561031657600080fd5b5061032a610325366004613145565b610954565b6040516001600160a01b0390911681526020016102df565b34801561034e57600080fd5b5061036261035d3660046130fe565b6109e4565b005b61036261037236600461322a565b610afc565b34801561038357600080fd5b50610362610392366004613145565b610c6c565b3480156103a357600080fd5b506103626103b2366004613145565b610d29565b3480156103c357600080fd5b506000545b6040519081526020016102df565b3480156103e257600080fd5b506103c860105481565b3480156103f857600080fd5b506103626104073660046131da565b610deb565b34801561041857600080fd5b50610362610427366004612f59565b610fbc565b34801561043857600080fd5b506103c860165481565b34801561044e57600080fd5b506103c861045d3660046130fe565b610fc7565b34801561046e57600080fd5b5061036261047d366004613145565b611123565b34801561048e57600080fd5b50610362611193565b3480156104a357600080fd5b5061036261124c565b3480156104b857600080fd5b50610362611410565b3480156104cd57600080fd5b506103626104dc366004612f05565b61144a565b3480156104ed57600080fd5b506103626104fc366004612f59565b6114bf565b34801561050d57600080fd5b5061036261051c366004613145565b6114da565b34801561052d57600080fd5b506103c861053c366004613145565b61154a565b34801561054d57600080fd5b5061036261055c366004613195565b6115ac565b34801561056d57600080fd5b506017546102d39060ff1681565b34801561058757600080fd5b5060075460ff166102d3565b34801561059f57600080fd5b5061032a6105ae366004613145565b6116bd565b3480156105bf57600080fd5b506103626105ce366004613145565b6116cf565b3480156105df57600080fd5b506103c860135481565b3480156105f557600080fd5b506102fd61173f565b34801561060a57600080fd5b506103c8600d5481565b34801561062057600080fd5b506103c861062f366004612f05565b61174e565b34801561064057600080fd5b506103626117df565b610362610657366004613145565b611819565b34801561066857600080fd5b5061036261193c565b34801561067d57600080fd5b50610362611974565b34801561069257600080fd5b5060075461010090046001600160a01b031661032a565b3480156106b557600080fd5b506102fd611a27565b3480156106ca57600080fd5b506103c860145481565b3480156106e057600080fd5b506103626106ef3660046130d1565b611a36565b34801561070057600080fd5b506103c860125481565b34801561071657600080fd5b50610362610725366004612f99565b611afb565b34801561073657600080fd5b50600f5461032a906001600160a01b031681565b34801561075657600080fd5b506102fd610765366004613145565b611b34565b34801561077657600080fd5b506103c8600c5481565b34801561078c57600080fd5b50600e5461032a906001600160a01b031681565b3480156107ac57600080fd5b506102d36107bb366004612f21565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b3480156107f557600080fd5b506103c860115481565b34801561080b57600080fd5b5061036261081a366004612f05565b611b3f565b34801561082b57600080fd5b506103c8600b5481565b34801561084157600080fd5b506102d3610850366004613015565b611bdd565b60006001600160e01b031982166380ac58cd60e01b148061088657506001600160e01b03198216635b5e139f60e01b145b806108a157506001600160e01b0319821663780e9d6360e01b145b806108bc57506301ffc9a760e01b6001600160e01b03198316145b92915050565b6060600880546108d19061360c565b80601f01602080910402602001604051908101604052809291908181526020018280546108fd9061360c565b801561094a5780601f1061091f5761010080835404028352916020019161094a565b820191906000526020600020905b81548152906001019060200180831161092d57829003601f168201915b5050505050905090565b6000610961826000541190565b6109c85760405162461bcd60e51b815260206004820152602d60248201527f455243373231413a20617070726f76656420717565727920666f72206e6f6e6560448201526c3c34b9ba32b73a103a37b5b2b760991b60648201526084015b60405180910390fd5b506000908152600560205260409020546001600160a01b031690565b60006109ef826116bd565b9050806001600160a01b0316836001600160a01b03161415610a5e5760405162461bcd60e51b815260206004820152602260248201527f455243373231413a20617070726f76616c20746f2063757272656e74206f776e60448201526132b960f11b60648201526084016109bf565b336001600160a01b0382161480610a7a5750610a7a81336107bb565b610aec5760405162461bcd60e51b815260206004820152603960248201527f455243373231413a20617070726f76652063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f76656420666f7220616c6c0000000000000060648201526084016109bf565b610af7838383611c3a565b505050565b60075460ff1615610b1f5760405162461bcd60e51b81526004016109bf90613451565b323314610b635760405162461bcd60e51b815260206004820152601260248201527143616c6c6572206d75737420626520454f4160701b60448201526064016109bf565b6017548290829060ff1615610c0e57610baf33838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611bdd92505050565b8015610bbd57506010544210155b610c095760405162461bcd60e51b815260206004820181905260248201527f556e617574686f72697a656420746f206a6f696e207468652070726573616c6560448201526064016109bf565b610c5c565b601354421015610c5c5760405162461bcd60e51b815260206004820152601960248201527814d85b19481a185cc81b9bdd081899595b881cdd185c9d1959603a1b60448201526064016109bf565b610c6585611c96565b5050505050565b6007546001600160a01b03610100909104163314610c9c5760405162461bcd60e51b81526004016109bf9061347b565b60008111610ce15760405162461bcd60e51b8152602060048201526012602482015271494e56414c49445f5a45524f5f56414c554560701b60448201526064016109bf565b600b805490829055604080518281526020810184905233917fb39bf8311c05c3cf0e747394ce1a50d0a55862cd7f3b087bf2c3bcb7f7fec46191015b60405180910390a25050565b6007546001600160a01b03610100909104163314610d595760405162461bcd60e51b81526004016109bf9061347b565b600d54811115610dab5760405162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206d6178206d696e742070657220616464726573730000000060448201526064016109bf565b6012805490829055604080518281526020810184905233917f6624911a35f6ecff7839762364df0b18738cf8d54e6e5401e8a8057dca9a877f9101610d1d565b600f546001600160a01b03163314610e315760405162461bcd60e51b81526020600482015260096024820152682337b93134b23232b760b91b60448201526064016109bf565b8060e001358161012001351015610e8a5760405162461bcd60e51b815260206004820152601860248201527f496e76616c6964207075626c69632073616c652074696d65000000000000000060448201526064016109bf565b6101208101356013556017805460ff19166001179055610140810135601255610160810135601455610fb9610ebf8280613503565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610f01925050506020840184613503565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610f43925050506040850185613503565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610f88925050506080860160608701612f05565b608086013560a087013560c088013560e08901356101008a0135610fb46101a08c016101808d01612f05565b611e88565b50565b610af7838383611fa2565b6000610fd28361174e565b821061102b5760405162461bcd60e51b815260206004820152602260248201527f455243373231413a206f776e657220696e646578206f7574206f6620626f756e604482015261647360f01b60648201526084016109bf565b600080549080805b838110156110c3576000818152600360209081526040918290208251808401909352546001600160a01b038116808452600160a01b9091046001600160401b0316918301919091521561108557805192505b876001600160a01b0316836001600160a01b031614156110ba57868414156110b3575093506108bc92505050565b6001909301925b50600101611033565b5060405162461bcd60e51b815260206004820152602e60248201527f455243373231413a20756e61626c6520746f2067657420746f6b656e206f662060448201526d0deeedccae440c4f240d2dcc8caf60931b60648201526084016109bf565b6007546001600160a01b036101009091041633146111535760405162461bcd60e51b81526004016109bf9061347b565b6014805490829055604080518281526020810184905233917fa9e0d811fda9bb12a8a33a230a373534ad7176732c43020ff83c3b8425ba9e859101610d1d565b6007546001600160a01b036101009091041633146111c35760405162461bcd60e51b81526004016109bf9061347b565b60175460ff166112155760405162461bcd60e51b815260206004820152601760248201527f57686974656c697374206973206e6f742061637469766500000000000000000060448201526064016109bf565b6017805460ff1916905560405133907f66c181ea7309d1a2533ad3614dab6d488bde2babb04711eeda39ed70b6e4d8ff90600090a2565b6007546001600160a01b0361010090910416331461127c5760405162461bcd60e51b81526004016109bf9061347b565b600e546000906001600160a01b031661133057506040514790600090339083908381818185875af1925050503d80600081146112d4576040519150601f19603f3d011682016040523d82523d6000602084013e6112d9565b606091505b505090508061132a5760405162461bcd60e51b815260206004820152601860248201527f4661696c656420746f207769746864726177204574686572000000000000000060448201526064016109bf565b506113c5565b600e546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b15801561137357600080fd5b505afa158015611387573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113ab9190613212565b600e549091506113c5906001600160a01b03163383612282565b600e54604080516001600160a01b0390921682526020820183905233917f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb910160405180910390a250565b6007546001600160a01b036101009091041633146114405760405162461bcd60e51b81526004016109bf9061347b565b6114486122e5565b565b6007546001600160a01b0361010090910416331461147a5760405162461bcd60e51b81526004016109bf9061347b565b6001600d546114928261148c60005490565b90612378565b11156114b05760405162461bcd60e51b81526004016109bf90613426565b6114bb82600161238b565b5050565b610af783838360405180602001604052806000815250611afb565b6007546001600160a01b0361010090910416331461150a5760405162461bcd60e51b81526004016109bf9061347b565b6016805490829055604080518281526020810184905233917f8b67e84be49a1952e3818ead1025bf3a2299ec901780204d0dec64678b2352879101610d1d565b6000805482106115a85760405162461bcd60e51b815260206004820152602360248201527f455243373231413a20676c6f62616c20696e646578206f7574206f6620626f756044820152626e647360e81b60648201526084016109bf565b5090565b6007546001600160a01b036101009091041633146115dc5760405162461bcd60e51b81526004016109bf9061347b565b6000600a80546115eb9061360c565b80601f01602080910402602001604051908101604052809291908181526020018280546116179061360c565b80156116645780601f1061163957610100808354040283529160200191611664565b820191906000526020600020905b81548152906001019060200180831161164757829003601f168201915b5050855193945061168093600a93506020870192509050612e1e565b50336001600160a01b03167f1583e02b0b2a79149e9152563c00c240bf33e5291f9c5337a03c013d74e177dd82600a604051610d1d92919061336a565b60006116c8826123a5565b5192915050565b6007546001600160a01b036101009091041633146116ff5760405162461bcd60e51b81526004016109bf9061347b565b600c805490829055604080518281526020810184905233917f6ef4f75898b1bc6ecd3c31efb5dd41fa825f83ee3ca1161450111af12115f7cc9101610d1d565b606061174961247b565b905090565b60006001600160a01b0382166117ba5760405162461bcd60e51b815260206004820152602b60248201527f455243373231413a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084016109bf565b506001600160a01b03166000908152600460205260409020546001600160801b031690565b6007546001600160a01b0361010090910416331461180f5760405162461bcd60e51b81526004016109bf9061347b565b611448600061248a565b60075460ff161561183c5760405162461bcd60e51b81526004016109bf90613451565b3233146118805760405162461bcd60e51b815260206004820152601260248201527143616c6c6572206d75737420626520454f4160701b60448201526064016109bf565b80600b548111156118e55760405162461bcd60e51b815260206004820152602960248201527f4d617820707572636861736520706572206f6e65207472616e73616374696f6e60448201526808195e18d95959195960ba1b60648201526084016109bf565b6013544210156119335760405162461bcd60e51b815260206004820152601960248201527814d85b19481a185cc81b9bdd081899595b881cdd185c9d1959603a1b60448201526064016109bf565b6114bb826124e4565b6007546001600160a01b0361010090910416331461196c5760405162461bcd60e51b81526004016109bf9061347b565b6114486125dd565b6007546001600160a01b036101009091041633146119a45760405162461bcd60e51b81526004016109bf9061347b565b60175460ff16156119ed5760405162461bcd60e51b815260206004820152601360248201527257686974656c6973742069732061637469766560681b60448201526064016109bf565b6017805460ff1916600117905560405133907f8756637acb74261437cc71a59a5be5b0deabb5eba0dd08280d1a7d5325caff2b90600090a2565b6060600980546108d19061360c565b6001600160a01b038216331415611a8f5760405162461bcd60e51b815260206004820152601a60248201527f455243373231413a20617070726f766520746f2063616c6c657200000000000060448201526064016109bf565b3360008181526006602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b611b06848484611fa2565b611b1284848484612635565b611b2e5760405162461bcd60e51b81526004016109bf906134b0565b50505050565b60606108bc82612742565b6007546001600160a01b03610100909104163314611b6f5760405162461bcd60e51b81526004016109bf9061347b565b6001600160a01b038116611bd45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016109bf565b610fb98161248a565b600080611c23846040516bffffffffffffffffffffffff19606083901b166020820152600090603401604051602081830303815290604052805190602001209050919050565b9050611c32836016548361280f565b949350505050565b60008281526005602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b80600d54611ca78261148c60005490565b1115611cc55760405162461bcd60e51b81526004016109bf90613426565b60125433600090815260156020526040902054611ce29084612378565b1115611d235760405162461bcd60e51b815260206004820152601060248201526f115e18d95959081d1a19481b1a5b5a5d60821b60448201526064016109bf565b33600090815260156020526040902054611d3d9083612378565b3360009081526015602052604090205560115415611da057601154421115611da05760405162461bcd60e51b815260206004820152601660248201527514d85b19481a185cc81899595b88199a5b9a5cda195960521b60448201526064016109bf565b600e546001600160a01b0316611e1057601454611dbd9083612825565b3414611e0b5760405162461bcd60e51b815260206004820152601a60248201527f496e76616c69642065746820666f722070757263686173696e6700000000000060448201526064016109bf565b611e7e565b3415611e505760405162461bcd60e51b815260206004820152600f60248201526e11551217d393d517d0531313d5d151608a1b60448201526064016109bf565b611e7e3330611e6a8560145461282590919063ffffffff16565b600e546001600160a01b0316929190612831565b6114bb338361238b565b60008311611ecd5760405162461bcd60e51b8152602060048201526012602482015271496e76616c69642073746172742074696d6560701b60448201526064016109bf565b60008411611f1d5760405162461bcd60e51b815260206004820152601d60248201527f4d617820746f6b656e73207065722074782063616e6e6f74206265203000000060448201526064016109bf565b8951611f309060089060208d0190612e1e565b508851611f449060099060208c0190612e1e565b508751611f5890600a9060208b0190612e1e565b50600e80546001600160a01b0319166001600160a01b038916179055600c869055600d859055600b84905560108390556011829055611f9681611b3f565b50505050505050505050565b6000611fad826123a5565b80519091506000906001600160a01b0316336001600160a01b03161480611fe4575033611fd984610954565b6001600160a01b0316145b80611ff657508151611ff690336107bb565b9050806120605760405162461bcd60e51b815260206004820152603260248201527f455243373231413a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b60648201526084016109bf565b846001600160a01b031682600001516001600160a01b0316146120d45760405162461bcd60e51b815260206004820152602660248201527f455243373231413a207472616e736665722066726f6d20696e636f72726563746044820152651037bbb732b960d11b60648201526084016109bf565b6001600160a01b0384166121385760405162461bcd60e51b815260206004820152602560248201527f455243373231413a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b60648201526084016109bf565b6121486000848460000151611c3a565b6001600160a01b03858116600090815260046020908152604080832080546001600160801b03198082166001600160801b03928316600019018316179092558986168086528386208054938416938316600190810190931693909317909255888552600390935281842080546001600160e01b031916909117600160a01b426001600160401b03160217905590860180835291205490911661223b576121ef816000541190565b1561223b57825160008281526003602090815260409091208054918601516001600160401b0316600160a01b026001600160e01b03199092166001600160a01b03909316929092171790555b5082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4610c65565b6040516001600160a01b038316602482015260448101829052610af790849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612869565b60075460ff1661232e5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016109bf565b6007805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6000612384828461357e565b9392505050565b6114bb82826040518060200160405280600081525061293b565b60408051808201909152600080825260208201526123c4826000541190565b6124235760405162461bcd60e51b815260206004820152602a60248201527f455243373231413a206f776e657220717565727920666f72206e6f6e657869736044820152693a32b73a103a37b5b2b760b11b60648201526084016109bf565b815b6000818152600360209081526040918290208251808401909352546001600160a01b038116808452600160a01b9091046001600160401b03169183019190915215612471579392505050565b5060001901612425565b6060600a80546108d19061360c565b600780546001600160a01b03838116610100818102610100600160a81b031985161790945560405193909204169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80600d546124f58261148c60005490565b11156125135760405162461bcd60e51b81526004016109bf90613426565b60115415612566576011544211156125665760405162461bcd60e51b815260206004820152601660248201527514d85b19481a185cc81899595b88199a5b9a5cda195960521b60448201526064016109bf565b600e546001600160a01b031661258357600c54611dbd9083612825565b34156125c35760405162461bcd60e51b815260206004820152600f60248201526e11551217d393d517d0531313d5d151608a1b60448201526064016109bf565b611e7e3330611e6a85600c5461282590919063ffffffff16565b60075460ff16156126005760405162461bcd60e51b81526004016109bf90613451565b6007805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861235b3390565b60006001600160a01b0384163b1561273757604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061267990339089908890889060040161331a565b602060405180830381600087803b15801561269357600080fd5b505af19250505080156126c3575060408051601f3d908101601f191682019092526126c091810190613179565b60015b61271d573d8080156126f1576040519150601f19603f3d011682016040523d82523d6000602084013e6126f6565b606091505b5080516127155760405162461bcd60e51b81526004016109bf906134b0565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611c32565b506001949350505050565b606061274f826000541190565b6127b35760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084016109bf565b60006127bd61247b565b90508051600014156127de5760405180602001604052806000815250612384565b806127e884612948565b6040516020016127f99291906132eb565b6040516020818303038152906040529392505050565b60008261281c8584612a61565b14949350505050565b600061238482846135aa565b6040516001600160a01b0380851660248301528316604482015260648101829052611b2e9085906323b872dd60e01b906084016122ae565b60006128be826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612ae39092919063ffffffff16565b805190915015610af757808060200190518101906128dc9190613129565b610af75760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016109bf565b610af78383836001612af2565b60608161296c5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612996578061298081613647565b915061298f9050600a83613596565b9150612970565b6000816001600160401b038111156129be57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156129e8576020820181803683370190505b5090505b8415611c32576129fd6001836135c9565b9150612a0a600a86613662565b612a1590603061357e565b60f81b818381518110612a3857634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350612a5a600a86613596565b94506129ec565b600081815b8451811015612adb576000858281518110612a9157634e487b7160e01b600052603260045260246000fd5b60200260200101519050808311612ab75760008381526020829052604090209250612ac8565b600081815260208490526040902092505b5080612ad381613647565b915050612a66565b509392505050565b6060611c328484600085612cb4565b6000546001600160a01b038516612b555760405162461bcd60e51b815260206004820152602160248201527f455243373231413a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b60648201526084016109bf565b83612bb35760405162461bcd60e51b815260206004820152602860248201527f455243373231413a207175616e74697479206d75737420626520677265617465604482015267072207468616e20360c41b60648201526084016109bf565b6001600160a01b03851660008181526004602090815260408083208054600160801b6001600160801b031982166001600160801b039283168c01831690811782900483168c01909216021790558483526003909152812080546001600160e01b031916909217600160a01b426001600160401b0316021790915581905b85811015612cab5760405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a48315612c9f57612c836000888488612635565b612c9f5760405162461bcd60e51b81526004016109bf906134b0565b60019182019101612c30565b50600055610c65565b606082471015612d155760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016109bf565b6001600160a01b0385163b612d6c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016109bf565b600080866001600160a01b03168587604051612d8891906132cf565b60006040518083038185875af1925050503d8060008114612dc5576040519150601f19603f3d011682016040523d82523d6000602084013e612dca565b606091505b5091509150612dda828286612de5565b979650505050505050565b60608315612df4575081612384565b825115612e045782518084602001fd5b8160405162461bcd60e51b81526004016109bf9190613357565b828054612e2a9061360c565b90600052602060002090601f016020900481019282612e4c5760008555612e92565b82601f10612e6557805160ff1916838001178555612e92565b82800160010185558215612e92579182015b82811115612e92578251825591602001919060010190612e77565b506115a89291505b808211156115a85760008155600101612e9a565b60006001600160401b03831115612ec757612ec76136a2565b612eda601f8401601f191660200161354e565b9050828152838383011115612eee57600080fd5b828260208301376000602084830101529392505050565b600060208284031215612f16578081fd5b8135612384816136b8565b60008060408385031215612f33578081fd5b8235612f3e816136b8565b91506020830135612f4e816136b8565b809150509250929050565b600080600060608486031215612f6d578081fd5b8335612f78816136b8565b92506020840135612f88816136b8565b929592945050506040919091013590565b60008060008060808587031215612fae578081fd5b8435612fb9816136b8565b93506020850135612fc9816136b8565b92506040850135915060608501356001600160401b03811115612fea578182fd5b8501601f81018713612ffa578182fd5b61300987823560208401612eae565b91505092959194509250565b60008060408385031215613027578182fd5b8235613032816136b8565b91506020838101356001600160401b038082111561304e578384fd5b818601915086601f830112613061578384fd5b813581811115613073576130736136a2565b8060051b915061308484830161354e565b8181528481019084860184860187018b101561309e578788fd5b8795505b838610156130c05780358352600195909501949186019186016130a2565b508096505050505050509250929050565b600080604083850312156130e3578182fd5b82356130ee816136b8565b91506020830135612f4e816136cd565b60008060408385031215613110578182fd5b823561311b816136b8565b946020939093013593505050565b60006020828403121561313a578081fd5b8151612384816136cd565b600060208284031215613156578081fd5b5035919050565b60006020828403121561316e578081fd5b8135612384816136db565b60006020828403121561318a578081fd5b8151612384816136db565b6000602082840312156131a6578081fd5b81356001600160401b038111156131bb578182fd5b8201601f810184136131cb578182fd5b611c3284823560208401612eae565b6000602082840312156131eb578081fd5b81356001600160401b03811115613200578182fd5b82016101a08185031215612384578182fd5b600060208284031215613223578081fd5b5051919050565b60008060006040848603121561323e578081fd5b8335925060208401356001600160401b038082111561325b578283fd5b818601915086601f83011261326e578283fd5b81358181111561327c578384fd5b8760208260051b8501011115613290578384fd5b6020830194508093505050509250925092565b600081518084526132bb8160208601602086016135e0565b601f01601f19169290920160200192915050565b600082516132e18184602087016135e0565b9190910192915050565b600083516132fd8184602088016135e0565b8351908301906133118183602088016135e0565b01949350505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061334d908301846132a3565b9695505050505050565b60208152600061238460208301846132a3565b60408152600061337d60408301856132a3565b60208382038185015282855484600182811c9150808316806133a057607f831692505b8583108114156133be57634e487b7160e01b88526022600452602488fd5b8287526020870196508080156133db57600181146133ec57613416565b60ff19851688528688019550613416565b60008b815260209020895b858110156134105781548a8201529084019088016133f7565b89019650505b50939a9950505050505050505050565b6020808252601190820152704578636565646564204d6178204e46547360781b604082015260600190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526033908201527f455243373231413a207472616e7366657220746f206e6f6e204552433732315260408201527232b1b2b4bb32b91034b6b83632b6b2b73a32b960691b606082015260800190565b6000808335601e19843603018112613519578283fd5b8301803591506001600160401b03821115613532578283fd5b60200191503681900382131561354757600080fd5b9250929050565b604051601f8201601f191681016001600160401b0381118282101715613576576135766136a2565b604052919050565b6000821982111561359157613591613676565b500190565b6000826135a5576135a561368c565b500490565b60008160001904831182151516156135c4576135c4613676565b500290565b6000828210156135db576135db613676565b500390565b60005b838110156135fb5781810151838201526020016135e3565b83811115611b2e5750506000910152565b600181811c9082168061362057607f821691505b6020821081141561364157634e487b7160e01b600052602260045260246000fd5b50919050565b600060001982141561365b5761365b613676565b5060010190565b6000826136715761367161368c565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610fb957600080fd5b8015158114610fb957600080fd5b6001600160e01b031981168114610fb957600080fdfea264697066735822122055ce1d98662bb16f8e1b6d0b678ff0d2322038daa22744c81cca13f9f2f3cd8b64736f6c63430008040033
Deployed Bytecode
0x6080604052600436106102ae5760003560e01c80636352211e116101755780639a70f6f2116100dc578063d2d8cb6711610095578063ed338ff11161006f578063ed338ff1146107e9578063f2fde38b146107ff578063f85aff941461081f578063f8e6b54d1461083557600080fd5b8063d2d8cb671461076a578063e985e36714610780578063e985e9c5146107a057600080fd5b80639a70f6f2146106be578063a22cb465146106d4578063a69890f0146106f4578063b88d4fde1461070a578063c45a01551461072a578063c87b56dd1461074a57600080fd5b8063715018a61161012e578063715018a61461063457806384506786146106495780638456cb591461065c57806389e877a3146106715780638da5cb5b1461068657806395d89b41146106a957600080fd5b80636352211e146105935780636a61e5fc146105b35780636bb7b1d9146105d35780636c0360eb146105e95780636fdaddf1146105fe57806370a082311461061457600080fd5b80632f745c591161021957806342842e0e116101d257806342842e0e146104e15780634783f0ef146105015780634f6ccce71461052157806355f804b31461054157806355fcd367146105615780635c975abb1461057b57600080fd5b80632f745c5914610442578063311df29a146104625780633597d7f3146104825780633ccfd60b146104975780633f4ba83a146104ac57806340d097c3146104c157600080fd5b80631471c8cb1161026b5780631471c8cb1461039757806318160ddd146103b75780631cbaee2d146103d657806321c3cdd3146103ec57806323b872dd1461040c5780632eb4a7ab1461042c57600080fd5b806301ffc9a7146102b357806306fdde03146102e8578063081812fc1461030a578063095ea7b3146103425780630ed013fb146103645780631449d3e614610377575b600080fd5b3480156102bf57600080fd5b506102d36102ce36600461315d565b610855565b60405190151581526020015b60405180910390f35b3480156102f457600080fd5b506102fd6108c2565b6040516102df9190613357565b34801561031657600080fd5b5061032a610325366004613145565b610954565b6040516001600160a01b0390911681526020016102df565b34801561034e57600080fd5b5061036261035d3660046130fe565b6109e4565b005b61036261037236600461322a565b610afc565b34801561038357600080fd5b50610362610392366004613145565b610c6c565b3480156103a357600080fd5b506103626103b2366004613145565b610d29565b3480156103c357600080fd5b506000545b6040519081526020016102df565b3480156103e257600080fd5b506103c860105481565b3480156103f857600080fd5b506103626104073660046131da565b610deb565b34801561041857600080fd5b50610362610427366004612f59565b610fbc565b34801561043857600080fd5b506103c860165481565b34801561044e57600080fd5b506103c861045d3660046130fe565b610fc7565b34801561046e57600080fd5b5061036261047d366004613145565b611123565b34801561048e57600080fd5b50610362611193565b3480156104a357600080fd5b5061036261124c565b3480156104b857600080fd5b50610362611410565b3480156104cd57600080fd5b506103626104dc366004612f05565b61144a565b3480156104ed57600080fd5b506103626104fc366004612f59565b6114bf565b34801561050d57600080fd5b5061036261051c366004613145565b6114da565b34801561052d57600080fd5b506103c861053c366004613145565b61154a565b34801561054d57600080fd5b5061036261055c366004613195565b6115ac565b34801561056d57600080fd5b506017546102d39060ff1681565b34801561058757600080fd5b5060075460ff166102d3565b34801561059f57600080fd5b5061032a6105ae366004613145565b6116bd565b3480156105bf57600080fd5b506103626105ce366004613145565b6116cf565b3480156105df57600080fd5b506103c860135481565b3480156105f557600080fd5b506102fd61173f565b34801561060a57600080fd5b506103c8600d5481565b34801561062057600080fd5b506103c861062f366004612f05565b61174e565b34801561064057600080fd5b506103626117df565b610362610657366004613145565b611819565b34801561066857600080fd5b5061036261193c565b34801561067d57600080fd5b50610362611974565b34801561069257600080fd5b5060075461010090046001600160a01b031661032a565b3480156106b557600080fd5b506102fd611a27565b3480156106ca57600080fd5b506103c860145481565b3480156106e057600080fd5b506103626106ef3660046130d1565b611a36565b34801561070057600080fd5b506103c860125481565b34801561071657600080fd5b50610362610725366004612f99565b611afb565b34801561073657600080fd5b50600f5461032a906001600160a01b031681565b34801561075657600080fd5b506102fd610765366004613145565b611b34565b34801561077657600080fd5b506103c8600c5481565b34801561078c57600080fd5b50600e5461032a906001600160a01b031681565b3480156107ac57600080fd5b506102d36107bb366004612f21565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b3480156107f557600080fd5b506103c860115481565b34801561080b57600080fd5b5061036261081a366004612f05565b611b3f565b34801561082b57600080fd5b506103c8600b5481565b34801561084157600080fd5b506102d3610850366004613015565b611bdd565b60006001600160e01b031982166380ac58cd60e01b148061088657506001600160e01b03198216635b5e139f60e01b145b806108a157506001600160e01b0319821663780e9d6360e01b145b806108bc57506301ffc9a760e01b6001600160e01b03198316145b92915050565b6060600880546108d19061360c565b80601f01602080910402602001604051908101604052809291908181526020018280546108fd9061360c565b801561094a5780601f1061091f5761010080835404028352916020019161094a565b820191906000526020600020905b81548152906001019060200180831161092d57829003601f168201915b5050505050905090565b6000610961826000541190565b6109c85760405162461bcd60e51b815260206004820152602d60248201527f455243373231413a20617070726f76656420717565727920666f72206e6f6e6560448201526c3c34b9ba32b73a103a37b5b2b760991b60648201526084015b60405180910390fd5b506000908152600560205260409020546001600160a01b031690565b60006109ef826116bd565b9050806001600160a01b0316836001600160a01b03161415610a5e5760405162461bcd60e51b815260206004820152602260248201527f455243373231413a20617070726f76616c20746f2063757272656e74206f776e60448201526132b960f11b60648201526084016109bf565b336001600160a01b0382161480610a7a5750610a7a81336107bb565b610aec5760405162461bcd60e51b815260206004820152603960248201527f455243373231413a20617070726f76652063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f76656420666f7220616c6c0000000000000060648201526084016109bf565b610af7838383611c3a565b505050565b60075460ff1615610b1f5760405162461bcd60e51b81526004016109bf90613451565b323314610b635760405162461bcd60e51b815260206004820152601260248201527143616c6c6572206d75737420626520454f4160701b60448201526064016109bf565b6017548290829060ff1615610c0e57610baf33838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611bdd92505050565b8015610bbd57506010544210155b610c095760405162461bcd60e51b815260206004820181905260248201527f556e617574686f72697a656420746f206a6f696e207468652070726573616c6560448201526064016109bf565b610c5c565b601354421015610c5c5760405162461bcd60e51b815260206004820152601960248201527814d85b19481a185cc81b9bdd081899595b881cdd185c9d1959603a1b60448201526064016109bf565b610c6585611c96565b5050505050565b6007546001600160a01b03610100909104163314610c9c5760405162461bcd60e51b81526004016109bf9061347b565b60008111610ce15760405162461bcd60e51b8152602060048201526012602482015271494e56414c49445f5a45524f5f56414c554560701b60448201526064016109bf565b600b805490829055604080518281526020810184905233917fb39bf8311c05c3cf0e747394ce1a50d0a55862cd7f3b087bf2c3bcb7f7fec46191015b60405180910390a25050565b6007546001600160a01b03610100909104163314610d595760405162461bcd60e51b81526004016109bf9061347b565b600d54811115610dab5760405162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206d6178206d696e742070657220616464726573730000000060448201526064016109bf565b6012805490829055604080518281526020810184905233917f6624911a35f6ecff7839762364df0b18738cf8d54e6e5401e8a8057dca9a877f9101610d1d565b600f546001600160a01b03163314610e315760405162461bcd60e51b81526020600482015260096024820152682337b93134b23232b760b91b60448201526064016109bf565b8060e001358161012001351015610e8a5760405162461bcd60e51b815260206004820152601860248201527f496e76616c6964207075626c69632073616c652074696d65000000000000000060448201526064016109bf565b6101208101356013556017805460ff19166001179055610140810135601255610160810135601455610fb9610ebf8280613503565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610f01925050506020840184613503565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610f43925050506040850185613503565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610f88925050506080860160608701612f05565b608086013560a087013560c088013560e08901356101008a0135610fb46101a08c016101808d01612f05565b611e88565b50565b610af7838383611fa2565b6000610fd28361174e565b821061102b5760405162461bcd60e51b815260206004820152602260248201527f455243373231413a206f776e657220696e646578206f7574206f6620626f756e604482015261647360f01b60648201526084016109bf565b600080549080805b838110156110c3576000818152600360209081526040918290208251808401909352546001600160a01b038116808452600160a01b9091046001600160401b0316918301919091521561108557805192505b876001600160a01b0316836001600160a01b031614156110ba57868414156110b3575093506108bc92505050565b6001909301925b50600101611033565b5060405162461bcd60e51b815260206004820152602e60248201527f455243373231413a20756e61626c6520746f2067657420746f6b656e206f662060448201526d0deeedccae440c4f240d2dcc8caf60931b60648201526084016109bf565b6007546001600160a01b036101009091041633146111535760405162461bcd60e51b81526004016109bf9061347b565b6014805490829055604080518281526020810184905233917fa9e0d811fda9bb12a8a33a230a373534ad7176732c43020ff83c3b8425ba9e859101610d1d565b6007546001600160a01b036101009091041633146111c35760405162461bcd60e51b81526004016109bf9061347b565b60175460ff166112155760405162461bcd60e51b815260206004820152601760248201527f57686974656c697374206973206e6f742061637469766500000000000000000060448201526064016109bf565b6017805460ff1916905560405133907f66c181ea7309d1a2533ad3614dab6d488bde2babb04711eeda39ed70b6e4d8ff90600090a2565b6007546001600160a01b0361010090910416331461127c5760405162461bcd60e51b81526004016109bf9061347b565b600e546000906001600160a01b031661133057506040514790600090339083908381818185875af1925050503d80600081146112d4576040519150601f19603f3d011682016040523d82523d6000602084013e6112d9565b606091505b505090508061132a5760405162461bcd60e51b815260206004820152601860248201527f4661696c656420746f207769746864726177204574686572000000000000000060448201526064016109bf565b506113c5565b600e546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b15801561137357600080fd5b505afa158015611387573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113ab9190613212565b600e549091506113c5906001600160a01b03163383612282565b600e54604080516001600160a01b0390921682526020820183905233917f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb910160405180910390a250565b6007546001600160a01b036101009091041633146114405760405162461bcd60e51b81526004016109bf9061347b565b6114486122e5565b565b6007546001600160a01b0361010090910416331461147a5760405162461bcd60e51b81526004016109bf9061347b565b6001600d546114928261148c60005490565b90612378565b11156114b05760405162461bcd60e51b81526004016109bf90613426565b6114bb82600161238b565b5050565b610af783838360405180602001604052806000815250611afb565b6007546001600160a01b0361010090910416331461150a5760405162461bcd60e51b81526004016109bf9061347b565b6016805490829055604080518281526020810184905233917f8b67e84be49a1952e3818ead1025bf3a2299ec901780204d0dec64678b2352879101610d1d565b6000805482106115a85760405162461bcd60e51b815260206004820152602360248201527f455243373231413a20676c6f62616c20696e646578206f7574206f6620626f756044820152626e647360e81b60648201526084016109bf565b5090565b6007546001600160a01b036101009091041633146115dc5760405162461bcd60e51b81526004016109bf9061347b565b6000600a80546115eb9061360c565b80601f01602080910402602001604051908101604052809291908181526020018280546116179061360c565b80156116645780601f1061163957610100808354040283529160200191611664565b820191906000526020600020905b81548152906001019060200180831161164757829003601f168201915b5050855193945061168093600a93506020870192509050612e1e565b50336001600160a01b03167f1583e02b0b2a79149e9152563c00c240bf33e5291f9c5337a03c013d74e177dd82600a604051610d1d92919061336a565b60006116c8826123a5565b5192915050565b6007546001600160a01b036101009091041633146116ff5760405162461bcd60e51b81526004016109bf9061347b565b600c805490829055604080518281526020810184905233917f6ef4f75898b1bc6ecd3c31efb5dd41fa825f83ee3ca1161450111af12115f7cc9101610d1d565b606061174961247b565b905090565b60006001600160a01b0382166117ba5760405162461bcd60e51b815260206004820152602b60248201527f455243373231413a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084016109bf565b506001600160a01b03166000908152600460205260409020546001600160801b031690565b6007546001600160a01b0361010090910416331461180f5760405162461bcd60e51b81526004016109bf9061347b565b611448600061248a565b60075460ff161561183c5760405162461bcd60e51b81526004016109bf90613451565b3233146118805760405162461bcd60e51b815260206004820152601260248201527143616c6c6572206d75737420626520454f4160701b60448201526064016109bf565b80600b548111156118e55760405162461bcd60e51b815260206004820152602960248201527f4d617820707572636861736520706572206f6e65207472616e73616374696f6e60448201526808195e18d95959195960ba1b60648201526084016109bf565b6013544210156119335760405162461bcd60e51b815260206004820152601960248201527814d85b19481a185cc81b9bdd081899595b881cdd185c9d1959603a1b60448201526064016109bf565b6114bb826124e4565b6007546001600160a01b0361010090910416331461196c5760405162461bcd60e51b81526004016109bf9061347b565b6114486125dd565b6007546001600160a01b036101009091041633146119a45760405162461bcd60e51b81526004016109bf9061347b565b60175460ff16156119ed5760405162461bcd60e51b815260206004820152601360248201527257686974656c6973742069732061637469766560681b60448201526064016109bf565b6017805460ff1916600117905560405133907f8756637acb74261437cc71a59a5be5b0deabb5eba0dd08280d1a7d5325caff2b90600090a2565b6060600980546108d19061360c565b6001600160a01b038216331415611a8f5760405162461bcd60e51b815260206004820152601a60248201527f455243373231413a20617070726f766520746f2063616c6c657200000000000060448201526064016109bf565b3360008181526006602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b611b06848484611fa2565b611b1284848484612635565b611b2e5760405162461bcd60e51b81526004016109bf906134b0565b50505050565b60606108bc82612742565b6007546001600160a01b03610100909104163314611b6f5760405162461bcd60e51b81526004016109bf9061347b565b6001600160a01b038116611bd45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016109bf565b610fb98161248a565b600080611c23846040516bffffffffffffffffffffffff19606083901b166020820152600090603401604051602081830303815290604052805190602001209050919050565b9050611c32836016548361280f565b949350505050565b60008281526005602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b80600d54611ca78261148c60005490565b1115611cc55760405162461bcd60e51b81526004016109bf90613426565b60125433600090815260156020526040902054611ce29084612378565b1115611d235760405162461bcd60e51b815260206004820152601060248201526f115e18d95959081d1a19481b1a5b5a5d60821b60448201526064016109bf565b33600090815260156020526040902054611d3d9083612378565b3360009081526015602052604090205560115415611da057601154421115611da05760405162461bcd60e51b815260206004820152601660248201527514d85b19481a185cc81899595b88199a5b9a5cda195960521b60448201526064016109bf565b600e546001600160a01b0316611e1057601454611dbd9083612825565b3414611e0b5760405162461bcd60e51b815260206004820152601a60248201527f496e76616c69642065746820666f722070757263686173696e6700000000000060448201526064016109bf565b611e7e565b3415611e505760405162461bcd60e51b815260206004820152600f60248201526e11551217d393d517d0531313d5d151608a1b60448201526064016109bf565b611e7e3330611e6a8560145461282590919063ffffffff16565b600e546001600160a01b0316929190612831565b6114bb338361238b565b60008311611ecd5760405162461bcd60e51b8152602060048201526012602482015271496e76616c69642073746172742074696d6560701b60448201526064016109bf565b60008411611f1d5760405162461bcd60e51b815260206004820152601d60248201527f4d617820746f6b656e73207065722074782063616e6e6f74206265203000000060448201526064016109bf565b8951611f309060089060208d0190612e1e565b508851611f449060099060208c0190612e1e565b508751611f5890600a9060208b0190612e1e565b50600e80546001600160a01b0319166001600160a01b038916179055600c869055600d859055600b84905560108390556011829055611f9681611b3f565b50505050505050505050565b6000611fad826123a5565b80519091506000906001600160a01b0316336001600160a01b03161480611fe4575033611fd984610954565b6001600160a01b0316145b80611ff657508151611ff690336107bb565b9050806120605760405162461bcd60e51b815260206004820152603260248201527f455243373231413a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b60648201526084016109bf565b846001600160a01b031682600001516001600160a01b0316146120d45760405162461bcd60e51b815260206004820152602660248201527f455243373231413a207472616e736665722066726f6d20696e636f72726563746044820152651037bbb732b960d11b60648201526084016109bf565b6001600160a01b0384166121385760405162461bcd60e51b815260206004820152602560248201527f455243373231413a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b60648201526084016109bf565b6121486000848460000151611c3a565b6001600160a01b03858116600090815260046020908152604080832080546001600160801b03198082166001600160801b03928316600019018316179092558986168086528386208054938416938316600190810190931693909317909255888552600390935281842080546001600160e01b031916909117600160a01b426001600160401b03160217905590860180835291205490911661223b576121ef816000541190565b1561223b57825160008281526003602090815260409091208054918601516001600160401b0316600160a01b026001600160e01b03199092166001600160a01b03909316929092171790555b5082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4610c65565b6040516001600160a01b038316602482015260448101829052610af790849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612869565b60075460ff1661232e5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016109bf565b6007805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6000612384828461357e565b9392505050565b6114bb82826040518060200160405280600081525061293b565b60408051808201909152600080825260208201526123c4826000541190565b6124235760405162461bcd60e51b815260206004820152602a60248201527f455243373231413a206f776e657220717565727920666f72206e6f6e657869736044820152693a32b73a103a37b5b2b760b11b60648201526084016109bf565b815b6000818152600360209081526040918290208251808401909352546001600160a01b038116808452600160a01b9091046001600160401b03169183019190915215612471579392505050565b5060001901612425565b6060600a80546108d19061360c565b600780546001600160a01b03838116610100818102610100600160a81b031985161790945560405193909204169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80600d546124f58261148c60005490565b11156125135760405162461bcd60e51b81526004016109bf90613426565b60115415612566576011544211156125665760405162461bcd60e51b815260206004820152601660248201527514d85b19481a185cc81899595b88199a5b9a5cda195960521b60448201526064016109bf565b600e546001600160a01b031661258357600c54611dbd9083612825565b34156125c35760405162461bcd60e51b815260206004820152600f60248201526e11551217d393d517d0531313d5d151608a1b60448201526064016109bf565b611e7e3330611e6a85600c5461282590919063ffffffff16565b60075460ff16156126005760405162461bcd60e51b81526004016109bf90613451565b6007805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861235b3390565b60006001600160a01b0384163b1561273757604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061267990339089908890889060040161331a565b602060405180830381600087803b15801561269357600080fd5b505af19250505080156126c3575060408051601f3d908101601f191682019092526126c091810190613179565b60015b61271d573d8080156126f1576040519150601f19603f3d011682016040523d82523d6000602084013e6126f6565b606091505b5080516127155760405162461bcd60e51b81526004016109bf906134b0565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611c32565b506001949350505050565b606061274f826000541190565b6127b35760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084016109bf565b60006127bd61247b565b90508051600014156127de5760405180602001604052806000815250612384565b806127e884612948565b6040516020016127f99291906132eb565b6040516020818303038152906040529392505050565b60008261281c8584612a61565b14949350505050565b600061238482846135aa565b6040516001600160a01b0380851660248301528316604482015260648101829052611b2e9085906323b872dd60e01b906084016122ae565b60006128be826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612ae39092919063ffffffff16565b805190915015610af757808060200190518101906128dc9190613129565b610af75760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016109bf565b610af78383836001612af2565b60608161296c5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612996578061298081613647565b915061298f9050600a83613596565b9150612970565b6000816001600160401b038111156129be57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156129e8576020820181803683370190505b5090505b8415611c32576129fd6001836135c9565b9150612a0a600a86613662565b612a1590603061357e565b60f81b818381518110612a3857634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350612a5a600a86613596565b94506129ec565b600081815b8451811015612adb576000858281518110612a9157634e487b7160e01b600052603260045260246000fd5b60200260200101519050808311612ab75760008381526020829052604090209250612ac8565b600081815260208490526040902092505b5080612ad381613647565b915050612a66565b509392505050565b6060611c328484600085612cb4565b6000546001600160a01b038516612b555760405162461bcd60e51b815260206004820152602160248201527f455243373231413a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b60648201526084016109bf565b83612bb35760405162461bcd60e51b815260206004820152602860248201527f455243373231413a207175616e74697479206d75737420626520677265617465604482015267072207468616e20360c41b60648201526084016109bf565b6001600160a01b03851660008181526004602090815260408083208054600160801b6001600160801b031982166001600160801b039283168c01831690811782900483168c01909216021790558483526003909152812080546001600160e01b031916909217600160a01b426001600160401b0316021790915581905b85811015612cab5760405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a48315612c9f57612c836000888488612635565b612c9f5760405162461bcd60e51b81526004016109bf906134b0565b60019182019101612c30565b50600055610c65565b606082471015612d155760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016109bf565b6001600160a01b0385163b612d6c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016109bf565b600080866001600160a01b03168587604051612d8891906132cf565b60006040518083038185875af1925050503d8060008114612dc5576040519150601f19603f3d011682016040523d82523d6000602084013e612dca565b606091505b5091509150612dda828286612de5565b979650505050505050565b60608315612df4575081612384565b825115612e045782518084602001fd5b8160405162461bcd60e51b81526004016109bf9190613357565b828054612e2a9061360c565b90600052602060002090601f016020900481019282612e4c5760008555612e92565b82601f10612e6557805160ff1916838001178555612e92565b82800160010185558215612e92579182015b82811115612e92578251825591602001919060010190612e77565b506115a89291505b808211156115a85760008155600101612e9a565b60006001600160401b03831115612ec757612ec76136a2565b612eda601f8401601f191660200161354e565b9050828152838383011115612eee57600080fd5b828260208301376000602084830101529392505050565b600060208284031215612f16578081fd5b8135612384816136b8565b60008060408385031215612f33578081fd5b8235612f3e816136b8565b91506020830135612f4e816136b8565b809150509250929050565b600080600060608486031215612f6d578081fd5b8335612f78816136b8565b92506020840135612f88816136b8565b929592945050506040919091013590565b60008060008060808587031215612fae578081fd5b8435612fb9816136b8565b93506020850135612fc9816136b8565b92506040850135915060608501356001600160401b03811115612fea578182fd5b8501601f81018713612ffa578182fd5b61300987823560208401612eae565b91505092959194509250565b60008060408385031215613027578182fd5b8235613032816136b8565b91506020838101356001600160401b038082111561304e578384fd5b818601915086601f830112613061578384fd5b813581811115613073576130736136a2565b8060051b915061308484830161354e565b8181528481019084860184860187018b101561309e578788fd5b8795505b838610156130c05780358352600195909501949186019186016130a2565b508096505050505050509250929050565b600080604083850312156130e3578182fd5b82356130ee816136b8565b91506020830135612f4e816136cd565b60008060408385031215613110578182fd5b823561311b816136b8565b946020939093013593505050565b60006020828403121561313a578081fd5b8151612384816136cd565b600060208284031215613156578081fd5b5035919050565b60006020828403121561316e578081fd5b8135612384816136db565b60006020828403121561318a578081fd5b8151612384816136db565b6000602082840312156131a6578081fd5b81356001600160401b038111156131bb578182fd5b8201601f810184136131cb578182fd5b611c3284823560208401612eae565b6000602082840312156131eb578081fd5b81356001600160401b03811115613200578182fd5b82016101a08185031215612384578182fd5b600060208284031215613223578081fd5b5051919050565b60008060006040848603121561323e578081fd5b8335925060208401356001600160401b038082111561325b578283fd5b818601915086601f83011261326e578283fd5b81358181111561327c578384fd5b8760208260051b8501011115613290578384fd5b6020830194508093505050509250925092565b600081518084526132bb8160208601602086016135e0565b601f01601f19169290920160200192915050565b600082516132e18184602087016135e0565b9190910192915050565b600083516132fd8184602088016135e0565b8351908301906133118183602088016135e0565b01949350505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061334d908301846132a3565b9695505050505050565b60208152600061238460208301846132a3565b60408152600061337d60408301856132a3565b60208382038185015282855484600182811c9150808316806133a057607f831692505b8583108114156133be57634e487b7160e01b88526022600452602488fd5b8287526020870196508080156133db57600181146133ec57613416565b60ff19851688528688019550613416565b60008b815260209020895b858110156134105781548a8201529084019088016133f7565b89019650505b50939a9950505050505050505050565b6020808252601190820152704578636565646564204d6178204e46547360781b604082015260600190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526033908201527f455243373231413a207472616e7366657220746f206e6f6e204552433732315260408201527232b1b2b4bb32b91034b6b83632b6b2b73a32b960691b606082015260800190565b6000808335601e19843603018112613519578283fd5b8301803591506001600160401b03821115613532578283fd5b60200191503681900382131561354757600080fd5b9250929050565b604051601f8201601f191681016001600160401b0381118282101715613576576135766136a2565b604052919050565b6000821982111561359157613591613676565b500190565b6000826135a5576135a561368c565b500490565b60008160001904831182151516156135c4576135c4613676565b500290565b6000828210156135db576135db613676565b500390565b60005b838110156135fb5781810151838201526020016135e3565b83811115611b2e5750506000910152565b600181811c9082168061362057607f821691505b6020821081141561364157634e487b7160e01b600052602260045260246000fd5b50919050565b600060001982141561365b5761365b613676565b5060010190565b6000826136715761367161368c565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610fb957600080fd5b8015158114610fb957600080fd5b6001600160e01b031981168114610fb957600080fdfea264697066735822122055ce1d98662bb16f8e1b6d0b678ff0d2322038daa22744c81cca13f9f2f3cd8b64736f6c63430008040033
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.