ETH Price: $1,795.99 (+10.49%)
Gas: 0.2 GWei

Contract

0x93A5467fbC9D7dbB5713752Ec5a934a5A752AC07

Overview

ETH Balance

Linea Mainnet LogoLinea Mainnet LogoLinea Mainnet Logo0.0002 ETH

ETH Value

$0.36 (@ $1,795.99/ETH)

Token Holdings

Transaction Hash
Method
Block
From
To
Set Approval For...182930282025-04-23 2:43:516 hrs ago1745376231IN
0x93A5467f...5A752AC07
0 ETH0.00000440.167465
Set Approval For...182840152025-04-22 19:27:5313 hrs ago1745350073IN
0x93A5467f...5A752AC07
0 ETH0.000009820.373532
Set Approval For...182812482025-04-22 17:19:5316 hrs ago1745342393IN
0x93A5467f...5A752AC07
0 ETH0.000016430.625238
Set Approval For...182756832025-04-22 13:28:4719 hrs ago1745328527IN
0x93A5467f...5A752AC07
0 ETH0.000007760.295256
Set Approval For...182651102025-04-22 6:09:2627 hrs ago1745302166IN
0x93A5467f...5A752AC07
0 ETH0.000002350.089523
Set Approval For...182574632025-04-22 0:08:3733 hrs ago1745280517IN
0x93A5467f...5A752AC07
0 ETH0.000002370.09043637
Set Approval For...180374372025-04-14 18:16:278 days ago1744654587IN
0x93A5467f...5A752AC07
0 ETH0.000001910.0787736
Set Approval For...180343592025-04-14 15:57:548 days ago1744646274IN
0x93A5467f...5A752AC07
0 ETH0.000001410.05826804
Set Approval For...177424192025-04-05 16:31:0217 days ago1743870662IN
0x93A5467f...5A752AC07
0 ETH0.00000160.06118145
Set Approval For...177424192025-04-05 16:31:0217 days ago1743870662IN
0x93A5467f...5A752AC07
0 ETH0.000001480.06118145
Set Approval For...175730632025-03-31 17:21:5622 days ago1743441716IN
0x93A5467f...5A752AC07
0 ETH0.000001680.06941204
Set Approval For...175104722025-03-30 0:56:1124 days ago1743296171IN
0x93A5467f...5A752AC07
0 ETH0.000001930.07957874
Set Approval For...175035472025-03-29 19:35:1924 days ago1743276919IN
0x93A5467f...5A752AC07
0 ETH0.000002420.05238712
Set Approval For...174926502025-03-29 12:41:2824 days ago1743252088IN
0x93A5467f...5A752AC07
0 ETH0.000002420.05238712
Set Approval For...173828872025-03-26 12:52:2727 days ago1742993547IN
0x93A5467f...5A752AC07
0 ETH0.000001550.06409484
Set Approval For...173150812025-03-24 17:29:4829 days ago1742837388IN
0x93A5467f...5A752AC07
0 ETH0.000002520.05473892
Permit173038282025-03-24 10:45:2929 days ago1742813129IN
0x93A5467f...5A752AC07
0 ETH0.000002660.07111256
Permit172810202025-03-23 19:34:1430 days ago1742758454IN
0x93A5467f...5A752AC07
0 ETH0.000002610.06976695
Set Approval For...169406692025-03-14 18:38:4239 days ago1741977522IN
0x93A5467f...5A752AC07
0 ETH0.000002430.092658
Set Approval For...169358092025-03-14 15:51:4039 days ago1741967500IN
0x93A5467f...5A752AC07
0 ETH0.000002520.09591
Set Approval For...169227562025-03-14 8:34:0240 days ago1741941242IN
0x93A5467f...5A752AC07
0 ETH0.000002350.089523
Set Approval For...169129692025-03-14 3:06:4140 days ago1741921601IN
0x93A5467f...5A752AC07
0 ETH0.000002350.089523
Set Approval For...169070362025-03-13 23:28:3840 days ago1741908518IN
0x93A5467f...5A752AC07
0 ETH0.000002350.089523
Set Approval For...168874142025-03-13 12:15:0240 days ago1741868102IN
0x93A5467f...5A752AC07
0 ETH0.000002350.089523
Set Approval For...168714432025-03-13 2:55:2141 days ago1741834521IN
0x93A5467f...5A752AC07
0 ETH0.000001470.06085583
View all transactions

Latest 25 internal transactions (View All)

Parent Transaction Hash Block From To
173038282025-03-24 10:45:2929 days ago1742813129
0x93A5467f...5A752AC07
0 ETH
172810202025-03-23 19:34:1430 days ago1742758454
0x93A5467f...5A752AC07
0 ETH
166526092025-03-07 10:19:5646 days ago1741342796
0x93A5467f...5A752AC07
0 ETH
166526092025-03-07 10:19:5646 days ago1741342796
0x93A5467f...5A752AC07
0 ETH
165669152025-03-05 7:52:2149 days ago1741161141
0x93A5467f...5A752AC07
0 ETH
164745972025-03-03 0:33:5851 days ago1740962038
0x93A5467f...5A752AC07
0 ETH
164745972025-03-03 0:33:5851 days ago1740962038
0x93A5467f...5A752AC07
0 ETH
161387652025-02-22 15:08:4559 days ago1740236925
0x93A5467f...5A752AC07
0 ETH
161281412025-02-22 9:01:2160 days ago1740214881
0x93A5467f...5A752AC07
0 ETH
161281412025-02-22 9:01:2160 days ago1740214881
0x93A5467f...5A752AC07
0 ETH
160838192025-02-21 6:13:0161 days ago1740118381
0x93A5467f...5A752AC07
0 ETH
160838192025-02-21 6:13:0161 days ago1740118381
0x93A5467f...5A752AC07
0 ETH
156752362025-02-11 1:50:1671 days ago1739238616
0x93A5467f...5A752AC07
0 ETH
153535222025-02-02 21:46:2479 days ago1738532784
0x93A5467f...5A752AC07
0 ETH
153535222025-02-02 21:46:2479 days ago1738532784
0x93A5467f...5A752AC07
0 ETH
149535292025-01-23 19:07:5489 days ago1737659274
0x93A5467f...5A752AC07
0 ETH
148609682025-01-21 12:04:4991 days ago1737461089
0x93A5467f...5A752AC07
0 ETH
148609682025-01-21 12:04:4991 days ago1737461089
0x93A5467f...5A752AC07
0 ETH
148609682025-01-21 12:04:4991 days ago1737461089
0x93A5467f...5A752AC07
0 ETH
148609682025-01-21 12:04:4991 days ago1737461089
0x93A5467f...5A752AC07
0 ETH
148609682025-01-21 12:04:4991 days ago1737461089
0x93A5467f...5A752AC07
0 ETH
148609682025-01-21 12:04:4991 days ago1737461089
0x93A5467f...5A752AC07
0 ETH
148609682025-01-21 12:04:4991 days ago1737461089
0x93A5467f...5A752AC07
0 ETH
148609682025-01-21 12:04:4991 days ago1737461089
0x93A5467f...5A752AC07
0 ETH
148609682025-01-21 12:04:4991 days ago1737461089
0x93A5467f...5A752AC07
0 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
DINOERC404

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
Yes with 1000 runs

Other Settings:
paris EvmVersion
File 1 of 16 : DINOERC404.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {Strings} from "@openzeppelin/contracts/utils/Strings.sol";
import {ERC404} from "../ERC404.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";

contract DINOERC404 is Ownable, ERC404 {
  constructor(
    string memory name_,
    string memory symbol_,
    uint8 decimals_,
    uint256 maxMint_,
    address _recipient
  ) ERC404(name_, symbol_, decimals_) Ownable() {
    MAX_MINT = maxMint_ * 10 ** decimals;
    MAX_ERC721_MINT= maxMint_;
    recipient = _recipient;
  }

  // Mapping to keep track of whether an address has minted
    mapping(address => bool) private hasMintedMap;
    mapping(address => bool) public whitelist;
    uint256 public MAX_MINT;
    uint256 public MAX_ERC721_MINT;
    address public VOYAGE = 0x0872ec4426103482a50f26Ffc32aCEfcec61b3c9;
    IERC1155 erc1151 = IERC1155(VOYAGE);
    // Address to receive the transferred funds
    address public recipient;
    uint256 public voyageMinted = 0;
    uint256 public whitelisted = 0;
    bool public isOpenMint = false;


    // URI for the token metadata
    string private URI = "ipfs://bafybeihhfaf4sanbgbzwxq6ku5ykeryvtkn6ahuo6zcsneps3se6k4my3y/";

    // Amount to be transferred (0.0018 ETH in this case)
    uint256 public transferAmount = 0.0018 ether;

    // Events for tracking whitelist changes
    event WhitelistAdded(address indexed account);
    event WhitelistRemoved(address indexed account);
    event Minted(address indexed account, uint256 tokenId);

    function tokenURI(uint256 id_) public view override returns (string memory) {
    // Concatenate the base URI with the token ID using Strings.toString
    return string.concat(URI, Strings.toString(id_));
    }

    function setERC721TransferExempt(
      address account_,
      bool value_
    ) external onlyOwner {
      _setERC721TransferExempt(account_, value_);
    }

    // Function to add multiple addresses to the whitelist in one transaction
    // Takes an array of addresses to be whitelisted
    function addToWhitelist(address[] calldata addresses) external onlyOwner {
        for (uint256 i = 0; i < addresses.length; i++) {
            if(!whitelist[addresses[i]]) {
              whitelisted++;
            }
            whitelist[addresses[i]] = true;
            emit WhitelistAdded(addresses[i]);
        }
    }

    // Function to remove addresses from the whitelist
    // Takes an array of addresses to be removed
    function removeFromWhitelist(address[] calldata addresses) external onlyOwner {
        for (uint256 i = 0; i < addresses.length; i++) {
            if (whitelist[addresses[i]]) {
                whitelist[addresses[i]] = false;
                emit WhitelistRemoved(addresses[i]);
            }
        }
    }

    function createUserArray(uint256 size, address value) internal pure returns (address[] memory) {
        address[] memory newArray = new address[](size);
        for (uint256 i = 0; i < size; i++) {
            newArray[i] = value;
        }
        return newArray;
    }

    function createDynamicArray(uint256 size) internal pure returns (uint256[] memory) {
        uint256[] memory dynamicArray = new uint256[](size);
        for (uint256 i = 0; i < size; i++) {
            dynamicArray[i] = i + 1;
        }

        return dynamicArray;
    }

    // Check if user has at least one VOYAGE NFT
    function hasVoyageNft(address _address) public view returns (bool) {
        //uint256 supply = IERC1155.currentSupply();

        // Create the accounts array filled with the caller's address
        address[] memory accounts = createUserArray(5, _address);

        // Create the ids array with values from 1 to supply
        uint256[] memory ids = createDynamicArray(5);

        uint256[] memory balances = erc1151.balanceOfBatch(accounts, ids);

        // Ensure valid input lengths
        if (balances.length != accounts.length || balances.length != ids.length) {
            revert("Invalid input lengths");
        }

        // Check for any non-zero balance
        for (uint256 i = 0; i < balances.length; i++) {
            if (balances[i] > 0) {
                return true; // At least one VOYAGE NFT found
            }
        }

        return false; // No VOYAGE NFTs found
    }

    function updateTransferAmount(uint256 _newAmount) public onlyOwner {
        transferAmount = _newAmount;
    }

    function mintERC20() external payable {
      require(isOpenMint, "Mint is not open");
      require(totalSupply <= MAX_MINT, "Max mint limit reached");
      require(!hasMintedMap[msg.sender], "Already minted");
      if (whitelist[msg.sender]) {
        // Mint for free if whitelisted
        _mintERC20(msg.sender, 1 * 10 ** decimals);
      } else if (hasVoyageNft(msg.sender)) {
        // Existing logic for VOYAGE NFT holders with payment
        // Ensure the contract receives the exact amount
        require(voyageMinted < MAX_ERC721_MINT - whitelisted, "Max voyage mint limit reached");
        require(msg.value == transferAmount, "Must send the exact amount (0.0018 ETH)");

        // Transfer funds to recipient
        (bool success,) = payable(recipient).call{value: transferAmount}("");

        // Check if transfer succeeded
        require(success, "Transfer failed");
        _mintERC20(msg.sender, 1 * 10 ** decimals);
        voyageMinted++;
      }
      hasMintedMap[msg.sender] = true;
      emit Minted(msg.sender, minted);
    }

    function setURI(string memory newURI) public onlyOwner {
      require(bytes(newURI).length > 0, "URI cannot be empty");
      URI = newURI;
    }

    // Check if user is whitelisted
    function isWhitelisted(address account) public view returns (bool) {
      return whitelist[account];
    }

    // Check if user has minted 
    function hasMinted(address account) public view returns (bool) {
        return hasMintedMap[account];
    }

    function withdrawNativeToken(uint256 _amount, address _receiver) external onlyOwner {
        uint balance = address(this).balance;
        require(_amount <= balance,"transfer failed");
        require(_amount > 0, "remove liquidity amount should be more than 0");   
        payable(_receiver).transfer(_amount);
    }

    function setOpenMint(bool _state) external onlyOwner {
      isOpenMint = _state;
    }
}

File 2 of 16 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.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. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling 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);
    }
}

File 3 of 16 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol)

pragma solidity ^0.8.0;

import "../utils/introspection/IERC165.sol";

File 4 of 16 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC721Receiver.sol)

pragma solidity ^0.8.0;

import "../token/ERC721/IERC721Receiver.sol";

File 5 of 16 : IERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/IERC1155.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC1155 compliant contract, as defined in the
 * https://eips.ethereum.org/EIPS/eip-1155[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155 is IERC165 {
    /**
     * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.
     */
    event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);

    /**
     * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all
     * transfers.
     */
    event TransferBatch(
        address indexed operator,
        address indexed from,
        address indexed to,
        uint256[] ids,
        uint256[] values
    );

    /**
     * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to
     * `approved`.
     */
    event ApprovalForAll(address indexed account, address indexed operator, bool approved);

    /**
     * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.
     *
     * If an {URI} event was emitted for `id`, the standard
     * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value
     * returned by {IERC1155MetadataURI-uri}.
     */
    event URI(string value, uint256 indexed id);

    /**
     * @dev Returns the amount of tokens of token type `id` owned by `account`.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) external view returns (uint256);

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(
        address[] calldata accounts,
        uint256[] calldata ids
    ) external view returns (uint256[] memory);

    /**
     * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,
     *
     * Emits an {ApprovalForAll} event.
     *
     * Requirements:
     *
     * - `operator` cannot be the caller.
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.
     *
     * See {setApprovalForAll}.
     */
    function isApprovedForAll(address account, address operator) external view returns (bool);

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external;

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] calldata ids,
        uint256[] calldata amounts,
        bytes calldata data
    ) external;
}

