ETH Price: $2,896.15 (-1.35%)

Contract

0xd4F2ED4E8d1c3C5Cb8872883D5054324354747D4

Overview

ETH Balance

Linea Mainnet LogoLinea Mainnet LogoLinea Mainnet Logo0 ETH

ETH Value

$0.00

Token Holdings

More Info

Private Name Tags

Transaction Hash
Block
From
To
Set Approval For...269345042025-12-21 17:22:3035 days ago1766337750IN
0xd4F2ED4E...4354747D4
0 ETH0.000000940.03873756
Set Approval For...263437122025-12-05 0:54:2552 days ago1764896065IN
0xd4F2ED4E...4354747D4
0 ETH0.000002150.04671691
Set Approval For...253537032025-11-06 16:41:0580 days ago1762447265IN
0xd4F2ED4E...4354747D4
0 ETH0.000001660.06877174
Set Approval For...253536992025-11-06 16:40:5780 days ago1762447257IN
0xd4F2ED4E...4354747D4
0 ETH0.000001660.06869301
Set Approval For...250506842025-10-29 20:15:0288 days ago1761768902IN
0xd4F2ED4E...4354747D4
0 ETH0.000002060.04472278
Set Approval For...247965872025-10-22 13:04:5995 days ago1761138299IN
0xd4F2ED4E...4354747D4
0 ETH0.000001370.05212158
Set Approval For...247965472025-10-22 13:03:2595 days ago1761138205IN
0xd4F2ED4E...4354747D4
0 ETH0.000001370.05212158
Set Approval For...247964692025-10-22 13:00:0595 days ago1761138005IN
0xd4F2ED4E...4354747D4
0 ETH0.000001240.05107514
Set Approval For...242830892025-10-08 7:21:23109 days ago1759908083IN
0xd4F2ED4E...4354747D4
0 ETH0.000001230.05110796
Set Approval For...237534502025-09-24 18:33:30123 days ago1758738810IN
0xd4F2ED4E...4354747D4
0 ETH0.000001180.04875355
Set Approval For...234143312025-09-16 18:33:40131 days ago1758047620IN
0xd4F2ED4E...4354747D4
0 ETH0.000002060.04472278
Set Approval For...233371152025-09-14 23:37:15133 days ago1757893035IN
0xd4F2ED4E...4354747D4
0 ETH0.000001240.05107514
Set Approval For...233136702025-09-14 10:33:38133 days ago1757846018IN
0xd4F2ED4E...4354747D4
0 ETH0.000001960.04259312
Set Approval For...232311362025-09-12 12:38:45135 days ago1757680725IN
0xd4F2ED4E...4354747D4
0 ETH0.000001120.04646178
Permit231092712025-09-09 8:43:32138 days ago1757407412IN
0xd4F2ED4E...4354747D4
0 ETH0.000001980.05287089
Set Approval For...230249462025-09-07 8:09:42140 days ago1757232582IN
0xd4F2ED4E...4354747D4
0 ETH0.000001180.04888454
Set Approval For...230246352025-09-07 7:59:00140 days ago1757231940IN
0xd4F2ED4E...4354747D4
0 ETH0.000001180.04888454
Set Approval For...230236082025-09-07 7:24:13140 days ago1757229853IN
0xd4F2ED4E...4354747D4
0 ETH0.000001180.04888454
Set Approval For...230233382025-09-07 7:15:05141 days ago1757229305IN
0xd4F2ED4E...4354747D4
0 ETH0.000001180.04888454
Set Approval For...224642582025-08-24 20:08:30154 days ago1756066110IN
0xd4F2ED4E...4354747D4
0 ETH0.000001240.05121237
Permit223470462025-08-22 1:12:59157 days ago1755825179IN
0xd4F2ED4E...4354747D4
0 ETH0.000002520.04622806
Set Approval For...221978302025-08-18 12:19:27160 days ago1755519567IN
0xd4F2ED4E...4354747D4
0 ETH0.000001180.04888454
Set Approval For...219849362025-08-13 11:24:04165 days ago1755084244IN
0xd4F2ED4E...4354747D4
0 ETH0.000001180.04888454
Set Approval For...218456932025-08-10 5:01:37169 days ago1754802097IN
0xd4F2ED4E...4354747D4
0 ETH0.000001970.04281994
Set Approval For...216128862025-08-04 6:42:30175 days ago1754289750IN
0xd4F2ED4E...4354747D4
0 ETH0.000001660.06863092
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
231092712025-09-09 8:43:32138 days ago1757407412
0xd4F2ED4E...4354747D4
0 ETH
223470462025-08-22 1:12:59157 days ago1755825179
0xd4F2ED4E...4354747D4
0 ETH
211055382025-07-21 10:05:06188 days ago1753092306
0xd4F2ED4E...4354747D4
0 ETH
198585402025-06-10 10:07:10229 days ago1749550030
0xd4F2ED4E...4354747D4
0 ETH
196619802025-06-04 13:34:31235 days ago1749044071
0xd4F2ED4E...4354747D4
0 ETH
196619332025-06-04 13:32:50235 days ago1749043970
0xd4F2ED4E...4354747D4
0 ETH
196619322025-06-04 13:32:48235 days ago1749043968
0xd4F2ED4E...4354747D4
0 ETH
196617672025-06-04 13:26:52235 days ago1749043612
0xd4F2ED4E...4354747D4
0 ETH
196617672025-06-04 13:26:52235 days ago1749043612
0xd4F2ED4E...4354747D4
0 ETH
196615722025-06-04 13:19:27235 days ago1749043167
0xd4F2ED4E...4354747D4
0 ETH
190679402025-05-16 22:25:39254 days ago1747434339
0xd4F2ED4E...4354747D4
0 ETH
183193282025-04-23 21:18:21277 days ago1745443101
0xd4F2ED4E...4354747D4
0 ETH
174360992025-03-27 22:37:45304 days ago1743115065
0xd4F2ED4E...4354747D4
0 ETH
173038302025-03-24 10:45:33307 days ago1742813133
0xd4F2ED4E...4354747D4
0 ETH
170242912025-03-16 21:26:43315 days ago1742160403
0xd4F2ED4E...4354747D4
0 ETH
168290352025-03-12 0:36:55320 days ago1741739815
0xd4F2ED4E...4354747D4
0 ETH
168290352025-03-12 0:36:55320 days ago1741739815
0xd4F2ED4E...4354747D4
0 ETH
165762632025-03-05 13:06:14326 days ago1741179974
0xd4F2ED4E...4354747D4
0 ETH
165669222025-03-05 7:52:35326 days ago1741161155
0xd4F2ED4E...4354747D4
0 ETH
162093962025-02-24 11:23:03335 days ago1740396183
0xd4F2ED4E...4354747D4
0 ETH
162093962025-02-24 11:23:03335 days ago1740396183
0xd4F2ED4E...4354747D4
0 ETH
161512662025-02-22 23:16:30337 days ago1740266190
0xd4F2ED4E...4354747D4
0 ETH
161281362025-02-22 9:01:11337 days ago1740214871
0xd4F2ED4E...4354747D4
0 ETH
161281362025-02-22 9:01:11337 days ago1740214871
0xd4F2ED4E...4354747D4
0 ETH
160838612025-02-21 6:14:26339 days ago1740118466
0xd4F2ED4E...4354747D4
0 ETH
View All Internal Transactions
Cross-Chain Transactions
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0xa8ad9f80...3b3e08935
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
EVOERC404

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
Yes with 1000 runs

Other Settings:
paris EvmVersion

Contract Source Code (Solidity Standard Json-Input format)

//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";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

contract EVOERC404 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;
    uint256 public voyageMinted = 0;

    uint256 public MAX_AIRDROP_MINT = 1031;
    uint256 public MAX_MINT;
    uint256 public MAX_ERC721_MINT;
    address public VOYAGE = 0x0872ec4426103482a50f26Ffc32aCEfcec61b3c9;
    IERC1155 erc1151 = IERC1155(VOYAGE);
    address public LINEA_LXP_TOKEN = 0xd83af4fbD77f3AB65C3B1Dc4B38D7e67AEcf599A;
    IERC20 lineaLxpToken = IERC20(LINEA_LXP_TOKEN);
    // Address to receive the transferred funds
    address public recipient;

    uint256 public whitelisted = 0;
    mapping(address => bool) public whitelist;
    mapping(address => uint256) public whitelistAmount;
    mapping(address => bool) private hasMintedWhitelistMap;

    uint256 public freemintWhitelisted = 0;
    mapping(address => bool) public freemintWhitelist;

    bool public isOpenMint = false;
    bool public isOpenClaimAirdrop = false;


    // URI for the token metadata
    string private URI = "https://nftstorage.link/ipfs/bafybeid6izuafivhzetzpfblarrhgonxu3mujy6n42de3hosh4g6nl7xwm/";

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

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

    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 addToAirdropWhitelist(address[] calldata addresses, uint256[] calldata amount) external onlyOwner {
        for (uint256 i = 0; i < addresses.length; i++) {
            if(!whitelist[addresses[i]]) {
              whitelisted++;
            }
            whitelist[addresses[i]] = true;
            whitelistAmount[addresses[i]] = amount[i];
            hasMintedWhitelistMap[addresses[i]] = false;
            emit WhitelistAdded(addresses[i], amount[i]);
        }
    }

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

    function addToFreemintWhitelist(address[] calldata addresses) external onlyOwner {
        for (uint256 i = 0; i < addresses.length; i++) {
            if(!freemintWhitelist[addresses[i]]) {
              freemintWhitelisted++;
            }
            freemintWhitelist[addresses[i]] = true;
            emit WhitelistAdded(addresses[i], 1 * 10 ** decimals);
        }
    }

    // Function to remove addresses from the whitelist
    // Takes an array of addresses to be removed
    function removeFromFreemintWhitelist(address[] calldata addresses) external onlyOwner {
        for (uint256 i = 0; i < addresses.length; i++) {
            if (freemintWhitelist[addresses[i]]) {
                freemintWhitelist[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 and hold more than 100 LXP
    function hasVoyageNftAndLxp(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) {
              // At least one VOYAGE NFT found
                uint256 lxpBalance = lineaLxpToken.balanceOf(_address);
                if (lxpBalance >= 100 * 10 ** 18) {
                    return true; // >= 100 LXP
                }
            }
        }

        return false; // No VOYAGE NFTs found or holding < 100 LXP
    }

    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 (freemintWhitelist[msg.sender]) {
        // Mint for free if whitelisted
        _mintERC20(msg.sender, 1 * 10 ** decimals);
      } else if (hasVoyageNftAndLxp(msg.sender)) {
        // Existing logic for VOYAGE NFT holders with payment
        // Ensure the contract receives the exact amount
        require(voyageMinted < MAX_ERC721_MINT - freemintWhitelisted - MAX_AIRDROP_MINT, "Max voyage mint limit reached");
        require(msg.value == transferAmount, "Must send the exact amount");

        // 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 claimAirdrop() external payable {
      require(isOpenClaimAirdrop, "Claim airdrop is not open");
      require(totalSupply <= MAX_MINT, "Max mint limit reached");
      require(!hasMintedWhitelistMap[msg.sender], "Already minted");
      if (whitelist[msg.sender]) {
        // Mint for free if whitelisted
        _mintERC20(msg.sender, whitelistAmount[msg.sender]);
      }

      hasMintedWhitelistMap[msg.sender] = true;
      whitelist[msg.sender] = false;
      emit ClaimAirdrop(msg.sender, whitelistAmount[msg.sender]);
    }

    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, uint256) {
      return (whitelist[account], whitelistAmount[account]);
    }

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

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

      return false;
    }

    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;
    }

    function setOpenClaimAirdrop(bool _state) external onlyOwner {
      isOpenClaimAirdrop = _state;
    }
}

