NFT
Overview
TokenID
2624
Total Transfers
-
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
RoughRyderNFT
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
Yes with 200 runs
Other Settings:
shanghai EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0 // solhint-disable-next-line pragma solidity 0.8.20; import "./ERC721A.sol"; import "./interfaces/IERC20_USDT.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; contract RoughRyderNFT is ERC721A, Ownable, ReentrancyGuard { using Strings for uint256; string baseURI; /// @notice Max supply of roughryder to be minted uint256 public constant MAX_SUPPLY = 3000; /// @notice Max supply of roughryder to be minted using ERC-20 uint256 public nonEthMaxSupply = 500; /// @notice current supply of token minted using ERC-20 uint256 public nonEthCurrentSupply = 0; /// @notice Max minting limit per wallet uint256 public totalMintLimit = 15; /// @notice Max minting limit using ERC20 per wallet uint256 public nonEthMintLimit = 3; /// @notice Timestamp of reveal date uint256 public revealTimestamp; /// @notice Maximum mint per tier per wallet uint256[] public maxMintPerTier = [5, 15, 15]; /// @notice Signer address for encrypted signatures address public secret; /// @notice Address of treasury address public treasury; /// @notice USDT token address address public usdtTokenAddress = 0xdAC17F958D2ee523a2206206994597C13D831ec7; /// @notice Total NFT amount minted per wallet mapping(address => uint256) public totalMintedAmount; /// @notice NFT Amount minted per wallet using ERC20 tokens mapping(address => uint256) public nonEthMintedAmount; /// @notice Track ETH minted for each tier per wallet mapping(address => mapping(uint256 => uint256)) public ethMintedPerTier; /// @notice Whitelisted ERC20 that can bypass the nonEthMintLimit mapping(address => bool) public whitelistedERC20; /// @notice Refund flag for each roughryder mapping(uint256 => bool) public notRefundable; /// @notice Authorization flag for orchestrators mapping(address => bool) public isOrchestrator; /// @notice Mapping for used signatures mapping(bytes => bool) public usedSignatures; struct PurchaseInfo { uint256 quantity; address paymentToken; uint256 priceOrTier; } event Purchased( address operator, address user, uint256 currentSupply, PurchaseInfo[] purchases, uint256 timestamp ); event Refunded(address user, uint256 tokenId); event Erc20TokenWhitelisted(address[] tokenAddresses, bool status); event MaxMintPerTierUpdated(uint256[] newMaxMintPerTier); event MintLimitChanged( uint256 newTotalMintLimit, uint256 newNonEthLimit, uint256 newNonEthMaxSupply, address operator ); event Received(address, uint256); /// @param secretAddress Signer address /// @dev Create ERC721A token: Rough Ryders - RoughRyders constructor(address secretAddress) ERC721A("Rough Ryders", "RRYDER") { secret = secretAddress; } receive() external payable { emit Received(msg.sender, msg.value); } /// @notice Check if caller is an orchestrator /// @dev Revert transaction is msg.sender is not Authorized modifier onlyOrchestrator() { require(isOrchestrator[msg.sender], "Operator not allowed"); _; } /// @notice Check if the wallet is valid /// @dev Revert transaction if zero address modifier noZeroAddress(address _address) { require(_address != address(0), "Cannot send to zero address"); _; } /// @notice Purchase an RoughRyder using whitelisted ECR20 tokens or ETH /// @param to Address to send the tokens /// @param totalQuantity Total amount of tokens to be minted /// @param purchases Array of PurchaseInfo struct /// @param signature Encrypted signature to verify the minting function purchase( address to, uint256 totalQuantity, PurchaseInfo[] memory purchases, bytes memory signature ) external payable { require( _verifyHashSignature( keccak256(abi.encode(to, purchases, msg.value)), signature ), "purchase: Signature is invalid" ); require( totalMintedAmount[to] + totalQuantity <= totalMintLimit, "purchase: Exceed mint limit per wallet" ); uint256 currentSupply = _totalMinted(); require( totalQuantity + currentSupply <= MAX_SUPPLY, "purchase: Supply limit" ); for (uint256 i = 0; i < purchases.length; i++) { PurchaseInfo memory purchaseInfo = purchases[i]; _validateMintingParameters( to, purchaseInfo.paymentToken, purchaseInfo.priceOrTier, purchaseInfo.quantity ); } totalMintedAmount[to] += totalQuantity; _safeMint(to, totalQuantity); emit Purchased( msg.sender, to, currentSupply, purchases, block.timestamp ); } /// @notice Mint free RoughRyder for whitelisted addresses /// @param to Address to send the tokens /// @param quantity Amount of tokens to be minted /// @param signature Encrypted signature to verify the minting function claimFreeMint( address to, uint256 quantity, bytes memory signature ) external { require( _verifyHashSignature( keccak256(abi.encode(to, quantity, "Rough Ryders free mint")), signature ), "claimFreeMint: Signature is invalid" ); require(!usedSignatures[signature], "claimFreeMint: Signature used"); require( totalMintedAmount[to] + quantity <= totalMintLimit, "claimFreeMint: Exceed mint limit per wallet" ); uint256 currentSupply = _totalMinted(); // Create an array to store purchase information PurchaseInfo[] memory purchases = new PurchaseInfo[](1); // Add the purchase information to the array purchases[0] = PurchaseInfo(quantity, address(0), 3); require( quantity + currentSupply <= MAX_SUPPLY, "claimFreeMint: Supply limit" ); usedSignatures[signature] = true; totalMintedAmount[to] += quantity; _safeMint(to, quantity); emit Purchased( msg.sender, to, currentSupply, purchases, block.timestamp ); } /// @notice ETH back function /// @param depositAddress Address to refund the funds /// @param tokenId RoughRyder NFT ID to be refunded /// @param tokenAddress tokenAddress of the token to be refunded with /// @param balance balance to be refunded /// @dev Can only be called by authorized orchestrators during refund period function refund( address depositAddress, uint256 tokenId, address tokenAddress, uint256 balance ) external onlyOrchestrator noZeroAddress(depositAddress) { require( !notRefundable[tokenId], "Refund: The token is not available for refund" ); require( ownerOf(tokenId) == depositAddress, "Refund: Address is not the token owner" ); safeTransferFrom(depositAddress, treasury, tokenId); if (tokenAddress == address(0)) { (bool success, ) = depositAddress.call{value: balance}(""); require(success, "Refund: ETH transfer failed"); } else { require( IERC20(tokenAddress).transfer(depositAddress, balance), "Refund: ERC20 token transfer failed" ); } emit Refunded(depositAddress, tokenId); } /// INTERNAL FUNCTIONS function _validateMintingParameters( address to, address tokenAddress, uint256 priceOrTier, uint256 quantity ) internal { if (tokenAddress == address(0)) { require( ethMintedPerTier[to][priceOrTier] + quantity <= maxMintPerTier[priceOrTier], "_validateMintingParameters: Exceed tier mint limit" ); ethMintedPerTier[to][priceOrTier] += quantity; } else { if (!whitelistedERC20[tokenAddress]) { require( quantity + nonEthCurrentSupply <= nonEthMaxSupply, "_validateMintingParameters: ERC-20 Supply limit exceed" ); require( nonEthMintedAmount[to] + quantity <= nonEthMintLimit, "_validateMintingParameters: Exceed mint limit" ); nonEthMintedAmount[to] += quantity; nonEthCurrentSupply += quantity; } if (usdtTokenAddress == tokenAddress) { IERC20_USDT(tokenAddress).transferFrom( msg.sender, address(this), priceOrTier ); } else { require( IERC20(tokenAddress).transferFrom( msg.sender, address(this), priceOrTier ), "_validateMintingParameters: Token transfer failed" ); } } } /// @notice Verify that message is signed by secret wallet function _verifyHashSignature( bytes32 freshHash, bytes memory signature ) internal view returns (bool) { bytes32 hash = keccak256( abi.encodePacked("\x19Ethereum Signed Message:\n32", freshHash) ); bytes32 r; bytes32 s; uint8 v; if (signature.length != 65) { return false; } assembly { r := mload(add(signature, 32)) s := mload(add(signature, 64)) v := byte(0, mload(add(signature, 96))) } if (v < 27) { v += 27; } address signer = address(0); if (v == 27 || v == 28) { // solium-disable-next-line arg-overflow signer = ecrecover(hash, v, r, s); } return secret == signer; } /// OWNABLE FUNCTIONS function addWhitelistedERC20( address[] memory tokenAddresses, bool status ) external onlyOwner { for (uint256 i = 0; i < tokenAddresses.length; i++) { whitelistedERC20[tokenAddresses[i]] = status; } emit Erc20TokenWhitelisted(tokenAddresses, status); } function setMintLimit( uint256 newTotalMintLimit, uint256 newNonEthLimit, uint256 newNonEthMaxSupply ) external onlyOwner { totalMintLimit = newTotalMintLimit; nonEthMintLimit = newNonEthLimit; nonEthMaxSupply = newNonEthMaxSupply; emit MintLimitChanged( newTotalMintLimit, newNonEthLimit, newNonEthMaxSupply, msg.sender ); } function setMaxMintPerTier( uint256[] memory newMaxMintPerTier ) external onlyOwner { require( newMaxMintPerTier.length == maxMintPerTier.length, "Invalid array length" ); for (uint256 i = 0; i < newMaxMintPerTier.length; i++) { maxMintPerTier[i] = newMaxMintPerTier[i]; } emit MaxMintPerTierUpdated(newMaxMintPerTier); } /// @notice Change the Base URI /// @param newURI new URI to be set /// @dev Can only be called by the contract owner function setBaseURI(string memory newURI) external onlyOwner { baseURI = newURI; } /// @notice Change the signer address /// @param secretAddress new signer for encrypted signatures /// @dev Can only be called by the contract owner function setSecret( address secretAddress ) external onlyOwner noZeroAddress(secretAddress) { secret = secretAddress; } /// @notice Change the treasury address /// @param treasuryAddress new treasury address /// @dev Can only be called by the contract owner function setTreasury( address treasuryAddress ) external onlyOwner noZeroAddress(treasuryAddress) { treasury = treasuryAddress; } /// @notice Add new authorized orchestrators /// @param operator Orchestrator address /// @param status set authorization true or false /// @dev Can only be called by the contract owner function setOrchestrator( address operator, bool status ) external onlyOwner noZeroAddress(operator) { isOrchestrator[operator] = status; } /// @notice Set reveal timestamp /// @dev Can only be called by the contract owner function setRevealTimestamp() external onlyOwner { require(revealTimestamp == 0, "Reveal timestamp already set"); revealTimestamp = block.timestamp; } /// @notice Send ETH to specific address /// @param to Address to send the funds /// @param amount ETH amount to be sent /// @dev Can only be called by the contract owner function withdrawETH( address to, uint256 amount ) public nonReentrant onlyOwner noZeroAddress(to) { require(amount <= address(this).balance, "Insufficient funds"); (bool success, ) = to.call{value: amount}(""); require(success, "withdrawETH: ETH transfer failed"); } /// @notice Send ERC20 tokens to specific address /// @param to Address to send the funds /// @param tokenAddresses Addresses of the tokens to be sent /// @dev Can only be called by the contract owner function withdrawERC20( address to, address[] memory tokenAddresses ) public nonReentrant onlyOwner noZeroAddress(to) { for (uint256 i = 0; i < tokenAddresses.length; i++) { IERC20 token = IERC20(tokenAddresses[i]); uint256 tokenBalance = token.balanceOf(address(this)); if (tokenBalance > 0) { token.transfer(to, tokenBalance); } } } /// VIEW FUNCTIONS /// @notice Return total minted amount function minted() external view returns (uint256) { return _totalMinted(); } /// @notice Return Base URI function _baseURI() internal view virtual override returns (string memory) { return baseURI; } /// @notice Inherit from ERC721, return token URI, revert is tokenId doesn't exist function tokenURI( uint256 tokenId ) public view virtual override returns (string memory) { require( _exists(tokenId), "ERC721Metadata: URI query for nonexistent token" ); return string(abi.encodePacked(baseURI, tokenId.toString())); } /// @notice Inherit from ERC721, checks if a token exists function exists(uint256 tokenId) external view returns (bool) { return _exists(tokenId); } /// OVERRIDE FUNCTIONS /// @notice Inherit from ERC721, added check of transfer period for refund function transferFrom( address from, address to, uint256 tokenId ) public virtual override { _checkTransferPeriod(tokenId); super.transferFrom(from, to, tokenId); } /// @notice Inherit from ERC721, added check of transfer period for refund function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { _checkTransferPeriod(tokenId); super.safeTransferFrom(from, to, tokenId, ""); } /// @notice Checks transfer after allow period to invalidate refund function _checkTransferPeriod(uint256 tokenId) internal { if ( !notRefundable[tokenId] && revealTimestamp != 0 && block.timestamp > revealTimestamp + 1 hours ) { notRefundable[tokenId] = true; } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IERC20_USDT { function transferFrom(address from, address to, uint value) external; }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.0.0 // Creator: Chiru Labs pragma solidity ^0.8.4; /** * @dev Interface of an ERC721A compliant contract. */ interface IERC721A { /** * The caller must own the token or be an approved operator. */ error ApprovalCallerNotOwnerNorApproved(); /** * The token does not exist. */ error ApprovalQueryForNonexistentToken(); /** * The caller cannot approve to their own address. */ error ApproveToCaller(); /** * The caller cannot approve to the current owner. */ error ApprovalToCurrentOwner(); /** * Cannot query the balance for the zero address. */ error BalanceQueryForZeroAddress(); /** * Cannot mint to the zero address. */ error MintToZeroAddress(); /** * The quantity of tokens minted must be more than zero. */ error MintZeroQuantity(); /** * The token does not exist. */ error OwnerQueryForNonexistentToken(); /** * The caller must own the token or be an approved operator. */ error TransferCallerNotOwnerNorApproved(); /** * The token must be owned by `from`. */ error TransferFromIncorrectOwner(); /** * Cannot safely transfer to a contract that does not implement the ERC721Receiver interface. */ error TransferToNonERC721ReceiverImplementer(); /** * Cannot transfer to the zero address. */ error TransferToZeroAddress(); /** * The token does not exist. */ error URIQueryForNonexistentToken(); 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; } /** * @dev Returns the total amount of tokens stored by the contract. * * Burned tokens are calculated here, use `_totalMinted()` if you want to count just minted tokens. */ function totalSupply() external view returns (uint256); // ============================== // 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); // ============================== // IERC721 // ============================== /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); // ============================== // IERC721Metadata // ============================== /** * @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 // ERC721A Contracts v4.0.0 // Creator: Chiru Labs pragma solidity ^0.8.4; import "./IERC721A.sol"; /** * @dev ERC721 token receiver interface. */ interface ERC721A__IERC721Receiver { function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at _startTokenId() (defaults to 0, e.g. 0, 1, 2, 3..). * * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * * Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721A is IERC721A { // Mask of an entry in packed address data. uint256 private constant BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1; // The bit position of `numberMinted` in packed address data. uint256 private constant BITPOS_NUMBER_MINTED = 64; // The bit position of `numberBurned` in packed address data. uint256 private constant BITPOS_NUMBER_BURNED = 128; // The bit position of `aux` in packed address data. uint256 private constant BITPOS_AUX = 192; // Mask of all 256 bits in packed address data except the 64 bits for `aux`. uint256 private constant BITMASK_AUX_COMPLEMENT = (1 << 192) - 1; // The bit position of `startTimestamp` in packed ownership. uint256 private constant BITPOS_START_TIMESTAMP = 160; // The bit mask of the `burned` bit in packed ownership. uint256 private constant BITMASK_BURNED = 1 << 224; // The bit position of the `nextInitialized` bit in packed ownership. uint256 private constant BITPOS_NEXT_INITIALIZED = 225; // The bit mask of the `nextInitialized` bit in packed ownership. uint256 private constant BITMASK_NEXT_INITIALIZED = 1 << 225; // The tokenId of the next token to be minted. uint256 private _currentIndex; // The number of tokens burned. uint256 private _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 `_packedOwnershipOf` implementation for details. // // Bits Layout: // - [0..159] `addr` // - [160..223] `startTimestamp` // - [224] `burned` // - [225] `nextInitialized` mapping(uint256 => uint256) private _packedOwnerships; // Mapping owner address to address data. // // Bits Layout: // - [0..63] `balance` // - [64..127] `numberMinted` // - [128..191] `numberBurned` // - [192..255] `aux` mapping(address => uint256) private _packedAddressData; // Mapping from token ID to approved address. mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; _currentIndex = _startTokenId(); } /** * @dev Returns the starting token ID. * To change the starting token ID, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { return 1; } /** * @dev Returns the next token ID to be minted. */ function _nextTokenId() internal view returns (uint256) { return _currentIndex; } /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see `_totalMinted`. */ function totalSupply() public view override returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than `_currentIndex - _startTokenId()` times. unchecked { return _currentIndex - _burnCounter - _startTokenId(); } } /** * @dev Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view returns (uint256) { // Counter underflow is impossible as _currentIndex does not decrement, // and it is initialized to `_startTokenId()` unchecked { return _currentIndex - _startTokenId(); } } /** * @dev Returns the total number of tokens burned. */ function _totalBurned() internal view returns (uint256) { return _burnCounter; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface( bytes4 interfaceId ) public view virtual override returns (bool) { // The interface IDs are constants representing the first 4 bytes of the XOR of // all function selectors in the interface. See: https://eips.ethereum.org/EIPS/eip-165 // e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)` return interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165. interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721. interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata. } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view override returns (uint256) { if (_addressToUint256(owner) == 0) revert BalanceQueryForZeroAddress(); return _packedAddressData[owner] & BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> BITPOS_NUMBER_MINTED) & BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> BITPOS_NUMBER_BURNED) & BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the auxillary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { return uint64(_packedAddressData[owner] >> BITPOS_AUX); } /** * Sets the auxillary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal { uint256 packed = _packedAddressData[owner]; uint256 auxCasted; assembly { // Cast aux without masking. auxCasted := aux } packed = (packed & BITMASK_AUX_COMPLEMENT) | (auxCasted << BITPOS_AUX); _packedAddressData[owner] = packed; } /** * Returns the packed ownership data of `tokenId`. */ function _packedOwnershipOf( uint256 tokenId ) private view returns (uint256) { uint256 curr = tokenId; unchecked { if (_startTokenId() <= curr) if (curr < _currentIndex) { uint256 packed = _packedOwnerships[curr]; // If not burned. if (packed & BITMASK_BURNED == 0) { // 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. // // We can directly compare the packed value. // If the address is zero, packed is zero. while (packed == 0) { packed = _packedOwnerships[--curr]; } return packed; } } } revert OwnerQueryForNonexistentToken(); } /** * Returns the unpacked `TokenOwnership` struct from `packed`. */ function _unpackedOwnership( uint256 packed ) private pure returns (TokenOwnership memory ownership) { ownership.addr = address(uint160(packed)); ownership.startTimestamp = uint64(packed >> BITPOS_START_TIMESTAMP); ownership.burned = packed & BITMASK_BURNED != 0; } /** * Returns the unpacked `TokenOwnership` struct at `index`. */ function _ownershipAt( uint256 index ) internal view returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnerships[index]); } /** * @dev Initializes the ownership slot minted at `index` for efficiency purposes. */ function _initializeOwnershipAt(uint256 index) internal { if (_packedOwnerships[index] == 0) { _packedOwnerships[index] = _packedOwnershipOf(index); } } /** * 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) { return _unpackedOwnership(_packedOwnershipOf(tokenId)); } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view override returns (address) { return address(uint160(_packedOwnershipOf(tokenId))); } /** * @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, _toString(tokenId))) : ""; } /** * @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 Casts the address to uint256 without masking. */ function _addressToUint256( address value ) private pure returns (uint256 result) { assembly { result := value } } /** * @dev Casts the boolean to uint256 without branching. */ function _boolToUint256(bool value) private pure returns (uint256 result) { assembly { result := value } } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public override { address owner = address(uint160(_packedOwnershipOf(tokenId))); if (to == owner) revert ApprovalToCurrentOwner(); if (_msgSenderERC721A() != owner) if (!isApprovedForAll(owner, _msgSenderERC721A())) { revert ApprovalCallerNotOwnerNorApproved(); } _tokenApprovals[tokenId] = to; emit Approval(owner, to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved( uint256 tokenId ) public view override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll( address operator, bool approved ) public virtual override { if (operator == _msgSenderERC721A()) revert ApproveToCaller(); _operatorApprovals[_msgSenderERC721A()][operator] = approved; emit ApprovalForAll(_msgSenderERC721A(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll( address owner, address operator ) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { _transfer(from, to, tokenId); if (to.code.length != 0) if (!_checkContractOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), */ function _exists(uint256 tokenId) internal view returns (bool) { return _startTokenId() <= tokenId && tokenId < _currentIndex && // If within bounds, _packedOwnerships[tokenId] & BITMASK_BURNED == 0; // and not burned. } /** * @dev Equivalent to `_safeMint(to, quantity, '')`. */ 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 { uint256 startTokenId = _currentIndex; if (_addressToUint256(to) == 0) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1 // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1 unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the balance and number minted. _packedAddressData[to] += quantity * ((1 << BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _addressToUint256(to) | (block.timestamp << BITPOS_START_TIMESTAMP) | (_boolToUint256(quantity == 1) << BITPOS_NEXT_INITIALIZED); uint256 updatedIndex = startTokenId; uint256 end = updatedIndex + quantity; if (to.code.length != 0) { do { emit Transfer(address(0), to, updatedIndex); if ( !_checkContractOnERC721Received( address(0), to, updatedIndex++, _data ) ) { revert TransferToNonERC721ReceiverImplementer(); } } while (updatedIndex < end); // Reentrancy protection if (_currentIndex != startTokenId) revert(); } else { do { emit Transfer(address(0), to, updatedIndex++); } while (updatedIndex < end); } _currentIndex = updatedIndex; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev 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) internal { uint256 startTokenId = _currentIndex; if (_addressToUint256(to) == 0) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1 // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1 unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the balance and number minted. _packedAddressData[to] += quantity * ((1 << BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _addressToUint256(to) | (block.timestamp << BITPOS_START_TIMESTAMP) | (_boolToUint256(quantity == 1) << BITPOS_NEXT_INITIALIZED); uint256 updatedIndex = startTokenId; uint256 end = updatedIndex + quantity; do { emit Transfer(address(0), to, updatedIndex++); } while (updatedIndex < end); _currentIndex = updatedIndex; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer(address from, address to, uint256 tokenId) private { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner(); address approvedAddress = _tokenApprovals[tokenId]; bool isApprovedOrOwner = (_msgSenderERC721A() == from || isApprovedForAll(from, _msgSenderERC721A()) || approvedAddress == _msgSenderERC721A()); if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved(); if (_addressToUint256(to) == 0) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner. if (_addressToUint256(approvedAddress) != 0) { delete _tokenApprovals[tokenId]; } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256. unchecked { // We can directly increment and decrement the balances. --_packedAddressData[from]; // Updates: `balance -= 1`. ++_packedAddressData[to]; // Updates: `balance += 1`. // Updates: // - `address` to the next owner. // - `startTimestamp` to the timestamp of transfering. // - `burned` to `false`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _addressToUint256(to) | (block.timestamp << BITPOS_START_TIMESTAMP) | BITMASK_NEXT_INITIALIZED; // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Equivalent to `_burn(tokenId, false)`. */ function _burn(uint256 tokenId) internal virtual { _burn(tokenId, false); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId, bool approvalCheck) internal virtual { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); address from = address(uint160(prevOwnershipPacked)); address approvedAddress = _tokenApprovals[tokenId]; if (approvalCheck) { bool isApprovedOrOwner = (_msgSenderERC721A() == from || isApprovedForAll(from, _msgSenderERC721A()) || approvedAddress == _msgSenderERC721A()); if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved(); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner. if (_addressToUint256(approvedAddress) != 0) { delete _tokenApprovals[tokenId]; } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256. unchecked { // Updates: // - `balance -= 1`. // - `numberBurned += 1`. // // We can directly decrement the balance, and increment the number burned. // This is equivalent to `packed -= 1; packed += 1 << BITPOS_NUMBER_BURNED;`. _packedAddressData[from] += (1 << BITPOS_NUMBER_BURNED) - 1; // Updates: // - `address` to the last owner. // - `startTimestamp` to the timestamp of burning. // - `burned` to `true`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _addressToUint256(from) | (block.timestamp << BITPOS_START_TIMESTAMP) | BITMASK_BURNED | BITMASK_NEXT_INITIALIZED; // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { try ERC721A__IERC721Receiver(to).onERC721Received( _msgSenderERC721A(), from, tokenId, _data ) returns (bytes4 retval) { return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } /** * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting. * And also called before burning one token. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes * minting. * And also called after one token has been burned. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Returns the message sender (defaults to `msg.sender`). * * If you are writing GSN compatible contracts, you need to override this function. */ function _msgSenderERC721A() internal view virtual returns (address) { return msg.sender; } /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function _toString( uint256 value ) internal pure returns (string memory ptr) { assembly { // The maximum value of a uint256 contains 78 digits (1 byte per digit), // but we allocate 128 bytes to keep the free memory pointer 32-byte word aliged. // We will need 1 32-byte word to store the length, // and 3 32-byte words to store a maximum of 78 digits. Total: 32 + 3 * 32 = 128. ptr := add(mload(0x40), 128) // Update the free memory pointer to allocate. mstore(0x40, ptr) // Cache the end of the memory to calculate the length later. let end := ptr // We write the string from the rightmost digit to the leftmost digit. // The following is essentially a do-while loop that also handles the zero case. // Costs a bit more than early returning for the zero case, // but cheaper in terms of deployment and overall runtime costs. for { // Initialize and perform the first pass without check. let temp := value // Move the pointer 1 byte leftwards to point to an empty character slot. ptr := sub(ptr, 1) // Write the character to the pointer. 48 is the ASCII index of '0'. mstore8(ptr, add(48, mod(temp, 10))) temp := div(temp, 10) } temp { // Keep dividing `temp` until zero. temp := div(temp, 10) } { // Body of the for loop. ptr := sub(ptr, 1) mstore8(ptr, add(48, mod(temp, 10))) } let length := sub(end, ptr) // Move the pointer 32 bytes leftwards to make room for the length. ptr := sub(ptr, 32) // Store the length. mstore(ptr, length) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv( uint256 x, uint256 y, uint256 denominator, Rounding rounding ) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10**64) { value /= 10**64; result += 64; } if (value >= 10**32) { value /= 10**32; result += 32; } if (value >= 10**16) { value /= 10**16; result += 16; } if (value >= 10**8) { value /= 10**8; result += 8; } if (value >= 10**4) { value /= 10**4; result += 4; } if (value >= 10**2) { value /= 10**2; result += 2; } if (value >= 10**1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @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] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (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 Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { 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); } }
{ "remappings": [], "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "shanghai", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"secretAddress","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":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[]","name":"tokenAddresses","type":"address[]"},{"indexed":false,"internalType":"bool","name":"status","type":"bool"}],"name":"Erc20TokenWhitelisted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"newMaxMintPerTier","type":"uint256[]"}],"name":"MaxMintPerTierUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newTotalMintLimit","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newNonEthLimit","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newNonEthMaxSupply","type":"uint256"},{"indexed":false,"internalType":"address","name":"operator","type":"address"}],"name":"MintLimitChanged","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":"operator","type":"address"},{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"currentSupply","type":"uint256"},{"components":[{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"address","name":"paymentToken","type":"address"},{"internalType":"uint256","name":"priceOrTier","type":"uint256"}],"indexed":false,"internalType":"struct RoughRyderNFT.PurchaseInfo[]","name":"purchases","type":"tuple[]"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"Purchased","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"","type":"address"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"}],"name":"Received","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Refunded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"tokenAddresses","type":"address[]"},{"internalType":"bool","name":"status","type":"bool"}],"name":"addWhitelistedERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"claimFreeMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"ethMintedPerTier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isOrchestrator","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"maxMintPerTier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nonEthCurrentSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nonEthMaxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nonEthMintLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonEthMintedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"notRefundable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"totalQuantity","type":"uint256"},{"components":[{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"address","name":"paymentToken","type":"address"},{"internalType":"uint256","name":"priceOrTier","type":"uint256"}],"internalType":"struct RoughRyderNFT.PurchaseInfo[]","name":"purchases","type":"tuple[]"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"purchase","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"depositAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"}],"name":"refund","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revealTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"secret","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"newMaxMintPerTier","type":"uint256[]"}],"name":"setMaxMintPerTier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newTotalMintLimit","type":"uint256"},{"internalType":"uint256","name":"newNonEthLimit","type":"uint256"},{"internalType":"uint256","name":"newNonEthMaxSupply","type":"uint256"}],"name":"setMintLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"status","type":"bool"}],"name":"setOrchestrator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setRevealTimestamp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"secretAddress","type":"address"}],"name":"setSecret","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"treasuryAddress","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":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalMintLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"totalMintedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"usdtTokenAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"","type":"bytes"}],"name":"usedSignatures","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelistedERC20","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"address[]","name":"tokenAddresses","type":"address[]"}],"name":"withdrawERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
6101f4600b555f600c55600f600d8190556003600e81905560e06040526005608090815260a083905260c0929092526200003c9160109162000184565b50601380546001600160a01b03191673dac17f958d2ee523a2206206994597c13d831ec71790553480156200006f575f80fd5b50604051620037e5380380620037e58339810160408190526200009291620001ed565b6040518060400160405280600c81526020016b526f7567682052796465727360a01b8152506040518060400160405280600681526020016529292ca222a960d11b8152508160029081620000e79190620002bc565b506003620000f68282620002bc565b505060015f5550620001083362000133565b6001600955601180546001600160a01b0319166001600160a01b039290921691909117905562000384565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b828054828255905f5260205f20908101928215620001c5579160200282015b82811115620001c5578251829060ff16905591602001919060010190620001a3565b50620001d3929150620001d7565b5090565b5b80821115620001d3575f8155600101620001d8565b5f60208284031215620001fe575f80fd5b81516001600160a01b038116811462000215575f80fd5b9392505050565b634e487b7160e01b5f52604160045260245ffd5b600181811c908216806200024557607f821691505b6020821081036200026457634e487b7160e01b5f52602260045260245ffd5b50919050565b601f821115620002b7575f81815260208120601f850160051c81016020861015620002925750805b601f850160051c820191505b81811015620002b3578281556001016200029e565b5050505b505050565b81516001600160401b03811115620002d857620002d86200021c565b620002f081620002e9845462000230565b846200026a565b602080601f83116001811462000326575f84156200030e5750858301515b5f19600386901b1c1916600185901b178555620002b3565b5f85815260208120601f198616915b82811015620003565788860151825594840194600190910190840162000335565b50858210156200037457878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b61345380620003925f395ff3fe6080604052600436106102a8575f3560e01c806376dd1f861161016f578063b88d4fde116100d8578063e949580e11610092578063f08324621161006d578063f0832462146108a5578063f0f44260146108c4578063f2fde38b146108e3578063f62f3c1114610902575f80fd5b8063e949580e1461082d578063e985e9c514610867578063e9a7484c14610886575f80fd5b8063b88d4fde14610764578063bf1485c414610783578063c87b56dd146107a2578063d1efd30d146107c1578063d701dcbd146107e0578063df1431c41461080e575f80fd5b80639d2dcde7116101295780639d2dcde7146106b45780639d741e5d146106d3578063a1be5d38146106f2578063a22cb46514610711578063a434cec114610730578063ac26558d1461074f575f80fd5b806376dd1f861461060f57806377272c6e146106245780638da5cb5b1461063857806390a85ee0146106555780639218c3191461068b57806395d89b41146106a0575f80fd5b80634782f7791161021157806361d027b3116101cb57806361d027b31461056c5780636352211e1461058b57806365c80ed4146105aa57806370a08231146105bd578063715018a6146105dc5780637192e111146105f0575f80fd5b80634782f779146104ac5780634b8adc5a146104cb5780634f02c420146104ea5780634f558e791461050057806355f804b31461051f57806357c4c2971461053e575f80fd5b806318160ddd1161026257806318160ddd146103e657806323b872dd1461040057806332cb6b0c1461041f57806336700502146104345780633e99ca1b1461046257806342842e0e1461048d575f80fd5b806301ffc9a7146102eb57806306fdde031461031f578063081812fc14610340578063095ea7b3146103775780630f7441fd1461039857806316ace63f146103d1575f80fd5b366102e757604080513381523460208201527f88a5966d370b9919b20f3e2c13ff65706f196a4e32cc2c12bf57088f88525874910160405180910390a1005b5f80fd5b3480156102f6575f80fd5b5061030a610305366004612910565b610917565b60405190151581526020015b60405180910390f35b34801561032a575f80fd5b50610333610968565b6040516103169190612978565b34801561034b575f80fd5b5061035f61035a36600461298a565b6109f8565b6040516001600160a01b039091168152602001610316565b348015610382575f80fd5b506103966103913660046129bc565b610a3a565b005b3480156103a3575f80fd5b506103c36103b23660046129e4565b60156020525f908152604090205481565b604051908152602001610316565b3480156103dc575f80fd5b506103c3600b5481565b3480156103f1575f80fd5b506001545f54035f19016103c3565b34801561040b575f80fd5b5061039661041a3660046129fd565b610b0a565b34801561042a575f80fd5b506103c3610bb881565b34801561043f575f80fd5b5061030a61044e3660046129e4565b60176020525f908152604090205460ff1681565b34801561046d575f80fd5b506103c361047c3660046129e4565b60146020525f908152604090205481565b348015610498575f80fd5b506103966104a73660046129fd565b610b23565b3480156104b7575f80fd5b506103966104c63660046129bc565b610b46565b3480156104d6575f80fd5b506103966104e5366004612a43565b610c7a565b3480156104f5575f80fd5b505f545f19016103c3565b34801561050b575f80fd5b5061030a61051a36600461298a565b610cd4565b34801561052a575f80fd5b50610396610539366004612b38565b610cde565b348015610549575f80fd5b5061030a61055836600461298a565b60186020525f908152604090205460ff1681565b348015610577575f80fd5b5060125461035f906001600160a01b031681565b348015610596575f80fd5b5061035f6105a536600461298a565b610cf2565b6103966105b8366004612bbc565b610cfc565b3480156105c8575f80fd5b506103c36105d73660046129e4565b610f28565b3480156105e7575f80fd5b50610396610f6d565b3480156105fb575f80fd5b5061039661060a366004612cbf565b610f80565b34801561061a575f80fd5b506103c3600d5481565b34801561062f575f80fd5b50610396610fe3565b348015610643575f80fd5b506008546001600160a01b031661035f565b348015610660575f80fd5b506103c361066f3660046129bc565b601660209081525f928352604080842090915290825290205481565b348015610696575f80fd5b506103c3600e5481565b3480156106ab575f80fd5b50610333611041565b3480156106bf575f80fd5b506103966106ce366004612d52565b611050565b3480156106de575f80fd5b5060135461035f906001600160a01b031681565b3480156106fd575f80fd5b5061039661070c366004612d9c565b6111aa565b34801561071c575f80fd5b5061039661072b366004612a43565b611254565b34801561073b575f80fd5b5061039661074a366004612ddf565b6112e8565b34801561075a575f80fd5b506103c3600c5481565b34801561076f575f80fd5b5061039661077e366004612e6a565b6113c9565b34801561078e575f80fd5b5061039661079d366004612ec1565b611413565b3480156107ad575f80fd5b506103336107bc36600461298a565b61174f565b3480156107cc575f80fd5b5060115461035f906001600160a01b031681565b3480156107eb575f80fd5b5061030a6107fa3660046129e4565b60196020525f908152604090205460ff1681565b348015610819575f80fd5b506103c361082836600461298a565b6117f0565b348015610838575f80fd5b5061030a610847366004612f13565b8051602081830181018051601a8252928201919093012091525460ff1681565b348015610872575f80fd5b5061030a610881366004612f44565b61180f565b348015610891575f80fd5b506103966108a03660046129e4565b61183c565b3480156108b0575f80fd5b506103966108bf366004612f75565b61188e565b3480156108cf575f80fd5b506103966108de3660046129e4565b611bc8565b3480156108ee575f80fd5b506103966108fd3660046129e4565b611c1a565b34801561090d575f80fd5b506103c3600f5481565b5f6301ffc9a760e01b6001600160e01b03198316148061094757506380ac58cd60e01b6001600160e01b03198316145b806109625750635b5e139f60e01b6001600160e01b03198316145b92915050565b60606002805461097790612fb6565b80601f01602080910402602001604051908101604052809291908181526020018280546109a390612fb6565b80156109ee5780601f106109c5576101008083540402835291602001916109ee565b820191905f5260205f20905b8154815290600101906020018083116109d157829003601f168201915b5050505050905090565b5f610a0282611c93565b610a1f576040516333d1c03960e21b815260040160405180910390fd5b505f908152600660205260409020546001600160a01b031690565b5f610a4482611cc5565b9050806001600160a01b0316836001600160a01b031603610a785760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b03821614610aaf57610a92813361180f565b610aaf576040516367d9dca160e11b815260040160405180910390fd5b5f8281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b610b1381611d35565b610b1e838383611d8d565b505050565b610b2c81611d35565b610b1e83838360405180602001604052805f8152506113c9565b610b4e611d98565b610b56611df1565b816001600160a01b038116610b865760405162461bcd60e51b8152600401610b7d90612fee565b60405180910390fd5b47821115610bcb5760405162461bcd60e51b8152602060048201526012602482015271496e73756666696369656e742066756e647360701b6044820152606401610b7d565b5f836001600160a01b0316836040515f6040518083038185875af1925050503d805f8114610c14576040519150601f19603f3d011682016040523d82523d5f602084013e610c19565b606091505b5050905080610c6a5760405162461bcd60e51b815260206004820181905260248201527f77697468647261774554483a20455448207472616e73666572206661696c65646044820152606401610b7d565b5050610c766001600955565b5050565b610c82611df1565b816001600160a01b038116610ca95760405162461bcd60e51b8152600401610b7d90612fee565b506001600160a01b03919091165f908152601960205260409020805460ff1916911515919091179055565b5f61096282611c93565b610ce6611df1565b600a610c76828261306a565b5f61096282611cc5565b610d30848334604051602001610d149392919061317d565b6040516020818303038152906040528051906020012082611e4b565b610d7c5760405162461bcd60e51b815260206004820152601e60248201527f70757263686173653a205369676e617475726520697320696e76616c696400006044820152606401610b7d565b600d546001600160a01b0385165f90815260146020526040902054610da29085906131c4565b1115610dff5760405162461bcd60e51b815260206004820152602660248201527f70757263686173653a20457863656564206d696e74206c696d697420706572206044820152651dd85b1b195d60d21b6064820152608401610b7d565b5f545f1901610bb8610e1182866131c4565b1115610e585760405162461bcd60e51b81526020600482015260166024820152751c1d5c98da185cd94e8814dd5c1c1b1e481b1a5b5a5d60521b6044820152606401610b7d565b5f5b8351811015610eaa575f848281518110610e7657610e766131d7565b60200260200101519050610e978782602001518360400151845f0151611f71565b5080610ea2816131eb565b915050610e5a565b506001600160a01b0385165f9081526014602052604081208054869290610ed29084906131c4565b90915550610ee29050858561232e565b7fea01331863093a17b14773c859e7389d771aa54e326d6c28a1d883d1aed3153c3386838642604051610f19959493929190613203565b60405180910390a15050505050565b5f815f03610f49576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03165f908152600560205260409020546001600160401b031690565b610f75611df1565b610f7e5f612347565b565b610f88611df1565b600d839055600e829055600b81905560408051848152602081018490529081018290523360608201527f30faad65c7f583308ef778354075d9d06fafbce424fc9cf12827c2d83772fb139060800160405180910390a1505050565b610feb611df1565b600f541561103b5760405162461bcd60e51b815260206004820152601c60248201527f52657665616c2074696d657374616d7020616c726561647920736574000000006044820152606401610b7d565b42600f55565b60606003805461097790612fb6565b611058611d98565b611060611df1565b816001600160a01b0381166110875760405162461bcd60e51b8152600401610b7d90612fee565b5f5b8251811015610c6a575f8382815181106110a5576110a56131d7565b60209081029190910101516040516370a0823160e01b81523060048201529091505f906001600160a01b038316906370a0823190602401602060405180830381865afa1580156110f7573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061111b9190613247565b905080156111955760405163a9059cbb60e01b81526001600160a01b0387811660048301526024820183905283169063a9059cbb906044016020604051808303815f875af115801561116f573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611193919061325e565b505b505080806111a2906131eb565b915050611089565b6111b2611df1565b5f5b8251811015611216578160175f8584815181106111d3576111d36131d7565b6020908102919091018101516001600160a01b031682528101919091526040015f20805460ff19169115159190911790558061120e816131eb565b9150506111b4565b507f528453e15e0401db362befe7b3bdca920ecbce5f016dd17482bdf7b0c755cf848282604051611248929190613279565b60405180910390a15050565b336001600160a01b0383160361127d5760405163b06307db60e01b815260040160405180910390fd5b335f8181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6112f0611df1565b6010548151146113395760405162461bcd60e51b8152602060048201526014602482015273092dcecc2d8d2c840c2e4e4c2f240d8cadccee8d60631b6044820152606401610b7d565b5f5b815181101561138e57818181518110611356576113566131d7565b602002602001015160108281548110611371576113716131d7565b5f9182526020909120015580611386816131eb565b91505061133b565b507f12a7b8f4faf22dfa81cd4f577a33bdda726f99b45e22c89b4614321e4550acc1816040516113be91906132cc565b60405180910390a150565b6113d4848484612398565b6001600160a01b0383163b1561140d576113f084848484612549565b61140d576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b604080516001600160a01b03851660208201529081018390526060808201526016608082015275149bdd59da08149e59195c9cc8199c9959481b5a5b9d60521b60a08201526114649060c001610d14565b6114bc5760405162461bcd60e51b815260206004820152602360248201527f636c61696d467265654d696e743a205369676e617475726520697320696e76616044820152621b1a5960ea1b6064820152608401610b7d565b601a816040516114cc919061330f565b9081526040519081900360200190205460ff161561152c5760405162461bcd60e51b815260206004820152601d60248201527f636c61696d467265654d696e743a205369676e617475726520757365640000006044820152606401610b7d565b600d546001600160a01b0384165f908152601460205260409020546115529084906131c4565b11156115b45760405162461bcd60e51b815260206004820152602b60248201527f636c61696d467265654d696e743a20457863656564206d696e74206c696d697460448201526a081c195c881dd85b1b195d60aa1b6064820152608401610b7d565b5f80546040805160018082528183019092525f19909201929190602082015b6115fd60405180606001604052805f81526020015f6001600160a01b031681526020015f81525090565b8152602001906001900390816115d357905050905060405180606001604052808581526020015f6001600160a01b031681526020016003815250815f81518110611649576116496131d7565b6020908102919091010152610bb861166183866131c4565b11156116af5760405162461bcd60e51b815260206004820152601b60248201527f636c61696d467265654d696e743a20537570706c79206c696d697400000000006044820152606401610b7d565b6001601a846040516116c1919061330f565b9081526040805160209281900383019020805460ff1916931515939093179092556001600160a01b0387165f908152601490915290812080548692906117089084906131c4565b909155506117189050858561232e565b7fea01331863093a17b14773c859e7389d771aa54e326d6c28a1d883d1aed3153c3386848442604051610f19959493929190613203565b606061175a82611c93565b6117be5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610b7d565b600a6117c983612631565b6040516020016117da92919061332a565b6040516020818303038152906040529050919050565b601081815481106117ff575f80fd5b5f91825260209091200154905081565b6001600160a01b039182165f90815260076020908152604080832093909416825291909152205460ff1690565b611844611df1565b806001600160a01b03811661186b5760405162461bcd60e51b8152600401610b7d90612fee565b50601180546001600160a01b0319166001600160a01b0392909216919091179055565b335f9081526019602052604090205460ff166118e35760405162461bcd60e51b815260206004820152601460248201527313dc195c985d1bdc881b9bdd08185b1b1bddd95960621b6044820152606401610b7d565b836001600160a01b03811661190a5760405162461bcd60e51b8152600401610b7d90612fee565b5f8481526018602052604090205460ff161561197e5760405162461bcd60e51b815260206004820152602d60248201527f526566756e643a2054686520746f6b656e206973206e6f7420617661696c616260448201526c1b1948199bdc881c99599d5b99609a1b6064820152608401610b7d565b846001600160a01b031661199185610cf2565b6001600160a01b0316146119f65760405162461bcd60e51b815260206004820152602660248201527f526566756e643a2041646472657373206973206e6f742074686520746f6b656e6044820152651037bbb732b960d11b6064820152608401610b7d565b601254611a0e9086906001600160a01b031686610b23565b6001600160a01b038316611ac1575f856001600160a01b0316836040515f6040518083038185875af1925050503d805f8114611a65576040519150601f19603f3d011682016040523d82523d5f602084013e611a6a565b606091505b5050905080611abb5760405162461bcd60e51b815260206004820152601b60248201527f526566756e643a20455448207472616e73666572206661696c656400000000006044820152606401610b7d565b50611b89565b60405163a9059cbb60e01b81526001600160a01b0386811660048301526024820184905284169063a9059cbb906044016020604051808303815f875af1158015611b0d573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b31919061325e565b611b895760405162461bcd60e51b815260206004820152602360248201527f526566756e643a20455243323020746f6b656e207472616e73666572206661696044820152621b195960ea1b6064820152608401610b7d565b604080516001600160a01b0387168152602081018690527fd7dee2702d63ad89917b6a4da9981c90c4d24f8c2bdfd64c604ecae57d8d06519101610f19565b611bd0611df1565b806001600160a01b038116611bf75760405162461bcd60e51b8152600401610b7d90612fee565b50601280546001600160a01b0319166001600160a01b0392909216919091179055565b611c22611df1565b6001600160a01b038116611c875760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610b7d565b611c9081612347565b50565b5f81600111158015611ca557505f5482105b80156109625750505f90815260046020526040902054600160e01b161590565b5f8180600111611d1c575f54811015611d1c575f8181526004602052604081205490600160e01b82169003611d1a575b805f03611d1357505f19015f81815260046020526040902054611cf5565b9392505050565b505b604051636f96cda160e11b815260040160405180910390fd5b5f8181526018602052604090205460ff16158015611d545750600f5415155b8015611d6d5750600f54611d6a90610e106131c4565b42115b15611c90575f818152601860205260409020805460ff1916600117905550565b610b1e838383612398565b600260095403611dea5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b7d565b6002600955565b6008546001600160a01b03163314610f7e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b7d565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c81018390525f908190605c016040516020818303038152906040528051906020012090505f805f8551604114611eb2575f945050505050610962565b5050506020830151604084015160608501515f1a601b811015611edd57611eda601b826133ad565b90505b5f8160ff16601b1480611ef357508160ff16601c145b15611f5557604080515f81526020810180835287905260ff841691810191909152606081018590526080810184905260019060a0016020604051602081039080840390855afa158015611f48573d5f803e3d5ffd5b5050506020604051035190505b6011546001600160a01b03918216911614979650505050505050565b6001600160a01b03831661206e5760108281548110611f9257611f926131d7565b5f9182526020808320909101546001600160a01b0387168352601682526040808420868552909252912054611fc89083906131c4565b11156120315760405162461bcd60e51b815260206004820152603260248201527f5f76616c69646174654d696e74696e67506172616d65746572733a20457863656044820152711959081d1a595c881b5a5b9d081b1a5b5a5d60721b6064820152608401610b7d565b6001600160a01b0384165f908152601660209081526040808320858452909152812080548392906120639084906131c4565b9091555061140d9050565b6001600160a01b0383165f9081526017602052604090205460ff166121d957600b54600c5461209d90836131c4565b111561210a5760405162461bcd60e51b815260206004820152603660248201527f5f76616c69646174654d696e74696e67506172616d65746572733a204552432d6044820152750c8c0814dd5c1c1b1e481b1a5b5a5d08195e18d9595960521b6064820152608401610b7d565b600e546001600160a01b0385165f908152601560205260409020546121309083906131c4565b11156121945760405162461bcd60e51b815260206004820152602d60248201527f5f76616c69646174654d696e74696e67506172616d65746572733a204578636560448201526c1959081b5a5b9d081b1a5b5a5d609a1b6064820152608401610b7d565b6001600160a01b0384165f90815260156020526040812080548392906121bb9084906131c4565b9250508190555080600c5f8282546121d391906131c4565b90915550505b6013546001600160a01b03808516911603612254576040516323b872dd60e01b8152336004820152306024820152604481018390526001600160a01b038416906323b872dd906064015f604051808303815f87803b158015612239575f80fd5b505af115801561224b573d5f803e3d5ffd5b5050505061140d565b6040516323b872dd60e01b8152336004820152306024820152604481018390526001600160a01b038416906323b872dd906064016020604051808303815f875af11580156122a4573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906122c8919061325e565b61140d5760405162461bcd60e51b815260206004820152603160248201527f5f76616c69646174654d696e74696e67506172616d65746572733a20546f6b656044820152701b881d1c985b9cd9995c8819985a5b1959607a1b6064820152608401610b7d565b610c76828260405180602001604052805f8152506126c0565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f6123a282611cc5565b9050836001600160a01b0316816001600160a01b0316146123d55760405162a1148160e81b815260040160405180910390fd5b5f828152600660205260408120546001600160a01b03908116919086163314806124045750612404863361180f565b8061241757506001600160a01b03821633145b90508061243757604051632ce44b5f60e11b815260040160405180910390fd5b845f0361245757604051633a954ecd60e21b815260040160405180910390fd5b8115612479575f84815260066020526040902080546001600160a01b03191690555b6001600160a01b038681165f90815260056020908152604080832080545f1901905592881682528282208054600101905586825260049052908120600160e11b4260a01b88178117909155841690036124ff57600184015f8181526004602052604081205490036124fd575f5481146124fd575f8181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b604051630a85bd0160e11b81525f906001600160a01b0385169063150b7a029061257d9033908990889088906004016133c6565b6020604051808303815f875af19250505080156125b7575060408051601f3d908101601f191682019092526125b491810190613402565b60015b612613573d8080156125e4576040519150601f19603f3d011682016040523d82523d5f602084013e6125e9565b606091505b5080515f0361260b576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b60605f61263d83612824565b60010190505f816001600160401b0381111561265b5761265b612a78565b6040519080825280601f01601f191660200182016040528015612685576020820181803683370190505b5090508181016020015b5f19016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461268f57509392505050565b5f54835f036126e157604051622e076360e81b815260040160405180910390fd5b825f036127015760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b0384165f8181526005602090815260408083208054680100000000000000018902019055848352600490915290204260a01b86176001861460e11b1790558190818501903b156127d1575b60405182906001600160a01b038816905f907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a461279c5f878480600101955087612549565b6127b9576040516368d2bf6b60e11b815260040160405180910390fd5b80821061275357825f54146127cc575f80fd5b612815565b5b6040516001830192906001600160a01b038816905f907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a48082106127d2575b505f90815561140d9085838684565b5f8072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106128625772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef8100000000831061288e576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106128ac57662386f26fc10000830492506010015b6305f5e10083106128c4576305f5e100830492506008015b61271083106128d857612710830492506004015b606483106128ea576064830492506002015b600a83106109625760010192915050565b6001600160e01b031981168114611c90575f80fd5b5f60208284031215612920575f80fd5b8135611d13816128fb565b5f5b8381101561294557818101518382015260200161292d565b50505f910152565b5f815180845261296481602086016020860161292b565b601f01601f19169290920160200192915050565b602081525f611d13602083018461294d565b5f6020828403121561299a575f80fd5b5035919050565b80356001600160a01b03811681146129b7575f80fd5b919050565b5f80604083850312156129cd575f80fd5b6129d6836129a1565b946020939093013593505050565b5f602082840312156129f4575f80fd5b611d13826129a1565b5f805f60608486031215612a0f575f80fd5b612a18846129a1565b9250612a26602085016129a1565b9150604084013590509250925092565b8015158114611c90575f80fd5b5f8060408385031215612a54575f80fd5b612a5d836129a1565b91506020830135612a6d81612a36565b809150509250929050565b634e487b7160e01b5f52604160045260245ffd5b604051606081016001600160401b0381118282101715612aae57612aae612a78565b60405290565b604051601f8201601f191681016001600160401b0381118282101715612adc57612adc612a78565b604052919050565b5f6001600160401b03831115612afc57612afc612a78565b612b0f601f8401601f1916602001612ab4565b9050828152838383011115612b22575f80fd5b828260208301375f602084830101529392505050565b5f60208284031215612b48575f80fd5b81356001600160401b03811115612b5d575f80fd5b8201601f81018413612b6d575f80fd5b61262984823560208401612ae4565b5f6001600160401b03821115612b9457612b94612a78565b5060051b60200190565b5f82601f830112612bad575f80fd5b611d1383833560208501612ae4565b5f805f8060808587031215612bcf575f80fd5b612bd8856129a1565b935060208086013593506040808701356001600160401b0380821115612bfc575f80fd5b818901915089601f830112612c0f575f80fd5b8135612c22612c1d82612b7c565b612ab4565b8181526060918202840186019186820191908d841115612c40575f80fd5b948701945b83861015612c8e5780868f031215612c5c575f8081fd5b612c64612a8c565b86358152612c738988016129a1565b818a0152868801358882015283529485019491870191612c45565b9098508b01359550505080841115612ca4575f80fd5b505050612cb387828801612b9e565b91505092959194509250565b5f805f60608486031215612cd1575f80fd5b505081359360208301359350604090920135919050565b5f82601f830112612cf7575f80fd5b81356020612d07612c1d83612b7c565b82815260059290921b84018101918181019086841115612d25575f80fd5b8286015b84811015612d4757612d3a816129a1565b8352918301918301612d29565b509695505050505050565b5f8060408385031215612d63575f80fd5b612d6c836129a1565b915060208301356001600160401b03811115612d86575f80fd5b612d9285828601612ce8565b9150509250929050565b5f8060408385031215612dad575f80fd5b82356001600160401b03811115612dc2575f80fd5b612dce85828601612ce8565b9250506020830135612a6d81612a36565b5f6020808385031215612df0575f80fd5b82356001600160401b03811115612e05575f80fd5b8301601f81018513612e15575f80fd5b8035612e23612c1d82612b7c565b81815260059190911b82018301908381019087831115612e41575f80fd5b928401925b82841015612e5f57833582529284019290840190612e46565b979650505050505050565b5f805f8060808587031215612e7d575f80fd5b612e86856129a1565b9350612e94602086016129a1565b92506040850135915060608501356001600160401b03811115612eb5575f80fd5b612cb387828801612b9e565b5f805f60608486031215612ed3575f80fd5b612edc846129a1565b92506020840135915060408401356001600160401b03811115612efd575f80fd5b612f0986828701612b9e565b9150509250925092565b5f60208284031215612f23575f80fd5b81356001600160401b03811115612f38575f80fd5b61262984828501612b9e565b5f8060408385031215612f55575f80fd5b612f5e836129a1565b9150612f6c602084016129a1565b90509250929050565b5f805f8060808587031215612f88575f80fd5b612f91856129a1565b935060208501359250612fa6604086016129a1565b9396929550929360600135925050565b600181811c90821680612fca57607f821691505b602082108103612fe857634e487b7160e01b5f52602260045260245ffd5b50919050565b6020808252601b908201527f43616e6e6f742073656e6420746f207a65726f20616464726573730000000000604082015260600190565b601f821115610b1e575f81815260208120601f850160051c8101602086101561304b5750805b601f850160051c820191505b8181101561254157828155600101613057565b81516001600160401b0381111561308357613083612a78565b613097816130918454612fb6565b84613025565b602080601f8311600181146130ca575f84156130b35750858301515b5f19600386901b1c1916600185901b178555612541565b5f85815260208120601f198616915b828110156130f8578886015182559484019460019091019084016130d9565b508582101561311557878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b5f8151808452602080850194508084015f5b8381101561317257815180518852838101516001600160a01b0316848901526040908101519088015260609096019590820190600101613137565b509495945050505050565b6001600160a01b03841681526060602082018190525f906131a090830185613125565b9050826040830152949350505050565b634e487b7160e01b5f52601160045260245ffd5b80820180821115610962576109626131b0565b634e487b7160e01b5f52603260045260245ffd5b5f600182016131fc576131fc6131b0565b5060010190565b6001600160a01b038681168252851660208201526040810184905260a0606082018190525f9061323590830185613125565b90508260808301529695505050505050565b5f60208284031215613257575f80fd5b5051919050565b5f6020828403121561326e575f80fd5b8151611d1381612a36565b604080825283519082018190525f906020906060840190828701845b828110156132ba5781516001600160a01b031684529284019290840190600101613295565b50505093151592019190915250919050565b602080825282518282018190525f9190848201906040850190845b81811015613303578351835292840192918401916001016132e7565b50909695505050505050565b5f825161332081846020870161292b565b9190910192915050565b5f80845461333781612fb6565b6001828116801561334f576001811461336457613390565b60ff1984168752821515830287019450613390565b885f526020805f205f5b858110156133875781548a82015290840190820161336e565b50505082870194505b5050505083516133a481836020880161292b565b01949350505050565b60ff8181168382160190811115610962576109626131b0565b6001600160a01b03858116825284166020820152604081018390526080606082018190525f906133f89083018461294d565b9695505050505050565b5f60208284031215613412575f80fd5b8151611d13816128fb56fea264697066735822122047e49503905824f751f3196e60e3ccc0be4fcd0ee807d7098eef2c4e21b85fbc64736f6c634300081400330000000000000000000000008246b06ecb7790c579ec137d26b8b37691230e7e
Deployed Bytecode
0x6080604052600436106102a8575f3560e01c806376dd1f861161016f578063b88d4fde116100d8578063e949580e11610092578063f08324621161006d578063f0832462146108a5578063f0f44260146108c4578063f2fde38b146108e3578063f62f3c1114610902575f80fd5b8063e949580e1461082d578063e985e9c514610867578063e9a7484c14610886575f80fd5b8063b88d4fde14610764578063bf1485c414610783578063c87b56dd146107a2578063d1efd30d146107c1578063d701dcbd146107e0578063df1431c41461080e575f80fd5b80639d2dcde7116101295780639d2dcde7146106b45780639d741e5d146106d3578063a1be5d38146106f2578063a22cb46514610711578063a434cec114610730578063ac26558d1461074f575f80fd5b806376dd1f861461060f57806377272c6e146106245780638da5cb5b1461063857806390a85ee0146106555780639218c3191461068b57806395d89b41146106a0575f80fd5b80634782f7791161021157806361d027b3116101cb57806361d027b31461056c5780636352211e1461058b57806365c80ed4146105aa57806370a08231146105bd578063715018a6146105dc5780637192e111146105f0575f80fd5b80634782f779146104ac5780634b8adc5a146104cb5780634f02c420146104ea5780634f558e791461050057806355f804b31461051f57806357c4c2971461053e575f80fd5b806318160ddd1161026257806318160ddd146103e657806323b872dd1461040057806332cb6b0c1461041f57806336700502146104345780633e99ca1b1461046257806342842e0e1461048d575f80fd5b806301ffc9a7146102eb57806306fdde031461031f578063081812fc14610340578063095ea7b3146103775780630f7441fd1461039857806316ace63f146103d1575f80fd5b366102e757604080513381523460208201527f88a5966d370b9919b20f3e2c13ff65706f196a4e32cc2c12bf57088f88525874910160405180910390a1005b5f80fd5b3480156102f6575f80fd5b5061030a610305366004612910565b610917565b60405190151581526020015b60405180910390f35b34801561032a575f80fd5b50610333610968565b6040516103169190612978565b34801561034b575f80fd5b5061035f61035a36600461298a565b6109f8565b6040516001600160a01b039091168152602001610316565b348015610382575f80fd5b506103966103913660046129bc565b610a3a565b005b3480156103a3575f80fd5b506103c36103b23660046129e4565b60156020525f908152604090205481565b604051908152602001610316565b3480156103dc575f80fd5b506103c3600b5481565b3480156103f1575f80fd5b506001545f54035f19016103c3565b34801561040b575f80fd5b5061039661041a3660046129fd565b610b0a565b34801561042a575f80fd5b506103c3610bb881565b34801561043f575f80fd5b5061030a61044e3660046129e4565b60176020525f908152604090205460ff1681565b34801561046d575f80fd5b506103c361047c3660046129e4565b60146020525f908152604090205481565b348015610498575f80fd5b506103966104a73660046129fd565b610b23565b3480156104b7575f80fd5b506103966104c63660046129bc565b610b46565b3480156104d6575f80fd5b506103966104e5366004612a43565b610c7a565b3480156104f5575f80fd5b505f545f19016103c3565b34801561050b575f80fd5b5061030a61051a36600461298a565b610cd4565b34801561052a575f80fd5b50610396610539366004612b38565b610cde565b348015610549575f80fd5b5061030a61055836600461298a565b60186020525f908152604090205460ff1681565b348015610577575f80fd5b5060125461035f906001600160a01b031681565b348015610596575f80fd5b5061035f6105a536600461298a565b610cf2565b6103966105b8366004612bbc565b610cfc565b3480156105c8575f80fd5b506103c36105d73660046129e4565b610f28565b3480156105e7575f80fd5b50610396610f6d565b3480156105fb575f80fd5b5061039661060a366004612cbf565b610f80565b34801561061a575f80fd5b506103c3600d5481565b34801561062f575f80fd5b50610396610fe3565b348015610643575f80fd5b506008546001600160a01b031661035f565b348015610660575f80fd5b506103c361066f3660046129bc565b601660209081525f928352604080842090915290825290205481565b348015610696575f80fd5b506103c3600e5481565b3480156106ab575f80fd5b50610333611041565b3480156106bf575f80fd5b506103966106ce366004612d52565b611050565b3480156106de575f80fd5b5060135461035f906001600160a01b031681565b3480156106fd575f80fd5b5061039661070c366004612d9c565b6111aa565b34801561071c575f80fd5b5061039661072b366004612a43565b611254565b34801561073b575f80fd5b5061039661074a366004612ddf565b6112e8565b34801561075a575f80fd5b506103c3600c5481565b34801561076f575f80fd5b5061039661077e366004612e6a565b6113c9565b34801561078e575f80fd5b5061039661079d366004612ec1565b611413565b3480156107ad575f80fd5b506103336107bc36600461298a565b61174f565b3480156107cc575f80fd5b5060115461035f906001600160a01b031681565b3480156107eb575f80fd5b5061030a6107fa3660046129e4565b60196020525f908152604090205460ff1681565b348015610819575f80fd5b506103c361082836600461298a565b6117f0565b348015610838575f80fd5b5061030a610847366004612f13565b8051602081830181018051601a8252928201919093012091525460ff1681565b348015610872575f80fd5b5061030a610881366004612f44565b61180f565b348015610891575f80fd5b506103966108a03660046129e4565b61183c565b3480156108b0575f80fd5b506103966108bf366004612f75565b61188e565b3480156108cf575f80fd5b506103966108de3660046129e4565b611bc8565b3480156108ee575f80fd5b506103966108fd3660046129e4565b611c1a565b34801561090d575f80fd5b506103c3600f5481565b5f6301ffc9a760e01b6001600160e01b03198316148061094757506380ac58cd60e01b6001600160e01b03198316145b806109625750635b5e139f60e01b6001600160e01b03198316145b92915050565b60606002805461097790612fb6565b80601f01602080910402602001604051908101604052809291908181526020018280546109a390612fb6565b80156109ee5780601f106109c5576101008083540402835291602001916109ee565b820191905f5260205f20905b8154815290600101906020018083116109d157829003601f168201915b5050505050905090565b5f610a0282611c93565b610a1f576040516333d1c03960e21b815260040160405180910390fd5b505f908152600660205260409020546001600160a01b031690565b5f610a4482611cc5565b9050806001600160a01b0316836001600160a01b031603610a785760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b03821614610aaf57610a92813361180f565b610aaf576040516367d9dca160e11b815260040160405180910390fd5b5f8281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b610b1381611d35565b610b1e838383611d8d565b505050565b610b2c81611d35565b610b1e83838360405180602001604052805f8152506113c9565b610b4e611d98565b610b56611df1565b816001600160a01b038116610b865760405162461bcd60e51b8152600401610b7d90612fee565b60405180910390fd5b47821115610bcb5760405162461bcd60e51b8152602060048201526012602482015271496e73756666696369656e742066756e647360701b6044820152606401610b7d565b5f836001600160a01b0316836040515f6040518083038185875af1925050503d805f8114610c14576040519150601f19603f3d011682016040523d82523d5f602084013e610c19565b606091505b5050905080610c6a5760405162461bcd60e51b815260206004820181905260248201527f77697468647261774554483a20455448207472616e73666572206661696c65646044820152606401610b7d565b5050610c766001600955565b5050565b610c82611df1565b816001600160a01b038116610ca95760405162461bcd60e51b8152600401610b7d90612fee565b506001600160a01b03919091165f908152601960205260409020805460ff1916911515919091179055565b5f61096282611c93565b610ce6611df1565b600a610c76828261306a565b5f61096282611cc5565b610d30848334604051602001610d149392919061317d565b6040516020818303038152906040528051906020012082611e4b565b610d7c5760405162461bcd60e51b815260206004820152601e60248201527f70757263686173653a205369676e617475726520697320696e76616c696400006044820152606401610b7d565b600d546001600160a01b0385165f90815260146020526040902054610da29085906131c4565b1115610dff5760405162461bcd60e51b815260206004820152602660248201527f70757263686173653a20457863656564206d696e74206c696d697420706572206044820152651dd85b1b195d60d21b6064820152608401610b7d565b5f545f1901610bb8610e1182866131c4565b1115610e585760405162461bcd60e51b81526020600482015260166024820152751c1d5c98da185cd94e8814dd5c1c1b1e481b1a5b5a5d60521b6044820152606401610b7d565b5f5b8351811015610eaa575f848281518110610e7657610e766131d7565b60200260200101519050610e978782602001518360400151845f0151611f71565b5080610ea2816131eb565b915050610e5a565b506001600160a01b0385165f9081526014602052604081208054869290610ed29084906131c4565b90915550610ee29050858561232e565b7fea01331863093a17b14773c859e7389d771aa54e326d6c28a1d883d1aed3153c3386838642604051610f19959493929190613203565b60405180910390a15050505050565b5f815f03610f49576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03165f908152600560205260409020546001600160401b031690565b610f75611df1565b610f7e5f612347565b565b610f88611df1565b600d839055600e829055600b81905560408051848152602081018490529081018290523360608201527f30faad65c7f583308ef778354075d9d06fafbce424fc9cf12827c2d83772fb139060800160405180910390a1505050565b610feb611df1565b600f541561103b5760405162461bcd60e51b815260206004820152601c60248201527f52657665616c2074696d657374616d7020616c726561647920736574000000006044820152606401610b7d565b42600f55565b60606003805461097790612fb6565b611058611d98565b611060611df1565b816001600160a01b0381166110875760405162461bcd60e51b8152600401610b7d90612fee565b5f5b8251811015610c6a575f8382815181106110a5576110a56131d7565b60209081029190910101516040516370a0823160e01b81523060048201529091505f906001600160a01b038316906370a0823190602401602060405180830381865afa1580156110f7573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061111b9190613247565b905080156111955760405163a9059cbb60e01b81526001600160a01b0387811660048301526024820183905283169063a9059cbb906044016020604051808303815f875af115801561116f573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611193919061325e565b505b505080806111a2906131eb565b915050611089565b6111b2611df1565b5f5b8251811015611216578160175f8584815181106111d3576111d36131d7565b6020908102919091018101516001600160a01b031682528101919091526040015f20805460ff19169115159190911790558061120e816131eb565b9150506111b4565b507f528453e15e0401db362befe7b3bdca920ecbce5f016dd17482bdf7b0c755cf848282604051611248929190613279565b60405180910390a15050565b336001600160a01b0383160361127d5760405163b06307db60e01b815260040160405180910390fd5b335f8181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6112f0611df1565b6010548151146113395760405162461bcd60e51b8152602060048201526014602482015273092dcecc2d8d2c840c2e4e4c2f240d8cadccee8d60631b6044820152606401610b7d565b5f5b815181101561138e57818181518110611356576113566131d7565b602002602001015160108281548110611371576113716131d7565b5f9182526020909120015580611386816131eb565b91505061133b565b507f12a7b8f4faf22dfa81cd4f577a33bdda726f99b45e22c89b4614321e4550acc1816040516113be91906132cc565b60405180910390a150565b6113d4848484612398565b6001600160a01b0383163b1561140d576113f084848484612549565b61140d576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b604080516001600160a01b03851660208201529081018390526060808201526016608082015275149bdd59da08149e59195c9cc8199c9959481b5a5b9d60521b60a08201526114649060c001610d14565b6114bc5760405162461bcd60e51b815260206004820152602360248201527f636c61696d467265654d696e743a205369676e617475726520697320696e76616044820152621b1a5960ea1b6064820152608401610b7d565b601a816040516114cc919061330f565b9081526040519081900360200190205460ff161561152c5760405162461bcd60e51b815260206004820152601d60248201527f636c61696d467265654d696e743a205369676e617475726520757365640000006044820152606401610b7d565b600d546001600160a01b0384165f908152601460205260409020546115529084906131c4565b11156115b45760405162461bcd60e51b815260206004820152602b60248201527f636c61696d467265654d696e743a20457863656564206d696e74206c696d697460448201526a081c195c881dd85b1b195d60aa1b6064820152608401610b7d565b5f80546040805160018082528183019092525f19909201929190602082015b6115fd60405180606001604052805f81526020015f6001600160a01b031681526020015f81525090565b8152602001906001900390816115d357905050905060405180606001604052808581526020015f6001600160a01b031681526020016003815250815f81518110611649576116496131d7565b6020908102919091010152610bb861166183866131c4565b11156116af5760405162461bcd60e51b815260206004820152601b60248201527f636c61696d467265654d696e743a20537570706c79206c696d697400000000006044820152606401610b7d565b6001601a846040516116c1919061330f565b9081526040805160209281900383019020805460ff1916931515939093179092556001600160a01b0387165f908152601490915290812080548692906117089084906131c4565b909155506117189050858561232e565b7fea01331863093a17b14773c859e7389d771aa54e326d6c28a1d883d1aed3153c3386848442604051610f19959493929190613203565b606061175a82611c93565b6117be5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610b7d565b600a6117c983612631565b6040516020016117da92919061332a565b6040516020818303038152906040529050919050565b601081815481106117ff575f80fd5b5f91825260209091200154905081565b6001600160a01b039182165f90815260076020908152604080832093909416825291909152205460ff1690565b611844611df1565b806001600160a01b03811661186b5760405162461bcd60e51b8152600401610b7d90612fee565b50601180546001600160a01b0319166001600160a01b0392909216919091179055565b335f9081526019602052604090205460ff166118e35760405162461bcd60e51b815260206004820152601460248201527313dc195c985d1bdc881b9bdd08185b1b1bddd95960621b6044820152606401610b7d565b836001600160a01b03811661190a5760405162461bcd60e51b8152600401610b7d90612fee565b5f8481526018602052604090205460ff161561197e5760405162461bcd60e51b815260206004820152602d60248201527f526566756e643a2054686520746f6b656e206973206e6f7420617661696c616260448201526c1b1948199bdc881c99599d5b99609a1b6064820152608401610b7d565b846001600160a01b031661199185610cf2565b6001600160a01b0316146119f65760405162461bcd60e51b815260206004820152602660248201527f526566756e643a2041646472657373206973206e6f742074686520746f6b656e6044820152651037bbb732b960d11b6064820152608401610b7d565b601254611a0e9086906001600160a01b031686610b23565b6001600160a01b038316611ac1575f856001600160a01b0316836040515f6040518083038185875af1925050503d805f8114611a65576040519150601f19603f3d011682016040523d82523d5f602084013e611a6a565b606091505b5050905080611abb5760405162461bcd60e51b815260206004820152601b60248201527f526566756e643a20455448207472616e73666572206661696c656400000000006044820152606401610b7d565b50611b89565b60405163a9059cbb60e01b81526001600160a01b0386811660048301526024820184905284169063a9059cbb906044016020604051808303815f875af1158015611b0d573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611b31919061325e565b611b895760405162461bcd60e51b815260206004820152602360248201527f526566756e643a20455243323020746f6b656e207472616e73666572206661696044820152621b195960ea1b6064820152608401610b7d565b604080516001600160a01b0387168152602081018690527fd7dee2702d63ad89917b6a4da9981c90c4d24f8c2bdfd64c604ecae57d8d06519101610f19565b611bd0611df1565b806001600160a01b038116611bf75760405162461bcd60e51b8152600401610b7d90612fee565b50601280546001600160a01b0319166001600160a01b0392909216919091179055565b611c22611df1565b6001600160a01b038116611c875760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610b7d565b611c9081612347565b50565b5f81600111158015611ca557505f5482105b80156109625750505f90815260046020526040902054600160e01b161590565b5f8180600111611d1c575f54811015611d1c575f8181526004602052604081205490600160e01b82169003611d1a575b805f03611d1357505f19015f81815260046020526040902054611cf5565b9392505050565b505b604051636f96cda160e11b815260040160405180910390fd5b5f8181526018602052604090205460ff16158015611d545750600f5415155b8015611d6d5750600f54611d6a90610e106131c4565b42115b15611c90575f818152601860205260409020805460ff1916600117905550565b610b1e838383612398565b600260095403611dea5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b7d565b6002600955565b6008546001600160a01b03163314610f7e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b7d565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c81018390525f908190605c016040516020818303038152906040528051906020012090505f805f8551604114611eb2575f945050505050610962565b5050506020830151604084015160608501515f1a601b811015611edd57611eda601b826133ad565b90505b5f8160ff16601b1480611ef357508160ff16601c145b15611f5557604080515f81526020810180835287905260ff841691810191909152606081018590526080810184905260019060a0016020604051602081039080840390855afa158015611f48573d5f803e3d5ffd5b5050506020604051035190505b6011546001600160a01b03918216911614979650505050505050565b6001600160a01b03831661206e5760108281548110611f9257611f926131d7565b5f9182526020808320909101546001600160a01b0387168352601682526040808420868552909252912054611fc89083906131c4565b11156120315760405162461bcd60e51b815260206004820152603260248201527f5f76616c69646174654d696e74696e67506172616d65746572733a20457863656044820152711959081d1a595c881b5a5b9d081b1a5b5a5d60721b6064820152608401610b7d565b6001600160a01b0384165f908152601660209081526040808320858452909152812080548392906120639084906131c4565b9091555061140d9050565b6001600160a01b0383165f9081526017602052604090205460ff166121d957600b54600c5461209d90836131c4565b111561210a5760405162461bcd60e51b815260206004820152603660248201527f5f76616c69646174654d696e74696e67506172616d65746572733a204552432d6044820152750c8c0814dd5c1c1b1e481b1a5b5a5d08195e18d9595960521b6064820152608401610b7d565b600e546001600160a01b0385165f908152601560205260409020546121309083906131c4565b11156121945760405162461bcd60e51b815260206004820152602d60248201527f5f76616c69646174654d696e74696e67506172616d65746572733a204578636560448201526c1959081b5a5b9d081b1a5b5a5d609a1b6064820152608401610b7d565b6001600160a01b0384165f90815260156020526040812080548392906121bb9084906131c4565b9250508190555080600c5f8282546121d391906131c4565b90915550505b6013546001600160a01b03808516911603612254576040516323b872dd60e01b8152336004820152306024820152604481018390526001600160a01b038416906323b872dd906064015f604051808303815f87803b158015612239575f80fd5b505af115801561224b573d5f803e3d5ffd5b5050505061140d565b6040516323b872dd60e01b8152336004820152306024820152604481018390526001600160a01b038416906323b872dd906064016020604051808303815f875af11580156122a4573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906122c8919061325e565b61140d5760405162461bcd60e51b815260206004820152603160248201527f5f76616c69646174654d696e74696e67506172616d65746572733a20546f6b656044820152701b881d1c985b9cd9995c8819985a5b1959607a1b6064820152608401610b7d565b610c76828260405180602001604052805f8152506126c0565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f6123a282611cc5565b9050836001600160a01b0316816001600160a01b0316146123d55760405162a1148160e81b815260040160405180910390fd5b5f828152600660205260408120546001600160a01b03908116919086163314806124045750612404863361180f565b8061241757506001600160a01b03821633145b90508061243757604051632ce44b5f60e11b815260040160405180910390fd5b845f0361245757604051633a954ecd60e21b815260040160405180910390fd5b8115612479575f84815260066020526040902080546001600160a01b03191690555b6001600160a01b038681165f90815260056020908152604080832080545f1901905592881682528282208054600101905586825260049052908120600160e11b4260a01b88178117909155841690036124ff57600184015f8181526004602052604081205490036124fd575f5481146124fd575f8181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b505050505050565b604051630a85bd0160e11b81525f906001600160a01b0385169063150b7a029061257d9033908990889088906004016133c6565b6020604051808303815f875af19250505080156125b7575060408051601f3d908101601f191682019092526125b491810190613402565b60015b612613573d8080156125e4576040519150601f19603f3d011682016040523d82523d5f602084013e6125e9565b606091505b5080515f0361260b576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b60605f61263d83612824565b60010190505f816001600160401b0381111561265b5761265b612a78565b6040519080825280601f01601f191660200182016040528015612685576020820181803683370190505b5090508181016020015b5f19016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461268f57509392505050565b5f54835f036126e157604051622e076360e81b815260040160405180910390fd5b825f036127015760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b0384165f8181526005602090815260408083208054680100000000000000018902019055848352600490915290204260a01b86176001861460e11b1790558190818501903b156127d1575b60405182906001600160a01b038816905f907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a461279c5f878480600101955087612549565b6127b9576040516368d2bf6b60e11b815260040160405180910390fd5b80821061275357825f54146127cc575f80fd5b612815565b5b6040516001830192906001600160a01b038816905f907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a48082106127d2575b505f90815561140d9085838684565b5f8072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106128625772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef8100000000831061288e576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106128ac57662386f26fc10000830492506010015b6305f5e10083106128c4576305f5e100830492506008015b61271083106128d857612710830492506004015b606483106128ea576064830492506002015b600a83106109625760010192915050565b6001600160e01b031981168114611c90575f80fd5b5f60208284031215612920575f80fd5b8135611d13816128fb565b5f5b8381101561294557818101518382015260200161292d565b50505f910152565b5f815180845261296481602086016020860161292b565b601f01601f19169290920160200192915050565b602081525f611d13602083018461294d565b5f6020828403121561299a575f80fd5b5035919050565b80356001600160a01b03811681146129b7575f80fd5b919050565b5f80604083850312156129cd575f80fd5b6129d6836129a1565b946020939093013593505050565b5f602082840312156129f4575f80fd5b611d13826129a1565b5f805f60608486031215612a0f575f80fd5b612a18846129a1565b9250612a26602085016129a1565b9150604084013590509250925092565b8015158114611c90575f80fd5b5f8060408385031215612a54575f80fd5b612a5d836129a1565b91506020830135612a6d81612a36565b809150509250929050565b634e487b7160e01b5f52604160045260245ffd5b604051606081016001600160401b0381118282101715612aae57612aae612a78565b60405290565b604051601f8201601f191681016001600160401b0381118282101715612adc57612adc612a78565b604052919050565b5f6001600160401b03831115612afc57612afc612a78565b612b0f601f8401601f1916602001612ab4565b9050828152838383011115612b22575f80fd5b828260208301375f602084830101529392505050565b5f60208284031215612b48575f80fd5b81356001600160401b03811115612b5d575f80fd5b8201601f81018413612b6d575f80fd5b61262984823560208401612ae4565b5f6001600160401b03821115612b9457612b94612a78565b5060051b60200190565b5f82601f830112612bad575f80fd5b611d1383833560208501612ae4565b5f805f8060808587031215612bcf575f80fd5b612bd8856129a1565b935060208086013593506040808701356001600160401b0380821115612bfc575f80fd5b818901915089601f830112612c0f575f80fd5b8135612c22612c1d82612b7c565b612ab4565b8181526060918202840186019186820191908d841115612c40575f80fd5b948701945b83861015612c8e5780868f031215612c5c575f8081fd5b612c64612a8c565b86358152612c738988016129a1565b818a0152868801358882015283529485019491870191612c45565b9098508b01359550505080841115612ca4575f80fd5b505050612cb387828801612b9e565b91505092959194509250565b5f805f60608486031215612cd1575f80fd5b505081359360208301359350604090920135919050565b5f82601f830112612cf7575f80fd5b81356020612d07612c1d83612b7c565b82815260059290921b84018101918181019086841115612d25575f80fd5b8286015b84811015612d4757612d3a816129a1565b8352918301918301612d29565b509695505050505050565b5f8060408385031215612d63575f80fd5b612d6c836129a1565b915060208301356001600160401b03811115612d86575f80fd5b612d9285828601612ce8565b9150509250929050565b5f8060408385031215612dad575f80fd5b82356001600160401b03811115612dc2575f80fd5b612dce85828601612ce8565b9250506020830135612a6d81612a36565b5f6020808385031215612df0575f80fd5b82356001600160401b03811115612e05575f80fd5b8301601f81018513612e15575f80fd5b8035612e23612c1d82612b7c565b81815260059190911b82018301908381019087831115612e41575f80fd5b928401925b82841015612e5f57833582529284019290840190612e46565b979650505050505050565b5f805f8060808587031215612e7d575f80fd5b612e86856129a1565b9350612e94602086016129a1565b92506040850135915060608501356001600160401b03811115612eb5575f80fd5b612cb387828801612b9e565b5f805f60608486031215612ed3575f80fd5b612edc846129a1565b92506020840135915060408401356001600160401b03811115612efd575f80fd5b612f0986828701612b9e565b9150509250925092565b5f60208284031215612f23575f80fd5b81356001600160401b03811115612f38575f80fd5b61262984828501612b9e565b5f8060408385031215612f55575f80fd5b612f5e836129a1565b9150612f6c602084016129a1565b90509250929050565b5f805f8060808587031215612f88575f80fd5b612f91856129a1565b935060208501359250612fa6604086016129a1565b9396929550929360600135925050565b600181811c90821680612fca57607f821691505b602082108103612fe857634e487b7160e01b5f52602260045260245ffd5b50919050565b6020808252601b908201527f43616e6e6f742073656e6420746f207a65726f20616464726573730000000000604082015260600190565b601f821115610b1e575f81815260208120601f850160051c8101602086101561304b5750805b601f850160051c820191505b8181101561254157828155600101613057565b81516001600160401b0381111561308357613083612a78565b613097816130918454612fb6565b84613025565b602080601f8311600181146130ca575f84156130b35750858301515b5f19600386901b1c1916600185901b178555612541565b5f85815260208120601f198616915b828110156130f8578886015182559484019460019091019084016130d9565b508582101561311557878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b5f8151808452602080850194508084015f5b8381101561317257815180518852838101516001600160a01b0316848901526040908101519088015260609096019590820190600101613137565b509495945050505050565b6001600160a01b03841681526060602082018190525f906131a090830185613125565b9050826040830152949350505050565b634e487b7160e01b5f52601160045260245ffd5b80820180821115610962576109626131b0565b634e487b7160e01b5f52603260045260245ffd5b5f600182016131fc576131fc6131b0565b5060010190565b6001600160a01b038681168252851660208201526040810184905260a0606082018190525f9061323590830185613125565b90508260808301529695505050505050565b5f60208284031215613257575f80fd5b5051919050565b5f6020828403121561326e575f80fd5b8151611d1381612a36565b604080825283519082018190525f906020906060840190828701845b828110156132ba5781516001600160a01b031684529284019290840190600101613295565b50505093151592019190915250919050565b602080825282518282018190525f9190848201906040850190845b81811015613303578351835292840192918401916001016132e7565b50909695505050505050565b5f825161332081846020870161292b565b9190910192915050565b5f80845461333781612fb6565b6001828116801561334f576001811461336457613390565b60ff1984168752821515830287019450613390565b885f526020805f205f5b858110156133875781548a82015290840190820161336e565b50505082870194505b5050505083516133a481836020880161292b565b01949350505050565b60ff8181168382160190811115610962576109626131b0565b6001600160a01b03858116825284166020820152604081018390526080606082018190525f906133f89083018461294d565b9695505050505050565b5f60208284031215613412575f80fd5b8151611d13816128fb56fea264697066735822122047e49503905824f751f3196e60e3ccc0be4fcd0ee807d7098eef2c4e21b85fbc64736f6c63430008140033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000008246b06ecb7790c579ec137d26b8b37691230e7e
-----Decoded View---------------
Arg [0] : secretAddress (address): 0x8246B06ECb7790c579Ec137d26B8B37691230E7e
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000008246b06ecb7790c579ec137d26b8b37691230e7e
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.