File 6 of 16 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 7 of 16 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (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;
    }

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

File 8 of 16 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 9 of 16 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.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) {
                // Solidity will revert if denominator == 0, unlike the div opcode on its own.
                // The surrounding unchecked block does not change this fact.
                // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1, "Math: mulDiv overflow");

            ///////////////////////////////////////////////
            // 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 256, 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 << 3) < value ? 1 : 0);
        }
    }
}

File 10 of 16 : SignedMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard signed math utilities missing in the Solidity language.
 */
library SignedMath {
    /**
     * @dev Returns the largest of two signed numbers.
     */
    function max(int256 a, int256 b) internal pure returns (int256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two signed numbers.
     */
    function min(int256 a, int256 b) internal pure returns (int256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two signed numbers without overflow.
     * The result is rounded towards zero.
     */
    function average(int256 a, int256 b) internal pure returns (int256) {
        // Formula from the book "Hacker's Delight"
        int256 x = (a & b) + ((a ^ b) >> 1);
        return x + (int256(uint256(x) >> 255) & (a ^ b));
    }

    /**
     * @dev Returns the absolute unsigned value of a signed value.
     */
    function abs(int256 n) internal pure returns (uint256) {
        unchecked {
            // must be unchecked in order to support `n = type(int256).min`
            return uint256(n >= 0 ? n : -n);
        }
    }
}

File 11 of 16 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

import "./math/Math.sol";
import "./math/SignedMath.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 `int256` to its ASCII `string` decimal representation.
     */
    function toString(int256 value) internal pure returns (string memory) {
        return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value))));
    }

    /**
     * @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);
    }

    /**
     * @dev Returns true if the two strings are equal.
     */
    function equal(string memory a, string memory b) internal pure returns (bool) {
        return keccak256(bytes(a)) == keccak256(bytes(b));
    }
}

File 12 of 16 : ERC404.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

import {IERC721Receiver} from "@openzeppelin/contracts/interfaces/IERC721Receiver.sol";
import {IERC165} from "@openzeppelin/contracts/interfaces/IERC165.sol";
import {IERC404} from "./interfaces/IERC404.sol";
import {DoubleEndedQueue} from "./lib/DoubleEndedQueue.sol";
import {ERC721Events} from "./lib/ERC721Events.sol";
import {ERC20Events} from "./lib/ERC20Events.sol";