// 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 17 : 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 17 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC721Receiver.sol)

pragma solidity ^0.8.0;

import "../token/ERC721/IERC721Receiver.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;
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 amount) external returns (bool);
}

File 7 of 17 : 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);
}

// 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;
    }
}

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

pragma solidity ^0.8.0;

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

// SPDX-License-Identifier: MIT
// 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);
        }
    }
}

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

// 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 13 of 17 : 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 = 3333;
  uint256 private constant MAX_ERC20_MINT = 3333*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;
  }
}

//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;
}

// 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 16 of 17 : 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 17 of 17 : ERC721Events.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

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":"amount","type":"uint256"}],"name":"ClaimAirdrop","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"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"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":"LINEA_LXP_TOKEN","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_AIRDROP_MINT","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[]"},{"internalType":"uint256[]","name":"amount","type":"uint256[]"}],"name":"addToAirdropWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"addresses","type":"address[]"}],"name":"addToFreemintWhitelist","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":"claimAirdrop","outputs":[],"stateMutability":"payable","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":"address","name":"","type":"address"}],"name":"freemintWhitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"freemintWhitelisted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":"account","type":"address"}],"name":"hasMintedWhitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"hasVoyageNftAndLxp","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":"isOpenClaimAirdrop","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"},{"internalType":"uint256","name":"","type":"uint256"}],"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":"removeFromAirdropWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"addresses","type":"address[]"}],"name":"removeFromFreemintWhitelist","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":"setOpenClaimAirdrop","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":[{"internalType":"address","name":"","type":"address"}],"name":"whitelistAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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"}]

