ERC-721
Overview
Max Total Supply
6,969 ⌐◧-◨
Holders
445
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
10 ⌐◧-◨Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
NounishFish
Compiler Version
v0.8.10+commit.fc410830
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
pragma solidity ^0.8.10; //SPDX-License-Identifier: MIT //Contract developed by: @moonfarm_eth import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/finance/PaymentSplitter.sol"; import "./ERC721A.sol"; // +-- . . . . . . . . . . . . . . . . . . . . --+ // | | // // . `++//++../+` . // `/+hhhhssooo+` // . `:/hhyyyy++o s. . // :ddyyyy++ss` // . :ddhy++dd:-----` . // :dh++yyyyyyhhhh:.` // . :ddys----//yyyyyy- . // `:dy-/yyyyyyhhhh-` // . _______ .__ .__ ___________.__ .__ . // \ \ ____ __ __ ____ |__| _____| |__ \_ _____/|__| _____| |__ // . / | \ / _ \| | \/ \| |/ ___/ | \ | __) | |/ ___/ | \ . // / | ( <_> ) | / | \ |\___ \| Y \| \ | |\___ \| Y \ // . \____|__ /\____/|____/|___| /__/____ >___| /\___ / |__/____ >___| / . // \/ \/ \/ \/ \/ \/ \/ // . :osys/:`/ddooooyyoo . // odhs+:-`:hhddssssdd` // . odhs+:-`-++sshhhhdd+/` . // odhs+:-`.----oohhddhh/:` // . odhs+:-``````--ooyyoohh/-` . // odhso+:..```` ------+ohd: // . odhshdy--````` .-yd/.` . // `.sdhyhdy:-``````` oyhd: // . shddddddy::......... ````oyhd/`` . // shhyyyhdyyyyyyyyyyy/ /yyyhhhhyyo // . `.ohhdddyhh `dhhh+ +hd `hhhy . // .-:hhdhhh `dyhhyoyhm `yhhy // . .hhddhh `dyhhs+yhm `yhhy . // `::::hhmmmmhhhhsoyhdmmmdhhhy // . :///////ddhhhd+///////: . // ++++++` // | | // +-- . . . . . . . . . . . . . . . . . . . . --+ contract NounishFish is ERC721A, Ownable, Pausable, PaymentSplitter { using SafeMath for uint256; // max amount of tokens in the collection uint256 public maxTokens; // price for first 400 tokens uint256 public tokenPrice1 = 0.0069 ether; // price per token minted uint256 public tokenPrice2 = 0.01 ether; // max amount of tokens minted in one transaction uint256 public maxTokensPerTxn; // amount of reserved tokens uint256 public reservedTokens; // minted reserved tokens uint256 public mintedReservedTokens; // ### active sale ### // public-sale allows anyone to mint // through publicMint() bool public publicSaleIsActive; // ### // saves the baseURI internally string private baseURI; // saves the baseURI for unrevealed tokens internally string private unrevealedBaseURI; // save reveal seed uint256 public seed; // URI for a specific token mapping(uint256 => string) private _tokenURIs; address[] payees = [ 0xDe87D0C974AD57EF203d0F3e7bF9C43c8BFE6Ec0, 0xfB4e5480dF2eff848F356e6d99fd5b9312cCcAAc ]; uint256[] payeeShares = [85, 15]; constructor( uint256 _maxTokens, uint8 _maxTokensPerTxn, uint256 _reservedTokens ) ERC721A("NounishFish", unicode"⌐◧-◨") PaymentSplitter(payees, payeeShares) { maxTokens = _maxTokens; maxTokensPerTxn = _maxTokensPerTxn; reservedTokens = _reservedTokens; } // *************** // *** Minting *** // *************** /** * Public minting, everyone can mint as long as publicSaleIsActive = true */ function publicMint(uint8 amount) external payable activeSale(publicSaleIsActive) payment(amount) amountWithinMaxTokens(amount) { mint(amount, msg.sender); } /** * Free token minting for the owner */ function mintReservedTokens(uint8 amount, address to) external onlyOwner { require( mintedReservedTokens.add(amount) <= reservedTokens, "Can not mint more than reserved" ); uint256 batches = amount / maxTokensPerTxn; for (uint8 i; i < batches; i++) { _safeMint(to, maxTokensPerTxn); } uint256 remainder = amount - batches.mul(maxTokensPerTxn); if (remainder > 0) { _safeMint(to, remainder); } mintedReservedTokens += amount; } function mint(uint8 amount, address to) private whenNotPaused { require(to != address(0), "No address"); require(amount <= maxTokensPerTxn, "Too many mints in a txn"); _safeMint(to, amount); } // ********************** // *** Administration *** // ********************** /** * set which sale(s) should be active or inactive */ function setPublicSale(bool _publicSaleIsActive) public onlyOwner { require( mintedReservedTokens == reservedTokens, "mint all reserved tokens first" ); publicSaleIsActive = _publicSaleIsActive; } /** * set minting price * _tokenPrice1: cost for first 400 tokens * _tokenPrice2: normal cost for tokens */ function setMintPrice(uint256 _tokenPrice1, uint256 _tokenPrice2) public onlyOwner { tokenPrice1 = _tokenPrice1; tokenPrice2 = _tokenPrice2; } /** * set a specific tokens URI * note: make sure you use the tokenId and not the generated reveal-id */ function setTokenURI(uint256 tokenId, string memory _tokenURI) public onlyOwner { require( _exists(tokenId), "ERC721Metadata: URI set of nonexistent token" ); _tokenURIs[tokenId] = _tokenURI; } /** * set the baseURI for the collection */ function setUnrevealedBaseURI(string memory _URI) external onlyOwner { unrevealedBaseURI = _URI; } /** * set the baseURI for the collection */ function setBaseURI(string memory _URI) external onlyOwner { baseURI = _URI; } /** * call to reveal tokens */ function revealTokens() public onlyOwner { require(seed == 0, "Can only reveal once"); seed = uint256( keccak256( abi.encodePacked( block.difficulty, block.timestamp, block.number ) ) ) % (maxTokens - reservedTokens); } /** * pause contract */ function pause() public onlyOwner { _pause(); } /** * unpause contract */ function unpause() public onlyOwner { _unpause(); } // *************** // **** Utils **** // *************** /** * get the baseURI internally */ function _baseURI() internal view virtual override returns (string memory) { return baseURI; } /** * get the tokenURI based on seeds generated in reveal * note: returns unrevealedBaseURI if tokenId hasn't been revealed yet */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require( _exists(tokenId), "ERC721Metadata: URI query for nonexistent token" ); if (seed == 0) { return unrevealedBaseURI; } string memory base = _baseURI(); string memory _tokenURI = _tokenURIs[tokenId]; // If there is a specific token URI, return the token URI. if (bytes(_tokenURI).length > 0) { return _tokenURI; } // Don't scramble reserved tokens if (tokenId < reservedTokens) { return string(abi.encodePacked(base, uint2str(tokenId))); } // Calculate revealed id from rotation uint256 revealedId = (seed + tokenId) % (maxTokens - reservedTokens); // Bundle id with base uri return string( abi.encodePacked(base, uint2str(revealedId + reservedTokens)) ); } /** * convert int to str */ function uint2str(uint256 _i) internal pure returns (string memory _uintAsString) { if (_i == 0) { return "0"; } uint256 j = _i; uint256 len; while (j != 0) { len++; j /= 10; } bytes memory bstr = new bytes(len); uint256 k = len; while (_i != 0) { k = k - 1; uint8 temp = (48 + uint8(_i - (_i / 10) * 10)); bytes1 b1 = bytes1(temp); bstr[k] = b1; _i /= 10; } return string(bstr); } // ***************** // ** Extensions *** // ***************** /** * @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 override { super._beforeTokenTransfers(from, to, startTokenId, quantity); require(!paused(), "Pausable: token transfer while paused"); } // ***************** // *** Modifiers *** // ***************** modifier activeSale(bool sale) { require(sale, "this sale is not active"); _; } modifier payment(uint8 amount) { bool first400 = totalSupply() < 400 && tokenPrice1.mul(amount) <= msg.value; require( first400 || tokenPrice2.mul(amount) <= msg.value, "Not enough ether to mint" ); _; } modifier amountWithinMaxTokens(uint8 amount) { require( totalSupply().add(amount) <= maxTokens.sub(reservedTokens.sub(mintedReservedTokens)), "Not enough tokens left to mint" ); _; } }
// SPDX-License-Identifier: MIT 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() { _setOwner(_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 { _setOwner(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"); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT 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 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 no longer needed starting with Solidity 0.8. 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 pragma solidity ^0.8.0; import "../utils/Address.sol"; import "../utils/Context.sol"; import "../utils/math/SafeMath.sol"; /** * @title PaymentSplitter * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware * that the Ether will be split in this way, since it is handled transparently by the contract. * * The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each * account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim * an amount proportional to the percentage of total shares they were assigned. * * `PaymentSplitter` follows a _pull payment_ model. This means that payments are not automatically forwarded to the * accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release} * function. */ contract PaymentSplitter is Context { event PayeeAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event PaymentReceived(address from, uint256 amount); uint256 private _totalShares; uint256 private _totalReleased; mapping(address => uint256) private _shares; mapping(address => uint256) private _released; address[] private _payees; /** * @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at * the matching position in the `shares` array. * * All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no * duplicates in `payees`. */ constructor(address[] memory payees, uint256[] memory shares_) payable { require(payees.length == shares_.length, "PaymentSplitter: payees and shares length mismatch"); require(payees.length > 0, "PaymentSplitter: no payees"); for (uint256 i = 0; i < payees.length; i++) { _addPayee(payees[i], shares_[i]); } } /** * @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully * reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the * reliability of the events, and not the actual splitting of Ether. * * To learn more about this see the Solidity documentation for * https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback * functions]. */ receive() external payable virtual { emit PaymentReceived(_msgSender(), msg.value); } /** * @dev Getter for the total shares held by payees. */ function totalShares() public view returns (uint256) { return _totalShares; } /** * @dev Getter for the total amount of Ether already released. */ function totalReleased() public view returns (uint256) { return _totalReleased; } /** * @dev Getter for the amount of shares held by an account. */ function shares(address account) public view returns (uint256) { return _shares[account]; } /** * @dev Getter for the amount of Ether already released to a payee. */ function released(address account) public view returns (uint256) { return _released[account]; } /** * @dev Getter for the address of the payee number `index`. */ function payee(uint256 index) public view returns (address) { return _payees[index]; } /** * @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the * total shares and their previous withdrawals. */ function release(address payable account) public virtual { require(_shares[account] > 0, "PaymentSplitter: account has no shares"); uint256 totalReceived = address(this).balance + _totalReleased; uint256 payment = (totalReceived * _shares[account]) / _totalShares - _released[account]; require(payment != 0, "PaymentSplitter: account is not due payment"); _released[account] = _released[account] + payment; _totalReleased = _totalReleased + payment; Address.sendValue(account, payment); emit PaymentReleased(account, payment); } /** * @dev Add a new payee to the contract. * @param account The address of the payee to add. * @param shares_ The number of shares owned by the payee. */ function _addPayee(address account, uint256 shares_) private { require(account != address(0), "PaymentSplitter: account is the zero address"); require(shares_ > 0, "PaymentSplitter: shares are 0"); require(_shares[account] == 0, "PaymentSplitter: account already has shares"); _payees.push(account); _shares[account] = shares_; _totalShares = _totalShares + shares_; emit PayeeAdded(account, shares_); } }
// SPDX-License-Identifier: MIT // Creator: Chiru Labs pragma solidity ^0.8.4; import '@openzeppelin/contracts/token/ERC721/IERC721.sol'; import '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol'; import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol'; import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol'; import '@openzeppelin/contracts/utils/Address.sol'; import '@openzeppelin/contracts/utils/Context.sol'; import '@openzeppelin/contracts/utils/Strings.sol'; import '@openzeppelin/contracts/utils/introspection/ERC165.sol'; error ApprovalCallerNotOwnerNorApproved(); error ApprovalQueryForNonexistentToken(); error ApproveToCaller(); error ApprovalToCurrentOwner(); error BalanceQueryForZeroAddress(); error MintedQueryForZeroAddress(); error BurnedQueryForZeroAddress(); error MintToZeroAddress(); error MintZeroQuantity(); error OwnerIndexOutOfBounds(); error OwnerQueryForNonexistentToken(); error TokenIndexOutOfBounds(); error TransferCallerNotOwnerNorApproved(); error TransferFromIncorrectOwner(); error TransferToNonERC721ReceiverImplementer(); error TransferToZeroAddress(); error URIQueryForNonexistentToken(); /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata 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..). * * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * * Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721A is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps track of the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; } // Compiler will pack this into a single 256bit word. struct AddressData { // Realistically, 2**64-1 is more than enough. uint64 balance; // Keeps track of mint count with minimal overhead for tokenomics. uint64 numberMinted; // Keeps track of burn count with minimal overhead for tokenomics. uint64 numberBurned; } // The tokenId of the next token to be minted. uint256 internal _currentIndex; // The number of tokens burned. uint256 internal _burnCounter; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. See ownershipOf implementation for details. mapping(uint256 => TokenOwnership) internal _ownerships; // Mapping owner address to address data mapping(address => AddressData) private _addressData; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view override returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than _currentIndex times unchecked { return _currentIndex - _burnCounter; } } /** * @dev See {IERC721Enumerable-tokenByIndex}. * 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 tokenByIndex(uint256 index) public view override returns (uint256) { uint256 numMintedSoFar = _currentIndex; uint256 tokenIdsIdx; // 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.burned) { if (tokenIdsIdx == index) { return i; } tokenIdsIdx++; } } } revert TokenIndexOutOfBounds(); } /** * @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) { if (index >= balanceOf(owner)) revert OwnerIndexOutOfBounds(); uint256 numMintedSoFar = _currentIndex; 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.burned) { continue; } if (ownership.addr != address(0)) { currOwnershipAddr = ownership.addr; } if (currOwnershipAddr == owner) { if (tokenIdsIdx == index) { return i; } tokenIdsIdx++; } } } // Execution should never reach this point. revert(); } /** * @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) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return uint256(_addressData[owner].balance); } function _numberMinted(address owner) internal view returns (uint256) { if (owner == address(0)) revert MintedQueryForZeroAddress(); return uint256(_addressData[owner].numberMinted); } function _numberBurned(address owner) internal view returns (uint256) { if (owner == address(0)) revert BurnedQueryForZeroAddress(); return uint256(_addressData[owner].numberBurned); } /** * Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around in the collection over time. */ function ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) { uint256 curr = tokenId; unchecked { if (curr < _currentIndex) { TokenOwnership memory ownership = _ownerships[curr]; if (!ownership.burned) { if (ownership.addr != address(0)) { return ownership; } // Invariant: // There will always be an ownership that has an address and is not burned // before an ownership that does not have an address and is not burned. // Hence, curr will not underflow. while (true) { curr--; ownership = _ownerships[curr]; if (ownership.addr != address(0)) { return ownership; } } } } } revert OwnerQueryForNonexistentToken(); } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view override returns (address) { return ownershipOf(tokenId).addr; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); string memory baseURI = _baseURI(); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ''; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ''; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public override { address owner = ERC721A.ownerOf(tokenId); if (to == owner) revert ApprovalToCurrentOwner(); if (_msgSender() != owner && !isApprovedForAll(owner, _msgSender())) { revert ApprovalCallerNotOwnerNorApproved(); } _approve(to, tokenId, owner); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public override { if (operator == _msgSender()) revert ApproveToCaller(); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ''); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { _transfer(from, to, tokenId); if (!_checkOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), */ function _exists(uint256 tokenId) internal view returns (bool) { return tokenId < _currentIndex && !_ownerships[tokenId].burned; } function _safeMint(address to, uint256 quantity) internal { _safeMint(to, quantity, ''); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal { _mint(to, quantity, _data, true); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _mint( address to, uint256 quantity, bytes memory _data, bool safe ) internal { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1 // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1 unchecked { _addressData[to].balance += uint64(quantity); _addressData[to].numberMinted += uint64(quantity); _ownerships[startTokenId].addr = to; _ownerships[startTokenId].startTimestamp = uint64(block.timestamp); uint256 updatedIndex = startTokenId; for (uint256 i; i < quantity; i++) { emit Transfer(address(0), to, updatedIndex); if (safe && !_checkOnERC721Received(address(0), to, updatedIndex, _data)) { revert TransferToNonERC721ReceiverImplementer(); } updatedIndex++; } _currentIndex = updatedIndex; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) private { TokenOwnership memory prevOwnership = ownershipOf(tokenId); bool isApprovedOrOwner = (_msgSender() == prevOwnership.addr || isApprovedForAll(prevOwnership.addr, _msgSender()) || getApproved(tokenId) == _msgSender()); if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved(); if (prevOwnership.addr != from) revert TransferFromIncorrectOwner(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, prevOwnership.addr); // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256. unchecked { _addressData[from].balance -= 1; _addressData[to].balance += 1; _ownerships[tokenId].addr = to; _ownerships[tokenId].startTimestamp = uint64(block.timestamp); // If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it. // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls. uint256 nextTokenId = tokenId + 1; if (_ownerships[nextTokenId].addr == address(0)) { // This will suffice for checking _exists(nextTokenId), // as a burned slot cannot contain the zero address. if (nextTokenId < _currentIndex) { _ownerships[nextTokenId].addr = prevOwnership.addr; _ownerships[nextTokenId].startTimestamp = prevOwnership.startTimestamp; } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { TokenOwnership memory prevOwnership = ownershipOf(tokenId); _beforeTokenTransfers(prevOwnership.addr, address(0), tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, prevOwnership.addr); // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256. unchecked { _addressData[prevOwnership.addr].balance -= 1; _addressData[prevOwnership.addr].numberBurned += 1; // Keep track of who burned the token, and the timestamp of burning. _ownerships[tokenId].addr = prevOwnership.addr; _ownerships[tokenId].startTimestamp = uint64(block.timestamp); _ownerships[tokenId].burned = true; // If the ownership slot of tokenId+1 is not explicitly set, that means the burn initiator owns it. // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls. uint256 nextTokenId = tokenId + 1; if (_ownerships[nextTokenId].addr == address(0)) { // This will suffice for checking _exists(nextTokenId), // as a burned slot cannot contain the zero address. if (nextTokenId < _currentIndex) { _ownerships[nextTokenId].addr = prevOwnership.addr; _ownerships[nextTokenId].startTimestamp = prevOwnership.startTimestamp; } } } emit Transfer(prevOwnership.addr, address(0), tokenId); _afterTokenTransfers(prevOwnership.addr, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve( address to, uint256 tokenId, address owner ) private { _tokenApprovals[tokenId] = to; emit Approval(owner, to, tokenId); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting. * And also called before burning one token. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes * minting. * And also called after one token has been burned. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} }
// SPDX-License-Identifier: MIT 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 pragma solidity ^0.8.0; /** * @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 * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 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 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 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 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 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 tokenId); /** * @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 pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"uint256","name":"_maxTokens","type":"uint256"},{"internalType":"uint8","name":"_maxTokensPerTxn","type":"uint8"},{"internalType":"uint256","name":"_reservedTokens","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApprovalToCurrentOwner","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerIndexOutOfBounds","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"TokenIndexOutOfBounds","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"}],"name":"PayeeAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentReleased","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"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxTokensPerTxn","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"amount","type":"uint8"},{"internalType":"address","name":"to","type":"address"}],"name":"mintReservedTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintedReservedTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"payee","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"amount","type":"uint8"}],"name":"publicMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"publicSaleIsActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"account","type":"address"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"released","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reservedTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"revealTokens","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":"seed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"_URI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenPrice1","type":"uint256"},{"internalType":"uint256","name":"_tokenPrice2","type":"uint256"}],"name":"setMintPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_publicSaleIsActive","type":"bool"}],"name":"setPublicSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"_tokenURI","type":"string"}],"name":"setTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_URI","type":"string"}],"name":"setUnrevealedBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"shares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"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":[],"name":"tokenPrice1","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenPrice2","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":"totalReleased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
6618838370f34000600f55662386f26fc1000060105560c060405273de87d0c974ad57ef203d0f3e7bf9c43c8bfe6ec0608090815273fb4e5480df2eff848f356e6d99fd5b9312cccaac60a0526200005c90601990600262000587565b506040805180820190915260558152600f60208201526200008290601a906002620005f1565b503480156200009057600080fd5b506040516200323e3803806200323e833981016040819052620000b391620006c8565b60198054806020026020016040519081016040528092919081815260200182805480156200010b57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311620000ec575b5050505050601a8054806020026020016040519081016040528092919081815260200182805480156200015e57602002820191906000526020600020905b81548152602001906001019080831162000149575b5050604080518082018252600b81526a09cdeeadcd2e6d08cd2e6d60ab1b60208083019182528351808501909452600a8452691c51921c52f4e5bc52f560b31b908401528151919550919350620001ba92506002919062000634565b508051620001d090600390602084019062000634565b505050620001ed620001e76200034360201b60201c565b62000347565b6008805460ff60a01b1916905580518251146200026c5760405162461bcd60e51b815260206004820152603260248201527f5061796d656e7453706c69747465723a2070617965657320616e6420736861726044820152710cae640d8cadccee8d040dad2e6dac2e8c6d60731b60648201526084015b60405180910390fd5b6000825111620002bf5760405162461bcd60e51b815260206004820152601a60248201527f5061796d656e7453706c69747465723a206e6f20706179656573000000000000604482015260640162000263565b60005b82518110156200032b5762000316838281518110620002e557620002e562000709565b602002602001015183838151811062000302576200030262000709565b60200260200101516200039960201b60201c565b80620003228162000735565b915050620002c2565b505050600e9290925560ff16601155601255620007ab565b3390565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b038216620004065760405162461bcd60e51b815260206004820152602c60248201527f5061796d656e7453706c69747465723a206163636f756e74206973207468652060448201526b7a65726f206164647265737360a01b606482015260840162000263565b60008111620004585760405162461bcd60e51b815260206004820152601d60248201527f5061796d656e7453706c69747465723a20736861726573206172652030000000604482015260640162000263565b6001600160a01b0382166000908152600b602052604090205415620004d45760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e7420616c726561647960448201526a206861732073686172657360a81b606482015260840162000263565b600d8054600181019091557fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb50180546001600160a01b0319166001600160a01b0384169081179091556000908152600b602052604090208190556009546200053e90829062000753565b600955604080516001600160a01b0384168152602081018390527f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac910160405180910390a15050565b828054828255906000526020600020908101928215620005df579160200282015b82811115620005df57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190620005a8565b50620005ed929150620006b1565b5090565b828054828255906000526020600020908101928215620005df579160200282015b82811115620005df578251829060ff1690559160200191906001019062000612565b82805462000642906200076e565b90600052602060002090601f016020900481019282620006665760008555620005df565b82601f106200068157805160ff1916838001178555620005df565b82800160010185558215620005df579182015b82811115620005df57825182559160200191906001019062000694565b5b80821115620005ed5760008155600101620006b2565b600080600060608486031215620006de57600080fd5b83519250602084015160ff81168114620006f757600080fd5b80925050604084015190509250925092565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006000198214156200074c576200074c6200071f565b5060010190565b600082198211156200076957620007696200071f565b500190565b600181811c908216806200078357607f821691505b60208210811415620007a557634e487b7160e01b600052602260045260246000fd5b50919050565b612a8380620007bb6000396000f3fe60806040526004361061026b5760003560e01c80636352211e11610144578063a22cb465116100b6578063e33b7de31161007a578063e33b7de31461075d578063e831574214610772578063e985e9c514610788578063eb74cc7d146107d1578063f2fde38b146107e7578063f34341c71461080757600080fd5b8063a22cb465146106a7578063b88d4fde146106c7578063c87b56dd146106e7578063ce7c2ac214610707578063e185a2cc1461073d57600080fd5b80638456cb59116101085780638456cb59146105f6578063858e83b51461060b5780638b83209b1461061e5780638da5cb5b1461063e57806395d89b411461065c5780639852595c1461067157600080fd5b80636352211e1461057557806370a08231146105955780637127beaa146105b5578063715018a6146105cb5780637d94792a146105e057600080fd5b806319165587116101dd5780633f4ba83a116101a15780633f4ba83a146104c157806342842e0e146104d65780634f6ccce7146104f657806355f804b3146105165780635aca1bb6146105365780635c975abb1461055657600080fd5b8063191655871461043757806323b872dd146104575780632f745c59146104775780633a98ef39146104975780633ba5939d146104ac57600080fd5b8063095ea7b31161022f578063095ea7b31461038e57806309c241f1146103ae5780630fcf2e75146103ce57806315a55347146103e8578063162094c4146103fe57806318160ddd1461041e57600080fd5b806301ffc9a7146102b95780630296c439146102ee5780630442bfa81461031257806306fdde0314610334578063081812fc1461035657600080fd5b366102b4577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77033604080516001600160a01b0390921682523460208301520160405180910390a1005b600080fd5b3480156102c557600080fd5b506102d96102d4366004612450565b61081d565b60405190151581526020015b60405180910390f35b3480156102fa57600080fd5b50610304600f5481565b6040519081526020016102e5565b34801561031e57600080fd5b5061033261032d36600461246d565b61088a565b005b34801561034057600080fd5b506103496108c8565b6040516102e591906124e7565b34801561036257600080fd5b506103766103713660046124fa565b61095a565b6040516001600160a01b0390911681526020016102e5565b34801561039a57600080fd5b506103326103a9366004612528565b61099e565b3480156103ba57600080fd5b506103326103c936600461256a565b610a2c565b3480156103da57600080fd5b506014546102d99060ff1681565b3480156103f457600080fd5b5061030460125481565b34801561040a57600080fd5b5061033261041936600461264c565b610b4f565b34801561042a57600080fd5b5060015460005403610304565b34801561044357600080fd5b50610332610452366004612692565b610c02565b34801561046357600080fd5b506103326104723660046126af565b610dd3565b34801561048357600080fd5b50610304610492366004612528565b610dde565b3480156104a357600080fd5b50600954610304565b3480156104b857600080fd5b50610332610ed1565b3480156104cd57600080fd5b50610332610f95565b3480156104e257600080fd5b506103326104f13660046126af565b610fc9565b34801561050257600080fd5b506103046105113660046124fa565b610fe4565b34801561052257600080fd5b506103326105313660046126f0565b611085565b34801561054257600080fd5b50610332610551366004612734565b6110c6565b34801561056257600080fd5b50600854600160a01b900460ff166102d9565b34801561058157600080fd5b506103766105903660046124fa565b611156565b3480156105a157600080fd5b506103046105b0366004612692565b611168565b3480156105c157600080fd5b5061030460105481565b3480156105d757600080fd5b506103326111b6565b3480156105ec57600080fd5b5061030460175481565b34801561060257600080fd5b506103326111ea565b61033261061936600461274f565b61121c565b34801561062a57600080fd5b506103766106393660046124fa565b6113a6565b34801561064a57600080fd5b506008546001600160a01b0316610376565b34801561066857600080fd5b506103496113d6565b34801561067d57600080fd5b5061030461068c366004612692565b6001600160a01b03166000908152600c602052604090205490565b3480156106b357600080fd5b506103326106c236600461276a565b6113e5565b3480156106d357600080fd5b506103326106e236600461279f565b61147b565b3480156106f357600080fd5b506103496107023660046124fa565b6114b5565b34801561071357600080fd5b50610304610722366004612692565b6001600160a01b03166000908152600b602052604090205490565b34801561074957600080fd5b506103326107583660046126f0565b611720565b34801561076957600080fd5b50600a54610304565b34801561077e57600080fd5b50610304600e5481565b34801561079457600080fd5b506102d96107a336600461281e565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b3480156107dd57600080fd5b5061030460135481565b3480156107f357600080fd5b50610332610802366004612692565b61175d565b34801561081357600080fd5b5061030460115481565b60006001600160e01b031982166380ac58cd60e01b148061084e57506001600160e01b03198216635b5e139f60e01b145b8061086957506001600160e01b0319821663780e9d6360e01b145b8061088457506301ffc9a760e01b6001600160e01b03198316145b92915050565b6008546001600160a01b031633146108bd5760405162461bcd60e51b81526004016108b49061283c565b60405180910390fd5b600f91909155601055565b6060600280546108d790612871565b80601f016020809104026020016040519081016040528092919081815260200182805461090390612871565b80156109505780601f1061092557610100808354040283529160200191610950565b820191906000526020600020905b81548152906001019060200180831161093357829003601f168201915b5050505050905090565b6000610965826117f8565b610982576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b60006109a982611156565b9050806001600160a01b0316836001600160a01b031614156109de5760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b038216148015906109fe57506109fc81336107a3565b155b15610a1c576040516367d9dca160e11b815260040160405180910390fd5b610a27838383611823565b505050565b6008546001600160a01b03163314610a565760405162461bcd60e51b81526004016108b49061283c565b601254601354610a699060ff851661187f565b1115610ab75760405162461bcd60e51b815260206004820152601f60248201527f43616e206e6f74206d696e74206d6f7265207468616e2072657365727665640060448201526064016108b4565b60006011548360ff16610aca91906128d8565b905060005b818160ff161015610af857610ae683601154611892565b80610af0816128ec565b915050610acf565b506000610b10601154836118ac90919063ffffffff16565b610b1d9060ff861661290c565b90508015610b2f57610b2f8382611892565b8360ff1660136000828254610b449190612923565b909155505050505050565b6008546001600160a01b03163314610b795760405162461bcd60e51b81526004016108b49061283c565b610b82826117f8565b610be35760405162461bcd60e51b815260206004820152602c60248201527f4552433732314d657461646174613a2055524920736574206f66206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016108b4565b60008281526018602090815260409091208251610a27928401906123a1565b6001600160a01b0381166000908152600b6020526040902054610c765760405162461bcd60e51b815260206004820152602660248201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060448201526573686172657360d01b60648201526084016108b4565b6000600a5447610c869190612923565b6001600160a01b0383166000908152600c6020908152604080832054600954600b909352908320549394509192610cbd908561293b565b610cc791906128d8565b610cd1919061290c565b905080610d345760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060448201526a191d59481c185e5b595b9d60aa1b60648201526084016108b4565b6001600160a01b0383166000908152600c6020526040902054610d58908290612923565b6001600160a01b0384166000908152600c6020526040902055600a54610d7f908290612923565b600a55610d8c83826118b8565b604080516001600160a01b0385168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056910160405180910390a1505050565b610a278383836119d1565b6000610de983611168565b8210610e08576040516306ed618760e11b815260040160405180910390fd5b600080549080805b83811015610ecb57600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff161580159282019290925290610e775750610ec3565b80516001600160a01b031615610e8c57805192505b876001600160a01b0316836001600160a01b03161415610ec15786841415610eba5750935061088492505050565b6001909301925b505b600101610e10565b50600080fd5b6008546001600160a01b03163314610efb5760405162461bcd60e51b81526004016108b49061283c565b60175415610f425760405162461bcd60e51b815260206004820152601460248201527343616e206f6e6c792072657665616c206f6e636560601b60448201526064016108b4565b601254600e54610f52919061290c565b6040805144602082015242918101919091524360608201526080016040516020818303038152906040528051906020012060001c610f90919061295a565b601755565b6008546001600160a01b03163314610fbf5760405162461bcd60e51b81526004016108b49061283c565b610fc7611bef565b565b610a278383836040518060200160405280600081525061147b565b6000805481805b8281101561106b57600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff16151591810182905290611062578583141561105b5750949350505050565b6001909201915b50600101610feb565b506040516329c8c00760e21b815260040160405180910390fd5b6008546001600160a01b031633146110af5760405162461bcd60e51b81526004016108b49061283c565b80516110c29060159060208401906123a1565b5050565b6008546001600160a01b031633146110f05760405162461bcd60e51b81526004016108b49061283c565b601254601354146111435760405162461bcd60e51b815260206004820152601e60248201527f6d696e7420616c6c20726573657276656420746f6b656e73206669727374000060448201526064016108b4565b6014805460ff1916911515919091179055565b600061116182611c8c565b5192915050565b60006001600160a01b038216611191576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600560205260409020546001600160401b031690565b6008546001600160a01b031633146111e05760405162461bcd60e51b81526004016108b49061283c565b610fc76000611da5565b6008546001600160a01b031633146112145760405162461bcd60e51b81526004016108b49061283c565b610fc7611df7565b60145460ff168061126f5760405162461bcd60e51b815260206004820152601760248201527f746869732073616c65206973206e6f742061637469766500000000000000000060448201526064016108b4565b8160006101906112826001546000540390565b10801561129f5750600f54349061129c9060ff85166118ac565b11155b905080806112bd575060105434906112ba9060ff85166118ac565b11155b6113095760405162461bcd60e51b815260206004820152601860248201527f4e6f7420656e6f75676820657468657220746f206d696e74000000000000000060448201526064016108b4565b8361132d611324601354601254611e7f90919063ffffffff16565b600e5490611e7f565b6113478260ff166113416001546000540390565b9061187f565b11156113955760405162461bcd60e51b815260206004820152601e60248201527f4e6f7420656e6f75676820746f6b656e73206c65667420746f206d696e74000060448201526064016108b4565b61139f8533611e8b565b5050505050565b6000600d82815481106113bb576113bb61296e565b6000918252602090912001546001600160a01b031692915050565b6060600380546108d790612871565b6001600160a01b03821633141561140f5760405163b06307db60e01b815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6114868484846119d1565b61149284848484611f7d565b6114af576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b60606114c0826117f8565b6115245760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084016108b4565b6017546115bd576016805461153890612871565b80601f016020809104026020016040519081016040528092919081815260200182805461156490612871565b80156115b15780601f10611586576101008083540402835291602001916115b1565b820191906000526020600020905b81548152906001019060200180831161159457829003601f168201915b50505050509050919050565b60006115c761207d565b6000848152601860205260408120805492935090916115e590612871565b80601f016020809104026020016040519081016040528092919081815260200182805461161190612871565b801561165e5780601f106116335761010080835404028352916020019161165e565b820191906000526020600020905b81548152906001019060200180831161164157829003601f168201915b50505050509050600081511115611676579392505050565b6012548410156116b3578161168a8561208c565b60405160200161169b929190612984565b60405160208183030381529060405292505050919050565b6000601254600e546116c5919061290c565b856017546116d39190612923565b6116dd919061295a565b9050826116f6601254836116f19190612923565b61208c565b604051602001611707929190612984565b6040516020818303038152906040529350505050919050565b6008546001600160a01b0316331461174a5760405162461bcd60e51b81526004016108b49061283c565b80516110c29060169060208401906123a1565b6008546001600160a01b031633146117875760405162461bcd60e51b81526004016108b49061283c565b6001600160a01b0381166117ec5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016108b4565b6117f581611da5565b50565b6000805482108015610884575050600090815260046020526040902054600160e01b900460ff161590565b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600061188b8284612923565b9392505050565b6110c28282604051806020016040528060008152506121b4565b600061188b828461293b565b804710156119085760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016108b4565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611955576040519150601f19603f3d011682016040523d82523d6000602084013e61195a565b606091505b5050905080610a275760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016108b4565b60006119dc82611c8c565b80519091506000906001600160a01b0316336001600160a01b03161480611a0a57508151611a0a90336107a3565b80611a25575033611a1a8461095a565b6001600160a01b0316145b905080611a4557604051632ce44b5f60e11b815260040160405180910390fd5b846001600160a01b031682600001516001600160a01b031614611a7a5760405162a1148160e81b815260040160405180910390fd5b6001600160a01b038416611aa157604051633a954ecd60e21b815260040160405180910390fd5b611aae85858560016121c1565b611abe6000848460000151611823565b6001600160a01b038581166000908152600560209081526040808320805467ffffffffffffffff198082166001600160401b0392831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600490945282852080546001600160e01b031916909417600160a01b429092169190910217909255908601808352912054909116611ba857600054811015611ba857825160008281526004602090815260409091208054918601516001600160401b0316600160a01b026001600160e01b03199092166001600160a01b03909316929092171790555b5082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461139f565b600854600160a01b900460ff16611c3f5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016108b4565b6008805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6040805160608101825260008082526020820181905291810182905290548290811015611d8c57600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff16151591810182905290611d8a5780516001600160a01b031615611d21579392505050565b5060001901600081815260046020908152604091829020825160608101845290546001600160a01b038116808352600160a01b82046001600160401b031693830193909352600160e01b900460ff1615159281019290925215611d85579392505050565b611d21565b505b604051636f96cda160e11b815260040160405180910390fd5b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600854600160a01b900460ff1615611e445760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016108b4565b6008805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611c6f3390565b600061188b828461290c565b600854600160a01b900460ff1615611ed85760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016108b4565b6001600160a01b038116611f1b5760405162461bcd60e51b815260206004820152600a6024820152694e6f206164647265737360b01b60448201526064016108b4565b6011548260ff161115611f705760405162461bcd60e51b815260206004820152601760248201527f546f6f206d616e79206d696e747320696e20612074786e00000000000000000060448201526064016108b4565b6110c2818360ff16611892565b60006001600160a01b0384163b1561207157604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611fc19033908990889088906004016129b3565b6020604051808303816000875af1925050508015611ffc575060408051601f3d908101601f19168201909252611ff9918101906129f0565b60015b612057573d80801561202a576040519150601f19603f3d011682016040523d82523d6000602084013e61202f565b606091505b50805161204f576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612075565b5060015b949350505050565b6060601580546108d790612871565b6060816120b05750506040805180820190915260018152600360fc1b602082015290565b8160005b81156120da57806120c481612a0d565b91506120d39050600a836128d8565b91506120b4565b6000816001600160401b038111156120f4576120f46125a1565b6040519080825280601f01601f19166020018201604052801561211e576020820181803683370190505b509050815b85156121ab5761213460018261290c565b90506000612143600a886128d8565b61214e90600a61293b565b612158908861290c565b612163906030612a28565b905060008160f81b9050808484815181106121805761218061296e565b60200101906001600160f81b031916908160001a9053506121a2600a896128d8565b97505050612123565b50949350505050565b610a278383836001612229565b600854600160a01b900460ff16156114af5760405162461bcd60e51b815260206004820152602560248201527f5061757361626c653a20746f6b656e207472616e73666572207768696c652070604482015264185d5cd95960da1b60648201526084016108b4565b6000546001600160a01b03851661225257604051622e076360e81b815260040160405180910390fd5b836122705760405163b562e8dd60e01b815260040160405180910390fd5b61227d60008683876121c1565b6001600160a01b038516600081815260056020908152604080832080546fffffffffffffffffffffffffffffffff1981166001600160401b038083168c0181169182176801000000000000000067ffffffffffffffff1990941690921783900481168c018116909202179091558584526004909252822080546001600160e01b031916909317600160a01b42909216919091021790915581905b858110156123985760405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a483801561236e575061236c6000888488611f7d565b155b1561238c576040516368d2bf6b60e11b815260040160405180910390fd5b60019182019101612317565b5060005561139f565b8280546123ad90612871565b90600052602060002090601f0160209004810192826123cf5760008555612415565b82601f106123e857805160ff1916838001178555612415565b82800160010185558215612415579182015b828111156124155782518255916020019190600101906123fa565b50612421929150612425565b5090565b5b808211156124215760008155600101612426565b6001600160e01b0319811681146117f557600080fd5b60006020828403121561246257600080fd5b813561188b8161243a565b6000806040838503121561248057600080fd5b50508035926020909101359150565b60005b838110156124aa578181015183820152602001612492565b838111156114af5750506000910152565b600081518084526124d381602086016020860161248f565b601f01601f19169290920160200192915050565b60208152600061188b60208301846124bb565b60006020828403121561250c57600080fd5b5035919050565b6001600160a01b03811681146117f557600080fd5b6000806040838503121561253b57600080fd5b823561254681612513565b946020939093013593505050565b803560ff8116811461256557600080fd5b919050565b6000806040838503121561257d57600080fd5b61258683612554565b9150602083013561259681612513565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b03808411156125d1576125d16125a1565b604051601f8501601f19908116603f011681019082821181831017156125f9576125f96125a1565b8160405280935085815286868601111561261257600080fd5b858560208301376000602087830101525050509392505050565b600082601f83011261263d57600080fd5b61188b838335602085016125b7565b6000806040838503121561265f57600080fd5b8235915060208301356001600160401b0381111561267c57600080fd5b6126888582860161262c565b9150509250929050565b6000602082840312156126a457600080fd5b813561188b81612513565b6000806000606084860312156126c457600080fd5b83356126cf81612513565b925060208401356126df81612513565b929592945050506040919091013590565b60006020828403121561270257600080fd5b81356001600160401b0381111561271857600080fd5b6120758482850161262c565b8035801515811461256557600080fd5b60006020828403121561274657600080fd5b61188b82612724565b60006020828403121561276157600080fd5b61188b82612554565b6000806040838503121561277d57600080fd5b823561278881612513565b915061279660208401612724565b90509250929050565b600080600080608085870312156127b557600080fd5b84356127c081612513565b935060208501356127d081612513565b92506040850135915060608501356001600160401b038111156127f257600080fd5b8501601f8101871361280357600080fd5b612812878235602084016125b7565b91505092959194509250565b6000806040838503121561283157600080fd5b823561258681612513565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600181811c9082168061288557607f821691505b602082108114156128a657634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000826128e7576128e76128ac565b500490565b600060ff821660ff811415612903576129036128c2565b60010192915050565b60008282101561291e5761291e6128c2565b500390565b60008219821115612936576129366128c2565b500190565b6000816000190483118215151615612955576129556128c2565b500290565b600082612969576129696128ac565b500690565b634e487b7160e01b600052603260045260246000fd5b6000835161299681846020880161248f565b8351908301906129aa81836020880161248f565b01949350505050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906129e6908301846124bb565b9695505050505050565b600060208284031215612a0257600080fd5b815161188b8161243a565b6000600019821415612a2157612a216128c2565b5060010190565b600060ff821660ff84168060ff03821115612a4557612a456128c2565b01939250505056fea26469706673582212208deb71fdf67f9aafd6c6ffe2bbdc3da8e918cd4ea88fc4d1584de96e836164fb64736f6c634300080a00330000000000000000000000000000000000000000000000000000000000001b39000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000a
Deployed Bytecode
0x60806040526004361061026b5760003560e01c80636352211e11610144578063a22cb465116100b6578063e33b7de31161007a578063e33b7de31461075d578063e831574214610772578063e985e9c514610788578063eb74cc7d146107d1578063f2fde38b146107e7578063f34341c71461080757600080fd5b8063a22cb465146106a7578063b88d4fde146106c7578063c87b56dd146106e7578063ce7c2ac214610707578063e185a2cc1461073d57600080fd5b80638456cb59116101085780638456cb59146105f6578063858e83b51461060b5780638b83209b1461061e5780638da5cb5b1461063e57806395d89b411461065c5780639852595c1461067157600080fd5b80636352211e1461057557806370a08231146105955780637127beaa146105b5578063715018a6146105cb5780637d94792a146105e057600080fd5b806319165587116101dd5780633f4ba83a116101a15780633f4ba83a146104c157806342842e0e146104d65780634f6ccce7146104f657806355f804b3146105165780635aca1bb6146105365780635c975abb1461055657600080fd5b8063191655871461043757806323b872dd146104575780632f745c59146104775780633a98ef39146104975780633ba5939d146104ac57600080fd5b8063095ea7b31161022f578063095ea7b31461038e57806309c241f1146103ae5780630fcf2e75146103ce57806315a55347146103e8578063162094c4146103fe57806318160ddd1461041e57600080fd5b806301ffc9a7146102b95780630296c439146102ee5780630442bfa81461031257806306fdde0314610334578063081812fc1461035657600080fd5b366102b4577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77033604080516001600160a01b0390921682523460208301520160405180910390a1005b600080fd5b3480156102c557600080fd5b506102d96102d4366004612450565b61081d565b60405190151581526020015b60405180910390f35b3480156102fa57600080fd5b50610304600f5481565b6040519081526020016102e5565b34801561031e57600080fd5b5061033261032d36600461246d565b61088a565b005b34801561034057600080fd5b506103496108c8565b6040516102e591906124e7565b34801561036257600080fd5b506103766103713660046124fa565b61095a565b6040516001600160a01b0390911681526020016102e5565b34801561039a57600080fd5b506103326103a9366004612528565b61099e565b3480156103ba57600080fd5b506103326103c936600461256a565b610a2c565b3480156103da57600080fd5b506014546102d99060ff1681565b3480156103f457600080fd5b5061030460125481565b34801561040a57600080fd5b5061033261041936600461264c565b610b4f565b34801561042a57600080fd5b5060015460005403610304565b34801561044357600080fd5b50610332610452366004612692565b610c02565b34801561046357600080fd5b506103326104723660046126af565b610dd3565b34801561048357600080fd5b50610304610492366004612528565b610dde565b3480156104a357600080fd5b50600954610304565b3480156104b857600080fd5b50610332610ed1565b3480156104cd57600080fd5b50610332610f95565b3480156104e257600080fd5b506103326104f13660046126af565b610fc9565b34801561050257600080fd5b506103046105113660046124fa565b610fe4565b34801561052257600080fd5b506103326105313660046126f0565b611085565b34801561054257600080fd5b50610332610551366004612734565b6110c6565b34801561056257600080fd5b50600854600160a01b900460ff166102d9565b34801561058157600080fd5b506103766105903660046124fa565b611156565b3480156105a157600080fd5b506103046105b0366004612692565b611168565b3480156105c157600080fd5b5061030460105481565b3480156105d757600080fd5b506103326111b6565b3480156105ec57600080fd5b5061030460175481565b34801561060257600080fd5b506103326111ea565b61033261061936600461274f565b61121c565b34801561062a57600080fd5b506103766106393660046124fa565b6113a6565b34801561064a57600080fd5b506008546001600160a01b0316610376565b34801561066857600080fd5b506103496113d6565b34801561067d57600080fd5b5061030461068c366004612692565b6001600160a01b03166000908152600c602052604090205490565b3480156106b357600080fd5b506103326106c236600461276a565b6113e5565b3480156106d357600080fd5b506103326106e236600461279f565b61147b565b3480156106f357600080fd5b506103496107023660046124fa565b6114b5565b34801561071357600080fd5b50610304610722366004612692565b6001600160a01b03166000908152600b602052604090205490565b34801561074957600080fd5b506103326107583660046126f0565b611720565b34801561076957600080fd5b50600a54610304565b34801561077e57600080fd5b50610304600e5481565b34801561079457600080fd5b506102d96107a336600461281e565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b3480156107dd57600080fd5b5061030460135481565b3480156107f357600080fd5b50610332610802366004612692565b61175d565b34801561081357600080fd5b5061030460115481565b60006001600160e01b031982166380ac58cd60e01b148061084e57506001600160e01b03198216635b5e139f60e01b145b8061086957506001600160e01b0319821663780e9d6360e01b145b8061088457506301ffc9a760e01b6001600160e01b03198316145b92915050565b6008546001600160a01b031633146108bd5760405162461bcd60e51b81526004016108b49061283c565b60405180910390fd5b600f91909155601055565b6060600280546108d790612871565b80601f016020809104026020016040519081016040528092919081815260200182805461090390612871565b80156109505780601f1061092557610100808354040283529160200191610950565b820191906000526020600020905b81548152906001019060200180831161093357829003601f168201915b5050505050905090565b6000610965826117f8565b610982576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b60006109a982611156565b9050806001600160a01b0316836001600160a01b031614156109de5760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b038216148015906109fe57506109fc81336107a3565b155b15610a1c576040516367d9dca160e11b815260040160405180910390fd5b610a27838383611823565b505050565b6008546001600160a01b03163314610a565760405162461bcd60e51b81526004016108b49061283c565b601254601354610a699060ff851661187f565b1115610ab75760405162461bcd60e51b815260206004820152601f60248201527f43616e206e6f74206d696e74206d6f7265207468616e2072657365727665640060448201526064016108b4565b60006011548360ff16610aca91906128d8565b905060005b818160ff161015610af857610ae683601154611892565b80610af0816128ec565b915050610acf565b506000610b10601154836118ac90919063ffffffff16565b610b1d9060ff861661290c565b90508015610b2f57610b2f8382611892565b8360ff1660136000828254610b449190612923565b909155505050505050565b6008546001600160a01b03163314610b795760405162461bcd60e51b81526004016108b49061283c565b610b82826117f8565b610be35760405162461bcd60e51b815260206004820152602c60248201527f4552433732314d657461646174613a2055524920736574206f66206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016108b4565b60008281526018602090815260409091208251610a27928401906123a1565b6001600160a01b0381166000908152600b6020526040902054610c765760405162461bcd60e51b815260206004820152602660248201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060448201526573686172657360d01b60648201526084016108b4565b6000600a5447610c869190612923565b6001600160a01b0383166000908152600c6020908152604080832054600954600b909352908320549394509192610cbd908561293b565b610cc791906128d8565b610cd1919061290c565b905080610d345760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060448201526a191d59481c185e5b595b9d60aa1b60648201526084016108b4565b6001600160a01b0383166000908152600c6020526040902054610d58908290612923565b6001600160a01b0384166000908152600c6020526040902055600a54610d7f908290612923565b600a55610d8c83826118b8565b604080516001600160a01b0385168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056910160405180910390a1505050565b610a278383836119d1565b6000610de983611168565b8210610e08576040516306ed618760e11b815260040160405180910390fd5b600080549080805b83811015610ecb57600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff161580159282019290925290610e775750610ec3565b80516001600160a01b031615610e8c57805192505b876001600160a01b0316836001600160a01b03161415610ec15786841415610eba5750935061088492505050565b6001909301925b505b600101610e10565b50600080fd5b6008546001600160a01b03163314610efb5760405162461bcd60e51b81526004016108b49061283c565b60175415610f425760405162461bcd60e51b815260206004820152601460248201527343616e206f6e6c792072657665616c206f6e636560601b60448201526064016108b4565b601254600e54610f52919061290c565b6040805144602082015242918101919091524360608201526080016040516020818303038152906040528051906020012060001c610f90919061295a565b601755565b6008546001600160a01b03163314610fbf5760405162461bcd60e51b81526004016108b49061283c565b610fc7611bef565b565b610a278383836040518060200160405280600081525061147b565b6000805481805b8281101561106b57600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff16151591810182905290611062578583141561105b5750949350505050565b6001909201915b50600101610feb565b506040516329c8c00760e21b815260040160405180910390fd5b6008546001600160a01b031633146110af5760405162461bcd60e51b81526004016108b49061283c565b80516110c29060159060208401906123a1565b5050565b6008546001600160a01b031633146110f05760405162461bcd60e51b81526004016108b49061283c565b601254601354146111435760405162461bcd60e51b815260206004820152601e60248201527f6d696e7420616c6c20726573657276656420746f6b656e73206669727374000060448201526064016108b4565b6014805460ff1916911515919091179055565b600061116182611c8c565b5192915050565b60006001600160a01b038216611191576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600560205260409020546001600160401b031690565b6008546001600160a01b031633146111e05760405162461bcd60e51b81526004016108b49061283c565b610fc76000611da5565b6008546001600160a01b031633146112145760405162461bcd60e51b81526004016108b49061283c565b610fc7611df7565b60145460ff168061126f5760405162461bcd60e51b815260206004820152601760248201527f746869732073616c65206973206e6f742061637469766500000000000000000060448201526064016108b4565b8160006101906112826001546000540390565b10801561129f5750600f54349061129c9060ff85166118ac565b11155b905080806112bd575060105434906112ba9060ff85166118ac565b11155b6113095760405162461bcd60e51b815260206004820152601860248201527f4e6f7420656e6f75676820657468657220746f206d696e74000000000000000060448201526064016108b4565b8361132d611324601354601254611e7f90919063ffffffff16565b600e5490611e7f565b6113478260ff166113416001546000540390565b9061187f565b11156113955760405162461bcd60e51b815260206004820152601e60248201527f4e6f7420656e6f75676820746f6b656e73206c65667420746f206d696e74000060448201526064016108b4565b61139f8533611e8b565b5050505050565b6000600d82815481106113bb576113bb61296e565b6000918252602090912001546001600160a01b031692915050565b6060600380546108d790612871565b6001600160a01b03821633141561140f5760405163b06307db60e01b815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6114868484846119d1565b61149284848484611f7d565b6114af576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b60606114c0826117f8565b6115245760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084016108b4565b6017546115bd576016805461153890612871565b80601f016020809104026020016040519081016040528092919081815260200182805461156490612871565b80156115b15780601f10611586576101008083540402835291602001916115b1565b820191906000526020600020905b81548152906001019060200180831161159457829003601f168201915b50505050509050919050565b60006115c761207d565b6000848152601860205260408120805492935090916115e590612871565b80601f016020809104026020016040519081016040528092919081815260200182805461161190612871565b801561165e5780601f106116335761010080835404028352916020019161165e565b820191906000526020600020905b81548152906001019060200180831161164157829003601f168201915b50505050509050600081511115611676579392505050565b6012548410156116b3578161168a8561208c565b60405160200161169b929190612984565b60405160208183030381529060405292505050919050565b6000601254600e546116c5919061290c565b856017546116d39190612923565b6116dd919061295a565b9050826116f6601254836116f19190612923565b61208c565b604051602001611707929190612984565b6040516020818303038152906040529350505050919050565b6008546001600160a01b0316331461174a5760405162461bcd60e51b81526004016108b49061283c565b80516110c29060169060208401906123a1565b6008546001600160a01b031633146117875760405162461bcd60e51b81526004016108b49061283c565b6001600160a01b0381166117ec5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016108b4565b6117f581611da5565b50565b6000805482108015610884575050600090815260046020526040902054600160e01b900460ff161590565b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600061188b8284612923565b9392505050565b6110c28282604051806020016040528060008152506121b4565b600061188b828461293b565b804710156119085760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016108b4565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611955576040519150601f19603f3d011682016040523d82523d6000602084013e61195a565b606091505b5050905080610a275760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016108b4565b60006119dc82611c8c565b80519091506000906001600160a01b0316336001600160a01b03161480611a0a57508151611a0a90336107a3565b80611a25575033611a1a8461095a565b6001600160a01b0316145b905080611a4557604051632ce44b5f60e11b815260040160405180910390fd5b846001600160a01b031682600001516001600160a01b031614611a7a5760405162a1148160e81b815260040160405180910390fd5b6001600160a01b038416611aa157604051633a954ecd60e21b815260040160405180910390fd5b611aae85858560016121c1565b611abe6000848460000151611823565b6001600160a01b038581166000908152600560209081526040808320805467ffffffffffffffff198082166001600160401b0392831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600490945282852080546001600160e01b031916909417600160a01b429092169190910217909255908601808352912054909116611ba857600054811015611ba857825160008281526004602090815260409091208054918601516001600160401b0316600160a01b026001600160e01b03199092166001600160a01b03909316929092171790555b5082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461139f565b600854600160a01b900460ff16611c3f5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016108b4565b6008805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6040805160608101825260008082526020820181905291810182905290548290811015611d8c57600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff16151591810182905290611d8a5780516001600160a01b031615611d21579392505050565b5060001901600081815260046020908152604091829020825160608101845290546001600160a01b038116808352600160a01b82046001600160401b031693830193909352600160e01b900460ff1615159281019290925215611d85579392505050565b611d21565b505b604051636f96cda160e11b815260040160405180910390fd5b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600854600160a01b900460ff1615611e445760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016108b4565b6008805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611c6f3390565b600061188b828461290c565b600854600160a01b900460ff1615611ed85760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016108b4565b6001600160a01b038116611f1b5760405162461bcd60e51b815260206004820152600a6024820152694e6f206164647265737360b01b60448201526064016108b4565b6011548260ff161115611f705760405162461bcd60e51b815260206004820152601760248201527f546f6f206d616e79206d696e747320696e20612074786e00000000000000000060448201526064016108b4565b6110c2818360ff16611892565b60006001600160a01b0384163b1561207157604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611fc19033908990889088906004016129b3565b6020604051808303816000875af1925050508015611ffc575060408051601f3d908101601f19168201909252611ff9918101906129f0565b60015b612057573d80801561202a576040519150601f19603f3d011682016040523d82523d6000602084013e61202f565b606091505b50805161204f576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612075565b5060015b949350505050565b6060601580546108d790612871565b6060816120b05750506040805180820190915260018152600360fc1b602082015290565b8160005b81156120da57806120c481612a0d565b91506120d39050600a836128d8565b91506120b4565b6000816001600160401b038111156120f4576120f46125a1565b6040519080825280601f01601f19166020018201604052801561211e576020820181803683370190505b509050815b85156121ab5761213460018261290c565b90506000612143600a886128d8565b61214e90600a61293b565b612158908861290c565b612163906030612a28565b905060008160f81b9050808484815181106121805761218061296e565b60200101906001600160f81b031916908160001a9053506121a2600a896128d8565b97505050612123565b50949350505050565b610a278383836001612229565b600854600160a01b900460ff16156114af5760405162461bcd60e51b815260206004820152602560248201527f5061757361626c653a20746f6b656e207472616e73666572207768696c652070604482015264185d5cd95960da1b60648201526084016108b4565b6000546001600160a01b03851661225257604051622e076360e81b815260040160405180910390fd5b836122705760405163b562e8dd60e01b815260040160405180910390fd5b61227d60008683876121c1565b6001600160a01b038516600081815260056020908152604080832080546fffffffffffffffffffffffffffffffff1981166001600160401b038083168c0181169182176801000000000000000067ffffffffffffffff1990941690921783900481168c018116909202179091558584526004909252822080546001600160e01b031916909317600160a01b42909216919091021790915581905b858110156123985760405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a483801561236e575061236c6000888488611f7d565b155b1561238c576040516368d2bf6b60e11b815260040160405180910390fd5b60019182019101612317565b5060005561139f565b8280546123ad90612871565b90600052602060002090601f0160209004810192826123cf5760008555612415565b82601f106123e857805160ff1916838001178555612415565b82800160010185558215612415579182015b828111156124155782518255916020019190600101906123fa565b50612421929150612425565b5090565b5b808211156124215760008155600101612426565b6001600160e01b0319811681146117f557600080fd5b60006020828403121561246257600080fd5b813561188b8161243a565b6000806040838503121561248057600080fd5b50508035926020909101359150565b60005b838110156124aa578181015183820152602001612492565b838111156114af5750506000910152565b600081518084526124d381602086016020860161248f565b601f01601f19169290920160200192915050565b60208152600061188b60208301846124bb565b60006020828403121561250c57600080fd5b5035919050565b6001600160a01b03811681146117f557600080fd5b6000806040838503121561253b57600080fd5b823561254681612513565b946020939093013593505050565b803560ff8116811461256557600080fd5b919050565b6000806040838503121561257d57600080fd5b61258683612554565b9150602083013561259681612513565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b03808411156125d1576125d16125a1565b604051601f8501601f19908116603f011681019082821181831017156125f9576125f96125a1565b8160405280935085815286868601111561261257600080fd5b858560208301376000602087830101525050509392505050565b600082601f83011261263d57600080fd5b61188b838335602085016125b7565b6000806040838503121561265f57600080fd5b8235915060208301356001600160401b0381111561267c57600080fd5b6126888582860161262c565b9150509250929050565b6000602082840312156126a457600080fd5b813561188b81612513565b6000806000606084860312156126c457600080fd5b83356126cf81612513565b925060208401356126df81612513565b929592945050506040919091013590565b60006020828403121561270257600080fd5b81356001600160401b0381111561271857600080fd5b6120758482850161262c565b8035801515811461256557600080fd5b60006020828403121561274657600080fd5b61188b82612724565b60006020828403121561276157600080fd5b61188b82612554565b6000806040838503121561277d57600080fd5b823561278881612513565b915061279660208401612724565b90509250929050565b600080600080608085870312156127b557600080fd5b84356127c081612513565b935060208501356127d081612513565b92506040850135915060608501356001600160401b038111156127f257600080fd5b8501601f8101871361280357600080fd5b612812878235602084016125b7565b91505092959194509250565b6000806040838503121561283157600080fd5b823561258681612513565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600181811c9082168061288557607f821691505b602082108114156128a657634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000826128e7576128e76128ac565b500490565b600060ff821660ff811415612903576129036128c2565b60010192915050565b60008282101561291e5761291e6128c2565b500390565b60008219821115612936576129366128c2565b500190565b6000816000190483118215151615612955576129556128c2565b500290565b600082612969576129696128ac565b500690565b634e487b7160e01b600052603260045260246000fd5b6000835161299681846020880161248f565b8351908301906129aa81836020880161248f565b01949350505050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906129e6908301846124bb565b9695505050505050565b600060208284031215612a0257600080fd5b815161188b8161243a565b6000600019821415612a2157612a216128c2565b5060010190565b600060ff821660ff84168060ff03821115612a4557612a456128c2565b01939250505056fea26469706673582212208deb71fdf67f9aafd6c6ffe2bbdc3da8e918cd4ea88fc4d1584de96e836164fb64736f6c634300080a0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000000000000000000000000000000000000001b39000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000a
-----Decoded View---------------
Arg [0] : _maxTokens (uint256): 6969
Arg [1] : _maxTokensPerTxn (uint8): 10
Arg [2] : _reservedTokens (uint256): 10
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000001b39
Arg [1] : 000000000000000000000000000000000000000000000000000000000000000a
Arg [2] : 000000000000000000000000000000000000000000000000000000000000000a
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.