abstract contract ERC404 is IERC404 {
  using DoubleEndedQueue for DoubleEndedQueue.Uint256Deque;

  /// @dev The queue of ERC-721 tokens stored in the contract.
  DoubleEndedQueue.Uint256Deque private _storedERC721Ids;

  /// @dev Token name
  string public name;

  /// @dev Token symbol
  string public symbol;

  /// @dev Decimals for ERC-20 representation
  uint8 public immutable decimals;

  /// @dev Units for ERC-20 representation
  uint256 public immutable units;

  /// @dev Total supply in ERC-20 representation
  uint256 public totalSupply;

  /// @dev Current mint counter which also represents the highest
  ///      minted id, monotonically increasing to ensure accurate ownership
  uint256 public minted;

  /// @dev Initial chain id for EIP-2612 support
  uint256 internal immutable _INITIAL_CHAIN_ID;

  /// @dev Initial domain separator for EIP-2612 support
  bytes32 internal immutable _INITIAL_DOMAIN_SEPARATOR;

  /// @dev Balance of user in ERC-20 representation
  mapping(address => uint256) public balanceOf;

  /// @dev Allowance of user in ERC-20 representation
  mapping(address => mapping(address => uint256)) public allowance;

  /// @dev Approval in ERC-721 representaion
  mapping(uint256 => address) public getApproved;

  /// @dev Approval for all in ERC-721 representation
  mapping(address => mapping(address => bool)) public isApprovedForAll;

  /// @dev Packed representation of ownerOf and owned indices
  mapping(uint256 => uint256) internal _ownedData;

  /// @dev Array of owned ids in ERC-721 representation
  mapping(address => uint256[]) internal _owned;

  /// @dev Addresses that are exempt from ERC-721 transfer, typically for gas savings (pairs, routers, etc)
  mapping(address => bool) internal _erc721TransferExempt;

  /// @dev EIP-2612 nonces
  mapping(address => uint256) public nonces;

  /// @dev Address bitmask for packed ownership data
  uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1;

  /// @dev Owned index bitmask for packed ownership data
  uint256 private constant _BITMASK_OWNED_INDEX = ((1 << 96) - 1) << 160;

  /// @dev Constant for token id max
  uint256 public constant ID_MAX = 5555;
  uint256 private constant MAX_ERC20_MINT = 5555*10**18;

  constructor(string memory name_, string memory symbol_, uint8 decimals_) {
    name = name_;
    symbol = symbol_;

    if (decimals_ < 18) {
      revert DecimalsTooLow();
    }

    decimals = decimals_;
    units = 10 ** decimals;

    // EIP-2612 initialization
    _INITIAL_CHAIN_ID = block.chainid;
    _INITIAL_DOMAIN_SEPARATOR = _computeDomainSeparator();
  }

  /// @notice Function to find owner of a given ERC-721 token
  function ownerOf(
    uint256 id_
  ) public view virtual returns (address erc721Owner) {
    erc721Owner = _getOwnerOf(id_);

    if (!_isValidTokenId(id_)) {
      revert InvalidTokenId();
    }

    if (erc721Owner == address(0)) {
      revert NotFound();
    }
  }

  function owned(
    address owner_
  ) public view virtual returns (uint256[] memory) {
    return _owned[owner_];
  }

  function erc721BalanceOf(
    address owner_
  ) public view virtual returns (uint256) {
    return _owned[owner_].length;
  }

  function erc20BalanceOf(
    address owner_
  ) public view virtual returns (uint256) {
    return balanceOf[owner_];
  }

  function erc20TotalSupply() public view virtual returns (uint256) {
    return totalSupply;
  }

  function erc721TotalSupply() public view virtual returns (uint256) {
    return minted;
  }

  function getERC721QueueLength() public view virtual returns (uint256) {
    return _storedERC721Ids.length();
  }

  function getERC721TokensInQueue(
    uint256 start_,
    uint256 count_
  ) public view virtual returns (uint256[] memory) {
    uint256[] memory tokensInQueue = new uint256[](count_);

    for (uint256 i = start_; i < start_ + count_; ) {
      tokensInQueue[i - start_] = _storedERC721Ids.at(i);

      unchecked {
        ++i;
      }
    }

    return tokensInQueue;
  }

  /// @notice tokenURI must be implemented by child contract
  function tokenURI(uint256 id_) public view virtual returns (string memory);

  /// @notice Function for token approvals
  /// @dev This function assumes the operator is attempting to approve
  ///      an ERC-721 if valueOrId_ is a possibly valid ERC-721 token id.
  ///      Unlike setApprovalForAll, spender_ must be allowed to be 0x0 so
  ///      that approval can be revoked.
  function approve(
    address spender_,
    uint256 valueOrId_
  ) public virtual returns (bool) {
    if (_isValidTokenId(valueOrId_)) {
      erc721Approve(spender_, valueOrId_);
    } else {
      return erc20Approve(spender_, valueOrId_);
    }

    return true;
  }

  function erc721Approve(address spender_, uint256 id_) public virtual {
    // Intention is to approve as ERC-721 token (id).
    address erc721Owner = _getOwnerOf(id_);

    if (
      msg.sender != erc721Owner && !isApprovedForAll[erc721Owner][msg.sender]
    ) {
      revert Unauthorized();
    }

    getApproved[id_] = spender_;

    emit ERC721Events.Approval(erc721Owner, spender_, id_);
  }

  /// @dev Providing type(uint256).max for approval value results in an
  ///      unlimited approval that is not deducted from on transfers.
  function erc20Approve(
    address spender_,
    uint256 value_
  ) public virtual returns (bool) {
    // Prevent granting 0x0 an ERC-20 allowance.
    if (spender_ == address(0)) {
      revert InvalidSpender();
    }

    allowance[msg.sender][spender_] = value_;

    emit ERC20Events.Approval(msg.sender, spender_, value_);

    return true;
  }

  /// @notice Function for ERC-721 approvals
  function setApprovalForAll(address operator_, bool approved_) public virtual {
    // Prevent approvals to 0x0.
    if (operator_ == address(0)) {
      revert InvalidOperator();
    }
    isApprovedForAll[msg.sender][operator_] = approved_;
    emit ERC721Events.ApprovalForAll(msg.sender, operator_, approved_);
  }

  /// @notice Function for mixed transfers from an operator that may be different than 'from'.
  /// @dev This function assumes the operator is attempting to transfer an ERC-721
  ///      if valueOrId is a possible valid token id.
  function transferFrom(
    address from_,
    address to_,
    uint256 valueOrId_
  ) public virtual returns (bool) {
    if (_isValidTokenId(valueOrId_)) {
      erc721TransferFrom(from_, to_, valueOrId_);
    } else {
      // Intention is to transfer as ERC-20 token (value).
      return erc20TransferFrom(from_, to_, valueOrId_);
    }

    return true;
  }

  /// @notice Function for ERC-721 transfers from.
  /// @dev This function is recommended for ERC721 transfers.
  function erc721TransferFrom(
    address from_,
    address to_,
    uint256 id_
  ) public virtual {
    // Prevent minting tokens from 0x0.
    if (from_ == address(0)) {
      revert InvalidSender();
    }

    // Prevent burning tokens to 0x0.
    if (to_ == address(0)) {
      revert InvalidRecipient();
    }

    if (from_ != _getOwnerOf(id_)) {
      revert Unauthorized();
    }

    // Check that the operator is either the sender or approved for the transfer.
    if (
      msg.sender != from_ &&
      !isApprovedForAll[from_][msg.sender] &&
      msg.sender != getApproved[id_]
    ) {
      revert Unauthorized();
    }

    // We only need to check ERC-721 transfer exempt status for the recipient
    // since the sender being ERC-721 transfer exempt means they have already
    // had their ERC-721s stripped away during the rebalancing process.
    if (erc721TransferExempt(to_)) {
      revert RecipientIsERC721TransferExempt();
    }

    // Transfer 1 * units ERC-20 and 1 ERC-721 token.
    // ERC-721 transfer exemptions handled above. Can't make it to this point if either is transfer exempt.
    _transferERC20(from_, to_, units);
    _transferERC721(from_, to_, id_);
  }

  /// @notice Function for ERC-20 transfers from.
  /// @dev This function is recommended for ERC20 transfers
  function erc20TransferFrom(
    address from_,
    address to_,
    uint256 value_
  ) public virtual returns (bool) {
    // Prevent minting tokens from 0x0.
    if (from_ == address(0)) {
      revert InvalidSender();
    }

    // Prevent burning tokens to 0x0.
    if (to_ == address(0)) {
      revert InvalidRecipient();
    }

    uint256 allowed = allowance[from_][msg.sender];

    // Check that the operator has sufficient allowance.
    if (allowed != type(uint256).max) {
      allowance[from_][msg.sender] = allowed - value_;
    }

    // Transferring ERC-20s directly requires the _transferERC20WithERC721 function.
    // Handles ERC-721 exemptions internally.
    return _transferERC20WithERC721(from_, to_, value_);
  }

  /// @notice Function for ERC-20 transfers.
  /// @dev This function assumes the operator is attempting to transfer as ERC-20
  ///      given this function is only supported on the ERC-20 interface.
  ///      Treats even large amounts that are valid ERC-721 ids as ERC-20s.
  function transfer(address to_, uint256 value_) public virtual returns (bool) {
    // Prevent burning tokens to 0x0.
    if (to_ == address(0)) {
      revert InvalidRecipient();
    }

    // Transferring ERC-20s directly requires the _transferERC20WithERC721 function.
    // Handles ERC-721 exemptions internally.
    return _transferERC20WithERC721(msg.sender, to_, value_);
  }

  /// @notice Function for ERC-721 transfers with contract support.
  /// This function only supports moving valid ERC-721 ids, as it does not exist on the ERC-20
  /// spec and will revert otherwise.
  function safeTransferFrom(
    address from_,
    address to_,
    uint256 id_
  ) public virtual {
    safeTransferFrom(from_, to_, id_, "");
  }

  /// @notice Function for ERC-721 transfers with contract support and callback data.
  /// This function only supports moving valid ERC-721 ids, as it does not exist on the
  /// ERC-20 spec and will revert otherwise.
  function safeTransferFrom(
    address from_,
    address to_,
    uint256 id_,
    bytes memory data_
  ) public virtual {
    if (!_isValidTokenId(id_)) {
      revert InvalidTokenId();
    }

    transferFrom(from_, to_, id_);

    if (
      to_.code.length != 0 &&
      IERC721Receiver(to_).onERC721Received(msg.sender, from_, id_, data_) !=
      IERC721Receiver.onERC721Received.selector
    ) {
      revert UnsafeRecipient();
    }
  }

    /// @notice Function for EIP-2612 permits (ERC-20 only).
  /// @dev Providing type(uint256).max for permit value results in an
  ///      unlimited approval that is not deducted from on transfers.
  function permit(
    address owner_,
    address spender_,
    uint256 value_,
    uint256 deadline_,
    uint8 v_,
    bytes32 r_,
    bytes32 s_
  ) public virtual {
    if (deadline_ < block.timestamp) {
      revert PermitDeadlineExpired();
    }

    // permit cannot be used for ERC-721 token approvals, so ensure
    // the value does not fall within the valid range of ERC-721 token ids.
    if (_isValidTokenId(value_)) {
      revert InvalidApproval();
    }

    if (spender_ == address(0)) {
      revert InvalidSpender();
    }

    unchecked {
      address recoveredAddress = ecrecover(
        keccak256(
          abi.encodePacked(
            "\x19\x01",
            DOMAIN_SEPARATOR(),
            keccak256(
              abi.encode(
                keccak256(
                  "Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"
                ),
                owner_,
                spender_,
                value_,
                nonces[owner_]++,
                deadline_
              )
            )
          )
        ),
        v_,
        r_,
        s_
      );

      if (recoveredAddress == address(0) || recoveredAddress != owner_) {
        revert InvalidSigner();
      }

      allowance[recoveredAddress][spender_] = value_;
    }

    emit ERC20Events.Approval(owner_, spender_, value_);
  }

  /// @notice Returns domain initial domain separator, or recomputes if chain id is not equal to initial chain id
  function DOMAIN_SEPARATOR() public view virtual returns (bytes32) {
    return
      block.chainid == _INITIAL_CHAIN_ID
        ? _INITIAL_DOMAIN_SEPARATOR
        : _computeDomainSeparator();
  }

  function supportsInterface(
    bytes4 interfaceId
  ) public view virtual returns (bool) {
    return
      interfaceId == type(IERC404).interfaceId ||
      interfaceId == type(IERC165).interfaceId;
  }

  /// @notice Function for self-exemption
  function setSelfERC721TransferExempt(bool state_) public virtual {
    _setERC721TransferExempt(msg.sender, state_);
  }

  /// @notice Function to check if address is transfer exempt
  function erc721TransferExempt(
    address target_
  ) public view virtual returns (bool) {
    return target_ == address(0) || _erc721TransferExempt[target_];
  }

  /// @notice For a token token id to be considered valid, it just needs
  ///         to fall within the range of possible token ids, it does not
  ///         necessarily have to be minted yet.
  function _isValidTokenId(uint256 id_) internal pure returns (bool) {
    return id_ >= 1 && id_ <= ID_MAX;
  }

  /// @notice Internal function to compute domain separator for EIP-2612 permits
  function _computeDomainSeparator() internal view virtual returns (bytes32) {
    return
      keccak256(
        abi.encode(
          keccak256(
            "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"
          ),
          keccak256(bytes(name)),
          keccak256("1"),
          block.chainid,
          address(this)
        )
      );
  }
  
  /// @notice This is the lowest level ERC-20 transfer function, which
  ///         should be used for both normal ERC-20 transfers as well as minting.
  /// Note that this function allows transfers to and from 0x0.
  function _transferERC20(
    address from_,
    address to_,
    uint256 value_
  ) internal virtual {
    // Minting is a special case for which we should not check the balance of
    // the sender, and we should increase the total supply.
    if (from_ == address(0)) {
      totalSupply += value_;
    } else {
      // Deduct value from sender's balance.
      balanceOf[from_] -= value_;
    }

    // Update the recipient's balance.
    // Can be unchecked because on mint, adding to totalSupply is checked, and on transfer balance deduction is checked.
    unchecked {
      balanceOf[to_] += value_;
    }

    emit ERC20Events.Transfer(from_, to_, value_);
  }

  /// @notice Consolidated record keeping function for transferring ERC-721s.
  /// @dev Assign the token to the new owner, and remove from the old owner.
  /// Note that this function allows transfers to and from 0x0.
  /// Does not handle ERC-721 exemptions.
  function _transferERC721(
    address from_,
    address to_,
    uint256 id_
  ) internal virtual {
    // If this is not a mint, handle record keeping for transfer from previous owner.
    if (from_ != address(0)) {
      // On transfer of an NFT, any previous approval is reset.
      delete getApproved[id_];

      uint256 updatedId = _owned[from_][_owned[from_].length - 1];
      if (updatedId != id_) {
        uint256 updatedIndex = _getOwnedIndex(id_);
        // update _owned for sender
        _owned[from_][updatedIndex] = updatedId;
        // update index for the moved id
        _setOwnedIndex(updatedId, updatedIndex);
      }

      // pop
      _owned[from_].pop();
    }

    // Check if this is a burn.
    if (to_ != address(0)) {
      // If not a burn, update the owner of the token to the new owner.
      // Update owner of the token to the new owner.
      _setOwnerOf(id_, to_);
      // Push token onto the new owner's stack.
      _owned[to_].push(id_);
      // Update index for new owner's stack.
      _setOwnedIndex(id_, _owned[to_].length - 1);
    } else {
      // If this is a burn, reset the owner of the token to 0x0 by deleting the token from _ownedData.
      delete _ownedData[id_];
    }

    emit ERC721Events.Transfer(from_, to_, id_);
  }

  /// @notice Internal function for ERC-20 transfers. Also handles any ERC-721 transfers that may be required.
  // Handles ERC-721 exemptions.
  function _transferERC20WithERC721(
    address from_,
    address to_,
    uint256 value_
  ) internal virtual returns (bool) {
    uint256 erc20BalanceOfSenderBefore = erc20BalanceOf(from_);
    uint256 erc20BalanceOfReceiverBefore = erc20BalanceOf(to_);

    _transferERC20(from_, to_, value_);

    // Preload for gas savings on branches
    bool isFromERC721TransferExempt = erc721TransferExempt(from_);
    bool isToERC721TransferExempt = erc721TransferExempt(to_);

    // Skip _withdrawAndStoreERC721 and/or _retrieveOrMintERC721 for ERC-721 transfer exempt addresses
    // 1) to save gas
    // 2) because ERC-721 transfer exempt addresses won't always have/need ERC-721s corresponding to their ERC20s.
    if (isFromERC721TransferExempt && isToERC721TransferExempt) {
      // Case 1) Both sender and recipient are ERC-721 transfer exempt. No ERC-721s need to be transferred.
      // NOOP.
    } else if (isFromERC721TransferExempt) {
      // Case 2) The sender is ERC-721 transfer exempt, but the recipient is not. Contract should not attempt
      //         to transfer ERC-721s from the sender, but the recipient should receive ERC-721s
      //         from the bank/minted for any whole number increase in their balance.
      // Only cares about whole number increments.
      uint256 tokensToRetrieveOrMint = (balanceOf[to_] / units) -
        (erc20BalanceOfReceiverBefore / units);
      for (uint256 i = 0; i < tokensToRetrieveOrMint; ) {
        _retrieveOrMintERC721(to_);
        unchecked {
          ++i;
        }
      }
    } else if (isToERC721TransferExempt) {
      // Case 3) The sender is not ERC-721 transfer exempt, but the recipient is. Contract should attempt
      //         to withdraw and store ERC-721s from the sender, but the recipient should not
      //         receive ERC-721s from the bank/minted.
      // Only cares about whole number increments.
      uint256 tokensToWithdrawAndStore = (erc20BalanceOfSenderBefore / units) -
        (balanceOf[from_] / units);
      for (uint256 i = 0; i < tokensToWithdrawAndStore; ) {
        _withdrawAndStoreERC721(from_);
        unchecked {
          ++i;
        }
      }
    } else {
      // Case 4) Neither the sender nor the recipient are ERC-721 transfer exempt.
      // Strategy:
      // 1. First deal with the whole tokens. These are easy and will just be transferred.
      // 2. Look at the fractional part of the value:
      //   a) If it causes the sender to lose a whole token that was represented by an NFT due to a
      //      fractional part being transferred, withdraw and store an additional NFT from the sender.
      //   b) If it causes the receiver to gain a whole new token that should be represented by an NFT
      //      due to receiving a fractional part that completes a whole token, retrieve or mint an NFT to the recevier.

      // Whole tokens worth of ERC-20s get transferred as ERC-721s without any burning/minting.
      uint256 nftsToTransfer = value_ / units;
      for (uint256 i = 0; i < nftsToTransfer; ) {
        // Pop from sender's ERC-721 stack and transfer them (LIFO)
        uint256 indexOfLastToken = _owned[from_].length - 1;
        uint256 tokenId = _owned[from_][indexOfLastToken];
        _transferERC721(from_, to_, tokenId);
        unchecked {
          ++i;
        }
      }

      // If the transfer changes either the sender or the recipient's holdings from a fractional to a non-fractional
      // amount (or vice versa), adjust ERC-721s.

      // First check if the send causes the sender to lose a whole token that was represented by an ERC-721
      // due to a fractional part being transferred.
      //
      // Process:
      // Take the difference between the whole number of tokens before and after the transfer for the sender.
      // If that difference is greater than the number of ERC-721s transferred (whole units), then there was
      // an additional ERC-721 lost due to the fractional portion of the transfer.
      // If this is a self-send and the before and after balances are equal (not always the case but often),
      // then no ERC-721s will be lost here.
      if (
        erc20BalanceOfSenderBefore / units - erc20BalanceOf(from_) / units >
        nftsToTransfer
      ) {
        _withdrawAndStoreERC721(from_);
      }

      // Then, check if the transfer causes the receiver to gain a whole new token which requires gaining
      // an additional ERC-721.
      //
      // Process:
      // Take the difference between the whole number of tokens before and after the transfer for the recipient.
      // If that difference is greater than the number of ERC-721s transferred (whole units), then there was
      // an additional ERC-721 gained due to the fractional portion of the transfer.
      // Again, for self-sends where the before and after balances are equal, no ERC-721s will be gained here.
      if (
        erc20BalanceOf(to_) / units - erc20BalanceOfReceiverBefore / units >
        nftsToTransfer
      ) {
        _retrieveOrMintERC721(to_);
      }
    }

    return true;
  }

  /// @notice Internal function for ERC20 minting
  /// @dev This function will allow minting of new ERC20s.
  ///      If mintCorrespondingERC721s_ is true, and the recipient is not ERC-721 exempt, it will
  ///      also mint the corresponding ERC721s.
  /// Handles ERC-721 exemptions.
  function _mintERC20(address to_, uint256 value_) internal virtual {
    /// You cannot mint to the zero address (you can't mint and immediately burn in the same transfer).
    if (to_ == address(0)) {
      revert InvalidRecipient();
    }
    if (totalSupply + value_ > MAX_ERC20_MINT) {
      revert MintLimitReached();
    }

    _transferERC20WithERC721(address(0), to_, value_);
  }

  /// @notice Internal function for ERC-721 minting and retrieval from the bank.
  /// @dev This function will allow minting of new ERC-721s up to the total fractional supply. It will
  ///      first try to pull from the bank, and if the bank is empty, it will mint a new token.
  /// Does not handle ERC-721 exemptions.
  function _retrieveOrMintERC721(address to_) internal virtual {
    if (to_ == address(0)) {
      revert InvalidRecipient();
    }

    uint256 id;

    if (!_storedERC721Ids.empty()) {
      // If there are any tokens in the bank, use those first.
      // Pop off the end of the queue (FIFO).
      id = _storedERC721Ids.popBack();
    } else {
      // Otherwise, mint a new token, should not be able to go over the total fractional supply.
      ++minted;

      // Reserve max uint256 for approvals
      if (minted == type(uint256).max) {
        revert MintLimitReached();
      }

      id = minted;
    }

    address erc721Owner = _getOwnerOf(id);

    // The token should not already belong to anyone besides 0x0 or this contract.
    // If it does, something is wrong, as this should never happen.
    if (erc721Owner != address(0)) {
      revert AlreadyExists();
    }

    // Transfer the token to the recipient, either transferring from the contract's bank or minting.
    // Does not handle ERC-721 exemptions.
    _transferERC721(erc721Owner, to_, id);
  }

  /// @notice Internal function for ERC-721 deposits to bank (this contract).
  /// @dev This function will allow depositing of ERC-721s to the bank, which can be retrieved by future minters.
  // Does not handle ERC-721 exemptions.
  function _withdrawAndStoreERC721(address from_) internal virtual {
    if (from_ == address(0)) {
      revert InvalidSender();
    }

    // Retrieve the latest token added to the owner's stack (LIFO).
    uint256 id = _owned[from_][_owned[from_].length - 1];

    // Transfer to 0x0.
    // Does not handle ERC-721 exemptions.
    _transferERC721(from_, address(0), id);

    // Record the token in the contract's bank queue.
    _storedERC721Ids.pushFront(id);
  }

  /// @notice Initialization function to set pairs / etc, saving gas by avoiding mint / burn on unnecessary targets
  function _setERC721TransferExempt(
    address target_,
    bool state_
  ) internal virtual {
    if (target_ == address(0)) {
      revert InvalidExemption();
    }

    // Adjust the ERC721 balances of the target to respect exemption rules.
    // Despite this logic, it is still recommended practice to exempt prior to the target
    // having an active balance.
    if (state_) {
      _clearERC721Balance(target_);
    } else {
      _reinstateERC721Balance(target_);
    }

    _erc721TransferExempt[target_] = state_;
  }

  /// @notice Function to reinstate balance on exemption removal
  function _reinstateERC721Balance(address target_) private {
    uint256 expectedERC721Balance = erc20BalanceOf(target_) / units;
    uint256 actualERC721Balance = erc721BalanceOf(target_);

    for (uint256 i = 0; i < expectedERC721Balance - actualERC721Balance; ) {
      // Transfer ERC721 balance in from pool
      _retrieveOrMintERC721(target_);
      unchecked {
        ++i;
      }
    }
  }

  /// @notice Function to clear balance on exemption inclusion
  function _clearERC721Balance(address target_) private {
    uint256 erc721Balance = erc721BalanceOf(target_);

    for (uint256 i = 0; i < erc721Balance; ) {
      // Transfer out ERC721 balance
      _withdrawAndStoreERC721(target_);
      unchecked {
        ++i;
      }
    }
  }

  function _getOwnerOf(
    uint256 id_
  ) internal view virtual returns (address ownerOf_) {
    uint256 data = _ownedData[id_];

    assembly {
      ownerOf_ := and(data, _BITMASK_ADDRESS)
    }
  }

  function _setOwnerOf(uint256 id_, address owner_) internal virtual {
    uint256 data = _ownedData[id_];

    assembly {
      data := add(
        and(data, _BITMASK_OWNED_INDEX),
        and(owner_, _BITMASK_ADDRESS)
      )
    }

    _ownedData[id_] = data;
  }

  function _getOwnedIndex(
    uint256 id_
  ) internal view virtual returns (uint256 ownedIndex_) {
    uint256 data = _ownedData[id_];

    assembly {
      ownedIndex_ := shr(160, data)
    }
  }

  function _setOwnedIndex(uint256 id_, uint256 index_) internal virtual {
    uint256 data = _ownedData[id_];

    if (index_ > _BITMASK_OWNED_INDEX >> 160) {
      revert OwnedIndexOverflow();
    }

    assembly {
      data := add(
        and(data, _BITMASK_ADDRESS),
        and(shl(160, index_), _BITMASK_OWNED_INDEX)
      )
    }

    _ownedData[id_] = data;
  }
}

File 13 of 16 : IERC404.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

import {IERC165} from "@openzeppelin/contracts/interfaces/IERC165.sol";