0x6000601081905561040760115560148054730872ec4426103482a50f26ffc32acefcec61b3c96001600160a01b031991821681179092556015805482169092179091556016805473d83af4fbd77f3ab65c3b1dc4b38d7e67aecf599a9083168117909155601780549092161790556019819055601d55601f805461ffff1916905561018060405260596101008181529062004bd061012039602090620000a6908262000340565b50663ff2e795f50000602155348015620000bf57600080fd5b5060405162004c2938038062004c29833981016040819052620000e291620004bb565b848484620000f033620001af565b6003620000fe848262000340565b5060046200010d838262000340565b5060128160ff16101562000134576040516398790fd560e01b815260040160405180910390fd5b60ff811660808190526200014a90600a62000680565b60a0524660c0526200015b620001ff565b60e0525050608051620001719150600a62000680565b6200017d908362000698565b601255601391909155601880546001600160a01b0319166001600160a01b039092169190911790555062000730915050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6003604051620002339190620006b2565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680620002c657607f821691505b602082108103620002e757634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200033b57600081815260208120601f850160051c81016020861015620003165750805b601f850160051c820191505b81811015620003375782815560010162000322565b5050505b505050565b81516001600160401b038111156200035c576200035c6200029b565b62000374816200036d8454620002b1565b84620002ed565b602080601f831160018114620003ac5760008415620003935750858301515b600019600386901b1c1916600185901b17855562000337565b600085815260208120601f198616915b82811015620003dd57888601518255948401946001909101908401620003bc565b5085821015620003fc5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600082601f8301126200041e57600080fd5b81516001600160401b03808211156200043b576200043b6200029b565b604051601f8301601f19908116603f011681019082821181831017156200046657620004666200029b565b816040528381526020925086838588010111156200048357600080fd5b600091505b83821015620004a7578582018301518183018401529082019062000488565b600093810190920192909252949350505050565b600080600080600060a08688031215620004d457600080fd5b85516001600160401b0380821115620004ec57600080fd5b620004fa89838a016200040c565b965060208801519150808211156200051157600080fd5b5062000520888289016200040c565b945050604086015160ff811681146200053857600080fd5b6060870151608088015191945092506001600160a01b03811681146200055d57600080fd5b809150509295509295909350565b634e487b7160e01b600052601160045260246000fd5b600181815b80851115620005c2578160001904821115620005a657620005a66200056b565b80851615620005b457918102915b93841c939080029062000586565b509250929050565b600082620005db575060016200067a565b81620005ea575060006200067a565b81600181146200060357600281146200060e576200062e565b60019150506200067a565b60ff8411156200062257620006226200056b565b50506001821b6200067a565b5060208310610133831016604e8410600b841016171562000653575081810a6200067a565b6200065f838362000581565b80600019048211156200067657620006766200056b565b0290505b92915050565b60006200069160ff841683620005ca565b9392505050565b80820281158282048414176200067a576200067a6200056b565b6000808354620006c281620002b1565b60018281168015620006dd5760018114620006f35762000724565b60ff198416875282151583028701945062000724565b8760005260208060002060005b858110156200071b5781548a82015290840190820162000700565b50505082870194505b50929695505050505050565b60805160a05160c05160e051614404620007cc60003960006116c901526000611699015260008181610a75015281816127f201528181612e0401528181612e4801528181612ec101528181612eeb01528181612f3f01528181612feb015281816130380152818161307c015281816130a3015261351f0152600081816106b0015281816112760152818161142b015261164101526144046000f3fe6080604052600436106104655760003560e01c80637e79d42411610243578063b71b688b11610143578063d96ca0b9116100bb578063e2af30f41161008a578063f0292a031161006f578063f0292a0314610d8e578063f2fde38b14610da4578063f780bc1a14610dc457600080fd5b8063e2af30f414610d33578063e985e9c514610d5357600080fd5b8063d96ca0b914610c9b578063dd62ed3e14610cbb578063dd63769914610cf3578063dfabc03314610d1357600080fd5b8063c6e672b911610112578063d0677c54116100f7578063d0677c5414610c4b578063d505accf14610c65578063d8b1ddfe14610c8557600080fd5b8063c6e672b914610c0b578063c87b56dd14610c2b57600080fd5b8063b71b688b14610baa578063b88d4fde14610bc0578063bea25e8014610be0578063c5ab3ba614610bf657600080fd5b806395d89b41116101d6578063a22cb465116101a5578063b1ab93171161018a578063b1ab931714610b27578063b2a3fb2b14610b54578063b3f9ea3414610b7457600080fd5b8063a22cb46514610ae7578063a9059cbb14610b0757600080fd5b806395d89b4114610a4e578063976a843514610a635780639ac9f48114610a975780639b19251a14610ab757600080fd5b806389fb4c661161021257806389fb4c66146109db5780638a696e50146109f05780638c6d127e14610a105780638da5cb5b14610a3057600080fd5b80637e79d424146109595780637ecebe00146109785780637f121b33146109a5578063811b8b0b146109bb57600080fd5b80633644e51511610369578063504d27fd116102e157806366d003ac116102b057806370a082311161029557806370a08231146108e7578063715018a61461091457806376b39e041461092957600080fd5b806366d003ac146108a75780636dc68fc6146108c757600080fd5b8063504d27fd1461083c5780635ab7e6c7146108525780635b88349d1461087f5780636352211e1461088757600080fd5b806342842e0e116103385780634673901b1161031d5780634673901b146107e65780634d966072146108065780634f02c4201461082657600080fd5b806342842e0e146107a657806346431cb3146107c657600080fd5b80633644e515146106e457806338e21cce146106f95780633af32abf146107325780633d9287fa1461079057600080fd5b806309f0ef65116103fc5780631d37ba31116103cb5780632c4c7316116103b05780632c4c7316146106685780632c4ea2401461067e578063313ce5671461069e57600080fd5b80631d37ba311461062857806323b872dd1461064857600080fd5b806309f0ef65146105ca5780631244c752146105ea57806318160ddd1461060a5780631a0599471461062057600080fd5b8063081812fc11610438578063081812fc14610527578063095ce7c114610575578063095ea7b31461059557806309674eb0146105b557600080fd5b806301ffc9a71461046a57806302519da31461049f57806302fe5305146104e357806306fdde0314610505575b600080fd5b34801561047657600080fd5b5061048a6104853660046139a2565b610de4565b60405190151581526020015b60405180910390f35b3480156104ab57600080fd5b506104d56104ba3660046139d6565b6001600160a01b031660009081526007602052604090205490565b604051908152602001610496565b3480156104ef57600080fd5b506105036104fe366004613a90565b610e4d565b005b34801561051157600080fd5b5061051a610ebb565b6040516104969190613b31565b34801561053357600080fd5b5061055d610542366004613b44565b6009602052600090815260409020546001600160a01b031681565b6040516001600160a01b039091168152602001610496565b34801561058157600080fd5b5061048a6105903660046139d6565b610f49565b3480156105a157600080fd5b5061048a6105b0366004613b5d565b610f91565b3480156105c157600080fd5b506104d5610fca565b3480156105d657600080fd5b5061048a6105e53660046139d6565b610ff4565b3480156105f657600080fd5b50610503610605366004613bd3565b611026565b34801561061657600080fd5b506104d560055481565b61050361114f565b34801561063457600080fd5b50610503610643366004613c25565b6114c2565b34801561065457600080fd5b5061048a610663366004613c40565b6114e4565b34801561067457600080fd5b506104d560135481565b34801561068a57600080fd5b50610503610699366004613bd3565b611521565b3480156106aa57600080fd5b506106d27f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff9091168152602001610496565b3480156106f057600080fd5b506104d5611695565b34801561070557600080fd5b5061048a6107143660046139d6565b6001600160a01b03166000908152600f602052604090205460ff1690565b34801561073e57600080fd5b5061077961074d3660046139d6565b6001600160a01b03166000908152601a6020908152604080832054601b9092529091205460ff90911691565b604080519215158352602083019190915201610496565b34801561079c57600080fd5b506104d560195481565b3480156107b257600080fd5b506105036107c1366004613c40565b6116eb565b3480156107d257600080fd5b506105036107e1366004613c7c565b611706565b3480156107f257600080fd5b5060145461055d906001600160a01b031681565b34801561081257600080fd5b5061048a610821366004613b5d565b611811565b34801561083257600080fd5b506104d560065481565b34801561084857600080fd5b506104d560215481565b34801561085e57600080fd5b506104d561086d3660046139d6565b601b6020526000908152604090205481565b61050361189e565b34801561089357600080fd5b5061055d6108a2366004613b44565b611a3f565b3480156108b357600080fd5b5060185461055d906001600160a01b031681565b3480156108d357600080fd5b5061048a6108e23660046139d6565b611ac2565b3480156108f357600080fd5b506104d56109023660046139d6565b60076020526000908152604090205481565b34801561092057600080fd5b50610503611ccb565b34801561093557600080fd5b5061048a6109443660046139d6565b601e6020526000908152604090205460ff1681565b34801561096557600080fd5b50601f5461048a90610100900460ff1681565b34801561098457600080fd5b506104d56109933660046139d6565b600e6020526000908152604090205481565b3480156109b157600080fd5b506104d560115481565b3480156109c757600080fd5b5060165461055d906001600160a01b031681565b3480156109e757600080fd5b506005546104d5565b3480156109fc57600080fd5b50610503610a0b366004613c25565b611cdf565b348015610a1c57600080fd5b50610503610a2b366004613ca8565b611cec565b348015610a3c57600080fd5b506000546001600160a01b031661055d565b348015610a5a57600080fd5b5061051a611f0d565b348015610a6f57600080fd5b506104d57f000000000000000000000000000000000000000000000000000000000000000081565b348015610aa357600080fd5b50610503610ab2366004613bd3565b611f1a565b348015610ac357600080fd5b5061048a610ad23660046139d6565b601a6020526000908152604090205460ff1681565b348015610af357600080fd5b50610503610b02366004613d14565b612085565b348015610b1357600080fd5b5061048a610b22366004613b5d565b612131565b348015610b3357600080fd5b50610b47610b423660046139d6565b612165565b6040516104969190613d79565b348015610b6057600080fd5b50610503610b6f366004613b44565b6121d1565b348015610b8057600080fd5b506104d5610b8f3660046139d6565b6001600160a01b03166000908152600c602052604090205490565b348015610bb657600080fd5b506104d560105481565b348015610bcc57600080fd5b50610503610bdb366004613d8c565b6121de565b348015610bec57600080fd5b506104d5610d0581565b348015610c0257600080fd5b506006546104d5565b348015610c1757600080fd5b50610503610c26366004613d14565b6122f8565b348015610c3757600080fd5b5061051a610c46366004613b44565b61230a565b348015610c5757600080fd5b50601f5461048a9060ff1681565b348015610c7157600080fd5b50610503610c80366004613e08565b61233e565b348015610c9157600080fd5b506104d5601d5481565b348015610ca757600080fd5b5061048a610cb6366004613c40565b6125e7565b348015610cc757600080fd5b506104d5610cd6366004613e7b565b600860209081526000928352604080842090915290825290205481565b348015610cff57600080fd5b50610503610d0e366004613c40565b6126a7565b348015610d1f57600080fd5b50610503610d2e366004613b5d565b612821565b348015610d3f57600080fd5b50610503610d4e366004613c25565b6128e6565b348015610d5f57600080fd5b5061048a610d6e366004613e7b565b600a60209081526000928352604080842090915290825290205460ff1681565b348015610d9a57600080fd5b506104d560125481565b348015610db057600080fd5b50610503610dbf3660046139d6565b612901565b348015610dd057600080fd5b50610b47610ddf366004613ea5565b61298e565b60006001600160e01b031982167fcaf91ff5000000000000000000000000000000000000000000000000000000001480610e4757506001600160e01b031982167f01ffc9a700000000000000000000000000000000000000000000000000000000145b92915050565b610e55612a2b565b6000815111610eab5760405162461bcd60e51b815260206004820152601360248201527f5552492063616e6e6f7420626520656d7074790000000000000000000000000060448201526064015b60405180910390fd5b6020610eb78282613f4f565b5050565b60038054610ec890613ec7565b80601f0160208091040260200160405190810160405280929190818152602001828054610ef490613ec7565b8015610f415780601f10610f1657610100808354040283529160200191610f41565b820191906000526020600020905b815481529060010190602001808311610f2457829003601f168201915b505050505081565b6001600160a01b0381166000908152601a602052604081205460ff1615610f8957506001600160a01b03166000908152601c602052604090205460ff1690565b506000919050565b6000610f9c82612a85565b15610fb057610fab8383612821565b610fc1565b610fba8383611811565b9050610e47565b50600192915050565b6000610fef6001546001600160801b03808216600160801b9092048116919091031690565b905090565b60006001600160a01b0382161580610e475750506001600160a01b03166000908152600d602052604090205460ff1690565b61102e612a2b565b60005b8181101561114a57601e600084848481811061104f5761104f61400f565b905060200201602081019061106491906139d6565b6001600160a01b0316815260208101919091526040016000205460ff1615611138576000601e600085858581811061109e5761109e61400f565b90506020020160208101906110b391906139d6565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790558282828181106110ed576110ed61400f565b905060200201602081019061110291906139d6565b6001600160a01b03167fde8cf212af7ce38b2840785a2768d97ff2dbf3c21b516961cec0061e134c2a1e60405160405180910390a25b806111428161403b565b915050611031565b505050565b601f5460ff166111a15760405162461bcd60e51b815260206004820152601060248201527f4d696e74206973206e6f74206f70656e000000000000000000000000000000006044820152606401610ea2565b60125460055411156111f55760405162461bcd60e51b815260206004820152601660248201527f4d6178206d696e74206c696d69742072656163686564000000000000000000006044820152606401610ea2565b336000908152600f602052604090205460ff16156112555760405162461bcd60e51b815260206004820152600e60248201527f416c7265616479206d696e7465640000000000000000000000000000000000006044820152606401610ea2565b336000908152601e602052604090205460ff16156112b1576112ac3361129c7f0000000000000000000000000000000000000000000000000000000000000000600a614138565b6112a7906001614147565b612a9c565b611468565b6112ba33611ac2565b1561146857601154601d546013546112d2919061415e565b6112dc919061415e565b6010541061132c5760405162461bcd60e51b815260206004820152601d60248201527f4d617820766f79616765206d696e74206c696d697420726561636865640000006044820152606401610ea2565b602154341461137d5760405162461bcd60e51b815260206004820152601a60248201527f4d7573742073656e642074686520657861637420616d6f756e740000000000006044820152606401610ea2565b6018546021546040516000926001600160a01b031691908381818185875af1925050503d80600081146113cc576040519150601f19603f3d011682016040523d82523d6000602084013e6113d1565b606091505b50509050806114225760405162461bcd60e51b815260206004820152600f60248201527f5472616e73666572206661696c656400000000000000000000000000000000006044820152606401610ea2565b6114513361129c7f0000000000000000000000000000000000000000000000000000000000000000600a614138565b601080549060006114618361403b565b9190505550505b336000818152600f602052604090819020805460ff1916600117905560065490517f30385c845b448a36257a6a1716e6ad2e1bc2cbe333cde1e69fe849ad6511adfe916114b89190815260200190565b60405180910390a2565b6114ca612a2b565b601f80549115156101000261ff0019909216919091179055565b60006114ef82612a85565b15611504576114ff8484846126a7565b611516565b61150f8484846125e7565b905061151a565b5060015b9392505050565b611529612a2b565b60005b8181101561114a57601e600084848481811061154a5761154a61400f565b905060200201602081019061155f91906139d6565b6001600160a01b0316815260208101919091526040016000205460ff1661159657601d80549060006115908361403b565b91905055505b6001601e60008585858181106115ae576115ae61400f565b90506020020160208101906115c391906139d6565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790558282828181106115fd576115fd61400f565b905060200201602081019061161291906139d6565b6001600160a01b03167f0311b094eb4c9ca217baa6a12f4c5070445cbbcc04a28fbb8072147b9cdcd0276116677f0000000000000000000000000000000000000000000000000000000000000000600a614138565b611672906001614147565b60405190815260200160405180910390a28061168d8161403b565b91505061152c565b60007f000000000000000000000000000000000000000000000000000000000000000046146116c657610fef612b06565b507f000000000000000000000000000000000000000000000000000000000000000090565b61114a838383604051806020016040528060008152506121de565b61170e612a2b565b478083111561175f5760405162461bcd60e51b815260206004820152600f60248201527f7472616e73666572206661696c656400000000000000000000000000000000006044820152606401610ea2565b600083116117d55760405162461bcd60e51b815260206004820152602d60248201527f72656d6f7665206c697175696469747920616d6f756e742073686f756c64206260448201527f65206d6f7265207468616e2030000000000000000000000000000000000000006064820152608401610ea2565b6040516001600160a01b0383169084156108fc029085906000818181858888f1935050505015801561180b573d6000803e3d6000fd5b50505050565b60006001600160a01b03831661183a57604051635461585f60e01b815260040160405180910390fd5b3360008181526008602090815260408083206001600160a01b03881680855290835292819020869055518581529192917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350600192915050565b601f54610100900460ff166118f55760405162461bcd60e51b815260206004820152601960248201527f436c61696d2061697264726f70206973206e6f74206f70656e000000000000006044820152606401610ea2565b60125460055411156119495760405162461bcd60e51b815260206004820152601660248201527f4d6178206d696e74206c696d69742072656163686564000000000000000000006044820152606401610ea2565b336000908152601c602052604090205460ff16156119a95760405162461bcd60e51b815260206004820152600e60248201527f416c7265616479206d696e7465640000000000000000000000000000000000006044820152606401610ea2565b336000908152601a602052604090205460ff16156119db57336000818152601b60205260409020546119db9190612a9c565b336000818152601c602090815260408083208054600160ff1991821617909155601a835281842080549091169055601b8252918290205491519182527fcebbbce55cb558a80c89a83b5e23dca5186979853be88c28e9e01232c7fdc98b91016114b8565b6000818152600b60205260409020546001600160a01b0316611a6082612a85565b611a7d576040516307ed98ed60e31b815260040160405180910390fd5b6001600160a01b038116611abd576040517fc5723b5100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b919050565b600080611ad0600584612ba0565b90506000611ade6005612c31565b6015546040517f4e1273f40000000000000000000000000000000000000000000000000000000081529192506000916001600160a01b0390911690634e1273f490611b2f9086908690600401614171565b600060405180830381865afa158015611b4c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611b7491908101906141d1565b905082518151141580611b8957508151815114155b15611bd65760405162461bcd60e51b815260206004820152601560248201527f496e76616c696420696e707574206c656e6774687300000000000000000000006044820152606401610ea2565b60005b8151811015611cbf576000828281518110611bf657611bf661400f565b60200260200101511115611cad576017546040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b03888116600483015260009216906370a0823190602401602060405180830381865afa158015611c68573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c8c9190614277565b905068056bc75e2d631000008110611cab575060019695505050505050565b505b80611cb78161403b565b915050611bd9565b50600095945050505050565b611cd3612a2b565b611cdd6000612cc6565b565b611ce93382612d16565b50565b611cf4612a2b565b60005b83811015611f0657601a6000868684818110611d1557611d1561400f565b9050602002016020810190611d2a91906139d6565b6001600160a01b0316815260208101919091526040016000205460ff16611d615760198054906000611d5b8361403b565b91905055505b6001601a6000878785818110611d7957611d7961400f565b9050602002016020810190611d8e91906139d6565b6001600160a01b031681526020810191909152604001600020805460ff1916911515919091179055828282818110611dc857611dc861400f565b90506020020135601b6000878785818110611de557611de561400f565b9050602002016020810190611dfa91906139d6565b6001600160a01b03166001600160a01b03168152602001908152602001600020819055506000601c6000878785818110611e3657611e3661400f565b9050602002016020810190611e4b91906139d6565b6001600160a01b031681526020810191909152604001600020805460ff1916911515919091179055848482818110611e8557611e8561400f565b9050602002016020810190611e9a91906139d6565b6001600160a01b03167f0311b094eb4c9ca217baa6a12f4c5070445cbbcc04a28fbb8072147b9cdcd027848484818110611ed657611ed661400f565b90506020020135604051611eec91815260200190565b60405180910390a280611efe8161403b565b915050611cf7565b5050505050565b60048054610ec890613ec7565b611f22612a2b565b60005b8181101561114a57601a6000848484818110611f4357611f4361400f565b9050602002016020810190611f5891906139d6565b6001600160a01b0316815260208101919091526040016000205460ff1615612073576000601a6000858585818110611f9257611f9261400f565b9050602002016020810190611fa791906139d6565b6001600160a01b0316815260208101919091526040016000908120805460ff191692151592909217909155601b81858585818110611fe757611fe761400f565b9050602002016020810190611ffc91906139d6565b6001600160a01b031681526020810191909152604001600020558282828181106120285761202861400f565b905060200201602081019061203d91906139d6565b6001600160a01b03167fde8cf212af7ce38b2840785a2768d97ff2dbf3c21b516961cec0061e134c2a1e60405160405180910390a25b8061207d8161403b565b915050611f25565b6001600160a01b0382166120c5576040517fccea9e6f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000818152600a602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b60006001600160a01b03831661215a57604051634e46966960e11b815260040160405180910390fd5b61151a338484612d9e565b6001600160a01b0381166000908152600c60209081526040918290208054835181840281018401909452808452606093928301828280156121c557602002820191906000526020600020905b8154815260200190600101908083116121b1575b50505050509050919050565b6121d9612a2b565b602155565b6121e782612a85565b612204576040516307ed98ed60e31b815260040160405180910390fd5b61220f8484846114e4565b506001600160a01b0383163b158015906122c157506040517f150b7a0200000000000000000000000000000000000000000000000000000000808252906001600160a01b0385169063150b7a0290612271903390899088908890600401614290565b6020604051808303816000875af1158015612290573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122b491906142c2565b6001600160e01b03191614155b1561180b576040517f3da6393100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612300612a2b565b610eb78282612d16565b6060602061231783613114565b604051602001612328929190614352565b6040516020818303038152906040529050919050565b42841015612378576040517f05787bdf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61238185612a85565b156123b8576040517f1f3e0de800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0386166123df57604051635461585f60e01b815260040160405180910390fd5b600060016123eb611695565b6001600160a01b038a81166000818152600e602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98184015280840194909452938d166060840152608083018c905260a083019390935260c08083018b90528151808403909101815260e0830190915280519201919091207f19010000000000000000000000000000000000000000000000000000000000006101008301526101028201929092526101228101919091526101420160408051601f198184030181528282528051602091820120600084529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa158015612512573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811615806125475750876001600160a01b0316816001600160a01b031614155b1561257e576040517f815e1d6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0390811660009081526008602090815260408083208a8516808552908352928190208990555188815291928a16917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350505050505050565b60006001600160a01b03841661261057604051636edaef2f60e11b815260040160405180910390fd5b6001600160a01b03831661263757604051634e46966960e11b815260040160405180910390fd5b6001600160a01b038416600090815260086020908152604080832033845290915290205460001981146126935761266e838261415e565b6001600160a01b03861660009081526008602090815260408083203384529091529020555b61269e858585612d9e565b95945050505050565b6001600160a01b0383166126ce57604051636edaef2f60e11b815260040160405180910390fd5b6001600160a01b0382166126f557604051634e46966960e11b815260040160405180910390fd5b6000818152600b60205260409020546001600160a01b0384811691161461272e576040516282b42960e81b815260040160405180910390fd5b336001600160a01b0384161480159061276b57506001600160a01b0383166000908152600a6020908152604080832033845290915290205460ff16155b801561278e57506000818152600960205260409020546001600160a01b03163314155b156127ab576040516282b42960e81b815260040160405180910390fd5b6127b482610ff4565b156127eb576040517f5ce7539700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61281683837f00000000000000000000000000000000000000000000000000000000000000006131b4565b61114a838383613270565b6000818152600b60205260409020546001600160a01b031633811480159061286d57506001600160a01b0381166000908152600a6020908152604080832033845290915290205460ff16155b1561288a576040516282b42960e81b815260040160405180910390fd5b60008281526009602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6128ee612a2b565b601f805460ff1916911515919091179055565b612909612a2b565b6001600160a01b0381166129855760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610ea2565b611ce981612cc6565b606060008267ffffffffffffffff8111156129ab576129ab6139f1565b6040519080825280602002602001820160405280156129d4578160200160208202803683370190505b509050835b6129e38486614377565b811015612a23576129f5600182613448565b82612a00878461415e565b81518110612a1057612a1061400f565b60209081029190910101526001016129d9565b509392505050565b6000546001600160a01b03163314611cdd5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ea2565b600060018210158015610e47575050610d05101590565b6001600160a01b038216612ac357604051634e46966960e11b815260040160405180910390fd5b68b4aeaab10258f4000081600554612adb9190614377565b1115612afa5760405163303b682f60e01b815260040160405180910390fd5b61114a60008383612d9e565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6003604051612b38919061438a565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b606060008367ffffffffffffffff811115612bbd57612bbd6139f1565b604051908082528060200260200182016040528015612be6578160200160208202803683370190505b50905060005b84811015612a235783828281518110612c0757612c0761400f565b6001600160a01b039092166020928302919091019091015280612c298161403b565b915050612bec565b606060008267ffffffffffffffff811115612c4e57612c4e6139f1565b604051908082528060200260200182016040528015612c77578160200160208202803683370190505b50905060005b83811015612cbf57612c90816001614377565b828281518110612ca257612ca261400f565b602090810291909101015280612cb78161403b565b915050612c7d565b5092915050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038216612d56576040517fa41e3d3f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8015612d6a57612d65826134cc565b612d73565b612d7382613500565b6001600160a01b03919091166000908152600d60205260409020805460ff1916911515919091179055565b6001600160a01b03838116600090815260076020526040808220549285168252812054909190612dcf8686866131b4565b6000612dda87610ff4565b90506000612de787610ff4565b9050818015612df35750805b613106578115612e9c576000612e297f000000000000000000000000000000000000000000000000000000000000000085614396565b6001600160a01b038916600090815260076020526040902054612e6d907f000000000000000000000000000000000000000000000000000000000000000090614396565b612e77919061415e565b905060005b81811015612e9557612e8d8961358e565b600101612e7c565b5050613106565b8015612f38576001600160a01b038816600090815260076020526040812054612ee6907f000000000000000000000000000000000000000000000000000000000000000090614396565b612f107f000000000000000000000000000000000000000000000000000000000000000087614396565b612f1a919061415e565b905060005b81811015612e9557612f308a613680565b600101612f1f565b6000612f647f000000000000000000000000000000000000000000000000000000000000000088614396565b905060005b81811015612fe7576001600160a01b038a166000908152600c6020526040812054612f969060019061415e565b6001600160a01b038c166000908152600c602052604081208054929350909183908110612fc557612fc561400f565b90600052602060002001549050612fdd8c8c83613270565b5050600101612f69565b50807f00000000000000000000000000000000000000000000000000000000000000006130298b6001600160a01b031660009081526007602052604090205490565b6130339190614396565b61305d7f000000000000000000000000000000000000000000000000000000000000000088614396565b613067919061415e565b11156130765761307689613680565b806130a17f000000000000000000000000000000000000000000000000000000000000000086614396565b7f00000000000000000000000000000000000000000000000000000000000000006130e18b6001600160a01b031660009081526007602052604090205490565b6130eb9190614396565b6130f5919061415e565b1115613104576131048861358e565b505b506001979650505050505050565b6060600061312183613701565b600101905060008167ffffffffffffffff811115613141576131416139f1565b6040519080825280601f01601f19166020018201604052801561316b576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a850494508461317557509392505050565b6001600160a01b0383166131df5780600560008282546131d49190614377565b9091555061320d9050565b6001600160a01b0383166000908152600760205260408120805483929061320790849061415e565b90915550505b6001600160a01b03808316600081815260076020526040908190208054850190555190918516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906132639085815260200190565b60405180910390a3505050565b6001600160a01b0383161561337b57600081815260096020908152604080832080546001600160a01b03191690556001600160a01b0386168352600c909152812080546132bf9060019061415e565b815481106132cf576132cf61400f565b9060005260206000200154905081811461333c576000828152600b602052604081205460a01c6001600160a01b0386166000908152600c6020526040902080549192508391839081106133245761332461400f565b60009182526020909120015561333a82826137e3565b505b6001600160a01b0384166000908152600c60205260409020805480613363576133636143b8565b60019003818190600052602060002001600090559055505b6001600160a01b038216156133f2576000818152600b6020908152604080832080546001600160a01b0319166001600160a01b038716908101909155808452600c835290832080546001818101835582865293852001859055925290546133ed9183916133e8919061415e565b6137e3565b613402565b6000818152600b60205260408120555b80826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b600061346c83546001600160801b03808216600160801b9092048116919091031690565b82106134a4576040517f580821e700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5081546001600160801b03908116820116600090815260018301602052604090205492915050565b6001600160a01b0381166000908152600c6020526040812054905b8181101561114a576134f883613680565b6001016134e7565b6001600160a01b038116600090815260076020526040812054613544907f000000000000000000000000000000000000000000000000000000000000000090614396565b90506000613567836001600160a01b03166000908152600c602052604090205490565b905060005b613576828461415e565b81101561180b576135868461358e565b60010161356c565b6001600160a01b0381166135b557604051634e46966960e11b815260040160405180910390fd5b60006135d5600154600160801b81046001600160801b0390811691161490565b6135ea576135e36001613868565b9050613625565b6006600081546135f99061403b565b909155506006546001016136205760405163303b682f60e01b815260040160405180910390fd5b506006545b6000818152600b60205260409020546001600160a01b03168015613675576040517f23369fa600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61114a818484613270565b6001600160a01b0381166136a757604051636edaef2f60e11b815260040160405180910390fd5b6001600160a01b0381166000908152600c6020526040812080546136cd9060019061415e565b815481106136dd576136dd61400f565b906000526020600020015490506136f682600083613270565b610eb76001826138f1565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000831061374a577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef81000000008310613776576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061379457662386f26fc10000830492506010015b6305f5e10083106137ac576305f5e100830492506008015b61271083106137c057612710830492506004015b606483106137d2576064830492506002015b600a8310610e475760010192915050565b6000828152600b60205260409020546bffffffffffffffffffffffff821115613838576040517ffcb3438c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000928352600b60205260409092206001600160a01b039290921660a09190911b6001600160a01b031916019055565b80546000906001600160801b03600160801b82048116911681036138b8576040517f75e52f4f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600019016001600160801b039081166000818152600185016020526040812080549190558454909216600160801b909102179092555090565b81546001600160801b038082166000190191600160801b9004811690821603613946576040517f8acb5f2700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160801b0316600081815260018401602052604090209190915581547fffffffffffffffffffffffffffffffff0000000000000000000000000000000016179055565b6001600160e01b031981168114611ce957600080fd5b6000602082840312156139b457600080fd5b813561151a8161398c565b80356001600160a01b0381168114611abd57600080fd5b6000602082840312156139e857600080fd5b61151a826139bf565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715613a3057613a306139f1565b604052919050565b600067ffffffffffffffff831115613a5257613a526139f1565b613a65601f8401601f1916602001613a07565b9050828152838383011115613a7957600080fd5b828260208301376000602084830101529392505050565b600060208284031215613aa257600080fd5b813567ffffffffffffffff811115613ab957600080fd5b8201601f81018413613aca57600080fd5b613ad984823560208401613a38565b949350505050565b60005b83811015613afc578181015183820152602001613ae4565b50506000910152565b60008151808452613b1d816020860160208601613ae1565b601f01601f19169290920160200192915050565b60208152600061151a6020830184613b05565b600060208284031215613b5657600080fd5b5035919050565b60008060408385031215613b7057600080fd5b613b79836139bf565b946020939093013593505050565b60008083601f840112613b9957600080fd5b50813567ffffffffffffffff811115613bb157600080fd5b6020830191508360208260051b8501011115613bcc57600080fd5b9250929050565b60008060208385031215613be657600080fd5b823567ffffffffffffffff811115613bfd57600080fd5b613c0985828601613b87565b90969095509350505050565b80358015158114611abd57600080fd5b600060208284031215613c3757600080fd5b61151a82613c15565b600080600060608486031215613c5557600080fd5b613c5e846139bf565b9250613c6c602085016139bf565b9150604084013590509250925092565b60008060408385031215613c8f57600080fd5b82359150613c9f602084016139bf565b90509250929050565b60008060008060408587031215613cbe57600080fd5b843567ffffffffffffffff80821115613cd657600080fd5b613ce288838901613b87565b90965094506020870135915080821115613cfb57600080fd5b50613d0887828801613b87565b95989497509550505050565b60008060408385031215613d2757600080fd5b613d30836139bf565b9150613c9f60208401613c15565b600081518084526020808501945080840160005b83811015613d6e57815187529582019590820190600101613d52565b509495945050505050565b60208152600061151a6020830184613d3e565b60008060008060808587031215613da257600080fd5b613dab856139bf565b9350613db9602086016139bf565b925060408501359150606085013567ffffffffffffffff811115613ddc57600080fd5b8501601f81018713613ded57600080fd5b613dfc87823560208401613a38565b91505092959194509250565b600080600080600080600060e0888a031215613e2357600080fd5b613e2c886139bf565b9650613e3a602089016139bf565b95506040880135945060608801359350608088013560ff81168114613e5e57600080fd5b9699959850939692959460a0840135945060c09093013592915050565b60008060408385031215613e8e57600080fd5b613e97836139bf565b9150613c9f602084016139bf565b60008060408385031215613eb857600080fd5b50508035926020909101359150565b600181811c90821680613edb57607f821691505b602082108103613efb57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561114a57600081815260208120601f850160051c81016020861015613f285750805b601f850160051c820191505b81811015613f4757828155600101613f34565b505050505050565b815167ffffffffffffffff811115613f6957613f696139f1565b613f7d81613f778454613ec7565b84613f01565b602080601f831160018114613fb25760008415613f9a5750858301515b600019600386901b1c1916600185901b178555613f47565b600085815260208120601f198616915b82811015613fe157888601518255948401946001909101908401613fc2565b5085821015613fff5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001820161404d5761404d614025565b5060010190565b600181815b8085111561408f57816000190482111561407557614075614025565b8085161561408257918102915b93841c9390800290614059565b509250929050565b6000826140a657506001610e47565b816140b357506000610e47565b81600181146140c957600281146140d3576140ef565b6001915050610e47565b60ff8411156140e4576140e4614025565b50506001821b610e47565b5060208310610133831016604e8410600b8410161715614112575081810a610e47565b61411c8383614054565b806000190482111561413057614130614025565b029392505050565b600061151a60ff841683614097565b8082028115828204841417610e4757610e47614025565b81810381811115610e4757610e47614025565b604080825283519082018190526000906020906060840190828701845b828110156141b35781516001600160a01b03168452928401929084019060010161418e565b505050838103828501526141c78186613d3e565b9695505050505050565b600060208083850312156141e457600080fd5b825167ffffffffffffffff808211156141fc57600080fd5b818501915085601f83011261421057600080fd5b815181811115614222576142226139f1565b8060051b9150614233848301613a07565b818152918301840191848101908884111561424d57600080fd5b938501935b8385101561426b57845182529385019390850190614252565b98975050505050505050565b60006020828403121561428957600080fd5b5051919050565b60006001600160a01b038087168352808616602084015250836040830152608060608301526141c76080830184613b05565b6000602082840312156142d457600080fd5b815161151a8161398c565b600081546142ec81613ec7565b60018281168015614304576001811461431957614348565b60ff1984168752821515830287019450614348565b8560005260208060002060005b8581101561433f5781548a820152908401908201614326565b50505082870194505b5050505092915050565b600061435e82856142df565b835161436e818360208801613ae1565b01949350505050565b80820180821115610e4757610e47614025565b600061151a82846142df565b6000826143b357634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603160045260246000fdfea26469706673582212207255ab34889360ba29b5a38b4ff01c61ae4c2351da175e7f20865ff1e31fb4b964736f6c6343000814003368747470733a2f2f6e667473746f726167652e6c696e6b2f697066732f626166796265696436697a7561666976687a65747a7066626c61727268676f6e7875336d756a79366e3432646533686f73683467366e6c3778776d2f00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000d05000000000000000000000000b042427b485922a928eb63e6a9b9e1cd01a08aa1000000000000000000000000000000000000000000000000000000000000001754686520426561757479206f662045766f6c7574696f6e000000000000000000000000000000000000000000000000000000000000000000000000000000000345564f0000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x6080604052600436106104655760003560e01c80637e79d42411610243578063b71b688b11610143578063d96ca0b9116100bb578063e2af30f41161008a578063f0292a031161006f578063f0292a0314610d8e578063f2fde38b14610da4578063f780bc1a14610dc457600080fd5b8063e2af30f414610d33578063e985e9c514610d5357600080fd5b8063d96ca0b914610c9b578063dd62ed3e14610cbb578063dd63769914610cf3578063dfabc03314610d1357600080fd5b8063c6e672b911610112578063d0677c54116100f7578063d0677c5414610c4b578063d505accf14610c65578063d8b1ddfe14610c8557600080fd5b8063c6e672b914610c0b578063c87b56dd14610c2b57600080fd5b8063b71b688b14610baa578063b88d4fde14610bc0578063bea25e8014610be0578063c5ab3ba614610bf657600080fd5b806395d89b41116101d6578063a22cb465116101a5578063b1ab93171161018a578063b1ab931714610b27578063b2a3fb2b14610b54578063b3f9ea3414610b7457600080fd5b8063a22cb46514610ae7578063a9059cbb14610b0757600080fd5b806395d89b4114610a4e578063976a843514610a635780639ac9f48114610a975780639b19251a14610ab757600080fd5b806389fb4c661161021257806389fb4c66146109db5780638a696e50146109f05780638c6d127e14610a105780638da5cb5b14610a3057600080fd5b80637e79d424146109595780637ecebe00146109785780637f121b33146109a5578063811b8b0b146109bb57600080fd5b80633644e51511610369578063504d27fd116102e157806366d003ac116102b057806370a082311161029557806370a08231146108e7578063715018a61461091457806376b39e041461092957600080fd5b806366d003ac146108a75780636dc68fc6146108c757600080fd5b8063504d27fd1461083c5780635ab7e6c7146108525780635b88349d1461087f5780636352211e1461088757600080fd5b806342842e0e116103385780634673901b1161031d5780634673901b146107e65780634d966072146108065780634f02c4201461082657600080fd5b806342842e0e146107a657806346431cb3146107c657600080fd5b80633644e515146106e457806338e21cce146106f95780633af32abf146107325780633d9287fa1461079057600080fd5b806309f0ef65116103fc5780631d37ba31116103cb5780632c4c7316116103b05780632c4c7316146106685780632c4ea2401461067e578063313ce5671461069e57600080fd5b80631d37ba311461062857806323b872dd1461064857600080fd5b806309f0ef65146105ca5780631244c752146105ea57806318160ddd1461060a5780631a0599471461062057600080fd5b8063081812fc11610438578063081812fc14610527578063095ce7c114610575578063095ea7b31461059557806309674eb0146105b557600080fd5b806301ffc9a71461046a57806302519da31461049f57806302fe5305146104e357806306fdde0314610505575b600080fd5b34801561047657600080fd5b5061048a6104853660046139a2565b610de4565b60405190151581526020015b60405180910390f35b3480156104ab57600080fd5b506104d56104ba3660046139d6565b6001600160a01b031660009081526007602052604090205490565b604051908152602001610496565b3480156104ef57600080fd5b506105036104fe366004613a90565b610e4d565b005b34801561051157600080fd5b5061051a610ebb565b6040516104969190613b31565b34801561053357600080fd5b5061055d610542366004613b44565b6009602052600090815260409020546001600160a01b031681565b6040516001600160a01b039091168152602001610496565b34801561058157600080fd5b5061048a6105903660046139d6565b610f49565b3480156105a157600080fd5b5061048a6105b0366004613b5d565b610f91565b3480156105c157600080fd5b506104d5610fca565b3480156105d657600080fd5b5061048a6105e53660046139d6565b610ff4565b3480156105f657600080fd5b50610503610605366004613bd3565b611026565b34801561061657600080fd5b506104d560055481565b61050361114f565b34801561063457600080fd5b50610503610643366004613c25565b6114c2565b34801561065457600080fd5b5061048a610663366004613c40565b6114e4565b34801561067457600080fd5b506104d560135481565b34801561068a57600080fd5b50610503610699366004613bd3565b611521565b3480156106aa57600080fd5b506106d27f000000000000000000000000000000000000000000000000000000000000001281565b60405160ff9091168152602001610496565b3480156106f057600080fd5b506104d5611695565b34801561070557600080fd5b5061048a6107143660046139d6565b6001600160a01b03166000908152600f602052604090205460ff1690565b34801561073e57600080fd5b5061077961074d3660046139d6565b6001600160a01b03166000908152601a6020908152604080832054601b9092529091205460ff90911691565b604080519215158352602083019190915201610496565b34801561079c57600080fd5b506104d560195481565b3480156107b257600080fd5b506105036107c1366004613c40565b6116eb565b3480156107d257600080fd5b506105036107e1366004613c7c565b611706565b3480156107f257600080fd5b5060145461055d906001600160a01b031681565b34801561081257600080fd5b5061048a610821366004613b5d565b611811565b34801561083257600080fd5b506104d560065481565b34801561084857600080fd5b506104d560215481565b34801561085e57600080fd5b506104d561086d3660046139d6565b601b6020526000908152604090205481565b61050361189e565b34801561089357600080fd5b5061055d6108a2366004613b44565b611a3f565b3480156108b357600080fd5b5060185461055d906001600160a01b031681565b3480156108d357600080fd5b5061048a6108e23660046139d6565b611ac2565b3480156108f357600080fd5b506104d56109023660046139d6565b60076020526000908152604090205481565b34801561092057600080fd5b50610503611ccb565b34801561093557600080fd5b5061048a6109443660046139d6565b601e6020526000908152604090205460ff1681565b34801561096557600080fd5b50601f5461048a90610100900460ff1681565b34801561098457600080fd5b506104d56109933660046139d6565b600e6020526000908152604090205481565b3480156109b157600080fd5b506104d560115481565b3480156109c757600080fd5b5060165461055d906001600160a01b031681565b3480156109e757600080fd5b506005546104d5565b3480156109fc57600080fd5b50610503610a0b366004613c25565b611cdf565b348015610a1c57600080fd5b50610503610a2b366004613ca8565b611cec565b348015610a3c57600080fd5b506000546001600160a01b031661055d565b348015610a5a57600080fd5b5061051a611f0d565b348015610a6f57600080fd5b506104d57f0000000000000000000000000000000000000000000000000de0b6b3a764000081565b348015610aa357600080fd5b50610503610ab2366004613bd3565b611f1a565b348015610ac357600080fd5b5061048a610ad23660046139d6565b601a6020526000908152604090205460ff1681565b348015610af357600080fd5b50610503610b02366004613d14565b612085565b348015610b1357600080fd5b5061048a610b22366004613b5d565b612131565b348015610b3357600080fd5b50610b47610b423660046139d6565b612165565b6040516104969190613d79565b348015610b6057600080fd5b50610503610b6f366004613b44565b6121d1565b348015610b8057600080fd5b506104d5610b8f3660046139d6565b6001600160a01b03166000908152600c602052604090205490565b348015610bb657600080fd5b506104d560105481565b348015610bcc57600080fd5b50610503610bdb366004613d8c565b6121de565b348015610bec57600080fd5b506104d5610d0581565b348015610c0257600080fd5b506006546104d5565b348015610c1757600080fd5b50610503610c26366004613d14565b6122f8565b348015610c3757600080fd5b5061051a610c46366004613b44565b61230a565b348015610c5757600080fd5b50601f5461048a9060ff1681565b348015610c7157600080fd5b50610503610c80366004613e08565b61233e565b348015610c9157600080fd5b506104d5601d5481565b348015610ca757600080fd5b5061048a610cb6366004613c40565b6125e7565b348015610cc757600080fd5b506104d5610cd6366004613e7b565b600860209081526000928352604080842090915290825290205481565b348015610cff57600080fd5b50610503610d0e366004613c40565b6126a7565b348015610d1f57600080fd5b50610503610d2e366004613b5d565b612821565b348015610d3f57600080fd5b50610503610d4e366004613c25565b6128e6565b348015610d5f57600080fd5b5061048a610d6e366004613e7b565b600a60209081526000928352604080842090915290825290205460ff1681565b348015610d9a57600080fd5b506104d560125481565b348015610db057600080fd5b50610503610dbf3660046139d6565b612901565b348015610dd057600080fd5b50610b47610ddf366004613ea5565b61298e565b60006001600160e01b031982167fcaf91ff5000000000000000000000000000000000000000000000000000000001480610e4757506001600160e01b031982167f01ffc9a700000000000000000000000000000000000000000000000000000000145b92915050565b610e55612a2b565b6000815111610eab5760405162461bcd60e51b815260206004820152601360248201527f5552492063616e6e6f7420626520656d7074790000000000000000000000000060448201526064015b60405180910390fd5b6020610eb78282613f4f565b5050565b60038054610ec890613ec7565b80601f0160208091040260200160405190810160405280929190818152602001828054610ef490613ec7565b8015610f415780601f10610f1657610100808354040283529160200191610f41565b820191906000526020600020905b815481529060010190602001808311610f2457829003601f168201915b505050505081565b6001600160a01b0381166000908152601a602052604081205460ff1615610f8957506001600160a01b03166000908152601c602052604090205460ff1690565b506000919050565b6000610f9c82612a85565b15610fb057610fab8383612821565b610fc1565b610fba8383611811565b9050610e47565b50600192915050565b6000610fef6001546001600160801b03808216600160801b9092048116919091031690565b905090565b60006001600160a01b0382161580610e475750506001600160a01b03166000908152600d602052604090205460ff1690565b61102e612a2b565b60005b8181101561114a57601e600084848481811061104f5761104f61400f565b905060200201602081019061106491906139d6565b6001600160a01b0316815260208101919091526040016000205460ff1615611138576000601e600085858581811061109e5761109e61400f565b90506020020160208101906110b391906139d6565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790558282828181106110ed576110ed61400f565b905060200201602081019061110291906139d6565b6001600160a01b03167fde8cf212af7ce38b2840785a2768d97ff2dbf3c21b516961cec0061e134c2a1e60405160405180910390a25b806111428161403b565b915050611031565b505050565b601f5460ff166111a15760405162461bcd60e51b815260206004820152601060248201527f4d696e74206973206e6f74206f70656e000000000000000000000000000000006044820152606401610ea2565b60125460055411156111f55760405162461bcd60e51b815260206004820152601660248201527f4d6178206d696e74206c696d69742072656163686564000000000000000000006044820152606401610ea2565b336000908152600f602052604090205460ff16156112555760405162461bcd60e51b815260206004820152600e60248201527f416c7265616479206d696e7465640000000000000000000000000000000000006044820152606401610ea2565b336000908152601e602052604090205460ff16156112b1576112ac3361129c7f0000000000000000000000000000000000000000000000000000000000000012600a614138565b6112a7906001614147565b612a9c565b611468565b6112ba33611ac2565b1561146857601154601d546013546112d2919061415e565b6112dc919061415e565b6010541061132c5760405162461bcd60e51b815260206004820152601d60248201527f4d617820766f79616765206d696e74206c696d697420726561636865640000006044820152606401610ea2565b602154341461137d5760405162461bcd60e51b815260206004820152601a60248201527f4d7573742073656e642074686520657861637420616d6f756e740000000000006044820152606401610ea2565b6018546021546040516000926001600160a01b031691908381818185875af1925050503d80600081146113cc576040519150601f19603f3d011682016040523d82523d6000602084013e6113d1565b606091505b50509050806114225760405162461bcd60e51b815260206004820152600f60248201527f5472616e73666572206661696c656400000000000000000000000000000000006044820152606401610ea2565b6114513361129c7f0000000000000000000000000000000000000000000000000000000000000012600a614138565b601080549060006114618361403b565b9190505550505b336000818152600f602052604090819020805460ff1916600117905560065490517f30385c845b448a36257a6a1716e6ad2e1bc2cbe333cde1e69fe849ad6511adfe916114b89190815260200190565b60405180910390a2565b6114ca612a2b565b601f80549115156101000261ff0019909216919091179055565b60006114ef82612a85565b15611504576114ff8484846126a7565b611516565b61150f8484846125e7565b905061151a565b5060015b9392505050565b611529612a2b565b60005b8181101561114a57601e600084848481811061154a5761154a61400f565b905060200201602081019061155f91906139d6565b6001600160a01b0316815260208101919091526040016000205460ff1661159657601d80549060006115908361403b565b91905055505b6001601e60008585858181106115ae576115ae61400f565b90506020020160208101906115c391906139d6565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790558282828181106115fd576115fd61400f565b905060200201602081019061161291906139d6565b6001600160a01b03167f0311b094eb4c9ca217baa6a12f4c5070445cbbcc04a28fbb8072147b9cdcd0276116677f0000000000000000000000000000000000000000000000000000000000000012600a614138565b611672906001614147565b60405190815260200160405180910390a28061168d8161403b565b91505061152c565b60007f000000000000000000000000000000000000000000000000000000000000e70846146116c657610fef612b06565b507f01bd07558ef0ea01794fdda9ffe5bef8dfd70d80aad915c394bff4e18ea24f8690565b61114a838383604051806020016040528060008152506121de565b61170e612a2b565b478083111561175f5760405162461bcd60e51b815260206004820152600f60248201527f7472616e73666572206661696c656400000000000000000000000000000000006044820152606401610ea2565b600083116117d55760405162461bcd60e51b815260206004820152602d60248201527f72656d6f7665206c697175696469747920616d6f756e742073686f756c64206260448201527f65206d6f7265207468616e2030000000000000000000000000000000000000006064820152608401610ea2565b6040516001600160a01b0383169084156108fc029085906000818181858888f1935050505015801561180b573d6000803e3d6000fd5b50505050565b60006001600160a01b03831661183a57604051635461585f60e01b815260040160405180910390fd5b3360008181526008602090815260408083206001600160a01b03881680855290835292819020869055518581529192917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350600192915050565b601f54610100900460ff166118f55760405162461bcd60e51b815260206004820152601960248201527f436c61696d2061697264726f70206973206e6f74206f70656e000000000000006044820152606401610ea2565b60125460055411156119495760405162461bcd60e51b815260206004820152601660248201527f4d6178206d696e74206c696d69742072656163686564000000000000000000006044820152606401610ea2565b336000908152601c602052604090205460ff16156119a95760405162461bcd60e51b815260206004820152600e60248201527f416c7265616479206d696e7465640000000000000000000000000000000000006044820152606401610ea2565b336000908152601a602052604090205460ff16156119db57336000818152601b60205260409020546119db9190612a9c565b336000818152601c602090815260408083208054600160ff1991821617909155601a835281842080549091169055601b8252918290205491519182527fcebbbce55cb558a80c89a83b5e23dca5186979853be88c28e9e01232c7fdc98b91016114b8565b6000818152600b60205260409020546001600160a01b0316611a6082612a85565b611a7d576040516307ed98ed60e31b815260040160405180910390fd5b6001600160a01b038116611abd576040517fc5723b5100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b919050565b600080611ad0600584612ba0565b90506000611ade6005612c31565b6015546040517f4e1273f40000000000000000000000000000000000000000000000000000000081529192506000916001600160a01b0390911690634e1273f490611b2f9086908690600401614171565b600060405180830381865afa158015611b4c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611b7491908101906141d1565b905082518151141580611b8957508151815114155b15611bd65760405162461bcd60e51b815260206004820152601560248201527f496e76616c696420696e707574206c656e6774687300000000000000000000006044820152606401610ea2565b60005b8151811015611cbf576000828281518110611bf657611bf661400f565b60200260200101511115611cad576017546040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b03888116600483015260009216906370a0823190602401602060405180830381865afa158015611c68573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c8c9190614277565b905068056bc75e2d631000008110611cab575060019695505050505050565b505b80611cb78161403b565b915050611bd9565b50600095945050505050565b611cd3612a2b565b611cdd6000612cc6565b565b611ce93382612d16565b50565b611cf4612a2b565b60005b83811015611f0657601a6000868684818110611d1557611d1561400f565b9050602002016020810190611d2a91906139d6565b6001600160a01b0316815260208101919091526040016000205460ff16611d615760198054906000611d5b8361403b565b91905055505b6001601a6000878785818110611d7957611d7961400f565b9050602002016020810190611d8e91906139d6565b6001600160a01b031681526020810191909152604001600020805460ff1916911515919091179055828282818110611dc857611dc861400f565b90506020020135601b6000878785818110611de557611de561400f565b9050602002016020810190611dfa91906139d6565b6001600160a01b03166001600160a01b03168152602001908152602001600020819055506000601c6000878785818110611e3657611e3661400f565b9050602002016020810190611e4b91906139d6565b6001600160a01b031681526020810191909152604001600020805460ff1916911515919091179055848482818110611e8557611e8561400f565b9050602002016020810190611e9a91906139d6565b6001600160a01b03167f0311b094eb4c9ca217baa6a12f4c5070445cbbcc04a28fbb8072147b9cdcd027848484818110611ed657611ed661400f565b90506020020135604051611eec91815260200190565b60405180910390a280611efe8161403b565b915050611cf7565b5050505050565b60048054610ec890613ec7565b611f22612a2b565b60005b8181101561114a57601a6000848484818110611f4357611f4361400f565b9050602002016020810190611f5891906139d6565b6001600160a01b0316815260208101919091526040016000205460ff1615612073576000601a6000858585818110611f9257611f9261400f565b9050602002016020810190611fa791906139d6565b6001600160a01b0316815260208101919091526040016000908120805460ff191692151592909217909155601b81858585818110611fe757611fe761400f565b9050602002016020810190611ffc91906139d6565b6001600160a01b031681526020810191909152604001600020558282828181106120285761202861400f565b905060200201602081019061203d91906139d6565b6001600160a01b03167fde8cf212af7ce38b2840785a2768d97ff2dbf3c21b516961cec0061e134c2a1e60405160405180910390a25b8061207d8161403b565b915050611f25565b6001600160a01b0382166120c5576040517fccea9e6f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000818152600a602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b60006001600160a01b03831661215a57604051634e46966960e11b815260040160405180910390fd5b61151a338484612d9e565b6001600160a01b0381166000908152600c60209081526040918290208054835181840281018401909452808452606093928301828280156121c557602002820191906000526020600020905b8154815260200190600101908083116121b1575b50505050509050919050565b6121d9612a2b565b602155565b6121e782612a85565b612204576040516307ed98ed60e31b815260040160405180910390fd5b61220f8484846114e4565b506001600160a01b0383163b158015906122c157506040517f150b7a0200000000000000000000000000000000000000000000000000000000808252906001600160a01b0385169063150b7a0290612271903390899088908890600401614290565b6020604051808303816000875af1158015612290573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122b491906142c2565b6001600160e01b03191614155b1561180b576040517f3da6393100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612300612a2b565b610eb78282612d16565b6060602061231783613114565b604051602001612328929190614352565b6040516020818303038152906040529050919050565b42841015612378576040517f05787bdf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61238185612a85565b156123b8576040517f1f3e0de800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0386166123df57604051635461585f60e01b815260040160405180910390fd5b600060016123eb611695565b6001600160a01b038a81166000818152600e602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98184015280840194909452938d166060840152608083018c905260a083019390935260c08083018b90528151808403909101815260e0830190915280519201919091207f19010000000000000000000000000000000000000000000000000000000000006101008301526101028201929092526101228101919091526101420160408051601f198184030181528282528051602091820120600084529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa158015612512573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811615806125475750876001600160a01b0316816001600160a01b031614155b1561257e576040517f815e1d6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0390811660009081526008602090815260408083208a8516808552908352928190208990555188815291928a16917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350505050505050565b60006001600160a01b03841661261057604051636edaef2f60e11b815260040160405180910390fd5b6001600160a01b03831661263757604051634e46966960e11b815260040160405180910390fd5b6001600160a01b038416600090815260086020908152604080832033845290915290205460001981146126935761266e838261415e565b6001600160a01b03861660009081526008602090815260408083203384529091529020555b61269e858585612d9e565b95945050505050565b6001600160a01b0383166126ce57604051636edaef2f60e11b815260040160405180910390fd5b6001600160a01b0382166126f557604051634e46966960e11b815260040160405180910390fd5b6000818152600b60205260409020546001600160a01b0384811691161461272e576040516282b42960e81b815260040160405180910390fd5b336001600160a01b0384161480159061276b57506001600160a01b0383166000908152600a6020908152604080832033845290915290205460ff16155b801561278e57506000818152600960205260409020546001600160a01b03163314155b156127ab576040516282b42960e81b815260040160405180910390fd5b6127b482610ff4565b156127eb576040517f5ce7539700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61281683837f0000000000000000000000000000000000000000000000000de0b6b3a76400006131b4565b61114a838383613270565b6000818152600b60205260409020546001600160a01b031633811480159061286d57506001600160a01b0381166000908152600a6020908152604080832033845290915290205460ff16155b1561288a576040516282b42960e81b815260040160405180910390fd5b60008281526009602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6128ee612a2b565b601f805460ff1916911515919091179055565b612909612a2b565b6001600160a01b0381166129855760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610ea2565b611ce981612cc6565b606060008267ffffffffffffffff8111156129ab576129ab6139f1565b6040519080825280602002602001820160405280156129d4578160200160208202803683370190505b509050835b6129e38486614377565b811015612a23576129f5600182613448565b82612a00878461415e565b81518110612a1057612a1061400f565b60209081029190910101526001016129d9565b509392505050565b6000546001600160a01b03163314611cdd5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ea2565b600060018210158015610e47575050610d05101590565b6001600160a01b038216612ac357604051634e46966960e11b815260040160405180910390fd5b68b4aeaab10258f4000081600554612adb9190614377565b1115612afa5760405163303b682f60e01b815260040160405180910390fd5b61114a60008383612d9e565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6003604051612b38919061438a565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b606060008367ffffffffffffffff811115612bbd57612bbd6139f1565b604051908082528060200260200182016040528015612be6578160200160208202803683370190505b50905060005b84811015612a235783828281518110612c0757612c0761400f565b6001600160a01b039092166020928302919091019091015280612c298161403b565b915050612bec565b606060008267ffffffffffffffff811115612c4e57612c4e6139f1565b604051908082528060200260200182016040528015612c77578160200160208202803683370190505b50905060005b83811015612cbf57612c90816001614377565b828281518110612ca257612ca261400f565b602090810291909101015280612cb78161403b565b915050612c7d565b5092915050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038216612d56576040517fa41e3d3f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8015612d6a57612d65826134cc565b612d73565b612d7382613500565b6001600160a01b03919091166000908152600d60205260409020805460ff1916911515919091179055565b6001600160a01b03838116600090815260076020526040808220549285168252812054909190612dcf8686866131b4565b6000612dda87610ff4565b90506000612de787610ff4565b9050818015612df35750805b613106578115612e9c576000612e297f0000000000000000000000000000000000000000000000000de0b6b3a764000085614396565b6001600160a01b038916600090815260076020526040902054612e6d907f0000000000000000000000000000000000000000000000000de0b6b3a764000090614396565b612e77919061415e565b905060005b81811015612e9557612e8d8961358e565b600101612e7c565b5050613106565b8015612f38576001600160a01b038816600090815260076020526040812054612ee6907f0000000000000000000000000000000000000000000000000de0b6b3a764000090614396565b612f107f0000000000000000000000000000000000000000000000000de0b6b3a764000087614396565b612f1a919061415e565b905060005b81811015612e9557612f308a613680565b600101612f1f565b6000612f647f0000000000000000000000000000000000000000000000000de0b6b3a764000088614396565b905060005b81811015612fe7576001600160a01b038a166000908152600c6020526040812054612f969060019061415e565b6001600160a01b038c166000908152600c602052604081208054929350909183908110612fc557612fc561400f565b90600052602060002001549050612fdd8c8c83613270565b5050600101612f69565b50807f0000000000000000000000000000000000000000000000000de0b6b3a76400006130298b6001600160a01b031660009081526007602052604090205490565b6130339190614396565b61305d7f0000000000000000000000000000000000000000000000000de0b6b3a764000088614396565b613067919061415e565b11156130765761307689613680565b806130a17f0000000000000000000000000000000000000000000000000de0b6b3a764000086614396565b7f0000000000000000000000000000000000000000000000000de0b6b3a76400006130e18b6001600160a01b031660009081526007602052604090205490565b6130eb9190614396565b6130f5919061415e565b1115613104576131048861358e565b505b506001979650505050505050565b6060600061312183613701565b600101905060008167ffffffffffffffff811115613141576131416139f1565b6040519080825280601f01601f19166020018201604052801561316b576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a850494508461317557509392505050565b6001600160a01b0383166131df5780600560008282546131d49190614377565b9091555061320d9050565b6001600160a01b0383166000908152600760205260408120805483929061320790849061415e565b90915550505b6001600160a01b03808316600081815260076020526040908190208054850190555190918516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906132639085815260200190565b60405180910390a3505050565b6001600160a01b0383161561337b57600081815260096020908152604080832080546001600160a01b03191690556001600160a01b0386168352600c909152812080546132bf9060019061415e565b815481106132cf576132cf61400f565b9060005260206000200154905081811461333c576000828152600b602052604081205460a01c6001600160a01b0386166000908152600c6020526040902080549192508391839081106133245761332461400f565b60009182526020909120015561333a82826137e3565b505b6001600160a01b0384166000908152600c60205260409020805480613363576133636143b8565b60019003818190600052602060002001600090559055505b6001600160a01b038216156133f2576000818152600b6020908152604080832080546001600160a01b0319166001600160a01b038716908101909155808452600c835290832080546001818101835582865293852001859055925290546133ed9183916133e8919061415e565b6137e3565b613402565b6000818152600b60205260408120555b80826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b600061346c83546001600160801b03808216600160801b9092048116919091031690565b82106134a4576040517f580821e700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5081546001600160801b03908116820116600090815260018301602052604090205492915050565b6001600160a01b0381166000908152600c6020526040812054905b8181101561114a576134f883613680565b6001016134e7565b6001600160a01b038116600090815260076020526040812054613544907f0000000000000000000000000000000000000000000000000de0b6b3a764000090614396565b90506000613567836001600160a01b03166000908152600c602052604090205490565b905060005b613576828461415e565b81101561180b576135868461358e565b60010161356c565b6001600160a01b0381166135b557604051634e46966960e11b815260040160405180910390fd5b60006135d5600154600160801b81046001600160801b0390811691161490565b6135ea576135e36001613868565b9050613625565b6006600081546135f99061403b565b909155506006546001016136205760405163303b682f60e01b815260040160405180910390fd5b506006545b6000818152600b60205260409020546001600160a01b03168015613675576040517f23369fa600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61114a818484613270565b6001600160a01b0381166136a757604051636edaef2f60e11b815260040160405180910390fd5b6001600160a01b0381166000908152600c6020526040812080546136cd9060019061415e565b815481106136dd576136dd61400f565b906000526020600020015490506136f682600083613270565b610eb76001826138f1565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000831061374a577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef81000000008310613776576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061379457662386f26fc10000830492506010015b6305f5e10083106137ac576305f5e100830492506008015b61271083106137c057612710830492506004015b606483106137d2576064830492506002015b600a8310610e475760010192915050565b6000828152600b60205260409020546bffffffffffffffffffffffff821115613838576040517ffcb3438c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000928352600b60205260409092206001600160a01b039290921660a09190911b6001600160a01b031916019055565b80546000906001600160801b03600160801b82048116911681036138b8576040517f75e52f4f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600019016001600160801b039081166000818152600185016020526040812080549190558454909216600160801b909102179092555090565b81546001600160801b038082166000190191600160801b9004811690821603613946576040517f8acb5f2700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160801b0316600081815260018401602052604090209190915581547fffffffffffffffffffffffffffffffff0000000000000000000000000000000016179055565b6001600160e01b031981168114611ce957600080fd5b6000602082840312156139b457600080fd5b813561151a8161398c565b80356001600160a01b0381168114611abd57600080fd5b6000602082840312156139e857600080fd5b61151a826139bf565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715613a3057613a306139f1565b604052919050565b600067ffffffffffffffff831115613a5257613a526139f1565b613a65601f8401601f1916602001613a07565b9050828152838383011115613a7957600080fd5b828260208301376000602084830101529392505050565b600060208284031215613aa257600080fd5b813567ffffffffffffffff811115613ab957600080fd5b8201601f81018413613aca57600080fd5b613ad984823560208401613a38565b949350505050565b60005b83811015613afc578181015183820152602001613ae4565b50506000910152565b60008151808452613b1d816020860160208601613ae1565b601f01601f19169290920160200192915050565b60208152600061151a6020830184613b05565b600060208284031215613b5657600080fd5b5035919050565b60008060408385031215613b7057600080fd5b613b79836139bf565b946020939093013593505050565b60008083601f840112613b9957600080fd5b50813567ffffffffffffffff811115613bb157600080fd5b6020830191508360208260051b8501011115613bcc57600080fd5b9250929050565b60008060208385031215613be657600080fd5b823567ffffffffffffffff811115613bfd57600080fd5b613c0985828601613b87565b90969095509350505050565b80358015158114611abd57600080fd5b600060208284031215613c3757600080fd5b61151a82613c15565b600080600060608486031215613c5557600080fd5b613c5e846139bf565b9250613c6c602085016139bf565b9150604084013590509250925092565b60008060408385031215613c8f57600080fd5b82359150613c9f602084016139bf565b90509250929050565b60008060008060408587031215613cbe57600080fd5b843567ffffffffffffffff80821115613cd657600080fd5b613ce288838901613b87565b90965094506020870135915080821115613cfb57600080fd5b50613d0887828801613b87565b95989497509550505050565b60008060408385031215613d2757600080fd5b613d30836139bf565b9150613c9f60208401613c15565b600081518084526020808501945080840160005b83811015613d6e57815187529582019590820190600101613d52565b509495945050505050565b60208152600061151a6020830184613d3e565b60008060008060808587031215613da257600080fd5b613dab856139bf565b9350613db9602086016139bf565b925060408501359150606085013567ffffffffffffffff811115613ddc57600080fd5b8501601f81018713613ded57600080fd5b613dfc87823560208401613a38565b91505092959194509250565b600080600080600080600060e0888a031215613e2357600080fd5b613e2c886139bf565b9650613e3a602089016139bf565b95506040880135945060608801359350608088013560ff81168114613e5e57600080fd5b9699959850939692959460a0840135945060c09093013592915050565b60008060408385031215613e8e57600080fd5b613e97836139bf565b9150613c9f602084016139bf565b60008060408385031215613eb857600080fd5b50508035926020909101359150565b600181811c90821680613edb57607f821691505b602082108103613efb57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561114a57600081815260208120601f850160051c81016020861015613f285750805b601f850160051c820191505b81811015613f4757828155600101613f34565b505050505050565b815167ffffffffffffffff811115613f6957613f696139f1565b613f7d81613f778454613ec7565b84613f01565b602080601f831160018114613fb25760008415613f9a5750858301515b600019600386901b1c1916600185901b178555613f47565b600085815260208120601f198616915b82811015613fe157888601518255948401946001909101908401613fc2565b5085821015613fff5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001820161404d5761404d614025565b5060010190565b600181815b8085111561408f57816000190482111561407557614075614025565b8085161561408257918102915b93841c9390800290614059565b509250929050565b6000826140a657506001610e47565b816140b357506000610e47565b81600181146140c957600281146140d3576140ef565b6001915050610e47565b60ff8411156140e4576140e4614025565b50506001821b610e47565b5060208310610133831016604e8410600b8410161715614112575081810a610e47565b61411c8383614054565b806000190482111561413057614130614025565b029392505050565b600061151a60ff841683614097565b8082028115828204841417610e4757610e47614025565b81810381811115610e4757610e47614025565b604080825283519082018190526000906020906060840190828701845b828110156141b35781516001600160a01b03168452928401929084019060010161418e565b505050838103828501526141c78186613d3e565b9695505050505050565b600060208083850312156141e457600080fd5b825167ffffffffffffffff808211156141fc57600080fd5b818501915085601f83011261421057600080fd5b815181811115614222576142226139f1565b8060051b9150614233848301613a07565b818152918301840191848101908884111561424d57600080fd5b938501935b8385101561426b57845182529385019390850190614252565b98975050505050505050565b60006020828403121561428957600080fd5b5051919050565b60006001600160a01b038087168352808616602084015250836040830152608060608301526141c76080830184613b05565b6000602082840312156142d457600080fd5b815161151a8161398c565b600081546142ec81613ec7565b60018281168015614304576001811461431957614348565b60ff1984168752821515830287019450614348565b8560005260208060002060005b8581101561433f5781548a820152908401908201614326565b50505082870194505b5050505092915050565b600061435e82856142df565b835161436e818360208801613ae1565b01949350505050565b80820180821115610e4757610e47614025565b600061151a82846142df565b6000826143b357634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603160045260246000fdfea26469706673582212207255ab34889360ba29b5a38b4ff01c61ae4c2351da175e7f20865ff1e31fb4b964736f6c63430008140033

Block Transaction Gas Used Reward
view all blocks sequenced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ 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.