ERC-721
Overview
Max Total Supply
777 PG
Holders
516
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
1 PGLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
ParallaxGenesis
Compiler Version
v0.8.10+commit.fc410830
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.10; import "./ERC721A.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; /** ____ ___ ____ ___ __ __ ___ _ __ / __ \/ | / __ \/ | / / / / / | | |/ / / /_/ / /| | / /_/ / /| | / / / / / /| | | / / ____/ ___ |/ _, _/ ___ |/ /___/ /___/ ___ |/ | /_/ /_/ |_/_/ |_/_/ |_/_____/_____/_/ |_/_/|_| */ /// @title ParallaxGenesis Mint Contract /// @author GEN3 Studios contract ParallaxGenesis is ERC721A, Ownable, Pausable { using Strings for uint256; using ECDSA for bytes32; string private baseURI; bool private _revealed; string private _unrevealedBaseURI; address private treasury; // General Mint Settings uint256 public maxSupply = 777; uint256 public nftPrice = 0.35 ether; uint256 public maxNftPerWallet = 1; // Sale toggles bool public presaleActive = false; bool public publicSaleActive = false; // Off-chain whitelist Variables address private signerAddress; mapping(address => uint256) public nftMintCount; // Events event PrivateMint(address indexed to, uint256 amount); event PublicMint(address indexed to, uint256 amount); event DevMint(uint256 amount); event WithdrawETH(uint256 amountWithdrawn); event Revealed(uint256 timestamp); // -------------------- MODIFIERS -------------------------- /** * @dev Prevent Smart Contracts from calling the functions with this modifier */ modifier onlyEOA() { require(msg.sender == tx.origin, "PARALLAX: ONLY EOA"); _; } constructor( string memory name_, string memory symbol_, string memory _initBaseURI, address _newOwner, address _signerAddress, address _treasury ) ERC721A(name_, symbol_) { _currentIndex = 1; // required for ERC721A since it starts from 0 setNotRevealedURI(_initBaseURI); transferOwnership(_newOwner); signerAddress = _signerAddress; treasury = _treasury; } // -------------------- MINT FUNCTIONS -------------------------- /// @notice Allows owner of smart contract to mint for free /// @param _mintAmount Amount to mint for Dev function devMint(uint256 _mintAmount) public onlyEOA onlyOwner { require( totalSupply() + _mintAmount <= maxSupply, "PARALLAX: EXCEEDED MAX SUPPLY" ); _mint(msg.sender, _mintAmount, "", true); emit DevMint(_mintAmount); } /** * @notice Private Mint for users who are whitelisted * @param signature Signature retrieved from backend for Parallax whitelist * @param nonce Random nonce retrieved from backend for Parallax whitelist */ function privateMint( bytes memory nonce, bytes memory signature ) external payable onlyEOA whenNotPaused { // Check if user is whitelisted require( whitelistSigned(msg.sender, nonce, signature), "PARALLAX: INVALID SIGNATURE" ); // Check if public sale is open require(presaleActive, "PARALLAX: PRIVATE SALE CLOSED"); // Check if enough ETH is sent require( msg.value >= nftPrice, "PARALLAX: INSUFFICIENT ETH" ); // Check if mints exceed maxSupply require( totalSupply() + 1 <= maxSupply, "PARALLAX: EXCEEDED MAX SUPPLY" ); // Check that mints does not exceed max wallet allowance for parallax require( nftMintCount[msg.sender] + 1 <= maxNftPerWallet, "PARALLAX: MAXIMUM AMOUNT MINTED" ); nftMintCount[msg.sender] += 1; _mint(msg.sender, 1, "", true); emit PrivateMint(msg.sender, 1); } /** * @notice Public Mint */ function publicMint() external payable onlyEOA whenNotPaused{ // Check if public sale is open require(publicSaleActive, "PARALLAX: Public Sale Closed!"); // Check if enough ETH is sent require( msg.value >= nftPrice, "PARALLAX: Insufficient ETH!" ); // Check if mints does not exceed maxSupply require( totalSupply() + 1 <= maxSupply, "PARALLAX: Max Supply for Public Mint Reached!" ); // Check that mints does not exceed max wallet allowance for public sale require( nftMintCount[msg.sender] + 1 <= maxNftPerWallet, "PARALLAX: Wallet has already minted Max Amount for Public Sale" ); nftMintCount[msg.sender] += 1; _mint(msg.sender, 1, "", true); emit PublicMint(msg.sender, 1); } // -------------------- WHITELIST FUNCTION ---------------------- /** * @dev Checks if the the signature is signed by a valid signer for whitelist * @param sender Address of minter * @param nonce Random bytes32 nonce * @param signature Signature generated off-chain */ function whitelistSigned( address sender, bytes memory nonce, bytes memory signature ) private view returns (bool) { bytes32 hash = keccak256(abi.encodePacked(sender, nonce)); return signerAddress == hash.recover(signature); } // ---------------------- VIEW FUNCTIONS ------------------------ /** * @dev See {IERC721Metadata-tokenURI}. * @dev gets baseURI from contract state variable */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); if (!_revealed) { return _unrevealedBaseURI; } return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, tokenId.toString(), ".json")) : ""; } // ------------------------- OWNER FUNCTIONS ---------------------------- /** * @notice Set presale state * @param _presaleState New presale state */ function setPresaleState(bool _presaleState) external onlyOwner { presaleActive = _presaleState; } /** * @notice Set public sale state * @param _publicSaleState New public sale state */ function setPublicSaleState(bool _publicSaleState) external onlyOwner { publicSaleActive = _publicSaleState; } /** * @notice Set max supply of collection * @param _maxSupply New max supply of the collection * @dev Can be used to "cap" the collection */ function setMaxSupply(uint256 _maxSupply) external onlyOwner { require(_maxSupply <= 777, "PARALLAX: ONLY REDUCE ALLOWED"); maxSupply = _maxSupply; } /** * @notice Set new mint price of collection * @param _newPrice New price nft minting * @dev Only use for contingencies */ function setPrice(uint256 _newPrice) external onlyOwner { nftPrice = _newPrice; } /** * @notice Pauses all minting except devMint */ function pause() public onlyOwner { _pause(); } /** * @notice Unpauses all minting except devMint */ function unpause() public onlyOwner { _unpause(); } /** * @dev Set Private Sale maximum amount of mints */ function setSignerAddress(address _signerAddress) external onlyOwner { signerAddress = _signerAddress; } /** * @dev Set the unrevealed URI * @param newUnrevealedURI unrevealed URI for metadata */ function setNotRevealedURI(string memory newUnrevealedURI) public onlyOwner { _unrevealedBaseURI = newUnrevealedURI; } /** * @dev Set Revealed Metadata URI */ function setBaseURI(string memory _newBaseURI) external onlyOwner { baseURI = _newBaseURI; } /** * @notice Set Revealed state of NFT metadata */ function reveal(bool revealed) external onlyOwner { _revealed = revealed; emit Revealed(block.timestamp); } /** * @notice Set treasury address for withdrawal */ function setTreasury(address _treasury) external onlyOwner { treasury = _treasury; } /** * @notice Withdraws ETH from smart contract to treasury */ function withdrawToTreasury() external onlyOwner { (bool success, ) = treasury.call{ value: address(this).balance }(""); // returns boolean and data require(success, "PARALLAX: WITHDRAWAL FAILED"); emit WithdrawETH(address(this).balance); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { // Check the signature length // - case 65: r,s,v signature (standard) // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._ if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else if (signature.length == 64) { bytes32 r; bytes32 vs; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) vs := mload(add(signature, 0x40)) } return tryRecover(hash, r, vs); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } if (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // 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**128 - 1 (max value of uint128). */ 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; } // Compiler will pack the following // _currentIndex and _burnCounter into a single 256bit word. // The tokenId of the next token to be minted. uint128 internal _currentIndex; // The number of tokens burned. uint128 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 - 1 - _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 > 3.4e38 (2**128) - 1 // updatedIndex overflows if _currentIndex + quantity > 3.4e38 (2**128) - 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 = uint128(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**128. 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**128. 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 {} }
{ "evmVersion": "london", "libraries": {}, "metadata": { "bytecodeHash": "ipfs", "useLiteralContent": true }, "optimizer": { "enabled": true, "runs": 200 }, "remappings": [], "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"string","name":"_initBaseURI","type":"string"},{"internalType":"address","name":"_newOwner","type":"address"},{"internalType":"address","name":"_signerAddress","type":"address"},{"internalType":"address","name":"_treasury","type":"address"}],"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"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"DevMint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PrivateMint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PublicMint","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"Revealed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amountWithdrawn","type":"uint256"}],"name":"WithdrawETH","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":"_mintAmount","type":"uint256"}],"name":"devMint","outputs":[],"stateMutability":"nonpayable","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":"maxNftPerWallet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nftMintCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nftPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presaleActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"nonce","type":"bytes"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"privateMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"publicMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"publicSaleActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"revealed","type":"bool"}],"name":"reveal","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":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newBaseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxSupply","type":"uint256"}],"name":"setMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newUnrevealedURI","type":"string"}],"name":"setNotRevealedURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_presaleState","type":"bool"}],"name":"setPresaleState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newPrice","type":"uint256"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_publicSaleState","type":"bool"}],"name":"setPublicSaleState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_signerAddress","type":"address"}],"name":"setSignerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasury","type":"address"}],"name":"setTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawToTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080604052610309600c556704db732547630000600d556001600e55600f805461ffff191690553480156200003357600080fd5b50604051620031ab380380620031ab833981016040819052620000569162000429565b8551869086906200006f90600190602085019062000299565b5080516200008590600290602084019062000299565b505050620000a26200009c6200011b60201b60201c565b6200011f565b6007805460ff60a01b19169055600080546001600160801b0319166001179055620000cd8462000171565b620000d883620001d9565b600f805462010000600160b01b031916620100006001600160a01b0394851602179055600b80546001600160a01b03191691909216179055506200052e92505050565b3390565b600780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6007546001600160a01b03163314620001c05760405162461bcd60e51b815260206004820181905260248201526000805160206200318b83398151915260448201526064015b60405180910390fd5b8051620001d590600a90602084019062000299565b5050565b6007546001600160a01b03163314620002245760405162461bcd60e51b815260206004820181905260248201526000805160206200318b8339815191526044820152606401620001b7565b6001600160a01b0381166200028b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401620001b7565b62000296816200011f565b50565b828054620002a790620004f1565b90600052602060002090601f016020900481019282620002cb576000855562000316565b82601f10620002e657805160ff191683800117855562000316565b8280016001018555821562000316579182015b8281111562000316578251825591602001919060010190620002f9565b506200032492915062000328565b5090565b5b8082111562000324576000815560010162000329565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200036757600080fd5b81516001600160401b03808211156200038457620003846200033f565b604051601f8301601f19908116603f01168101908282118183101715620003af57620003af6200033f565b81604052838152602092508683858801011115620003cc57600080fd5b600091505b83821015620003f05785820183015181830184015290820190620003d1565b83821115620004025760008385830101525b9695505050505050565b80516001600160a01b03811681146200042457600080fd5b919050565b60008060008060008060c087890312156200044357600080fd5b86516001600160401b03808211156200045b57600080fd5b620004698a838b0162000355565b975060208901519150808211156200048057600080fd5b6200048e8a838b0162000355565b96506040890151915080821115620004a557600080fd5b50620004b489828a0162000355565b945050620004c5606088016200040c565b9250620004d5608088016200040c565b9150620004e560a088016200040c565b90509295509295509295565b600181811c908216806200050657607f821691505b602082108114156200052857634e487b7160e01b600052602260045260246000fd5b50919050565b612c4d806200053e6000396000f3fe6080604052600436106102465760003560e01c80636f8b44b011610139578063a22cb465116100b6578063d5abeb011161007a578063d5abeb011461067f578063e74c9f2614610695578063e985e9c5146106a8578063f0f44260146106f1578063f2c4ce1e14610711578063f2fde38b1461073157600080fd5b8063a22cb465146105e0578063b88d4fde14610600578063bc8893b414610620578063bce4d6ae1461063f578063c87b56dd1461065f57600080fd5b80638da5cb5b116100fd5780638da5cb5b1461054d57806391b7f5ed1461056b5780639293a5c71461058b578063940cd05b146105ab57806395d89b41146105cb57600080fd5b80636f8b44b0146104ce57806370a08231146104ee578063715018a61461050e5780637e80c186146105235780638456cb591461053857600080fd5b80632f745c59116101c75780634f6ccce71161018b5780634f6ccce71461043557806353135ca01461045557806355f804b31461046f5780635c975abb1461048f5780636352211e146104ae57600080fd5b80632f745c5914610393578063375a069a146103b35780633965ca51146103d35780633f4ba83a1461040057806342842e0e1461041557600080fd5b80630d39fc811161020e5780630d39fc811461031c57806318160ddd1461034057806322127d191461035557806323b872dd1461036b57806326092b831461038b57600080fd5b806301ffc9a71461024b578063046dc1661461028057806306fdde03146102a2578063081812fc146102c4578063095ea7b3146102fc575b600080fd5b34801561025757600080fd5b5061026b610266366004612594565b610751565b60405190151581526020015b60405180910390f35b34801561028c57600080fd5b506102a061029b3660046125d4565b6107be565b005b3480156102ae57600080fd5b506102b761081b565b6040516102779190612647565b3480156102d057600080fd5b506102e46102df36600461265a565b6108ad565b6040516001600160a01b039091168152602001610277565b34801561030857600080fd5b506102a0610317366004612673565b6108f1565b34801561032857600080fd5b50610332600d5481565b604051908152602001610277565b34801561034c57600080fd5b5061033261097f565b34801561036157600080fd5b50610332600e5481565b34801561037757600080fd5b506102a061038636600461269d565b6109a2565b6102a06109ad565b34801561039f57600080fd5b506103326103ae366004612673565b610c27565b3480156103bf57600080fd5b506102a06103ce36600461265a565b610d23565b3480156103df57600080fd5b506103326103ee3660046125d4565b60106020526000908152604090205481565b34801561040c57600080fd5b506102a0610e23565b34801561042157600080fd5b506102a061043036600461269d565b610e57565b34801561044157600080fd5b5061033261045036600461265a565b610e72565b34801561046157600080fd5b50600f5461026b9060ff1681565b34801561047b57600080fd5b506102a061048a366004612764565b610f1c565b34801561049b57600080fd5b50600754600160a01b900460ff1661026b565b3480156104ba57600080fd5b506102e46104c936600461265a565b610f5d565b3480156104da57600080fd5b506102a06104e936600461265a565b610f6f565b3480156104fa57600080fd5b506103326105093660046125d4565b610ff0565b34801561051a57600080fd5b506102a061103e565b34801561052f57600080fd5b506102a0611072565b34801561054457600080fd5b506102a061116f565b34801561055957600080fd5b506007546001600160a01b03166102e4565b34801561057757600080fd5b506102a061058636600461265a565b6111a1565b34801561059757600080fd5b506102a06105a63660046127bc565b6111d0565b3480156105b757600080fd5b506102a06105c63660046127bc565b611214565b3480156105d757600080fd5b506102b761127c565b3480156105ec57600080fd5b506102a06105fb3660046127d7565b61128b565b34801561060c57600080fd5b506102a061061b36600461282a565b611321565b34801561062c57600080fd5b50600f5461026b90610100900460ff1681565b34801561064b57600080fd5b506102a061065a3660046127bc565b61135b565b34801561066b57600080fd5b506102b761067a36600461265a565b611398565b34801561068b57600080fd5b50610332600c5481565b6102a06106a3366004612891565b6114b7565b3480156106b457600080fd5b5061026b6106c33660046128f4565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b3480156106fd57600080fd5b506102a061070c3660046125d4565b611749565b34801561071d57600080fd5b506102a061072c366004612764565b611795565b34801561073d57600080fd5b506102a061074c3660046125d4565b6117d2565b60006001600160e01b031982166380ac58cd60e01b148061078257506001600160e01b03198216635b5e139f60e01b145b8061079d57506001600160e01b0319821663780e9d6360e01b145b806107b857506301ffc9a760e01b6001600160e01b03198316145b92915050565b6007546001600160a01b031633146107f15760405162461bcd60e51b81526004016107e89061291e565b60405180910390fd5b600f80546001600160a01b03909216620100000262010000600160b01b0319909216919091179055565b60606001805461082a90612953565b80601f016020809104026020016040519081016040528092919081815260200182805461085690612953565b80156108a35780601f10610878576101008083540402835291602001916108a3565b820191906000526020600020905b81548152906001019060200180831161088657829003601f168201915b5050505050905090565b60006108b88261186d565b6108d5576040516333d1c03960e21b815260040160405180910390fd5b506000908152600560205260409020546001600160a01b031690565b60006108fc82610f5d565b9050806001600160a01b0316836001600160a01b031614156109315760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b03821614801590610951575061094f81336106c3565b155b1561096f576040516367d9dca160e11b815260040160405180910390fd5b61097a8383836118a1565b505050565b6000546001600160801b03600160801b8204811691811691909103600019011690565b61097a8383836118fd565b3332146109cc5760405162461bcd60e51b81526004016107e89061298e565b600754600160a01b900460ff16156109f65760405162461bcd60e51b81526004016107e8906129ba565b600f54610100900460ff16610a4d5760405162461bcd60e51b815260206004820152601d60248201527f504152414c4c41583a205075626c69632053616c6520436c6f7365642100000060448201526064016107e8565b600d54341015610a9f5760405162461bcd60e51b815260206004820152601b60248201527f504152414c4c41583a20496e73756666696369656e742045544821000000000060448201526064016107e8565b600c54610aaa61097f565b610ab59060016129fa565b1115610b195760405162461bcd60e51b815260206004820152602d60248201527f504152414c4c41583a204d617820537570706c7920666f72205075626c69632060448201526c4d696e7420526561636865642160981b60648201526084016107e8565b600e5433600090815260106020526040902054610b379060016129fa565b1115610bab5760405162461bcd60e51b815260206004820152603e60248201527f504152414c4c41583a2057616c6c65742068617320616c7265616479206d696e60448201527f746564204d617820416d6f756e7420666f72205075626c69632053616c65000060648201526084016107e8565b336000908152601060205260408120805460019290610bcb9084906129fa565b92505081905550610bef336001604051806020016040528060008152506001611b1a565b6040516001815233907f748a2986091c2034d6e93b6f44f771a79f0e1d6acd8a60c68c17d4e1e2feaed29060200160405180910390a2565b6000610c3283610ff0565b8210610c51576040516306ed618760e11b815260040160405180910390fd5b600080546001600160801b03169080805b83811015610d1d57600081815260036020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff161580159282019290925290610cc95750610d15565b80516001600160a01b031615610cde57805192505b876001600160a01b0316836001600160a01b03161415610d135786841415610d0c575093506107b892505050565b6001909301925b505b600101610c62565b50600080fd5b333214610d425760405162461bcd60e51b81526004016107e89061298e565b6007546001600160a01b03163314610d6c5760405162461bcd60e51b81526004016107e89061291e565b600c5481610d7861097f565b610d8291906129fa565b1115610dd05760405162461bcd60e51b815260206004820152601d60248201527f504152414c4c41583a204558434545444544204d415820535550504c5900000060448201526064016107e8565b610dec3382604051806020016040528060008152506001611b1a565b6040518181527f6dc41da7efc7f0e4ff3cc76df99542e60d74c16e8ec252c7bffb4e83a5dbafce906020015b60405180910390a150565b6007546001600160a01b03163314610e4d5760405162461bcd60e51b81526004016107e89061291e565b610e55611ca2565b565b61097a83838360405180602001604052806000815250611321565b600080546001600160801b031681805b82811015610f0257600081815260036020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff16151591810182905290610ef95785831415610ef25750949350505050565b6001909201915b50600101610e82565b506040516329c8c00760e21b815260040160405180910390fd5b6007546001600160a01b03163314610f465760405162461bcd60e51b81526004016107e89061291e565b8051610f599060089060208401906124e5565b5050565b6000610f6882611d3f565b5192915050565b6007546001600160a01b03163314610f995760405162461bcd60e51b81526004016107e89061291e565b610309811115610feb5760405162461bcd60e51b815260206004820152601d60248201527f504152414c4c41583a204f4e4c592052454455434520414c4c4f57454400000060448201526064016107e8565b600c55565b60006001600160a01b038216611019576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600460205260409020546001600160401b031690565b6007546001600160a01b031633146110685760405162461bcd60e51b81526004016107e89061291e565b610e556000611e61565b6007546001600160a01b0316331461109c5760405162461bcd60e51b81526004016107e89061291e565b600b546040516000916001600160a01b03169047908381818185875af1925050503d80600081146110e9576040519150601f19603f3d011682016040523d82523d6000602084013e6110ee565b606091505b505090508061113f5760405162461bcd60e51b815260206004820152601b60248201527f504152414c4c41583a205749544844524157414c204641494c4544000000000060448201526064016107e8565b6040514781527f94effa14ea3a1ef396fa2fd829336d1597f1d76b548c26bfa2332869706638af90602001610e18565b6007546001600160a01b031633146111995760405162461bcd60e51b81526004016107e89061291e565b610e55611eb3565b6007546001600160a01b031633146111cb5760405162461bcd60e51b81526004016107e89061291e565b600d55565b6007546001600160a01b031633146111fa5760405162461bcd60e51b81526004016107e89061291e565b600f80549115156101000261ff0019909216919091179055565b6007546001600160a01b0316331461123e5760405162461bcd60e51b81526004016107e89061291e565b6009805460ff19168215151790556040514281527f15120e52505e619cbf6c2af910d5cf7f9ee1befa55801b078c33e93880b2d60990602001610e18565b60606002805461082a90612953565b6001600160a01b0382163314156112b55760405163b06307db60e01b815260040160405180910390fd5b3360008181526006602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b61132c8484846118fd565b61133884848484611f18565b611355576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b6007546001600160a01b031633146113855760405162461bcd60e51b81526004016107e89061291e565b600f805460ff1916911515919091179055565b60606113a38261186d565b6113c057604051630a14c4b560e41b815260040160405180910390fd5b60095460ff1661145c57600a80546113d790612953565b80601f016020809104026020016040519081016040528092919081815260200182805461140390612953565b80156114505780601f1061142557610100808354040283529160200191611450565b820191906000526020600020905b81548152906001019060200180831161143357829003601f168201915b50505050509050919050565b6008805461146990612953565b1515905061148657604051806020016040528060008152506107b8565b600861149183612018565b6040516020016114a2929190612a2e565b60405160208183030381529060405292915050565b3332146114d65760405162461bcd60e51b81526004016107e89061298e565b600754600160a01b900460ff16156115005760405162461bcd60e51b81526004016107e8906129ba565b61150b338383612115565b6115575760405162461bcd60e51b815260206004820152601b60248201527f504152414c4c41583a20494e56414c4944205349474e4154555245000000000060448201526064016107e8565b600f5460ff166115a95760405162461bcd60e51b815260206004820152601d60248201527f504152414c4c41583a20505249564154452053414c4520434c4f53454400000060448201526064016107e8565b600d543410156115fb5760405162461bcd60e51b815260206004820152601a60248201527f504152414c4c41583a20494e53554646494349454e542045544800000000000060448201526064016107e8565b600c5461160661097f565b6116119060016129fa565b111561165f5760405162461bcd60e51b815260206004820152601d60248201527f504152414c4c41583a204558434545444544204d415820535550504c5900000060448201526064016107e8565b600e543360009081526010602052604090205461167d9060016129fa565b11156116cb5760405162461bcd60e51b815260206004820152601f60248201527f504152414c4c41583a204d4158494d554d20414d4f554e54204d494e5445440060448201526064016107e8565b3360009081526010602052604081208054600192906116eb9084906129fa565b9250508190555061170f336001604051806020016040528060008152506001611b1a565b6040516001815233907f73c70fae6461815259bb17577a08362a747e97f1b952b86e211522d4a24f95379060200160405180910390a25050565b6007546001600160a01b031633146117735760405162461bcd60e51b81526004016107e89061291e565b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b6007546001600160a01b031633146117bf5760405162461bcd60e51b81526004016107e89061291e565b8051610f5990600a9060208401906124e5565b6007546001600160a01b031633146117fc5760405162461bcd60e51b81526004016107e89061291e565b6001600160a01b0381166118615760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016107e8565b61186a81611e61565b50565b600080546001600160801b0316821080156107b8575050600090815260036020526040902054600160e01b900460ff161590565b60008281526005602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600061190882611d3f565b80519091506000906001600160a01b0316336001600160a01b031614806119365750815161193690336106c3565b80611951575033611946846108ad565b6001600160a01b0316145b90508061197157604051632ce44b5f60e11b815260040160405180910390fd5b846001600160a01b031682600001516001600160a01b0316146119a65760405162a1148160e81b815260040160405180910390fd5b6001600160a01b0384166119cd57604051633a954ecd60e21b815260040160405180910390fd5b6119dd60008484600001516118a1565b6001600160a01b038581166000908152600460209081526040808320805467ffffffffffffffff198082166001600160401b0392831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600390945282852080546001600160e01b031916909417600160a01b429092169190910217909255908601808352912054909116611ad0576000546001600160801b0316811015611ad057825160008281526003602090815260409091208054918601516001600160401b0316600160a01b026001600160e01b03199092166001600160a01b03909316929092171790555b5082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b5050505050565b6000546001600160801b03166001600160a01b038516611b4c57604051622e076360e81b815260040160405180910390fd5b83611b6a5760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038516600081815260046020908152604080832080546001600160801b031981166001600160401b038083168c0181169182176801000000000000000067ffffffffffffffff1990941690921783900481168c018116909202179091558584526003909252822080546001600160e01b031916909317600160a01b42909216919091021790915581905b85811015611c7c5760405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4838015611c525750611c506000888488611f18565b155b15611c70576040516368d2bf6b60e11b815260040160405180910390fd5b60019182019101611bfb565b50600080546001600160801b0319166001600160801b0392909216919091179055611b13565b600754600160a01b900460ff16611cf25760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016107e8565b6007805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60408051606081018252600080825260208201819052918101829052905482906001600160801b0316811015611e4857600081815260036020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff16151591810182905290611e465780516001600160a01b031615611ddd579392505050565b5060001901600081815260036020908152604091829020825160608101845290546001600160a01b038116808352600160a01b82046001600160401b031693830193909352600160e01b900460ff1615159281019290925215611e41579392505050565b611ddd565b505b604051636f96cda160e11b815260040160405180910390fd5b600780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600754600160a01b900460ff1615611edd5760405162461bcd60e51b81526004016107e8906129ba565b6007805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611d223390565b60006001600160a01b0384163b1561200c57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611f5c903390899088908890600401612ae9565b6020604051808303816000875af1925050508015611f97575060408051601f3d908101601f19168201909252611f9491810190612b26565b60015b611ff2573d808015611fc5576040519150601f19603f3d011682016040523d82523d6000602084013e611fca565b606091505b508051611fea576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612010565b5060015b949350505050565b60608161203c5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612066578061205081612b43565b915061205f9050600a83612b74565b9150612040565b6000816001600160401b03811115612080576120806126d9565b6040519080825280601f01601f1916602001820160405280156120aa576020820181803683370190505b5090505b8415612010576120bf600183612b88565b91506120cc600a86612b9f565b6120d79060306129fa565b60f81b8183815181106120ec576120ec612bb3565b60200101906001600160f81b031916908160001a90535061210e600a86612b74565b94506120ae565b600080848460405160200161212b929190612bc9565b60408051601f198184030181529190528051602090910120905061214f8184612170565b600f546201000090046001600160a01b039081169116149150509392505050565b600080600061217f8585612194565b9150915061218c81612204565b509392505050565b6000808251604114156121cb5760208301516040840151606085015160001a6121bf878285856123bf565b945094505050506121fd565b8251604014156121f557602083015160408401516121ea8683836124ac565b9350935050506121fd565b506000905060025b9250929050565b600081600481111561221857612218612c01565b14156122215750565b600181600481111561223557612235612c01565b14156122835760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016107e8565b600281600481111561229757612297612c01565b14156122e55760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016107e8565b60038160048111156122f9576122f9612c01565b14156123525760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016107e8565b600481600481111561236657612366612c01565b141561186a5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016107e8565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156123f657506000905060036124a3565b8460ff16601b1415801561240e57508460ff16601c14155b1561241f57506000905060046124a3565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612473573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661249c576000600192509250506124a3565b9150600090505b94509492505050565b6000806001600160ff1b038316816124c960ff86901c601b6129fa565b90506124d7878288856123bf565b935093505050935093915050565b8280546124f190612953565b90600052602060002090601f0160209004810192826125135760008555612559565b82601f1061252c57805160ff1916838001178555612559565b82800160010185558215612559579182015b8281111561255957825182559160200191906001019061253e565b50612565929150612569565b5090565b5b80821115612565576000815560010161256a565b6001600160e01b03198116811461186a57600080fd5b6000602082840312156125a657600080fd5b81356125b18161257e565b9392505050565b80356001600160a01b03811681146125cf57600080fd5b919050565b6000602082840312156125e657600080fd5b6125b1826125b8565b60005b8381101561260a5781810151838201526020016125f2565b838111156113555750506000910152565b600081518084526126338160208601602086016125ef565b601f01601f19169290920160200192915050565b6020815260006125b1602083018461261b565b60006020828403121561266c57600080fd5b5035919050565b6000806040838503121561268657600080fd5b61268f836125b8565b946020939093013593505050565b6000806000606084860312156126b257600080fd5b6126bb846125b8565b92506126c9602085016125b8565b9150604084013590509250925092565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b0380841115612709576127096126d9565b604051601f8501601f19908116603f01168101908282118183101715612731576127316126d9565b8160405280935085815286868601111561274a57600080fd5b858560208301376000602087830101525050509392505050565b60006020828403121561277657600080fd5b81356001600160401b0381111561278c57600080fd5b8201601f8101841361279d57600080fd5b612010848235602084016126ef565b803580151581146125cf57600080fd5b6000602082840312156127ce57600080fd5b6125b1826127ac565b600080604083850312156127ea57600080fd5b6127f3836125b8565b9150612801602084016127ac565b90509250929050565b600082601f83011261281b57600080fd5b6125b1838335602085016126ef565b6000806000806080858703121561284057600080fd5b612849856125b8565b9350612857602086016125b8565b92506040850135915060608501356001600160401b0381111561287957600080fd5b6128858782880161280a565b91505092959194509250565b600080604083850312156128a457600080fd5b82356001600160401b03808211156128bb57600080fd5b6128c78683870161280a565b935060208501359150808211156128dd57600080fd5b506128ea8582860161280a565b9150509250929050565b6000806040838503121561290757600080fd5b612910836125b8565b9150612801602084016125b8565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600181811c9082168061296757607f821691505b6020821081141561298857634e487b7160e01b600052602260045260246000fd5b50919050565b602080825260129082015271504152414c4c41583a204f4e4c5920454f4160701b604082015260600190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60008219821115612a0d57612a0d6129e4565b500190565b60008151612a248185602086016125ef565b9290920192915050565b600080845481600182811c915080831680612a4a57607f831692505b6020808410821415612a6a57634e487b7160e01b86526022600452602486fd5b818015612a7e5760018114612a8f57612abc565b60ff19861689528489019650612abc565b60008b81526020902060005b86811015612ab45781548b820152908501908301612a9b565b505084890196505b505050505050612ae0612acf8286612a12565b64173539b7b760d91b815260050190565b95945050505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612b1c9083018461261b565b9695505050505050565b600060208284031215612b3857600080fd5b81516125b18161257e565b6000600019821415612b5757612b576129e4565b5060010190565b634e487b7160e01b600052601260045260246000fd5b600082612b8357612b83612b5e565b500490565b600082821015612b9a57612b9a6129e4565b500390565b600082612bae57612bae612b5e565b500690565b634e487b7160e01b600052603260045260246000fd5b6bffffffffffffffffffffffff198360601b16815260008251612bf38160148501602087016125ef565b919091016014019392505050565b634e487b7160e01b600052602160045260246000fdfea26469706673582212206bf71c0778b603f98c1ac864f11bb044b1e9e24cbbc040fdf30a978fce7b995a64736f6c634300080a00334f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657200000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000014000000000000000000000000074852c9d93378f70b683883554a1b8a644d7136b000000000000000000000000a627eadbb3efb587ff9114f193dbfb9e536441650000000000000000000000001db7303bd5256178a6970e7499fec3d567b73bb4000000000000000000000000000000000000000000000000000000000000000f506172616c6c617847656e65736973000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000025047000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005068747470733a2f2f676174657761792e70696e6174612e636c6f75642f697066732f516d5335335a335a7374654e514b6744386e45693144376944695135316a454877655068435a7935797832794c7800000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106102465760003560e01c80636f8b44b011610139578063a22cb465116100b6578063d5abeb011161007a578063d5abeb011461067f578063e74c9f2614610695578063e985e9c5146106a8578063f0f44260146106f1578063f2c4ce1e14610711578063f2fde38b1461073157600080fd5b8063a22cb465146105e0578063b88d4fde14610600578063bc8893b414610620578063bce4d6ae1461063f578063c87b56dd1461065f57600080fd5b80638da5cb5b116100fd5780638da5cb5b1461054d57806391b7f5ed1461056b5780639293a5c71461058b578063940cd05b146105ab57806395d89b41146105cb57600080fd5b80636f8b44b0146104ce57806370a08231146104ee578063715018a61461050e5780637e80c186146105235780638456cb591461053857600080fd5b80632f745c59116101c75780634f6ccce71161018b5780634f6ccce71461043557806353135ca01461045557806355f804b31461046f5780635c975abb1461048f5780636352211e146104ae57600080fd5b80632f745c5914610393578063375a069a146103b35780633965ca51146103d35780633f4ba83a1461040057806342842e0e1461041557600080fd5b80630d39fc811161020e5780630d39fc811461031c57806318160ddd1461034057806322127d191461035557806323b872dd1461036b57806326092b831461038b57600080fd5b806301ffc9a71461024b578063046dc1661461028057806306fdde03146102a2578063081812fc146102c4578063095ea7b3146102fc575b600080fd5b34801561025757600080fd5b5061026b610266366004612594565b610751565b60405190151581526020015b60405180910390f35b34801561028c57600080fd5b506102a061029b3660046125d4565b6107be565b005b3480156102ae57600080fd5b506102b761081b565b6040516102779190612647565b3480156102d057600080fd5b506102e46102df36600461265a565b6108ad565b6040516001600160a01b039091168152602001610277565b34801561030857600080fd5b506102a0610317366004612673565b6108f1565b34801561032857600080fd5b50610332600d5481565b604051908152602001610277565b34801561034c57600080fd5b5061033261097f565b34801561036157600080fd5b50610332600e5481565b34801561037757600080fd5b506102a061038636600461269d565b6109a2565b6102a06109ad565b34801561039f57600080fd5b506103326103ae366004612673565b610c27565b3480156103bf57600080fd5b506102a06103ce36600461265a565b610d23565b3480156103df57600080fd5b506103326103ee3660046125d4565b60106020526000908152604090205481565b34801561040c57600080fd5b506102a0610e23565b34801561042157600080fd5b506102a061043036600461269d565b610e57565b34801561044157600080fd5b5061033261045036600461265a565b610e72565b34801561046157600080fd5b50600f5461026b9060ff1681565b34801561047b57600080fd5b506102a061048a366004612764565b610f1c565b34801561049b57600080fd5b50600754600160a01b900460ff1661026b565b3480156104ba57600080fd5b506102e46104c936600461265a565b610f5d565b3480156104da57600080fd5b506102a06104e936600461265a565b610f6f565b3480156104fa57600080fd5b506103326105093660046125d4565b610ff0565b34801561051a57600080fd5b506102a061103e565b34801561052f57600080fd5b506102a0611072565b34801561054457600080fd5b506102a061116f565b34801561055957600080fd5b506007546001600160a01b03166102e4565b34801561057757600080fd5b506102a061058636600461265a565b6111a1565b34801561059757600080fd5b506102a06105a63660046127bc565b6111d0565b3480156105b757600080fd5b506102a06105c63660046127bc565b611214565b3480156105d757600080fd5b506102b761127c565b3480156105ec57600080fd5b506102a06105fb3660046127d7565b61128b565b34801561060c57600080fd5b506102a061061b36600461282a565b611321565b34801561062c57600080fd5b50600f5461026b90610100900460ff1681565b34801561064b57600080fd5b506102a061065a3660046127bc565b61135b565b34801561066b57600080fd5b506102b761067a36600461265a565b611398565b34801561068b57600080fd5b50610332600c5481565b6102a06106a3366004612891565b6114b7565b3480156106b457600080fd5b5061026b6106c33660046128f4565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b3480156106fd57600080fd5b506102a061070c3660046125d4565b611749565b34801561071d57600080fd5b506102a061072c366004612764565b611795565b34801561073d57600080fd5b506102a061074c3660046125d4565b6117d2565b60006001600160e01b031982166380ac58cd60e01b148061078257506001600160e01b03198216635b5e139f60e01b145b8061079d57506001600160e01b0319821663780e9d6360e01b145b806107b857506301ffc9a760e01b6001600160e01b03198316145b92915050565b6007546001600160a01b031633146107f15760405162461bcd60e51b81526004016107e89061291e565b60405180910390fd5b600f80546001600160a01b03909216620100000262010000600160b01b0319909216919091179055565b60606001805461082a90612953565b80601f016020809104026020016040519081016040528092919081815260200182805461085690612953565b80156108a35780601f10610878576101008083540402835291602001916108a3565b820191906000526020600020905b81548152906001019060200180831161088657829003601f168201915b5050505050905090565b60006108b88261186d565b6108d5576040516333d1c03960e21b815260040160405180910390fd5b506000908152600560205260409020546001600160a01b031690565b60006108fc82610f5d565b9050806001600160a01b0316836001600160a01b031614156109315760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b03821614801590610951575061094f81336106c3565b155b1561096f576040516367d9dca160e11b815260040160405180910390fd5b61097a8383836118a1565b505050565b6000546001600160801b03600160801b8204811691811691909103600019011690565b61097a8383836118fd565b3332146109cc5760405162461bcd60e51b81526004016107e89061298e565b600754600160a01b900460ff16156109f65760405162461bcd60e51b81526004016107e8906129ba565b600f54610100900460ff16610a4d5760405162461bcd60e51b815260206004820152601d60248201527f504152414c4c41583a205075626c69632053616c6520436c6f7365642100000060448201526064016107e8565b600d54341015610a9f5760405162461bcd60e51b815260206004820152601b60248201527f504152414c4c41583a20496e73756666696369656e742045544821000000000060448201526064016107e8565b600c54610aaa61097f565b610ab59060016129fa565b1115610b195760405162461bcd60e51b815260206004820152602d60248201527f504152414c4c41583a204d617820537570706c7920666f72205075626c69632060448201526c4d696e7420526561636865642160981b60648201526084016107e8565b600e5433600090815260106020526040902054610b379060016129fa565b1115610bab5760405162461bcd60e51b815260206004820152603e60248201527f504152414c4c41583a2057616c6c65742068617320616c7265616479206d696e60448201527f746564204d617820416d6f756e7420666f72205075626c69632053616c65000060648201526084016107e8565b336000908152601060205260408120805460019290610bcb9084906129fa565b92505081905550610bef336001604051806020016040528060008152506001611b1a565b6040516001815233907f748a2986091c2034d6e93b6f44f771a79f0e1d6acd8a60c68c17d4e1e2feaed29060200160405180910390a2565b6000610c3283610ff0565b8210610c51576040516306ed618760e11b815260040160405180910390fd5b600080546001600160801b03169080805b83811015610d1d57600081815260036020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff161580159282019290925290610cc95750610d15565b80516001600160a01b031615610cde57805192505b876001600160a01b0316836001600160a01b03161415610d135786841415610d0c575093506107b892505050565b6001909301925b505b600101610c62565b50600080fd5b333214610d425760405162461bcd60e51b81526004016107e89061298e565b6007546001600160a01b03163314610d6c5760405162461bcd60e51b81526004016107e89061291e565b600c5481610d7861097f565b610d8291906129fa565b1115610dd05760405162461bcd60e51b815260206004820152601d60248201527f504152414c4c41583a204558434545444544204d415820535550504c5900000060448201526064016107e8565b610dec3382604051806020016040528060008152506001611b1a565b6040518181527f6dc41da7efc7f0e4ff3cc76df99542e60d74c16e8ec252c7bffb4e83a5dbafce906020015b60405180910390a150565b6007546001600160a01b03163314610e4d5760405162461bcd60e51b81526004016107e89061291e565b610e55611ca2565b565b61097a83838360405180602001604052806000815250611321565b600080546001600160801b031681805b82811015610f0257600081815260036020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff16151591810182905290610ef95785831415610ef25750949350505050565b6001909201915b50600101610e82565b506040516329c8c00760e21b815260040160405180910390fd5b6007546001600160a01b03163314610f465760405162461bcd60e51b81526004016107e89061291e565b8051610f599060089060208401906124e5565b5050565b6000610f6882611d3f565b5192915050565b6007546001600160a01b03163314610f995760405162461bcd60e51b81526004016107e89061291e565b610309811115610feb5760405162461bcd60e51b815260206004820152601d60248201527f504152414c4c41583a204f4e4c592052454455434520414c4c4f57454400000060448201526064016107e8565b600c55565b60006001600160a01b038216611019576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600460205260409020546001600160401b031690565b6007546001600160a01b031633146110685760405162461bcd60e51b81526004016107e89061291e565b610e556000611e61565b6007546001600160a01b0316331461109c5760405162461bcd60e51b81526004016107e89061291e565b600b546040516000916001600160a01b03169047908381818185875af1925050503d80600081146110e9576040519150601f19603f3d011682016040523d82523d6000602084013e6110ee565b606091505b505090508061113f5760405162461bcd60e51b815260206004820152601b60248201527f504152414c4c41583a205749544844524157414c204641494c4544000000000060448201526064016107e8565b6040514781527f94effa14ea3a1ef396fa2fd829336d1597f1d76b548c26bfa2332869706638af90602001610e18565b6007546001600160a01b031633146111995760405162461bcd60e51b81526004016107e89061291e565b610e55611eb3565b6007546001600160a01b031633146111cb5760405162461bcd60e51b81526004016107e89061291e565b600d55565b6007546001600160a01b031633146111fa5760405162461bcd60e51b81526004016107e89061291e565b600f80549115156101000261ff0019909216919091179055565b6007546001600160a01b0316331461123e5760405162461bcd60e51b81526004016107e89061291e565b6009805460ff19168215151790556040514281527f15120e52505e619cbf6c2af910d5cf7f9ee1befa55801b078c33e93880b2d60990602001610e18565b60606002805461082a90612953565b6001600160a01b0382163314156112b55760405163b06307db60e01b815260040160405180910390fd5b3360008181526006602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b61132c8484846118fd565b61133884848484611f18565b611355576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b6007546001600160a01b031633146113855760405162461bcd60e51b81526004016107e89061291e565b600f805460ff1916911515919091179055565b60606113a38261186d565b6113c057604051630a14c4b560e41b815260040160405180910390fd5b60095460ff1661145c57600a80546113d790612953565b80601f016020809104026020016040519081016040528092919081815260200182805461140390612953565b80156114505780601f1061142557610100808354040283529160200191611450565b820191906000526020600020905b81548152906001019060200180831161143357829003601f168201915b50505050509050919050565b6008805461146990612953565b1515905061148657604051806020016040528060008152506107b8565b600861149183612018565b6040516020016114a2929190612a2e565b60405160208183030381529060405292915050565b3332146114d65760405162461bcd60e51b81526004016107e89061298e565b600754600160a01b900460ff16156115005760405162461bcd60e51b81526004016107e8906129ba565b61150b338383612115565b6115575760405162461bcd60e51b815260206004820152601b60248201527f504152414c4c41583a20494e56414c4944205349474e4154555245000000000060448201526064016107e8565b600f5460ff166115a95760405162461bcd60e51b815260206004820152601d60248201527f504152414c4c41583a20505249564154452053414c4520434c4f53454400000060448201526064016107e8565b600d543410156115fb5760405162461bcd60e51b815260206004820152601a60248201527f504152414c4c41583a20494e53554646494349454e542045544800000000000060448201526064016107e8565b600c5461160661097f565b6116119060016129fa565b111561165f5760405162461bcd60e51b815260206004820152601d60248201527f504152414c4c41583a204558434545444544204d415820535550504c5900000060448201526064016107e8565b600e543360009081526010602052604090205461167d9060016129fa565b11156116cb5760405162461bcd60e51b815260206004820152601f60248201527f504152414c4c41583a204d4158494d554d20414d4f554e54204d494e5445440060448201526064016107e8565b3360009081526010602052604081208054600192906116eb9084906129fa565b9250508190555061170f336001604051806020016040528060008152506001611b1a565b6040516001815233907f73c70fae6461815259bb17577a08362a747e97f1b952b86e211522d4a24f95379060200160405180910390a25050565b6007546001600160a01b031633146117735760405162461bcd60e51b81526004016107e89061291e565b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b6007546001600160a01b031633146117bf5760405162461bcd60e51b81526004016107e89061291e565b8051610f5990600a9060208401906124e5565b6007546001600160a01b031633146117fc5760405162461bcd60e51b81526004016107e89061291e565b6001600160a01b0381166118615760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016107e8565b61186a81611e61565b50565b600080546001600160801b0316821080156107b8575050600090815260036020526040902054600160e01b900460ff161590565b60008281526005602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600061190882611d3f565b80519091506000906001600160a01b0316336001600160a01b031614806119365750815161193690336106c3565b80611951575033611946846108ad565b6001600160a01b0316145b90508061197157604051632ce44b5f60e11b815260040160405180910390fd5b846001600160a01b031682600001516001600160a01b0316146119a65760405162a1148160e81b815260040160405180910390fd5b6001600160a01b0384166119cd57604051633a954ecd60e21b815260040160405180910390fd5b6119dd60008484600001516118a1565b6001600160a01b038581166000908152600460209081526040808320805467ffffffffffffffff198082166001600160401b0392831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600390945282852080546001600160e01b031916909417600160a01b429092169190910217909255908601808352912054909116611ad0576000546001600160801b0316811015611ad057825160008281526003602090815260409091208054918601516001600160401b0316600160a01b026001600160e01b03199092166001600160a01b03909316929092171790555b5082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b5050505050565b6000546001600160801b03166001600160a01b038516611b4c57604051622e076360e81b815260040160405180910390fd5b83611b6a5760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038516600081815260046020908152604080832080546001600160801b031981166001600160401b038083168c0181169182176801000000000000000067ffffffffffffffff1990941690921783900481168c018116909202179091558584526003909252822080546001600160e01b031916909317600160a01b42909216919091021790915581905b85811015611c7c5760405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4838015611c525750611c506000888488611f18565b155b15611c70576040516368d2bf6b60e11b815260040160405180910390fd5b60019182019101611bfb565b50600080546001600160801b0319166001600160801b0392909216919091179055611b13565b600754600160a01b900460ff16611cf25760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016107e8565b6007805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60408051606081018252600080825260208201819052918101829052905482906001600160801b0316811015611e4857600081815260036020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff16151591810182905290611e465780516001600160a01b031615611ddd579392505050565b5060001901600081815260036020908152604091829020825160608101845290546001600160a01b038116808352600160a01b82046001600160401b031693830193909352600160e01b900460ff1615159281019290925215611e41579392505050565b611ddd565b505b604051636f96cda160e11b815260040160405180910390fd5b600780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600754600160a01b900460ff1615611edd5760405162461bcd60e51b81526004016107e8906129ba565b6007805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611d223390565b60006001600160a01b0384163b1561200c57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611f5c903390899088908890600401612ae9565b6020604051808303816000875af1925050508015611f97575060408051601f3d908101601f19168201909252611f9491810190612b26565b60015b611ff2573d808015611fc5576040519150601f19603f3d011682016040523d82523d6000602084013e611fca565b606091505b508051611fea576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612010565b5060015b949350505050565b60608161203c5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612066578061205081612b43565b915061205f9050600a83612b74565b9150612040565b6000816001600160401b03811115612080576120806126d9565b6040519080825280601f01601f1916602001820160405280156120aa576020820181803683370190505b5090505b8415612010576120bf600183612b88565b91506120cc600a86612b9f565b6120d79060306129fa565b60f81b8183815181106120ec576120ec612bb3565b60200101906001600160f81b031916908160001a90535061210e600a86612b74565b94506120ae565b600080848460405160200161212b929190612bc9565b60408051601f198184030181529190528051602090910120905061214f8184612170565b600f546201000090046001600160a01b039081169116149150509392505050565b600080600061217f8585612194565b9150915061218c81612204565b509392505050565b6000808251604114156121cb5760208301516040840151606085015160001a6121bf878285856123bf565b945094505050506121fd565b8251604014156121f557602083015160408401516121ea8683836124ac565b9350935050506121fd565b506000905060025b9250929050565b600081600481111561221857612218612c01565b14156122215750565b600181600481111561223557612235612c01565b14156122835760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016107e8565b600281600481111561229757612297612c01565b14156122e55760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016107e8565b60038160048111156122f9576122f9612c01565b14156123525760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016107e8565b600481600481111561236657612366612c01565b141561186a5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016107e8565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156123f657506000905060036124a3565b8460ff16601b1415801561240e57508460ff16601c14155b1561241f57506000905060046124a3565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612473573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661249c576000600192509250506124a3565b9150600090505b94509492505050565b6000806001600160ff1b038316816124c960ff86901c601b6129fa565b90506124d7878288856123bf565b935093505050935093915050565b8280546124f190612953565b90600052602060002090601f0160209004810192826125135760008555612559565b82601f1061252c57805160ff1916838001178555612559565b82800160010185558215612559579182015b8281111561255957825182559160200191906001019061253e565b50612565929150612569565b5090565b5b80821115612565576000815560010161256a565b6001600160e01b03198116811461186a57600080fd5b6000602082840312156125a657600080fd5b81356125b18161257e565b9392505050565b80356001600160a01b03811681146125cf57600080fd5b919050565b6000602082840312156125e657600080fd5b6125b1826125b8565b60005b8381101561260a5781810151838201526020016125f2565b838111156113555750506000910152565b600081518084526126338160208601602086016125ef565b601f01601f19169290920160200192915050565b6020815260006125b1602083018461261b565b60006020828403121561266c57600080fd5b5035919050565b6000806040838503121561268657600080fd5b61268f836125b8565b946020939093013593505050565b6000806000606084860312156126b257600080fd5b6126bb846125b8565b92506126c9602085016125b8565b9150604084013590509250925092565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b0380841115612709576127096126d9565b604051601f8501601f19908116603f01168101908282118183101715612731576127316126d9565b8160405280935085815286868601111561274a57600080fd5b858560208301376000602087830101525050509392505050565b60006020828403121561277657600080fd5b81356001600160401b0381111561278c57600080fd5b8201601f8101841361279d57600080fd5b612010848235602084016126ef565b803580151581146125cf57600080fd5b6000602082840312156127ce57600080fd5b6125b1826127ac565b600080604083850312156127ea57600080fd5b6127f3836125b8565b9150612801602084016127ac565b90509250929050565b600082601f83011261281b57600080fd5b6125b1838335602085016126ef565b6000806000806080858703121561284057600080fd5b612849856125b8565b9350612857602086016125b8565b92506040850135915060608501356001600160401b0381111561287957600080fd5b6128858782880161280a565b91505092959194509250565b600080604083850312156128a457600080fd5b82356001600160401b03808211156128bb57600080fd5b6128c78683870161280a565b935060208501359150808211156128dd57600080fd5b506128ea8582860161280a565b9150509250929050565b6000806040838503121561290757600080fd5b612910836125b8565b9150612801602084016125b8565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600181811c9082168061296757607f821691505b6020821081141561298857634e487b7160e01b600052602260045260246000fd5b50919050565b602080825260129082015271504152414c4c41583a204f4e4c5920454f4160701b604082015260600190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60008219821115612a0d57612a0d6129e4565b500190565b60008151612a248185602086016125ef565b9290920192915050565b600080845481600182811c915080831680612a4a57607f831692505b6020808410821415612a6a57634e487b7160e01b86526022600452602486fd5b818015612a7e5760018114612a8f57612abc565b60ff19861689528489019650612abc565b60008b81526020902060005b86811015612ab45781548b820152908501908301612a9b565b505084890196505b505050505050612ae0612acf8286612a12565b64173539b7b760d91b815260050190565b95945050505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612b1c9083018461261b565b9695505050505050565b600060208284031215612b3857600080fd5b81516125b18161257e565b6000600019821415612b5757612b576129e4565b5060010190565b634e487b7160e01b600052601260045260246000fd5b600082612b8357612b83612b5e565b500490565b600082821015612b9a57612b9a6129e4565b500390565b600082612bae57612bae612b5e565b500690565b634e487b7160e01b600052603260045260246000fd5b6bffffffffffffffffffffffff198360601b16815260008251612bf38160148501602087016125ef565b919091016014019392505050565b634e487b7160e01b600052602160045260246000fdfea26469706673582212206bf71c0778b603f98c1ac864f11bb044b1e9e24cbbc040fdf30a978fce7b995a64736f6c634300080a0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000014000000000000000000000000074852c9d93378f70b683883554a1b8a644d7136b000000000000000000000000a627eadbb3efb587ff9114f193dbfb9e536441650000000000000000000000001db7303bd5256178a6970e7499fec3d567b73bb4000000000000000000000000000000000000000000000000000000000000000f506172616c6c617847656e65736973000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000025047000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005068747470733a2f2f676174657761792e70696e6174612e636c6f75642f697066732f516d5335335a335a7374654e514b6744386e45693144376944695135316a454877655068435a7935797832794c7800000000000000000000000000000000
-----Decoded View---------------
Arg [0] : name_ (string): ParallaxGenesis
Arg [1] : symbol_ (string): PG
Arg [2] : _initBaseURI (string): https://gateway.pinata.cloud/ipfs/QmS53Z3ZsteNQKgD8nEi1D7iDiQ51jEHwePhCZy5yx2yLx
Arg [3] : _newOwner (address): 0x74852C9D93378f70b683883554A1b8a644D7136b
Arg [4] : _signerAddress (address): 0xA627Eadbb3Efb587ff9114f193DbFb9e53644165
Arg [5] : _treasury (address): 0x1Db7303bD5256178a6970e7499fEC3D567B73bb4
-----Encoded View---------------
14 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [3] : 00000000000000000000000074852c9d93378f70b683883554a1b8a644d7136b
Arg [4] : 000000000000000000000000a627eadbb3efb587ff9114f193dbfb9e53644165
Arg [5] : 0000000000000000000000001db7303bd5256178a6970e7499fec3d567b73bb4
Arg [6] : 000000000000000000000000000000000000000000000000000000000000000f
Arg [7] : 506172616c6c617847656e657369730000000000000000000000000000000000
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [9] : 5047000000000000000000000000000000000000000000000000000000000000
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000050
Arg [11] : 68747470733a2f2f676174657761792e70696e6174612e636c6f75642f697066
Arg [12] : 732f516d5335335a335a7374654e514b6744386e45693144376944695135316a
Arg [13] : 454877655068435a7935797832794c7800000000000000000000000000000000
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.