interface IERC404 is IERC165 {
  error NotFound();
  error InvalidTokenId();
  error AlreadyExists();
  error InvalidRecipient();
  error InvalidSender();
  error InvalidSpender();
  error InvalidOperator();
  error UnsafeRecipient();
  error RecipientIsERC721TransferExempt();
  error Unauthorized();
  error InsufficientAllowance();
  error DecimalsTooLow();
  error PermitDeadlineExpired();
  error InvalidSigner();
  error InvalidApproval();
  error OwnedIndexOverflow();
  error MintLimitReached();
  error InvalidExemption();

  function name() external view returns (string memory);
  function symbol() external view returns (string memory);
  function decimals() external view returns (uint8);
  function totalSupply() external view returns (uint256);
  function erc20TotalSupply() external view returns (uint256);
  function erc721TotalSupply() external view returns (uint256);
  function balanceOf(address owner_) external view returns (uint256);
  function erc721BalanceOf(address owner_) external view returns (uint256);
  function erc20BalanceOf(address owner_) external view returns (uint256);
  function erc721TransferExempt(address account_) external view returns (bool);
  function isApprovedForAll(
    address owner_,
    address operator_
  ) external view returns (bool);
  function allowance(
    address owner_,
    address spender_
  ) external view returns (uint256);
  function owned(address owner_) external view returns (uint256[] memory);
  function ownerOf(uint256 id_) external view returns (address erc721Owner);
  function tokenURI(uint256 id_) external view returns (string memory);
  function approve(
    address spender_,
    uint256 valueOrId_
  ) external returns (bool);
  function erc20Approve(
    address spender_,
    uint256 value_
  ) external returns (bool);
  function erc721Approve(address spender_, uint256 id_) external;
  function setApprovalForAll(address operator_, bool approved_) external;
  function transferFrom(
    address from_,
    address to_,
    uint256 valueOrId_
  ) external returns (bool);
  function erc20TransferFrom(
    address from_,
    address to_,
    uint256 value_
  ) external returns (bool);
  function erc721TransferFrom(address from_, address to_, uint256 id_) external;
  function transfer(address to_, uint256 amount_) external returns (bool);
  function getERC721QueueLength() external view returns (uint256);
  function getERC721TokensInQueue(
    uint256 start_,
    uint256 count_
  ) external view returns (uint256[] memory);
  function setSelfERC721TransferExempt(bool state_) external;
  function safeTransferFrom(address from_, address to_, uint256 id_) external;
  function safeTransferFrom(
    address from_,
    address to_,
    uint256 id_,
    bytes calldata data_
  ) external;
  function DOMAIN_SEPARATOR() external view returns (bytes32);
  function permit(
    address owner_,
    address spender_,
    uint256 value_,
    uint256 deadline_,
    uint8 v_,
    bytes32 r_,
    bytes32 s_
  ) external;
}

File 14 of 16 : DoubleEndedQueue.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/structs/DoubleEndedQueue.sol)
// Modified by Pandora Labs to support native uint256 operations
pragma solidity ^0.8.20;

/**
 * @dev A sequence of items with the ability to efficiently push and pop items (i.e. insert and remove) on both ends of
 * the sequence (called front and back). Among other access patterns, it can be used to implement efficient LIFO and
 * FIFO queues. Storage use is optimized, and all operations are O(1) constant time. This includes {clear}, given that
 * the existing queue contents are left in storage.
 *
 * The struct is called `Uint256Deque`. This data structure can only be used in storage, and not in memory.
 *
 * ```solidity
 * DoubleEndedQueue.Uint256Deque queue;
 * ```
 */
library DoubleEndedQueue {
  /**
   * @dev An operation (e.g. {front}) couldn't be completed due to the queue being empty.
   */
  error QueueEmpty();

  /**
   * @dev A push operation couldn't be completed due to the queue being full.
   */
  error QueueFull();

  /**
   * @dev An operation (e.g. {at}) couldn't be completed due to an index being out of bounds.
   */
  error QueueOutOfBounds();

  /**
   * @dev Indices are 128 bits so begin and end are packed in a single storage slot for efficient access.
   *
   * Struct members have an underscore prefix indicating that they are "private" and should not be read or written to
   * directly. Use the functions provided below instead. Modifying the struct manually may violate assumptions and
   * lead to unexpected behavior.
   *
   * The first item is at data[begin] and the last item is at data[end - 1]. This range can wrap around.
   */
  struct Uint256Deque {
    uint128 _begin;
    uint128 _end;
    mapping(uint128 index => uint256) _data;
  }

  /**
   * @dev Inserts an item at the end of the queue.
   *
   * Reverts with {QueueFull} if the queue is full.
   */
  function pushBack(Uint256Deque storage deque, uint256 value) internal {
    unchecked {
      uint128 backIndex = deque._end;
      if (backIndex + 1 == deque._begin) revert QueueFull();
      deque._data[backIndex] = value;
      deque._end = backIndex + 1;
    }
  }

  /**
   * @dev Removes the item at the end of the queue and returns it.
   *
   * Reverts with {QueueEmpty} if the queue is empty.
   */
  function popBack(
    Uint256Deque storage deque
  ) internal returns (uint256 value) {
    unchecked {
      uint128 backIndex = deque._end;
      if (backIndex == deque._begin) revert QueueEmpty();
      --backIndex;
      value = deque._data[backIndex];
      delete deque._data[backIndex];
      deque._end = backIndex;
    }
  }

  /**
   * @dev Inserts an item at the beginning of the queue.
   *
   * Reverts with {QueueFull} if the queue is full.
   */
  function pushFront(Uint256Deque storage deque, uint256 value) internal {
    unchecked {
      uint128 frontIndex = deque._begin - 1;
      if (frontIndex == deque._end) revert QueueFull();
      deque._data[frontIndex] = value;
      deque._begin = frontIndex;
    }
  }

  /**
   * @dev Removes the item at the beginning of the queue and returns it.
   *
   * Reverts with `QueueEmpty` if the queue is empty.
   */
  function popFront(
    Uint256Deque storage deque
  ) internal returns (uint256 value) {
    unchecked {
      uint128 frontIndex = deque._begin;
      if (frontIndex == deque._end) revert QueueEmpty();
      value = deque._data[frontIndex];
      delete deque._data[frontIndex];
      deque._begin = frontIndex + 1;
    }
  }

  /**
   * @dev Returns the item at the beginning of the queue.
   *
   * Reverts with `QueueEmpty` if the queue is empty.
   */
  function front(
    Uint256Deque storage deque
  ) internal view returns (uint256 value) {
    if (empty(deque)) revert QueueEmpty();
    return deque._data[deque._begin];
  }

  /**
   * @dev Returns the item at the end of the queue.
   *
   * Reverts with `QueueEmpty` if the queue is empty.
   */
  function back(
    Uint256Deque storage deque
  ) internal view returns (uint256 value) {
    if (empty(deque)) revert QueueEmpty();
    unchecked {
      return deque._data[deque._end - 1];
    }
  }

  /**
   * @dev Return the item at a position in the queue given by `index`, with the first item at 0 and last item at
   * `length(deque) - 1`.
   *
   * Reverts with `QueueOutOfBounds` if the index is out of bounds.
   */
  function at(
    Uint256Deque storage deque,
    uint256 index
  ) internal view returns (uint256 value) {
    if (index >= length(deque)) revert QueueOutOfBounds();
    // By construction, length is a uint128, so the check above ensures that index can be safely downcast to uint128
    unchecked {
      return deque._data[deque._begin + uint128(index)];
    }
  }

  /**
   * @dev Resets the queue back to being empty.
   *
   * NOTE: The current items are left behind in storage. This does not affect the functioning of the queue, but misses
   * out on potential gas refunds.
   */
  function clear(Uint256Deque storage deque) internal {
    deque._begin = 0;
    deque._end = 0;
  }

  /**
   * @dev Returns the number of items in the queue.
   */
  function length(Uint256Deque storage deque) internal view returns (uint256) {
    unchecked {
      return uint256(deque._end - deque._begin);
    }
  }

  /**
   * @dev Returns true if the queue is empty.
   */
  function empty(Uint256Deque storage deque) internal view returns (bool) {
    return deque._end == deque._begin;
  }
}

File 15 of 16 : ERC20Events.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

library ERC20Events {
  event Approval(address indexed owner, address indexed spender, uint256 value);
  event Transfer(address indexed from, address indexed to, uint256 amount);
}

File 16 of 16 : ERC721Events.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

library ERC721Events {
  event ApprovalForAll(
    address indexed owner,
    address indexed operator,
    bool approved
  );
  event Approval(
    address indexed owner,
    address indexed spender,
    uint256 indexed id
  );
  event Transfer(address indexed from, address indexed to, uint256 indexed id);
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 1000
  },
  "evmVersion": "paris",
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"uint8","name":"decimals_","type":"uint8"},{"internalType":"uint256","name":"maxMint_","type":"uint256"},{"internalType":"address","name":"_recipient","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AlreadyExists","type":"error"},{"inputs":[],"name":"DecimalsTooLow","type":"error"},{"inputs":[],"name":"InsufficientAllowance","type":"error"},{"inputs":[],"name":"InvalidApproval","type":"error"},{"inputs":[],"name":"InvalidExemption","type":"error"},{"inputs":[],"name":"InvalidOperator","type":"error"},{"inputs":[],"name":"InvalidRecipient","type":"error"},{"inputs":[],"name":"InvalidSender","type":"error"},{"inputs":[],"name":"InvalidSigner","type":"error"},{"inputs":[],"name":"InvalidSpender","type":"error"},{"inputs":[],"name":"InvalidTokenId","type":"error"},{"inputs":[],"name":"MintLimitReached","type":"error"},{"inputs":[],"name":"NotFound","type":"error"},{"inputs":[],"name":"OwnedIndexOverflow","type":"error"},{"inputs":[],"name":"PermitDeadlineExpired","type":"error"},{"inputs":[],"name":"QueueEmpty","type":"error"},{"inputs":[],"name":"QueueFull","type":"error"},{"inputs":[],"name":"QueueOutOfBounds","type":"error"},{"inputs":[],"name":"RecipientIsERC721TransferExempt","type":"error"},{"inputs":[],"name":"Unauthorized","type":"error"},{"inputs":[],"name":"UnsafeRecipient","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Minted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Transfer","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":"id","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"}],"name":"WhitelistAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"}],"name":"WhitelistRemoved","type":"event"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ID_MAX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_ERC721_MINT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_MINT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VOYAGE","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"addresses","type":"address[]"}],"name":"addToWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender_","type":"address"},{"internalType":"uint256","name":"valueOrId_","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender_","type":"address"},{"internalType":"uint256","name":"value_","type":"uint256"}],"name":"erc20Approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner_","type":"address"}],"name":"erc20BalanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"erc20TotalSupply","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":"value_","type":"uint256"}],"name":"erc20TransferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender_","type":"address"},{"internalType":"uint256","name":"id_","type":"uint256"}],"name":"erc721Approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner_","type":"address"}],"name":"erc721BalanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"erc721TotalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"target_","type":"address"}],"name":"erc721TransferExempt","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from_","type":"address"},{"internalType":"address","name":"to_","type":"address"},{"internalType":"uint256","name":"id_","type":"uint256"}],"name":"erc721TransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getERC721QueueLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"start_","type":"uint256"},{"internalType":"uint256","name":"count_","type":"uint256"}],"name":"getERC721TokensInQueue","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"hasMinted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"hasVoyageNft","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isOpenMint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintERC20","outputs":[],"stateMutability":"payable","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":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner_","type":"address"}],"name":"owned","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id_","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"erc721Owner","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner_","type":"address"},{"internalType":"address","name":"spender_","type":"address"},{"internalType":"uint256","name":"value_","type":"uint256"},{"internalType":"uint256","name":"deadline_","type":"uint256"},{"internalType":"uint8","name":"v_","type":"uint8"},{"internalType":"bytes32","name":"r_","type":"bytes32"},{"internalType":"bytes32","name":"s_","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"recipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"addresses","type":"address[]"}],"name":"removeFromWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from_","type":"address"},{"internalType":"address","name":"to_","type":"address"},{"internalType":"uint256","name":"id_","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":"id_","type":"uint256"},{"internalType":"bytes","name":"data_","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator_","type":"address"},{"internalType":"bool","name":"approved_","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account_","type":"address"},{"internalType":"bool","name":"value_","type":"bool"}],"name":"setERC721TransferExempt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_state","type":"bool"}],"name":"setOpenMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"state_","type":"bool"}],"name":"setSelfERC721TransferExempt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newURI","type":"string"}],"name":"setURI","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":"id_","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to_","type":"address"},{"internalType":"uint256","name":"value_","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"transferAmount","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":"valueOrId_","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"units","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newAmount","type":"uint256"}],"name":"updateTransferAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"voyageMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"whitelisted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_receiver","type":"address"}],"name":"withdrawNativeToken","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60138054730872ec4426103482a50f26ffc32acefcec61b3c96001600160a01b03199182168117909255601480549091169091179055600060168190556017556018805460ff1916905561018060405260436101008181529062004250610120396019906200006f908262000309565b506606651728988000601a553480156200008857600080fd5b506040516200429338038062004293833981016040819052620000ab9162000484565b848484620000b93362000178565b6003620000c7848262000309565b506004620000d6838262000309565b5060128160ff161015620000fd576040516398790fd560e01b815260040160405180910390fd5b60ff811660808190526200011390600a62000649565b60a0524660c05262000124620001c8565b60e05250506080516200013a9150600a62000649565b62000146908362000661565b601155601291909155601580546001600160a01b0319166001600160a01b0390921691909117905550620006f9915050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6003604051620001fc91906200067b565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200028f57607f821691505b602082108103620002b057634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200030457600081815260208120601f850160051c81016020861015620002df5750805b601f850160051c820191505b818110156200030057828155600101620002eb565b5050505b505050565b81516001600160401b0381111562000325576200032562000264565b6200033d816200033684546200027a565b84620002b6565b602080601f8311600181146200037557600084156200035c5750858301515b600019600386901b1c1916600185901b17855562000300565b600085815260208120601f198616915b82811015620003a65788860151825594840194600190910190840162000385565b5085821015620003c55787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600082601f830112620003e757600080fd5b81516001600160401b038082111562000404576200040462000264565b604051601f8301601f19908116603f011681019082821181831017156200042f576200042f62000264565b816040528381526020925086838588010111156200044c57600080fd5b600091505b8382101562000470578582018301518183018401529082019062000451565b600093810190920192909252949350505050565b600080600080600060a086880312156200049d57600080fd5b85516001600160401b0380821115620004b557600080fd5b620004c389838a01620003d5565b96506020880151915080821115620004da57600080fd5b50620004e988828901620003d5565b945050604086015160ff811681146200050157600080fd5b6060870151608088015191945092506001600160a01b03811681146200052657600080fd5b809150509295509295909350565b634e487b7160e01b600052601160045260246000fd5b600181815b808511156200058b5781600019048211156200056f576200056f62000534565b808516156200057d57918102915b93841c93908002906200054f565b509250929050565b600082620005a45750600162000643565b81620005b35750600062000643565b8160018114620005cc5760028114620005d757620005f7565b600191505062000643565b60ff841115620005eb57620005eb62000534565b50506001821b62000643565b5060208310610133831016604e8410600b84101617156200061c575081810a62000643565b6200062883836200054a565b80600019048211156200063f576200063f62000534565b0290505b92915050565b60006200065a60ff84168362000593565b9392505050565b808202811582820484141762000643576200064362000534565b60008083546200068b816200027a565b60018281168015620006a65760018114620006bc57620006ed565b60ff1984168752821515830287019450620006ed565b8760005260208060002060005b85811015620006e45781548a820152908401908201620006c9565b50505082870194505b50929695505050505050565b60805160a05160c05160e051613ac26200078e60003960006112f9015260006112c901526000818161085d01528181611f4d01528181612560015281816125a40152818161261d015281816126470152818161269b0152818161274701528181612794015281816127d8015281816127ff0152612c7b0152600081816105770152818161102301526111f10152613ac26000f3fe60806040526004361061038c5760003560e01c80637ecebe00116101dc578063bea25e8011610102578063dd62ed3e116100a0578063e985e9c51161006f578063e985e9c514610b05578063f0292a0314610b40578063f2fde38b14610b56578063f780bc1a14610b7657600080fd5b8063dd62ed3e14610a6d578063dd63769914610aa5578063dfabc03314610ac5578063e2af30f414610ae557600080fd5b8063c87b56dd116100dc578063c87b56dd146109f3578063d0677c5414610a13578063d505accf14610a2d578063d96ca0b914610a4d57600080fd5b8063bea25e80146109a8578063c5ab3ba6146109be578063c6e672b9146109d357600080fd5b80639b19251a1161017a578063b2a3fb2b11610149578063b2a3fb2b1461091c578063b3f9ea341461093c578063b71b688b14610972578063b88d4fde1461098857600080fd5b80639b19251a1461087f578063a22cb465146108af578063a9059cbb146108cf578063b1ab9317146108ef57600080fd5b80638a696e50116101b65780638a696e50146107f85780638da5cb5b1461081857806395d89b4114610836578063976a84351461084b57600080fd5b80637ecebe00146107965780637f649783146107c357806389fb4c66146107e357600080fd5b80633644e515116102c15780634d9660721161025f5780636352211e1161022e5780636352211e1461071457806366d003ac1461073457806370a0823114610754578063715018a61461078157600080fd5b80634d966072146106a85780634f02c420146106c8578063504d27fd146106de578063548db174146106f457600080fd5b80633d9287fa1161029b5780633d9287fa1461063257806342842e0e1461064857806346431cb3146106685780634673901b1461068857600080fd5b80633644e515146105ab57806338e21cce146105c05780633af32abf146105f957600080fd5b806309f0ef651161032e5780631a059947116103085780631a0599471461052757806323b872dd1461052f5780632c4c73161461054f578063313ce5671461056557600080fd5b806309f0ef65146104d15780630ce517e3146104f157806318160ddd1461051157600080fd5b806306fdde031161036a57806306fdde031461042c578063081812fc1461044e578063095ea7b31461049c57806309674eb0146104bc57600080fd5b806301ffc9a71461039157806302519da3146103c657806302fe53051461040a575b600080fd5b34801561039d57600080fd5b506103b16103ac3660046130fe565b610b96565b60405190151581526020015b60405180910390f35b3480156103d257600080fd5b506103fc6103e1366004613132565b6001600160a01b031660009081526007602052604090205490565b6040519081526020016103bd565b34801561041657600080fd5b5061042a6104253660046131ec565b610bff565b005b34801561043857600080fd5b50610441610c6d565b6040516103bd919061328d565b34801561045a57600080fd5b506104846104693660046132a0565b6009602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020016103bd565b3480156104a857600080fd5b506103b16104b73660046132b9565b610cfb565b3480156104c857600080fd5b506103fc610d34565b3480156104dd57600080fd5b506103b16104ec366004613132565b610d5e565b3480156104fd57600080fd5b506103b161050c366004613132565b610d90565b34801561051d57600080fd5b506103fc60055481565b61042a610efc565b34801561053b57600080fd5b506103b161054a3660046132e3565b611288565b34801561055b57600080fd5b506103fc60125481565b34801561057157600080fd5b506105997f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016103bd565b3480156105b757600080fd5b506103fc6112c5565b3480156105cc57600080fd5b506103b16105db366004613132565b6001600160a01b03166000908152600f602052604090205460ff1690565b34801561060557600080fd5b506103b1610614366004613132565b6001600160a01b031660009081526010602052604090205460ff1690565b34801561063e57600080fd5b506103fc60175481565b34801561065457600080fd5b5061042a6106633660046132e3565b61131b565b34801561067457600080fd5b5061042a61068336600461331f565b61133b565b34801561069457600080fd5b50601354610484906001600160a01b031681565b3480156106b457600080fd5b506103b16106c33660046132b9565b611446565b3480156106d457600080fd5b506103fc60065481565b3480156106ea57600080fd5b506103fc601a5481565b34801561070057600080fd5b5061042a61070f36600461334b565b6114d3565b34801561072057600080fd5b5061048461072f3660046132a0565b6115f7565b34801561074057600080fd5b50601554610484906001600160a01b031681565b34801561076057600080fd5b506103fc61076f366004613132565b60076020526000908152604090205481565b34801561078d57600080fd5b5061042a61167a565b3480156107a257600080fd5b506103fc6107b1366004613132565b600e6020526000908152604090205481565b3480156107cf57600080fd5b5061042a6107de36600461334b565b61168e565b3480156107ef57600080fd5b506005546103fc565b34801561080457600080fd5b5061042a6108133660046133d0565b6117c6565b34801561082457600080fd5b506000546001600160a01b0316610484565b34801561084257600080fd5b506104416117d3565b34801561085757600080fd5b506103fc7f000000000000000000000000000000000000000000000000000000000000000081565b34801561088b57600080fd5b506103b161089a366004613132565b60106020526000908152604090205460ff1681565b3480156108bb57600080fd5b5061042a6108ca3660046133eb565b6117e0565b3480156108db57600080fd5b506103b16108ea3660046132b9565b61188c565b3480156108fb57600080fd5b5061090f61090a366004613132565b6118c0565b6040516103bd9190613450565b34801561092857600080fd5b5061042a6109373660046132a0565b61192c565b34801561094857600080fd5b506103fc610957366004613132565b6001600160a01b03166000908152600c602052604090205490565b34801561097e57600080fd5b506103fc60165481565b34801561099457600080fd5b5061042a6109a3366004613463565b611939565b3480156109b457600080fd5b506103fc6115b381565b3480156109ca57600080fd5b506006546103fc565b3480156109df57600080fd5b5061042a6109ee3660046133eb565b611a53565b3480156109ff57600080fd5b50610441610a0e3660046132a0565b611a65565b348015610a1f57600080fd5b506018546103b19060ff1681565b348015610a3957600080fd5b5061042a610a483660046134df565b611a99565b348015610a5957600080fd5b506103b1610a683660046132e3565b611d42565b348015610a7957600080fd5b506103fc610a88366004613552565b600860209081526000928352604080842090915290825290205481565b348015610ab157600080fd5b5061042a610ac03660046132e3565b611e02565b348015610ad157600080fd5b5061042a610ae03660046132b9565b611f7c565b348015610af157600080fd5b5061042a610b003660046133d0565b612041565b348015610b1157600080fd5b506103b1610b20366004613552565b600a60209081526000928352604080842090915290825290205460ff1681565b348015610b4c57600080fd5b506103fc60115481565b348015610b6257600080fd5b5061042a610b71366004613132565b61205c565b348015610b8257600080fd5b5061090f610b9136600461357c565b6120e9565b60006001600160e01b031982167fcaf91ff5000000000000000000000000000000000000000000000000000000001480610bf957506001600160e01b031982167f01ffc9a700000000000000000000000000000000000000000000000000000000145b92915050565b610c07612186565b6000815111610c5d5760405162461bcd60e51b815260206004820152601360248201527f5552492063616e6e6f7420626520656d7074790000000000000000000000000060448201526064015b60405180910390fd5b6019610c698282613626565b5050565b60038054610c7a9061359e565b80601f0160208091040260200160405190810160405280929190818152602001828054610ca69061359e565b8015610cf35780601f10610cc857610100808354040283529160200191610cf3565b820191906000526020600020905b815481529060010190602001808311610cd657829003601f168201915b505050505081565b6000610d06826121e0565b15610d1a57610d158383611f7c565b610d2b565b610d248383611446565b9050610bf9565b50600192915050565b6000610d596001546001600160801b03808216600160801b9092048116919091031690565b905090565b60006001600160a01b0382161580610bf95750506001600160a01b03166000908152600d602052604090205460ff1690565b600080610d9e6005846121f7565b90506000610dac6005612288565b6014546040517f4e1273f40000000000000000000000000000000000000000000000000000000081529192506000916001600160a01b0390911690634e1273f490610dfd90869086906004016136e6565b600060405180830381865afa158015610e1a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610e429190810190613746565b905082518151141580610e5757508151815114155b15610ea45760405162461bcd60e51b815260206004820152601560248201527f496e76616c696420696e707574206c656e6774687300000000000000000000006044820152606401610c54565b60005b8151811015610ef0576000828281518110610ec457610ec46137ec565b60200260200101511115610ede5750600195945050505050565b80610ee881613818565b915050610ea7565b50600095945050505050565b60185460ff16610f4e5760405162461bcd60e51b815260206004820152601060248201527f4d696e74206973206e6f74206f70656e000000000000000000000000000000006044820152606401610c54565b6011546005541115610fa25760405162461bcd60e51b815260206004820152601660248201527f4d6178206d696e74206c696d69742072656163686564000000000000000000006044820152606401610c54565b336000908152600f602052604090205460ff16156110025760405162461bcd60e51b815260206004820152600e60248201527f416c7265616479206d696e7465640000000000000000000000000000000000006044820152606401610c54565b3360009081526010602052604090205460ff161561105e57611059336110497f0000000000000000000000000000000000000000000000000000000000000000600a613915565b611054906001613924565b61231d565b61122e565b61106733610d90565b1561122e5760175460125461107c919061393b565b601654106110cc5760405162461bcd60e51b815260206004820152601d60248201527f4d617820766f79616765206d696e74206c696d697420726561636865640000006044820152606401610c54565b601a5434146111435760405162461bcd60e51b815260206004820152602760248201527f4d7573742073656e642074686520657861637420616d6f756e742028302e303060448201527f31382045544829000000000000000000000000000000000000000000000000006064820152608401610c54565b601554601a546040516000926001600160a01b031691908381818185875af1925050503d8060008114611192576040519150601f19603f3d011682016040523d82523d6000602084013e611197565b606091505b50509050806111e85760405162461bcd60e51b815260206004820152600f60248201527f5472616e73666572206661696c656400000000000000000000000000000000006044820152606401610c54565b611217336110497f0000000000000000000000000000000000000000000000000000000000000000600a613915565b6016805490600061122783613818565b9190505550505b336000818152600f602052604090819020805460ff1916600117905560065490517f30385c845b448a36257a6a1716e6ad2e1bc2cbe333cde1e69fe849ad6511adfe9161127e9190815260200190565b60405180910390a2565b6000611293826121e0565b156112a8576112a3848484611e02565b6112ba565b6112b3848484611d42565b90506112be565b5060015b9392505050565b60007f000000000000000000000000000000000000000000000000000000000000000046146112f657610d59612388565b507f000000000000000000000000000000000000000000000000000000000000000090565b61133683838360405180602001604052806000815250611939565b505050565b611343612186565b47808311156113945760405162461bcd60e51b815260206004820152600f60248201527f7472616e73666572206661696c656400000000000000000000000000000000006044820152606401610c54565b6000831161140a5760405162461bcd60e51b815260206004820152602d60248201527f72656d6f7665206c697175696469747920616d6f756e742073686f756c64206260448201527f65206d6f7265207468616e2030000000000000000000000000000000000000006064820152608401610c54565b6040516001600160a01b0383169084156108fc029085906000818181858888f19350505050158015611440573d6000803e3d6000fd5b50505050565b60006001600160a01b03831661146f57604051635461585f60e01b815260040160405180910390fd5b3360008181526008602090815260408083206001600160a01b03881680855290835292819020869055518581529192917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350600192915050565b6114db612186565b60005b8181101561133657601060008484848181106114fc576114fc6137ec565b90506020020160208101906115119190613132565b6001600160a01b0316815260208101919091526040016000205460ff16156115e55760006010600085858581811061154b5761154b6137ec565b90506020020160208101906115609190613132565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905582828281811061159a5761159a6137ec565b90506020020160208101906115af9190613132565b6001600160a01b03167fde8cf212af7ce38b2840785a2768d97ff2dbf3c21b516961cec0061e134c2a1e60405160405180910390a25b806115ef81613818565b9150506114de565b6000818152600b60205260409020546001600160a01b0316611618826121e0565b611635576040516307ed98ed60e31b815260040160405180910390fd5b6001600160a01b038116611675576040517fc5723b5100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b919050565b611682612186565b61168c6000612422565b565b611696612186565b60005b8181101561133657601060008484848181106116b7576116b76137ec565b90506020020160208101906116cc9190613132565b6001600160a01b0316815260208101919091526040016000205460ff1661170357601780549060006116fd83613818565b91905055505b60016010600085858581811061171b5761171b6137ec565b90506020020160208101906117309190613132565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905582828281811061176a5761176a6137ec565b905060200201602081019061177f9190613132565b6001600160a01b03167f4790a4adb426ca2345bb5108f6e454eae852a7bf687544cd66a7270dff3a41d660405160405180910390a2806117be81613818565b915050611699565b6117d03382612472565b50565b60048054610c7a9061359e565b6001600160a01b038216611820576040517fccea9e6f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000818152600a602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b60006001600160a01b0383166118b557604051634e46966960e11b815260040160405180910390fd5b6112be3384846124fa565b6001600160a01b0381166000908152600c602090815260409182902080548351818402810184019094528084526060939283018282801561192057602002820191906000526020600020905b81548152602001906001019080831161190c575b50505050509050919050565b611934612186565b601a55565b611942826121e0565b61195f576040516307ed98ed60e31b815260040160405180910390fd5b61196a848484611288565b506001600160a01b0383163b15801590611a1c57506040517f150b7a0200000000000000000000000000000000000000000000000000000000808252906001600160a01b0385169063150b7a02906119cc90339089908890889060040161394e565b6020604051808303816000875af11580156119eb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a0f9190613980565b6001600160e01b03191614155b15611440576040517f3da6393100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611a5b612186565b610c698282612472565b60606019611a7283612870565b604051602001611a83929190613a10565b6040516020818303038152906040529050919050565b42841015611ad3576040517f05787bdf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611adc856121e0565b15611b13576040517f1f3e0de800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038616611b3a57604051635461585f60e01b815260040160405180910390fd5b60006001611b466112c5565b6001600160a01b038a81166000818152600e602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98184015280840194909452938d166060840152608083018c905260a083019390935260c08083018b90528151808403909101815260e0830190915280519201919091207f19010000000000000000000000000000000000000000000000000000000000006101008301526101028201929092526101228101919091526101420160408051601f198184030181528282528051602091820120600084529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa158015611c6d573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381161580611ca25750876001600160a01b0316816001600160a01b031614155b15611cd9576040517f815e1d6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0390811660009081526008602090815260408083208a8516808552908352928190208990555188815291928a16917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350505050505050565b60006001600160a01b038416611d6b57604051636edaef2f60e11b815260040160405180910390fd5b6001600160a01b038316611d9257604051634e46966960e11b815260040160405180910390fd5b6001600160a01b03841660009081526008602090815260408083203384529091529020546000198114611dee57611dc9838261393b565b6001600160a01b03861660009081526008602090815260408083203384529091529020555b611df98585856124fa565b95945050505050565b6001600160a01b038316611e2957604051636edaef2f60e11b815260040160405180910390fd5b6001600160a01b038216611e5057604051634e46966960e11b815260040160405180910390fd5b6000818152600b60205260409020546001600160a01b03848116911614611e89576040516282b42960e81b815260040160405180910390fd5b336001600160a01b03841614801590611ec657506001600160a01b0383166000908152600a6020908152604080832033845290915290205460ff16155b8015611ee957506000818152600960205260409020546001600160a01b03163314155b15611f06576040516282b42960e81b815260040160405180910390fd5b611f0f82610d5e565b15611f46576040517f5ce7539700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611f7183837f0000000000000000000000000000000000000000000000000000000000000000612910565b6113368383836129cc565b6000818152600b60205260409020546001600160a01b0316338114801590611fc857506001600160a01b0381166000908152600a6020908152604080832033845290915290205460ff16155b15611fe5576040516282b42960e81b815260040160405180910390fd5b60008281526009602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b612049612186565b6018805460ff1916911515919091179055565b612064612186565b6001600160a01b0381166120e05760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610c54565b6117d081612422565b606060008267ffffffffffffffff8111156121065761210661314d565b60405190808252806020026020018201604052801561212f578160200160208202803683370190505b509050835b61213e8486613a35565b81101561217e57612150600182612ba4565b8261215b878461393b565b8151811061216b5761216b6137ec565b6020908102919091010152600101612134565b509392505050565b6000546001600160a01b0316331461168c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c54565b600060018210158015610bf95750506115b3101590565b606060008367ffffffffffffffff8111156122145761221461314d565b60405190808252806020026020018201604052801561223d578160200160208202803683370190505b50905060005b8481101561217e578382828151811061225e5761225e6137ec565b6001600160a01b03909216602092830291909101909101528061228081613818565b915050612243565b606060008267ffffffffffffffff8111156122a5576122a561314d565b6040519080825280602002602001820160405280156122ce578160200160208202803683370190505b50905060005b83811015612316576122e7816001613a35565b8282815181106122f9576122f96137ec565b60209081029190910101528061230e81613818565b9150506122d4565b5092915050565b6001600160a01b03821661234457604051634e46966960e11b815260040160405180910390fd5b69012d231c7c593eec00008160055461235d9190613a35565b111561237c5760405163303b682f60e01b815260040160405180910390fd5b611336600083836124fa565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60036040516123ba9190613a48565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0382166124b2576040517fa41e3d3f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80156124c6576124c182612c28565b6124cf565b6124cf82612c5c565b6001600160a01b03919091166000908152600d60205260409020805460ff1916911515919091179055565b6001600160a01b0383811660009081526007602052604080822054928516825281205490919061252b868686612910565b600061253687610d5e565b9050600061254387610d5e565b905081801561254f5750805b6128625781156125f85760006125857f000000000000000000000000000000000000000000000000000000000000000085613a54565b6001600160a01b0389166000908152600760205260409020546125c9907f000000000000000000000000000000000000000000000000000000000000000090613a54565b6125d3919061393b565b905060005b818110156125f1576125e989612cea565b6001016125d8565b5050612862565b8015612694576001600160a01b038816600090815260076020526040812054612642907f000000000000000000000000000000000000000000000000000000000000000090613a54565b61266c7f000000000000000000000000000000000000000000000000000000000000000087613a54565b612676919061393b565b905060005b818110156125f15761268c8a612ddc565b60010161267b565b60006126c07f000000000000000000000000000000000000000000000000000000000000000088613a54565b905060005b81811015612743576001600160a01b038a166000908152600c60205260408120546126f29060019061393b565b6001600160a01b038c166000908152600c602052604081208054929350909183908110612721576127216137ec565b906000526020600020015490506127398c8c836129cc565b50506001016126c5565b50807f00000000000000000000000000000000000000000000000000000000000000006127858b6001600160a01b031660009081526007602052604090205490565b61278f9190613a54565b6127b97f000000000000000000000000000000000000000000000000000000000000000088613a54565b6127c3919061393b565b11156127d2576127d289612ddc565b806127fd7f000000000000000000000000000000000000000000000000000000000000000086613a54565b7f000000000000000000000000000000000000000000000000000000000000000061283d8b6001600160a01b031660009081526007602052604090205490565b6128479190613a54565b612851919061393b565b11156128605761286088612cea565b505b506001979650505050505050565b6060600061287d83612e5d565b600101905060008167ffffffffffffffff81111561289d5761289d61314d565b6040519080825280601f01601f1916602001820160405280156128c7576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846128d157509392505050565b6001600160a01b03831661293b5780600560008282546129309190613a35565b909155506129699050565b6001600160a01b0383166000908152600760205260408120805483929061296390849061393b565b90915550505b6001600160a01b03808316600081815260076020526040908190208054850190555190918516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906129bf9085815260200190565b60405180910390a3505050565b6001600160a01b03831615612ad757600081815260096020908152604080832080546001600160a01b03191690556001600160a01b0386168352600c90915281208054612a1b9060019061393b565b81548110612a2b57612a2b6137ec565b90600052602060002001549050818114612a98576000828152600b602052604081205460a01c6001600160a01b0386166000908152600c602052604090208054919250839183908110612a8057612a806137ec565b600091825260209091200155612a968282612f3f565b505b6001600160a01b0384166000908152600c60205260409020805480612abf57612abf613a76565b60019003818190600052602060002001600090559055505b6001600160a01b03821615612b4e576000818152600b6020908152604080832080546001600160a01b0319166001600160a01b038716908101909155808452600c83529083208054600181810183558286529385200185905592529054612b49918391612b44919061393b565b612f3f565b612b5e565b6000818152600b60205260408120555b80826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b6000612bc883546001600160801b03808216600160801b9092048116919091031690565b8210612c00576040517f580821e700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5081546001600160801b03908116820116600090815260018301602052604090205492915050565b6001600160a01b0381166000908152600c6020526040812054905b8181101561133657612c5483612ddc565b600101612c43565b6001600160a01b038116600090815260076020526040812054612ca0907f000000000000000000000000000000000000000000000000000000000000000090613a54565b90506000612cc3836001600160a01b03166000908152600c602052604090205490565b905060005b612cd2828461393b565b81101561144057612ce284612cea565b600101612cc8565b6001600160a01b038116612d1157604051634e46966960e11b815260040160405180910390fd5b6000612d31600154600160801b81046001600160801b0390811691161490565b612d4657612d3f6001612fc4565b9050612d81565b600660008154612d5590613818565b90915550600654600101612d7c5760405163303b682f60e01b815260040160405180910390fd5b506006545b6000818152600b60205260409020546001600160a01b03168015612dd1576040517f23369fa600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6113368184846129cc565b6001600160a01b038116612e0357604051636edaef2f60e11b815260040160405180910390fd5b6001600160a01b0381166000908152600c602052604081208054612e299060019061393b565b81548110612e3957612e396137ec565b90600052602060002001549050612e52826000836129cc565b610c6960018261304d565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310612ea6577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef81000000008310612ed2576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310612ef057662386f26fc10000830492506010015b6305f5e1008310612f08576305f5e100830492506008015b6127108310612f1c57612710830492506004015b60648310612f2e576064830492506002015b600a8310610bf95760010192915050565b6000828152600b60205260409020546bffffffffffffffffffffffff821115612f94576040517ffcb3438c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000928352600b60205260409092206001600160a01b039290921660a09190911b6001600160a01b031916019055565b80546000906001600160801b03600160801b8204811691168103613014576040517f75e52f4f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600019016001600160801b039081166000818152600185016020526040812080549190558454909216600160801b909102179092555090565b81546001600160801b038082166000190191600160801b90048116908216036130a2576040517f8acb5f2700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160801b0316600081815260018401602052604090209190915581547fffffffffffffffffffffffffffffffff0000000000000000000000000000000016179055565b6001600160e01b0319811681146117d057600080fd5b60006020828403121561311057600080fd5b81356112be816130e8565b80356001600160a01b038116811461167557600080fd5b60006020828403121561314457600080fd5b6112be8261311b565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561318c5761318c61314d565b604052919050565b600067ffffffffffffffff8311156131ae576131ae61314d565b6131c1601f8401601f1916602001613163565b90508281528383830111156131d557600080fd5b828260208301376000602084830101529392505050565b6000602082840312156131fe57600080fd5b813567ffffffffffffffff81111561321557600080fd5b8201601f8101841361322657600080fd5b61323584823560208401613194565b949350505050565b60005b83811015613258578181015183820152602001613240565b50506000910152565b6000815180845261327981602086016020860161323d565b601f01601f19169290920160200192915050565b6020815260006112be6020830184613261565b6000602082840312156132b257600080fd5b5035919050565b600080604083850312156132cc57600080fd5b6132d58361311b565b946020939093013593505050565b6000806000606084860312156132f857600080fd5b6133018461311b565b925061330f6020850161311b565b9150604084013590509250925092565b6000806040838503121561333257600080fd5b823591506133426020840161311b565b90509250929050565b6000806020838503121561335e57600080fd5b823567ffffffffffffffff8082111561337657600080fd5b818501915085601f83011261338a57600080fd5b81358181111561339957600080fd5b8660208260051b85010111156133ae57600080fd5b60209290920196919550909350505050565b8035801515811461167557600080fd5b6000602082840312156133e257600080fd5b6112be826133c0565b600080604083850312156133fe57600080fd5b6134078361311b565b9150613342602084016133c0565b600081518084526020808501945080840160005b8381101561344557815187529582019590820190600101613429565b509495945050505050565b6020815260006112be6020830184613415565b6000806000806080858703121561347957600080fd5b6134828561311b565b93506134906020860161311b565b925060408501359150606085013567ffffffffffffffff8111156134b357600080fd5b8501601f810187136134c457600080fd5b6134d387823560208401613194565b91505092959194509250565b600080600080600080600060e0888a0312156134fa57600080fd5b6135038861311b565b96506135116020890161311b565b95506040880135945060608801359350608088013560ff8116811461353557600080fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561356557600080fd5b61356e8361311b565b91506133426020840161311b565b6000806040838503121561358f57600080fd5b50508035926020909101359150565b600181811c908216806135b257607f821691505b6020821081036135d257634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561133657600081815260208120601f850160051c810160208610156135ff5750805b601f850160051c820191505b8181101561361e5782815560010161360b565b505050505050565b815167ffffffffffffffff8111156136405761364061314d565b6136548161364e845461359e565b846135d8565b602080601f83116001811461368957600084156136715750858301515b600019600386901b1c1916600185901b17855561361e565b600085815260208120601f198616915b828110156136b857888601518255948401946001909101908401613699565b50858210156136d65787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b604080825283519082018190526000906020906060840190828701845b828110156137285781516001600160a01b031684529284019290840190600101613703565b5050508381038285015261373c8186613415565b9695505050505050565b6000602080838503121561375957600080fd5b825167ffffffffffffffff8082111561377157600080fd5b818501915085601f83011261378557600080fd5b8151818111156137975761379761314d565b8060051b91506137a8848301613163565b81815291830184019184810190888411156137c257600080fd5b938501935b838510156137e0578451825293850193908501906137c7565b98975050505050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001820161382a5761382a613802565b5060010190565b600181815b8085111561386c57816000190482111561385257613852613802565b8085161561385f57918102915b93841c9390800290613836565b509250929050565b60008261388357506001610bf9565b8161389057506000610bf9565b81600181146138a657600281146138b0576138cc565b6001915050610bf9565b60ff8411156138c1576138c1613802565b50506001821b610bf9565b5060208310610133831016604e8410600b84101617156138ef575081810a610bf9565b6138f98383613831565b806000190482111561390d5761390d613802565b029392505050565b60006112be60ff841683613874565b8082028115828204841417610bf957610bf9613802565b81810381811115610bf957610bf9613802565b60006001600160a01b0380871683528086166020840152508360408301526080606083015261373c6080830184613261565b60006020828403121561399257600080fd5b81516112be816130e8565b600081546139aa8161359e565b600182811680156139c257600181146139d757613a06565b60ff1984168752821515830287019450613a06565b8560005260208060002060005b858110156139fd5781548a8201529084019082016139e4565b50505082870194505b5050505092915050565b6000613a1c828561399d565b8351613a2c81836020880161323d565b01949350505050565b80820180821115610bf957610bf9613802565b60006112be828461399d565b600082613a7157634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220a9772e0f9b6220137224b1ebe696b6008678905607e46d3f611ae5c2573f5c0b64736f6c63430008140033697066733a2f2f6261667962656968686661663473616e6267627a777871366b7535796b65727976746b6e366168756f367a63736e657073337365366b346d7933792f00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000015b3000000000000000000000000ef7ece90e670736918d0b34aac6ceee1f5ba2de200000000000000000000000000000000000000000000000000000000000000104a75726173736963204c6567656e647300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000744494e4f34303400000000000000000000000000000000000000000000000000

Deployed Bytecode

0x60806040526004361061038c5760003560e01c80637ecebe00116101dc578063bea25e8011610102578063dd62ed3e116100a0578063e985e9c51161006f578063e985e9c514610b05578063f0292a0314610b40578063f2fde38b14610b56578063f780bc1a14610b7657600080fd5b8063dd62ed3e14610a6d578063dd63769914610aa5578063dfabc03314610ac5578063e2af30f414610ae557600080fd5b8063c87b56dd116100dc578063c87b56dd146109f3578063d0677c5414610a13578063d505accf14610a2d578063d96ca0b914610a4d57600080fd5b8063bea25e80146109a8578063c5ab3ba6146109be578063c6e672b9146109d357600080fd5b80639b19251a1161017a578063b2a3fb2b11610149578063b2a3fb2b1461091c578063b3f9ea341461093c578063b71b688b14610972578063b88d4fde1461098857600080fd5b80639b19251a1461087f578063a22cb465146108af578063a9059cbb146108cf578063b1ab9317146108ef57600080fd5b80638a696e50116101b65780638a696e50146107f85780638da5cb5b1461081857806395d89b4114610836578063976a84351461084b57600080fd5b80637ecebe00146107965780637f649783146107c357806389fb4c66146107e357600080fd5b80633644e515116102c15780634d9660721161025f5780636352211e1161022e5780636352211e1461071457806366d003ac1461073457806370a0823114610754578063715018a61461078157600080fd5b80634d966072146106a85780634f02c420146106c8578063504d27fd146106de578063548db174146106f457600080fd5b80633d9287fa1161029b5780633d9287fa1461063257806342842e0e1461064857806346431cb3146106685780634673901b1461068857600080fd5b80633644e515146105ab57806338e21cce146105c05780633af32abf146105f957600080fd5b806309f0ef651161032e5780631a059947116103085780631a0599471461052757806323b872dd1461052f5780632c4c73161461054f578063313ce5671461056557600080fd5b806309f0ef65146104d15780630ce517e3146104f157806318160ddd1461051157600080fd5b806306fdde031161036a57806306fdde031461042c578063081812fc1461044e578063095ea7b31461049c57806309674eb0146104bc57600080fd5b806301ffc9a71461039157806302519da3146103c657806302fe53051461040a575b600080fd5b34801561039d57600080fd5b506103b16103ac3660046130fe565b610b96565b60405190151581526020015b60405180910390f35b3480156103d257600080fd5b506103fc6103e1366004613132565b6001600160a01b031660009081526007602052604090205490565b6040519081526020016103bd565b34801561041657600080fd5b5061042a6104253660046131ec565b610bff565b005b34801561043857600080fd5b50610441610c6d565b6040516103bd919061328d565b34801561045a57600080fd5b506104846104693660046132a0565b6009602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020016103bd565b3480156104a857600080fd5b506103b16104b73660046132b9565b610cfb565b3480156104c857600080fd5b506103fc610d34565b3480156104dd57600080fd5b506103b16104ec366004613132565b610d5e565b3480156104fd57600080fd5b506103b161050c366004613132565b610d90565b34801561051d57600080fd5b506103fc60055481565b61042a610efc565b34801561053b57600080fd5b506103b161054a3660046132e3565b611288565b34801561055b57600080fd5b506103fc60125481565b34801561057157600080fd5b506105997f000000000000000000000000000000000000000000000000000000000000001281565b60405160ff90911681526020016103bd565b3480156105b757600080fd5b506103fc6112c5565b3480156105cc57600080fd5b506103b16105db366004613132565b6001600160a01b03166000908152600f602052604090205460ff1690565b34801561060557600080fd5b506103b1610614366004613132565b6001600160a01b031660009081526010602052604090205460ff1690565b34801561063e57600080fd5b506103fc60175481565b34801561065457600080fd5b5061042a6106633660046132e3565b61131b565b34801561067457600080fd5b5061042a61068336600461331f565b61133b565b34801561069457600080fd5b50601354610484906001600160a01b031681565b3480156106b457600080fd5b506103b16106c33660046132b9565b611446565b3480156106d457600080fd5b506103fc60065481565b3480156106ea57600080fd5b506103fc601a5481565b34801561070057600080fd5b5061042a61070f36600461334b565b6114d3565b34801561072057600080fd5b5061048461072f3660046132a0565b6115f7565b34801561074057600080fd5b50601554610484906001600160a01b031681565b34801561076057600080fd5b506103fc61076f366004613132565b60076020526000908152604090205481565b34801561078d57600080fd5b5061042a61167a565b3480156107a257600080fd5b506103fc6107b1366004613132565b600e6020526000908152604090205481565b3480156107cf57600080fd5b5061042a6107de36600461334b565b61168e565b3480156107ef57600080fd5b506005546103fc565b34801561080457600080fd5b5061042a6108133660046133d0565b6117c6565b34801561082457600080fd5b506000546001600160a01b0316610484565b34801561084257600080fd5b506104416117d3565b34801561085757600080fd5b506103fc7f0000000000000000000000000000000000000000000000000de0b6b3a764000081565b34801561088b57600080fd5b506103b161089a366004613132565b60106020526000908152604090205460ff1681565b3480156108bb57600080fd5b5061042a6108ca3660046133eb565b6117e0565b3480156108db57600080fd5b506103b16108ea3660046132b9565b61188c565b3480156108fb57600080fd5b5061090f61090a366004613132565b6118c0565b6040516103bd9190613450565b34801561092857600080fd5b5061042a6109373660046132a0565b61192c565b34801561094857600080fd5b506103fc610957366004613132565b6001600160a01b03166000908152600c602052604090205490565b34801561097e57600080fd5b506103fc60165481565b34801561099457600080fd5b5061042a6109a3366004613463565b611939565b3480156109b457600080fd5b506103fc6115b381565b3480156109ca57600080fd5b506006546103fc565b3480156109df57600080fd5b5061042a6109ee3660046133eb565b611a53565b3480156109ff57600080fd5b50610441610a0e3660046132a0565b611a65565b348015610a1f57600080fd5b506018546103b19060ff1681565b348015610a3957600080fd5b5061042a610a483660046134df565b611a99565b348015610a5957600080fd5b506103b1610a683660046132e3565b611d42565b348015610a7957600080fd5b506103fc610a88366004613552565b600860209081526000928352604080842090915290825290205481565b348015610ab157600080fd5b5061042a610ac03660046132e3565b611e02565b348015610ad157600080fd5b5061042a610ae03660046132b9565b611f7c565b348015610af157600080fd5b5061042a610b003660046133d0565b612041565b348015610b1157600080fd5b506103b1610b20366004613552565b600a60209081526000928352604080842090915290825290205460ff1681565b348015610b4c57600080fd5b506103fc60115481565b348015610b6257600080fd5b5061042a610b71366004613132565b61205c565b348015610b8257600080fd5b5061090f610b9136600461357c565b6120e9565b60006001600160e01b031982167fcaf91ff5000000000000000000000000000000000000000000000000000000001480610bf957506001600160e01b031982167f01ffc9a700000000000000000000000000000000000000000000000000000000145b92915050565b610c07612186565b6000815111610c5d5760405162461bcd60e51b815260206004820152601360248201527f5552492063616e6e6f7420626520656d7074790000000000000000000000000060448201526064015b60405180910390fd5b6019610c698282613626565b5050565b60038054610c7a9061359e565b80601f0160208091040260200160405190810160405280929190818152602001828054610ca69061359e565b8015610cf35780601f10610cc857610100808354040283529160200191610cf3565b820191906000526020600020905b815481529060010190602001808311610cd657829003601f168201915b505050505081565b6000610d06826121e0565b15610d1a57610d158383611f7c565b610d2b565b610d248383611446565b9050610bf9565b50600192915050565b6000610d596001546001600160801b03808216600160801b9092048116919091031690565b905090565b60006001600160a01b0382161580610bf95750506001600160a01b03166000908152600d602052604090205460ff1690565b600080610d9e6005846121f7565b90506000610dac6005612288565b6014546040517f4e1273f40000000000000000000000000000000000000000000000000000000081529192506000916001600160a01b0390911690634e1273f490610dfd90869086906004016136e6565b600060405180830381865afa158015610e1a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610e429190810190613746565b905082518151141580610e5757508151815114155b15610ea45760405162461bcd60e51b815260206004820152601560248201527f496e76616c696420696e707574206c656e6774687300000000000000000000006044820152606401610c54565b60005b8151811015610ef0576000828281518110610ec457610ec46137ec565b60200260200101511115610ede5750600195945050505050565b80610ee881613818565b915050610ea7565b50600095945050505050565b60185460ff16610f4e5760405162461bcd60e51b815260206004820152601060248201527f4d696e74206973206e6f74206f70656e000000000000000000000000000000006044820152606401610c54565b6011546005541115610fa25760405162461bcd60e51b815260206004820152601660248201527f4d6178206d696e74206c696d69742072656163686564000000000000000000006044820152606401610c54565b336000908152600f602052604090205460ff16156110025760405162461bcd60e51b815260206004820152600e60248201527f416c7265616479206d696e7465640000000000000000000000000000000000006044820152606401610c54565b3360009081526010602052604090205460ff161561105e57611059336110497f0000000000000000000000000000000000000000000000000000000000000012600a613915565b611054906001613924565b61231d565b61122e565b61106733610d90565b1561122e5760175460125461107c919061393b565b601654106110cc5760405162461bcd60e51b815260206004820152601d60248201527f4d617820766f79616765206d696e74206c696d697420726561636865640000006044820152606401610c54565b601a5434146111435760405162461bcd60e51b815260206004820152602760248201527f4d7573742073656e642074686520657861637420616d6f756e742028302e303060448201527f31382045544829000000000000000000000000000000000000000000000000006064820152608401610c54565b601554601a546040516000926001600160a01b031691908381818185875af1925050503d8060008114611192576040519150601f19603f3d011682016040523d82523d6000602084013e611197565b606091505b50509050806111e85760405162461bcd60e51b815260206004820152600f60248201527f5472616e73666572206661696c656400000000000000000000000000000000006044820152606401610c54565b611217336110497f0000000000000000000000000000000000000000000000000000000000000012600a613915565b6016805490600061122783613818565b9190505550505b336000818152600f602052604090819020805460ff1916600117905560065490517f30385c845b448a36257a6a1716e6ad2e1bc2cbe333cde1e69fe849ad6511adfe9161127e9190815260200190565b60405180910390a2565b6000611293826121e0565b156112a8576112a3848484611e02565b6112ba565b6112b3848484611d42565b90506112be565b5060015b9392505050565b60007f000000000000000000000000000000000000000000000000000000000000e70846146112f657610d59612388565b507f4231b16c8a182e4f3237bff2e525523599bf3eb2ea1af5b4779687630c9d674c90565b61133683838360405180602001604052806000815250611939565b505050565b611343612186565b47808311156113945760405162461bcd60e51b815260206004820152600f60248201527f7472616e73666572206661696c656400000000000000000000000000000000006044820152606401610c54565b6000831161140a5760405162461bcd60e51b815260206004820152602d60248201527f72656d6f7665206c697175696469747920616d6f756e742073686f756c64206260448201527f65206d6f7265207468616e2030000000000000000000000000000000000000006064820152608401610c54565b6040516001600160a01b0383169084156108fc029085906000818181858888f19350505050158015611440573d6000803e3d6000fd5b50505050565b60006001600160a01b03831661146f57604051635461585f60e01b815260040160405180910390fd5b3360008181526008602090815260408083206001600160a01b03881680855290835292819020869055518581529192917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350600192915050565b6114db612186565b60005b8181101561133657601060008484848181106114fc576114fc6137ec565b90506020020160208101906115119190613132565b6001600160a01b0316815260208101919091526040016000205460ff16156115e55760006010600085858581811061154b5761154b6137ec565b90506020020160208101906115609190613132565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905582828281811061159a5761159a6137ec565b90506020020160208101906115af9190613132565b6001600160a01b03167fde8cf212af7ce38b2840785a2768d97ff2dbf3c21b516961cec0061e134c2a1e60405160405180910390a25b806115ef81613818565b9150506114de565b6000818152600b60205260409020546001600160a01b0316611618826121e0565b611635576040516307ed98ed60e31b815260040160405180910390fd5b6001600160a01b038116611675576040517fc5723b5100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b919050565b611682612186565b61168c6000612422565b565b611696612186565b60005b8181101561133657601060008484848181106116b7576116b76137ec565b90506020020160208101906116cc9190613132565b6001600160a01b0316815260208101919091526040016000205460ff1661170357601780549060006116fd83613818565b91905055505b60016010600085858581811061171b5761171b6137ec565b90506020020160208101906117309190613132565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905582828281811061176a5761176a6137ec565b905060200201602081019061177f9190613132565b6001600160a01b03167f4790a4adb426ca2345bb5108f6e454eae852a7bf687544cd66a7270dff3a41d660405160405180910390a2806117be81613818565b915050611699565b6117d03382612472565b50565b60048054610c7a9061359e565b6001600160a01b038216611820576040517fccea9e6f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000818152600a602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b60006001600160a01b0383166118b557604051634e46966960e11b815260040160405180910390fd5b6112be3384846124fa565b6001600160a01b0381166000908152600c602090815260409182902080548351818402810184019094528084526060939283018282801561192057602002820191906000526020600020905b81548152602001906001019080831161190c575b50505050509050919050565b611934612186565b601a55565b611942826121e0565b61195f576040516307ed98ed60e31b815260040160405180910390fd5b61196a848484611288565b506001600160a01b0383163b15801590611a1c57506040517f150b7a0200000000000000000000000000000000000000000000000000000000808252906001600160a01b0385169063150b7a02906119cc90339089908890889060040161394e565b6020604051808303816000875af11580156119eb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a0f9190613980565b6001600160e01b03191614155b15611440576040517f3da6393100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611a5b612186565b610c698282612472565b60606019611a7283612870565b604051602001611a83929190613a10565b6040516020818303038152906040529050919050565b42841015611ad3576040517f05787bdf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611adc856121e0565b15611b13576040517f1f3e0de800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038616611b3a57604051635461585f60e01b815260040160405180910390fd5b60006001611b466112c5565b6001600160a01b038a81166000818152600e602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98184015280840194909452938d166060840152608083018c905260a083019390935260c08083018b90528151808403909101815260e0830190915280519201919091207f19010000000000000000000000000000000000000000000000000000000000006101008301526101028201929092526101228101919091526101420160408051601f198184030181528282528051602091820120600084529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa158015611c6d573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381161580611ca25750876001600160a01b0316816001600160a01b031614155b15611cd9576040517f815e1d6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0390811660009081526008602090815260408083208a8516808552908352928190208990555188815291928a16917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350505050505050565b60006001600160a01b038416611d6b57604051636edaef2f60e11b815260040160405180910390fd5b6001600160a01b038316611d9257604051634e46966960e11b815260040160405180910390fd5b6001600160a01b03841660009081526008602090815260408083203384529091529020546000198114611dee57611dc9838261393b565b6001600160a01b03861660009081526008602090815260408083203384529091529020555b611df98585856124fa565b95945050505050565b6001600160a01b038316611e2957604051636edaef2f60e11b815260040160405180910390fd5b6001600160a01b038216611e5057604051634e46966960e11b815260040160405180910390fd5b6000818152600b60205260409020546001600160a01b03848116911614611e89576040516282b42960e81b815260040160405180910390fd5b336001600160a01b03841614801590611ec657506001600160a01b0383166000908152600a6020908152604080832033845290915290205460ff16155b8015611ee957506000818152600960205260409020546001600160a01b03163314155b15611f06576040516282b42960e81b815260040160405180910390fd5b611f0f82610d5e565b15611f46576040517f5ce7539700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611f7183837f0000000000000000000000000000000000000000000000000de0b6b3a7640000612910565b6113368383836129cc565b6000818152600b60205260409020546001600160a01b0316338114801590611fc857506001600160a01b0381166000908152600a6020908152604080832033845290915290205460ff16155b15611fe5576040516282b42960e81b815260040160405180910390fd5b60008281526009602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b612049612186565b6018805460ff1916911515919091179055565b612064612186565b6001600160a01b0381166120e05760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610c54565b6117d081612422565b606060008267ffffffffffffffff8111156121065761210661314d565b60405190808252806020026020018201604052801561212f578160200160208202803683370190505b509050835b61213e8486613a35565b81101561217e57612150600182612ba4565b8261215b878461393b565b8151811061216b5761216b6137ec565b6020908102919091010152600101612134565b509392505050565b6000546001600160a01b0316331461168c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c54565b600060018210158015610bf95750506115b3101590565b606060008367ffffffffffffffff8111156122145761221461314d565b60405190808252806020026020018201604052801561223d578160200160208202803683370190505b50905060005b8481101561217e578382828151811061225e5761225e6137ec565b6001600160a01b03909216602092830291909101909101528061228081613818565b915050612243565b606060008267ffffffffffffffff8111156122a5576122a561314d565b6040519080825280602002602001820160405280156122ce578160200160208202803683370190505b50905060005b83811015612316576122e7816001613a35565b8282815181106122f9576122f96137ec565b60209081029190910101528061230e81613818565b9150506122d4565b5092915050565b6001600160a01b03821661234457604051634e46966960e11b815260040160405180910390fd5b69012d231c7c593eec00008160055461235d9190613a35565b111561237c5760405163303b682f60e01b815260040160405180910390fd5b611336600083836124fa565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60036040516123ba9190613a48565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0382166124b2576040517fa41e3d3f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80156124c6576124c182612c28565b6124cf565b6124cf82612c5c565b6001600160a01b03919091166000908152600d60205260409020805460ff1916911515919091179055565b6001600160a01b0383811660009081526007602052604080822054928516825281205490919061252b868686612910565b600061253687610d5e565b9050600061254387610d5e565b905081801561254f5750805b6128625781156125f85760006125857f0000000000000000000000000000000000000000000000000de0b6b3a764000085613a54565b6001600160a01b0389166000908152600760205260409020546125c9907f0000000000000000000000000000000000000000000000000de0b6b3a764000090613a54565b6125d3919061393b565b905060005b818110156125f1576125e989612cea565b6001016125d8565b5050612862565b8015612694576001600160a01b038816600090815260076020526040812054612642907f0000000000000000000000000000000000000000000000000de0b6b3a764000090613a54565b61266c7f0000000000000000000000000000000000000000000000000de0b6b3a764000087613a54565b612676919061393b565b905060005b818110156125f15761268c8a612ddc565b60010161267b565b60006126c07f0000000000000000000000000000000000000000000000000de0b6b3a764000088613a54565b905060005b81811015612743576001600160a01b038a166000908152600c60205260408120546126f29060019061393b565b6001600160a01b038c166000908152600c602052604081208054929350909183908110612721576127216137ec565b906000526020600020015490506127398c8c836129cc565b50506001016126c5565b50807f0000000000000000000000000000000000000000000000000de0b6b3a76400006127858b6001600160a01b031660009081526007602052604090205490565b61278f9190613a54565b6127b97f0000000000000000000000000000000000000000000000000de0b6b3a764000088613a54565b6127c3919061393b565b11156127d2576127d289612ddc565b806127fd7f0000000000000000000000000000000000000000000000000de0b6b3a764000086613a54565b7f0000000000000000000000000000000000000000000000000de0b6b3a764000061283d8b6001600160a01b031660009081526007602052604090205490565b6128479190613a54565b612851919061393b565b11156128605761286088612cea565b505b506001979650505050505050565b6060600061287d83612e5d565b600101905060008167ffffffffffffffff81111561289d5761289d61314d565b6040519080825280601f01601f1916602001820160405280156128c7576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846128d157509392505050565b6001600160a01b03831661293b5780600560008282546129309190613a35565b909155506129699050565b6001600160a01b0383166000908152600760205260408120805483929061296390849061393b565b90915550505b6001600160a01b03808316600081815260076020526040908190208054850190555190918516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906129bf9085815260200190565b60405180910390a3505050565b6001600160a01b03831615612ad757600081815260096020908152604080832080546001600160a01b03191690556001600160a01b0386168352600c90915281208054612a1b9060019061393b565b81548110612a2b57612a2b6137ec565b90600052602060002001549050818114612a98576000828152600b602052604081205460a01c6001600160a01b0386166000908152600c602052604090208054919250839183908110612a8057612a806137ec565b600091825260209091200155612a968282612f3f565b505b6001600160a01b0384166000908152600c60205260409020805480612abf57612abf613a76565b60019003818190600052602060002001600090559055505b6001600160a01b03821615612b4e576000818152600b6020908152604080832080546001600160a01b0319166001600160a01b038716908101909155808452600c83529083208054600181810183558286529385200185905592529054612b49918391612b44919061393b565b612f3f565b612b5e565b6000818152600b60205260408120555b80826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b6000612bc883546001600160801b03808216600160801b9092048116919091031690565b8210612c00576040517f580821e700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5081546001600160801b03908116820116600090815260018301602052604090205492915050565b6001600160a01b0381166000908152600c6020526040812054905b8181101561133657612c5483612ddc565b600101612c43565b6001600160a01b038116600090815260076020526040812054612ca0907f0000000000000000000000000000000000000000000000000de0b6b3a764000090613a54565b90506000612cc3836001600160a01b03166000908152600c602052604090205490565b905060005b612cd2828461393b565b81101561144057612ce284612cea565b600101612cc8565b6001600160a01b038116612d1157604051634e46966960e11b815260040160405180910390fd5b6000612d31600154600160801b81046001600160801b0390811691161490565b612d4657612d3f6001612fc4565b9050612d81565b600660008154612d5590613818565b90915550600654600101612d7c5760405163303b682f60e01b815260040160405180910390fd5b506006545b6000818152600b60205260409020546001600160a01b03168015612dd1576040517f23369fa600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6113368184846129cc565b6001600160a01b038116612e0357604051636edaef2f60e11b815260040160405180910390fd5b6001600160a01b0381166000908152600c602052604081208054612e299060019061393b565b81548110612e3957612e396137ec565b90600052602060002001549050612e52826000836129cc565b610c6960018261304d565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310612ea6577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef81000000008310612ed2576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310612ef057662386f26fc10000830492506010015b6305f5e1008310612f08576305f5e100830492506008015b6127108310612f1c57612710830492506004015b60648310612f2e576064830492506002015b600a8310610bf95760010192915050565b6000828152600b60205260409020546bffffffffffffffffffffffff821115612f94576040517ffcb3438c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000928352600b60205260409092206001600160a01b039290921660a09190911b6001600160a01b031916019055565b80546000906001600160801b03600160801b8204811691168103613014576040517f75e52f4f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600019016001600160801b039081166000818152600185016020526040812080549190558454909216600160801b909102179092555090565b81546001600160801b038082166000190191600160801b90048116908216036130a2576040517f8acb5f2700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160801b0316600081815260018401602052604090209190915581547fffffffffffffffffffffffffffffffff0000000000000000000000000000000016179055565b6001600160e01b0319811681146117d057600080fd5b60006020828403121561311057600080fd5b81356112be816130e8565b80356001600160a01b038116811461167557600080fd5b60006020828403121561314457600080fd5b6112be8261311b565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561318c5761318c61314d565b604052919050565b600067ffffffffffffffff8311156131ae576131ae61314d565b6131c1601f8401601f1916602001613163565b90508281528383830111156131d557600080fd5b828260208301376000602084830101529392505050565b6000602082840312156131fe57600080fd5b813567ffffffffffffffff81111561321557600080fd5b8201601f8101841361322657600080fd5b61323584823560208401613194565b949350505050565b60005b83811015613258578181015183820152602001613240565b50506000910152565b6000815180845261327981602086016020860161323d565b601f01601f19169290920160200192915050565b6020815260006112be6020830184613261565b6000602082840312156132b257600080fd5b5035919050565b600080604083850312156132cc57600080fd5b6132d58361311b565b946020939093013593505050565b6000806000606084860312156132f857600080fd5b6133018461311b565b925061330f6020850161311b565b9150604084013590509250925092565b6000806040838503121561333257600080fd5b823591506133426020840161311b565b90509250929050565b6000806020838503121561335e57600080fd5b823567ffffffffffffffff8082111561337657600080fd5b818501915085601f83011261338a57600080fd5b81358181111561339957600080fd5b8660208260051b85010111156133ae57600080fd5b60209290920196919550909350505050565b8035801515811461167557600080fd5b6000602082840312156133e257600080fd5b6112be826133c0565b600080604083850312156133fe57600080fd5b6134078361311b565b9150613342602084016133c0565b600081518084526020808501945080840160005b8381101561344557815187529582019590820190600101613429565b509495945050505050565b6020815260006112be6020830184613415565b6000806000806080858703121561347957600080fd5b6134828561311b565b93506134906020860161311b565b925060408501359150606085013567ffffffffffffffff8111156134b357600080fd5b8501601f810187136134c457600080fd5b6134d387823560208401613194565b91505092959194509250565b600080600080600080600060e0888a0312156134fa57600080fd5b6135038861311b565b96506135116020890161311b565b95506040880135945060608801359350608088013560ff8116811461353557600080fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561356557600080fd5b61356e8361311b565b91506133426020840161311b565b6000806040838503121561358f57600080fd5b50508035926020909101359150565b600181811c908216806135b257607f821691505b6020821081036135d257634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561133657600081815260208120601f850160051c810160208610156135ff5750805b601f850160051c820191505b8181101561361e5782815560010161360b565b505050505050565b815167ffffffffffffffff8111156136405761364061314d565b6136548161364e845461359e565b846135d8565b602080601f83116001811461368957600084156136715750858301515b600019600386901b1c1916600185901b17855561361e565b600085815260208120601f198616915b828110156136b857888601518255948401946001909101908401613699565b50858210156136d65787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b604080825283519082018190526000906020906060840190828701845b828110156137285781516001600160a01b031684529284019290840190600101613703565b5050508381038285015261373c8186613415565b9695505050505050565b6000602080838503121561375957600080fd5b825167ffffffffffffffff8082111561377157600080fd5b818501915085601f83011261378557600080fd5b8151818111156137975761379761314d565b8060051b91506137a8848301613163565b81815291830184019184810190888411156137c257600080fd5b938501935b838510156137e0578451825293850193908501906137c7565b98975050505050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001820161382a5761382a613802565b5060010190565b600181815b8085111561386c57816000190482111561385257613852613802565b8085161561385f57918102915b93841c9390800290613836565b509250929050565b60008261388357506001610bf9565b8161389057506000610bf9565b81600181146138a657600281146138b0576138cc565b6001915050610bf9565b60ff8411156138c1576138c1613802565b50506001821b610bf9565b5060208310610133831016604e8410600b84101617156138ef575081810a610bf9565b6138f98383613831565b806000190482111561390d5761390d613802565b029392505050565b60006112be60ff841683613874565b8082028115828204841417610bf957610bf9613802565b81810381811115610bf957610bf9613802565b60006001600160a01b0380871683528086166020840152508360408301526080606083015261373c6080830184613261565b60006020828403121561399257600080fd5b81516112be816130e8565b600081546139aa8161359e565b600182811680156139c257600181146139d757613a06565b60ff1984168752821515830287019450613a06565b8560005260208060002060005b858110156139fd5781548a8201529084019082016139e4565b50505082870194505b5050505092915050565b6000613a1c828561399d565b8351613a2c81836020880161323d565b01949350505050565b80820180821115610bf957610bf9613802565b60006112be828461399d565b600082613a7157634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220a9772e0f9b6220137224b1ebe696b6008678905607e46d3f611ae5c2573f5c0b64736f6c63430008140033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000015b3000000000000000000000000ef7ece90e670736918d0b34aac6ceee1f5ba2de200000000000000000000000000000000000000000000000000000000000000104a75726173736963204c6567656e647300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000744494e4f34303400000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : name_ (string): Jurassic Legends
Arg [1] : symbol_ (string): DINO404
Arg [2] : decimals_ (uint8): 18
Arg [3] : maxMint_ (uint256): 5555
Arg [4] : _recipient (address): 0xeF7EcE90E670736918d0b34aac6CeEE1F5BA2De2

-----Encoded View---------------
9 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000012
Arg [3] : 00000000000000000000000000000000000000000000000000000000000015b3
Arg [4] : 000000000000000000000000ef7ece90e670736918d0b34aac6ceee1f5ba2de2
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000010
Arg [6] : 4a75726173736963204c6567656e647300000000000000000000000000000000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000007
Arg [8] : 44494e4f34303400000000000000000000000000000000000000000000000000


Block Transaction Gas Used Reward
view all blocks sequenced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.