Sepolia Testnet

Contract

0x5451be680dAaF017b9F85bd900c724ACa3199cCB

Overview

ETH Balance

0 ETH

Token Holdings

Multichain Info

N/A
Transaction Hash
Method
Block
From
To
Value
Approve57410902024-04-20 20:11:2437 days ago1713643884IN
0x5451be68...Ca3199cCB
0 ETH0.000047981.50045116
Approve57193392024-04-17 17:39:0040 days ago1713375540IN
0x5451be68...Ca3199cCB
0 ETH0.000053221.6642521
Approve57193022024-04-17 17:31:1240 days ago1713375072IN
0x5451be68...Ca3199cCB
0 ETH0.000052081.62866468
Mint56717812024-04-11 1:27:2447 days ago1712798844IN
0x5451be68...Ca3199cCB
0 ETH0.000142011.20072682
Bridge To Frame56473522024-04-07 11:30:0050 days ago1712489400IN
0x5451be68...Ca3199cCB
0.01 ETH0.000405371.50051873
Mint56473392024-04-07 11:27:2450 days ago1712489244IN
0x5451be68...Ca3199cCB
0 ETH0.000177471.50059486
Approve55193232024-03-19 18:53:1269 days ago1710874392IN
0x5451be68...Ca3199cCB
0 ETH0.000057971.81271387
Approve54922882024-03-15 17:20:1273 days ago1710523212IN
0x5451be68...Ca3199cCB
0 ETH0.0023847374.56970757
Approve54847442024-03-14 14:40:0074 days ago1710427200IN
0x5451be68...Ca3199cCB
0 ETH0.0020596564.40457765
Approve54723612024-03-12 18:53:2476 days ago1710269604IN
0x5451be68...Ca3199cCB
0 ETH0.000076182.38227585
Approve54711702024-03-12 14:49:3676 days ago1710254976IN
0x5451be68...Ca3199cCB
0 ETH0.0017601555.03932669
Approve54659902024-03-11 21:01:1277 days ago1710190872IN
0x5451be68...Ca3199cCB
0 ETH0.000051761.6187386
Bridge To Frame52626272024-02-11 2:06:00107 days ago1707617160IN
0x5451be68...Ca3199cCB
0.01 ETH0.0031063911.77988315
Mint52626252024-02-11 2:05:36107 days ago1707617136IN
0x5451be68...Ca3199cCB
0 ETH0.0015704813.27844923
Mint52205962024-02-04 21:37:12113 days ago1707082632IN
0x5451be68...Ca3199cCB
0 ETH0.00070445.9557956
Mint52056752024-02-02 18:04:12115 days ago1706897052IN
0x5451be68...Ca3199cCB
0 ETH0.0016615270.49303848
Bridge To Frame51756182024-01-29 7:08:24120 days ago1706512104IN
0x5451be68...Ca3199cCB
0.01 ETH0.0035355413.63243771
Mint51756152024-01-29 7:07:36120 days ago1706512056IN
0x5451be68...Ca3199cCB
0 ETH0.00161213.62949804
Approve51153992024-01-19 16:52:24129 days ago1705683144IN
0x5451be68...Ca3199cCB
0 ETH0.0029321859.7575
Mint51074592024-01-18 9:57:12131 days ago1705571832IN
0x5451be68...Ca3199cCB
0 ETH0.01478412125
Bridge To Frame50960832024-01-16 11:42:36132 days ago1705405356IN
0x5451be68...Ca3199cCB
0.01 ETH0.03642479140.44756314
Mint50960782024-01-16 11:41:12132 days ago1705405272IN
0x5451be68...Ca3199cCB
0 ETH0.01394037117.86608094
Bridge To Frame50538532024-01-09 14:49:36139 days ago1704811776IN
0x5451be68...Ca3199cCB
0.01 ETH0.008933134.44445325
Mint50538512024-01-09 14:49:12139 days ago1704811752IN
0x5451be68...Ca3199cCB
0 ETH0.0042412835.86012048
Bridge To Frame50170452024-01-04 1:45:48145 days ago1704332748IN
0x5451be68...Ca3199cCB
0.01 ETH0.005286720.38458049
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To Value
56473522024-04-07 11:30:0050 days ago1712489400
0x5451be68...Ca3199cCB
0.01 ETH
52626272024-02-11 2:06:00107 days ago1707617160
0x5451be68...Ca3199cCB
0.01 ETH
51756182024-01-29 7:08:24120 days ago1706512104
0x5451be68...Ca3199cCB
0.01 ETH
50960832024-01-16 11:42:36132 days ago1705405356
0x5451be68...Ca3199cCB
0.01 ETH
50538532024-01-09 14:49:36139 days ago1704811776
0x5451be68...Ca3199cCB
0.01 ETH
50170452024-01-04 1:45:48145 days ago1704332748
0x5451be68...Ca3199cCB
0.01 ETH
49791272023-12-29 8:55:48151 days ago1703840148
0x5451be68...Ca3199cCB
0.01 ETH
49590772023-12-26 4:22:36154 days ago1703564556
0x5451be68...Ca3199cCB
0.1 ETH
49448462023-12-23 20:58:24156 days ago1703365104
0x5451be68...Ca3199cCB
0.01 ETH
49407572023-12-23 4:59:36157 days ago1703307576
0x5451be68...Ca3199cCB
0.01 ETH
49353062023-12-22 8:05:36158 days ago1703232336
0x5451be68...Ca3199cCB
0.01 ETH
49242322023-12-20 15:15:12159 days ago1703085312
0x5451be68...Ca3199cCB
0.01 ETH
49235692023-12-20 12:50:12159 days ago1703076612
0x5451be68...Ca3199cCB
0.01 ETH
49212492023-12-20 4:14:12160 days ago1703045652
0x5451be68...Ca3199cCB
0.01 ETH
49198282023-12-19 22:48:36160 days ago1703026116
0x5451be68...Ca3199cCB
0.01 ETH
49195862023-12-19 21:53:36160 days ago1703022816
0x5451be68...Ca3199cCB
0.01 ETH
49191832023-12-19 20:19:36160 days ago1703017176
0x5451be68...Ca3199cCB
0.01 ETH
49189662023-12-19 19:30:24160 days ago1703014224
0x5451be68...Ca3199cCB
0.01 ETH
49189552023-12-19 19:27:36160 days ago1703014056
0x5451be68...Ca3199cCB
0.01 ETH
49187652023-12-19 18:46:00160 days ago1703011560
0x5451be68...Ca3199cCB
0.01 ETH
49186392023-12-19 18:18:24160 days ago1703009904
0x5451be68...Ca3199cCB
0.01 ETH
49186222023-12-19 18:14:48160 days ago1703009688
0x5451be68...Ca3199cCB
0.01 ETH
49185752023-12-19 18:04:12160 days ago1703009052
0x5451be68...Ca3199cCB
0.01 ETH
49185452023-12-19 17:58:00160 days ago1703008680
0x5451be68...Ca3199cCB
0.01 ETH
49182522023-12-19 16:50:36160 days ago1703004636
0x5451be68...Ca3199cCB
0.01 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
FrameLayerZeroNFT_Sepolia

Compiler Version
v0.8.22+commit.4fc1097e

Optimization Enabled:
No with 200 runs

Other Settings:
paris EvmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 20 : FrameLayerZeroNFT_Sepolia.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.22;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "./interfaces/ILayerZeroEndpoint.sol";
import "./interfaces/ILayerZeroReceiver.sol";
import "./NonblockingLzApp.sol";

error InsufficientGas();
error AlreadyMinted();
error TokenDoesNotExist();
error OneWayBridge();
error Soulbound();

contract FrameLayerZeroNFT_Sepolia is Ownable, ERC721, NonblockingLzApp {
    enum STATUS {
        NEITHER,
        MINTED,
        BRIDGED
    }

    // user has minted
    mapping(address => uint256) public minted;

    // token exists
    mapping(uint256 => bool) public exists;

    // user has initiated bridge
    mapping(address => bool) public bridged;

    // start ID will be 1
    uint256 public currentTokenId = 1;

    string private _tokenURI;

    uint16 public constant FRAME_CHAIN_ID = 10222;

    constructor(
        address _endpoint,
        string memory _uri
    )
        ERC721("Frame LayerZero Testnet NFT", "FLZTNFT")
        NonblockingLzApp(_endpoint)
        Ownable(msg.sender)
    {
        _tokenURI = _uri;
    }

    function mint() external returns (uint256) {
        if (minted[msg.sender] != 0) revert AlreadyMinted();

        uint256 cached = currentTokenId;

        exists[cached] = true;
        minted[msg.sender] = cached;

        _mint(msg.sender, cached);

        // will return then increment
        return currentTokenId++;
    }

    function bridgeToFrame() public payable {
        uint256 tokenId = minted[msg.sender];

        exists[tokenId] = false;
        _burn(tokenId);

        bytes memory payload = abi.encode(msg.sender, tokenId);
        uint16 version = 1;
        uint256 gasForLzReceive = 350000;
        bytes memory adapterParams = abi.encodePacked(version, gasForLzReceive);

        (uint256 messageFee, ) = lzEndpoint.estimateFees(
            FRAME_CHAIN_ID,
            address(this),
            payload,
            false,
            adapterParams
        );
        if (msg.value <= messageFee) revert InsufficientGas();

        // bridged
        bridged[msg.sender] = true;

        _lzSend(
            FRAME_CHAIN_ID,
            payload,
            payable(msg.sender),
            address(0x0),
            adapterParams,
            msg.value
        );
    }

    function _nonblockingLzReceive(
        uint16 _srcChainId,
        bytes memory _srcAddress,
        uint64 /*_nonce*/,
        bytes memory _payload
    ) internal override {
        revert OneWayBridge();
    }

    // Endpoint.sol estimateFees() returns the fees for the message
    function estimateFees() external view returns (uint256) {
        bytes memory payload = abi.encode(msg.sender, 1); // Use arbitrary token id
        uint16 version = 1;
        uint256 gasForLzReceive = 350000;
        bytes memory adapterParams = abi.encodePacked(version, gasForLzReceive);

        (uint256 messageFee, ) = lzEndpoint.estimateFees(
            FRAME_CHAIN_ID,
            address(this),
            payload,
            false,
            adapterParams
        );
        return messageFee;
    }

    function updateUri(string calldata _uri) external onlyOwner {
        _tokenURI = _uri;
    }

    function status(address addr) external view returns (STATUS) {
        if (bridged[addr]) return STATUS.BRIDGED;

        if (minted[addr] > 0) return STATUS.MINTED;

        return STATUS.NEITHER;
    }

    function tokenURI(
        uint256 tokenId
    ) public view override returns (string memory) {
        if (!exists[tokenId]) revert TokenDoesNotExist();

        return _tokenURI;
    }

    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public override {
        revert Soulbound();
    }
}

File 2 of 20 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.20;

import {Context} from "../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.
 *
 * The initial owner is set to the address provided by the deployer. 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;

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    constructor(address initialOwner) {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

    /**
     * @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 {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

    /**
     * @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 {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _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 20 : draft-IERC6093.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)
pragma solidity ^0.8.20;

/**
 * @dev Standard ERC20 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.
 */
interface IERC20Errors {
    /**
     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param balance Current balance for the interacting account.
     * @param needed Minimum amount required to perform a transfer.
     */
    error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC20InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC20InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.
     * @param spender Address that may be allowed to operate on tokens without being their owner.
     * @param allowance Amount of tokens a `spender` is allowed to operate with.
     * @param needed Minimum amount required to perform a transfer.
     */
    error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC20InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `spender` to be approved. Used in approvals.
     * @param spender Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC20InvalidSpender(address spender);
}

/**
 * @dev Standard ERC721 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens.
 */
interface IERC721Errors {
    /**
     * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20.
     * Used in balance queries.
     * @param owner Address of the current owner of a token.
     */
    error ERC721InvalidOwner(address owner);

    /**
     * @dev Indicates a `tokenId` whose `owner` is the zero address.
     * @param tokenId Identifier number of a token.
     */
    error ERC721NonexistentToken(uint256 tokenId);

    /**
     * @dev Indicates an error related to the ownership over a particular token. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param tokenId Identifier number of a token.
     * @param owner Address of the current owner of a token.
     */
    error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC721InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC721InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `operator`’s approval. Used in transfers.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     * @param tokenId Identifier number of a token.
     */
    error ERC721InsufficientApproval(address operator, uint256 tokenId);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC721InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `operator` to be approved. Used in approvals.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC721InvalidOperator(address operator);
}

/**
 * @dev Standard ERC1155 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens.
 */
interface IERC1155Errors {
    /**
     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param balance Current balance for the interacting account.
     * @param needed Minimum amount required to perform a transfer.
     * @param tokenId Identifier number of a token.
     */
    error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC1155InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC1155InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `operator`’s approval. Used in transfers.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     * @param owner Address of the current owner of a token.
     */
    error ERC1155MissingApprovalForAll(address operator, address owner);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC1155InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `operator` to be approved. Used in approvals.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC1155InvalidOperator(address operator);

    /**
     * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.
     * Used in batch transfers.
     * @param idsLength Length of the array of token identifiers
     * @param valuesLength Length of the array of token amounts
     */
    error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);
}

File 4 of 20 : ERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/ERC721.sol)

pragma solidity ^0.8.20;

import {IERC721} from "./IERC721.sol";
import {IERC721Receiver} from "./IERC721Receiver.sol";
import {IERC721Metadata} from "./extensions/IERC721Metadata.sol";
import {Context} from "../../utils/Context.sol";
import {Strings} from "../../utils/Strings.sol";
import {IERC165, ERC165} from "../../utils/introspection/ERC165.sol";
import {IERC721Errors} from "../../interfaces/draft-IERC6093.sol";

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension, but not including the Enumerable extension, which is available separately as
 * {ERC721Enumerable}.
 */
abstract contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Errors {
    using Strings for uint256;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    mapping(uint256 tokenId => address) private _owners;

    mapping(address owner => uint256) private _balances;

    mapping(uint256 tokenId => address) private _tokenApprovals;

    mapping(address owner => mapping(address operator => bool)) private _operatorApprovals;

    /**
     * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return
            interfaceId == type(IERC721).interfaceId ||
            interfaceId == type(IERC721Metadata).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view virtual returns (uint256) {
        if (owner == address(0)) {
            revert ERC721InvalidOwner(address(0));
        }
        return _balances[owner];
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view virtual returns (address) {
        return _requireOwned(tokenId);
    }

    /**
     * @dev See {IERC721Metadata-name}.
     */
    function name() public view virtual returns (string memory) {
        return _name;
    }

    /**
     * @dev See {IERC721Metadata-symbol}.
     */
    function symbol() public view virtual returns (string memory) {
        return _symbol;
    }

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual returns (string memory) {
        _requireOwned(tokenId);

        string memory baseURI = _baseURI();
        return bytes(baseURI).length > 0 ? string.concat(baseURI, tokenId.toString()) : "";
    }

    /**
     * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
     * token will be the concatenation of the `baseURI` and the `tokenId`. Empty
     * by default, can be overridden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return "";
    }

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public virtual {
        _approve(to, tokenId, _msgSender());
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view virtual returns (address) {
        _requireOwned(tokenId);

        return _getApproved(tokenId);
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual {
        _setApprovalForAll(_msgSender(), operator, approved);
    }

    /**
     * @dev See {IERC721-isApprovedForAll}.
     */
    function isApprovedForAll(address owner, address operator) public view virtual returns (bool) {
        return _operatorApprovals[owner][operator];
    }

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(address from, address to, uint256 tokenId) public virtual {
        if (to == address(0)) {
            revert ERC721InvalidReceiver(address(0));
        }
        // Setting an "auth" arguments enables the `_isAuthorized` check which verifies that the token exists
        // (from != 0). Therefore, it is not needed to verify that the return value is not 0 here.
        address previousOwner = _update(to, tokenId, _msgSender());
        if (previousOwner != from) {
            revert ERC721IncorrectOwner(from, tokenId, previousOwner);
        }
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(address from, address to, uint256 tokenId) public {
        safeTransferFrom(from, to, tokenId, "");
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual {
        transferFrom(from, to, tokenId);
        _checkOnERC721Received(from, to, tokenId, data);
    }

    /**
     * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist
     *
     * IMPORTANT: Any overrides to this function that add ownership of tokens not tracked by the
     * core ERC721 logic MUST be matched with the use of {_increaseBalance} to keep balances
     * consistent with ownership. The invariant to preserve is that for any address `a` the value returned by
     * `balanceOf(a)` must be equal to the number of tokens such that `_ownerOf(tokenId)` is `a`.
     */
    function _ownerOf(uint256 tokenId) internal view virtual returns (address) {
        return _owners[tokenId];
    }

    /**
     * @dev Returns the approved address for `tokenId`. Returns 0 if `tokenId` is not minted.
     */
    function _getApproved(uint256 tokenId) internal view virtual returns (address) {
        return _tokenApprovals[tokenId];
    }

    /**
     * @dev Returns whether `spender` is allowed to manage `owner`'s tokens, or `tokenId` in
     * particular (ignoring whether it is owned by `owner`).
     *
     * WARNING: This function assumes that `owner` is the actual owner of `tokenId` and does not verify this
     * assumption.
     */
    function _isAuthorized(address owner, address spender, uint256 tokenId) internal view virtual returns (bool) {
        return
            spender != address(0) &&
            (owner == spender || isApprovedForAll(owner, spender) || _getApproved(tokenId) == spender);
    }

    /**
     * @dev Checks if `spender` can operate on `tokenId`, assuming the provided `owner` is the actual owner.
     * Reverts if `spender` does not have approval from the provided `owner` for the given token or for all its assets
     * the `spender` for the specific `tokenId`.
     *
     * WARNING: This function assumes that `owner` is the actual owner of `tokenId` and does not verify this
     * assumption.
     */
    function _checkAuthorized(address owner, address spender, uint256 tokenId) internal view virtual {
        if (!_isAuthorized(owner, spender, tokenId)) {
            if (owner == address(0)) {
                revert ERC721NonexistentToken(tokenId);
            } else {
                revert ERC721InsufficientApproval(spender, tokenId);
            }
        }
    }

    /**
     * @dev Unsafe write access to the balances, used by extensions that "mint" tokens using an {ownerOf} override.
     *
     * NOTE: the value is limited to type(uint128).max. This protect against _balance overflow. It is unrealistic that
     * a uint256 would ever overflow from increments when these increments are bounded to uint128 values.
     *
     * WARNING: Increasing an account's balance using this function tends to be paired with an override of the
     * {_ownerOf} function to resolve the ownership of the corresponding tokens so that balances and ownership
     * remain consistent with one another.
     */
    function _increaseBalance(address account, uint128 value) internal virtual {
        unchecked {
            _balances[account] += value;
        }
    }

    /**
     * @dev Transfers `tokenId` from its current owner to `to`, or alternatively mints (or burns) if the current owner
     * (or `to`) is the zero address. Returns the owner of the `tokenId` before the update.
     *
     * The `auth` argument is optional. If the value passed is non 0, then this function will check that
     * `auth` is either the owner of the token, or approved to operate on the token (by the owner).
     *
     * Emits a {Transfer} event.
     *
     * NOTE: If overriding this function in a way that tracks balances, see also {_increaseBalance}.
     */
    function _update(address to, uint256 tokenId, address auth) internal virtual returns (address) {
        address from = _ownerOf(tokenId);

        // Perform (optional) operator check
        if (auth != address(0)) {
            _checkAuthorized(from, auth, tokenId);
        }

        // Execute the update
        if (from != address(0)) {
            // Clear approval. No need to re-authorize or emit the Approval event
            _approve(address(0), tokenId, address(0), false);

            unchecked {
                _balances[from] -= 1;
            }
        }

        if (to != address(0)) {
            unchecked {
                _balances[to] += 1;
            }
        }

        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);

        return from;
    }

    /**
     * @dev Mints `tokenId` and transfers it to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - `to` cannot be the zero address.
     *
     * Emits a {Transfer} event.
     */
    function _mint(address to, uint256 tokenId) internal {
        if (to == address(0)) {
            revert ERC721InvalidReceiver(address(0));
        }
        address previousOwner = _update(to, tokenId, address(0));
        if (previousOwner != address(0)) {
            revert ERC721InvalidSender(address(0));
        }
    }

    /**
     * @dev Mints `tokenId`, transfers it to `to` and checks for `to` acceptance.
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(address to, uint256 tokenId) internal {
        _safeMint(to, tokenId, "");
    }

    /**
     * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
     * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
     */
    function _safeMint(address to, uint256 tokenId, bytes memory data) internal virtual {
        _mint(to, tokenId);
        _checkOnERC721Received(address(0), to, tokenId, data);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     * This is an internal function that does not check if the sender is authorized to operate on the token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal {
        address previousOwner = _update(address(0), tokenId, address(0));
        if (previousOwner == address(0)) {
            revert ERC721NonexistentToken(tokenId);
        }
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *  As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function _transfer(address from, address to, uint256 tokenId) internal {
        if (to == address(0)) {
            revert ERC721InvalidReceiver(address(0));
        }
        address previousOwner = _update(to, tokenId, address(0));
        if (previousOwner == address(0)) {
            revert ERC721NonexistentToken(tokenId);
        } else if (previousOwner != from) {
            revert ERC721IncorrectOwner(from, tokenId, previousOwner);
        }
    }

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking that contract recipients
     * are aware of the ERC721 standard to prevent tokens from being forever locked.
     *
     * `data` is additional data, it has no specified format and it is sent in call to `to`.
     *
     * This internal function is like {safeTransferFrom} in the sense that it invokes
     * {IERC721Receiver-onERC721Received} on the receiver, and can be used to e.g.
     * implement alternative mechanisms to perform token transfer, such as signature-based.
     *
     * Requirements:
     *
     * - `tokenId` token must exist and be owned by `from`.
     * - `to` cannot be the zero address.
     * - `from` cannot be the zero address.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeTransfer(address from, address to, uint256 tokenId) internal {
        _safeTransfer(from, to, tokenId, "");
    }

    /**
     * @dev Same as {xref-ERC721-_safeTransfer-address-address-uint256-}[`_safeTransfer`], with an additional `data` parameter which is
     * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
     */
    function _safeTransfer(address from, address to, uint256 tokenId, bytes memory data) internal virtual {
        _transfer(from, to, tokenId);
        _checkOnERC721Received(from, to, tokenId, data);
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * The `auth` argument is optional. If the value passed is non 0, then this function will check that `auth` is
     * either the owner of the token, or approved to operate on all tokens held by this owner.
     *
     * Emits an {Approval} event.
     *
     * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.
     */
    function _approve(address to, uint256 tokenId, address auth) internal {
        _approve(to, tokenId, auth, true);
    }

    /**
     * @dev Variant of `_approve` with an optional flag to enable or disable the {Approval} event. The event is not
     * emitted in the context of transfers.
     */
    function _approve(address to, uint256 tokenId, address auth, bool emitEvent) internal virtual {
        // Avoid reading the owner unless necessary
        if (emitEvent || auth != address(0)) {
            address owner = _requireOwned(tokenId);

            // We do not use _isAuthorized because single-token approvals should not be able to call approve
            if (auth != address(0) && owner != auth && !isApprovedForAll(owner, auth)) {
                revert ERC721InvalidApprover(auth);
            }

            if (emitEvent) {
                emit Approval(owner, to, tokenId);
            }
        }

        _tokenApprovals[tokenId] = to;
    }

    /**
     * @dev Approve `operator` to operate on all of `owner` tokens
     *
     * Requirements:
     * - operator can't be the address zero.
     *
     * Emits an {ApprovalForAll} event.
     */
    function _setApprovalForAll(address owner, address operator, bool approved) internal virtual {
        if (operator == address(0)) {
            revert ERC721InvalidOperator(operator);
        }
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    /**
     * @dev Reverts if the `tokenId` doesn't have a current owner (it hasn't been minted, or it has been burned).
     * Returns the owner.
     *
     * Overrides to ownership logic should be done to {_ownerOf}.
     */
    function _requireOwned(uint256 tokenId) internal view returns (address) {
        address owner = _ownerOf(tokenId);
        if (owner == address(0)) {
            revert ERC721NonexistentToken(tokenId);
        }
        return owner;
    }

    /**
     * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target address. This will revert if the
     * recipient doesn't accept the token transfer. The call is not executed if the target address is not a contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param data bytes optional data to send along with the call
     */
    function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory data) private {
        if (to.code.length > 0) {
            try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {
                if (retval != IERC721Receiver.onERC721Received.selector) {
                    revert ERC721InvalidReceiver(to);
                }
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert ERC721InvalidReceiver(to);
                } else {
                    /// @solidity memory-safe-assembly
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        }
    }
}

File 5 of 20 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/extensions/IERC721Metadata.sol)

pragma solidity ^0.8.20;

import {IERC721} from "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Metadata is IERC721 {
    /**
     * @dev Returns the token collection name.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the token collection symbol.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) external view returns (string memory);
}

File 6 of 20 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.20;

import {IERC165} from "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon
     *   a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or
     *   {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon
     *   a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(address from, address to, uint256 tokenId) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
     * understand this adds an external call which potentially creates a reentrancy vulnerability.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 tokenId) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the address zero.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);
}

File 7 of 20 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.20;

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

File 8 of 20 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol)

pragma solidity ^0.8.20;

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

File 9 of 20 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol)

pragma solidity ^0.8.20;

import {IERC165} from "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 10 of 20 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)

pragma solidity ^0.8.20;

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

File 11 of 20 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)

pragma solidity ^0.8.20;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    /**
     * @dev Muldiv operation overflow.
     */
    error MathOverflowedMulDiv();

    enum Rounding {
        Floor, // Toward negative infinity
        Ceil, // Toward positive infinity
        Trunc, // Toward zero
        Expand // Away from zero
    }

    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, with an overflow flag.
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @dev Returns the 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 towards infinity instead
     * of rounding towards zero.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        if (b == 0) {
            // Guarantee the same behavior as in a regular Solidity division.
            return a / b;
        }

        // (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 = x * y; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                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.
            if (denominator <= prod1) {
                revert MathOverflowedMulDiv();
            }

            ///////////////////////////////////////////////
            // 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.

            uint256 twos = denominator & (0 - denominator);
            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 (unsignedRoundsUp(rounding) && 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
     * towards zero.
     *
     * 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 + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2 of a positive value rounded towards zero.
     * 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 + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10 of a positive value rounded towards zero.
     * 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 + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256 of a positive value rounded towards zero.
     * 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 + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);
        }
    }

    /**
     * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.
     */
    function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {
        return uint8(rounding) % 2 == 1;
    }
}

File 12 of 20 : SignedMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)

pragma solidity ^0.8.20;

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

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

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

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

File 13 of 20 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)

pragma solidity ^0.8.20;

import {Math} from "./math/Math.sol";
import {SignedMath} from "./math/SignedMath.sol";

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant HEX_DIGITS = "0123456789abcdef";
    uint8 private constant ADDRESS_LENGTH = 20;

    /**
     * @dev The `value` string doesn't fit in the specified `length`.
     */
    error StringsInsufficientHexLength(uint256 value, uint256 length);

    /**
     * @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), HEX_DIGITS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `int256` to its ASCII `string` decimal representation.
     */
    function toStringSigned(int256 value) internal pure returns (string memory) {
        return string.concat(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) {
        uint256 localValue = value;
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = HEX_DIGITS[localValue & 0xf];
            localValue >>= 4;
        }
        if (localValue != 0) {
            revert StringsInsufficientHexLength(value, length);
        }
        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 bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));
    }
}

File 15 of 20 : ILayerZeroEndpoint.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.5.0;

import "./ILayerZeroUserApplicationConfig.sol";

interface ILayerZeroEndpoint is ILayerZeroUserApplicationConfig {
    // @notice send a LayerZero message to the specified address at a LayerZero endpoint.
    // @param _dstChainId - the destination chain identifier
    // @param _destination - the address on destination chain (in bytes). address length/format may vary by chains
    // @param _payload - a custom bytes payload to send to the destination contract
    // @param _refundAddress - if the source transaction is cheaper than the amount of value passed, refund the additional amount to this address
    // @param _zroPaymentAddress - the address of the ZRO token holder who would pay for the transaction
    // @param _adapterParams - parameters for custom functionality. e.g. receive airdropped native gas from the relayer on destination
    function send(
        uint16 _dstChainId,
        bytes calldata _destination,
        bytes calldata _payload,
        address payable _refundAddress,
        address _zroPaymentAddress,
        bytes calldata _adapterParams
    ) external payable;

    // @notice used by the messaging library to publish verified payload
    // @param _srcChainId - the source chain identifier
    // @param _srcAddress - the source contract (as bytes) at the source chain
    // @param _dstAddress - the address on destination chain
    // @param _nonce - the unbound message ordering nonce
    // @param _gasLimit - the gas limit for external contract execution
    // @param _payload - verified payload to send to the destination contract
    function receivePayload(
        uint16 _srcChainId,
        bytes calldata _srcAddress,
        address _dstAddress,
        uint64 _nonce,
        uint _gasLimit,
        bytes calldata _payload
    ) external;

    // @notice get the inboundNonce of a lzApp from a source chain which could be EVM or non-EVM chain
    // @param _srcChainId - the source chain identifier
    // @param _srcAddress - the source chain contract address
    function getInboundNonce(
        uint16 _srcChainId,
        bytes calldata _srcAddress
    ) external view returns (uint64);

    // @notice get the outboundNonce from this source chain which, consequently, is always an EVM
    // @param _srcAddress - the source chain contract address
    function getOutboundNonce(
        uint16 _dstChainId,
        address _srcAddress
    ) external view returns (uint64);

    // @notice gets a quote in source native gas, for the amount that send() requires to pay for message delivery
    // @param _dstChainId - the destination chain identifier
    // @param _userApplication - the user app address on this EVM chain
    // @param _payload - the custom message to send over LayerZero
    // @param _payInZRO - if false, user app pays the protocol fee in native token
    // @param _adapterParam - parameters for the adapter service, e.g. send some dust native token to dstChain
    function estimateFees(
        uint16 _dstChainId,
        address _userApplication,
        bytes calldata _payload,
        bool _payInZRO,
        bytes calldata _adapterParam
    ) external view returns (uint nativeFee, uint zroFee);

    // @notice get this Endpoint's immutable source identifier
    function getChainId() external view returns (uint16);

    // @notice the interface to retry failed message on this Endpoint destination
    // @param _srcChainId - the source chain identifier
    // @param _srcAddress - the source chain contract address
    // @param _payload - the payload to be retried
    function retryPayload(
        uint16 _srcChainId,
        bytes calldata _srcAddress,
        bytes calldata _payload
    ) external;

    // @notice query if any STORED payload (message blocking) at the endpoint.
    // @param _srcChainId - the source chain identifier
    // @param _srcAddress - the source chain contract address
    function hasStoredPayload(
        uint16 _srcChainId,
        bytes calldata _srcAddress
    ) external view returns (bool);

    // @notice query if the _libraryAddress is valid for sending msgs.
    // @param _userApplication - the user app address on this EVM chain
    function getSendLibraryAddress(
        address _userApplication
    ) external view returns (address);

    // @notice query if the _libraryAddress is valid for receiving msgs.
    // @param _userApplication - the user app address on this EVM chain
    function getReceiveLibraryAddress(
        address _userApplication
    ) external view returns (address);

    // @notice query if the non-reentrancy guard for send() is on
    // @return true if the guard is on. false otherwise
    function isSendingPayload() external view returns (bool);

    // @notice query if the non-reentrancy guard for receive() is on
    // @return true if the guard is on. false otherwise
    function isReceivingPayload() external view returns (bool);

    // @notice get the configuration of the LayerZero messaging library of the specified version
    // @param _version - messaging library version
    // @param _chainId - the chainId for the pending config change
    // @param _userApplication - the contract address of the user application
    // @param _configType - type of configuration. every messaging library has its own convention.
    function getConfig(
        uint16 _version,
        uint16 _chainId,
        address _userApplication,
        uint _configType
    ) external view returns (bytes memory);

    // @notice get the send() LayerZero messaging library version
    // @param _userApplication - the contract address of the user application
    function getSendVersion(
        address _userApplication
    ) external view returns (uint16);

    // @notice get the lzReceive() LayerZero messaging library version
    // @param _userApplication - the contract address of the user application
    function getReceiveVersion(
        address _userApplication
    ) external view returns (uint16);
}

File 16 of 20 : ILayerZeroReceiver.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.5.0;

interface ILayerZeroReceiver {
    // @notice LayerZero endpoint will invoke this function to deliver the message on the destination
    // @param _srcChainId - the source endpoint identifier
    // @param _srcAddress - the source sending contract address from the source chain
    // @param _nonce - the ordered message nonce
    // @param _payload - the signed payload is the UA bytes has encoded to be sent
    function lzReceive(
        uint16 _srcChainId,
        bytes calldata _srcAddress,
        uint64 _nonce,
        bytes calldata _payload
    ) external;
}

File 17 of 20 : ILayerZeroUserApplicationConfig.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.5.0;

interface ILayerZeroUserApplicationConfig {
    // @notice set the configuration of the LayerZero messaging library of the specified version
    // @param _version - messaging library version
    // @param _chainId - the chainId for the pending config change
    // @param _configType - type of configuration. every messaging library has its own convention.
    // @param _config - configuration in the bytes. can encode arbitrary content.
    function setConfig(
        uint16 _version,
        uint16 _chainId,
        uint _configType,
        bytes calldata _config
    ) external;

    // @notice set the send() LayerZero messaging library version to _version
    // @param _version - new messaging library version
    function setSendVersion(uint16 _version) external;

    // @notice set the lzReceive() LayerZero messaging library version to _version
    // @param _version - new messaging library version
    function setReceiveVersion(uint16 _version) external;

    // @notice Only when the UA needs to resume the message flow in blocking mode and clear the stored payload
    // @param _srcChainId - the chainId of the source chain
    // @param _srcAddress - the contract address of the source contract at the source chain
    function forceResumeReceive(
        uint16 _srcChainId,
        bytes calldata _srcAddress
    ) external;
}

File 18 of 20 : BytesLib.sol
// SPDX-License-Identifier: Unlicense
/*
 * @title Solidity Bytes Arrays Utils
 * @author Gonçalo Sá <[email protected]>
 *
 * @dev Bytes tightly packed arrays utility library for ethereum contracts written in Solidity.
 *      The library lets you concatenate, slice and type cast bytes arrays both in memory and storage.
 */
pragma solidity >=0.8.0 <0.9.0;

library BytesLib {
    function concat(
        bytes memory _preBytes,
        bytes memory _postBytes
    ) internal pure returns (bytes memory) {
        bytes memory tempBytes;

        assembly {
            // Get a location of some free memory and store it in tempBytes as
            // Solidity does for memory variables.
            tempBytes := mload(0x40)

            // Store the length of the first bytes array at the beginning of
            // the memory for tempBytes.
            let length := mload(_preBytes)
            mstore(tempBytes, length)

            // Maintain a memory counter for the current write location in the
            // temp bytes array by adding the 32 bytes for the array length to
            // the starting location.
            let mc := add(tempBytes, 0x20)
            // Stop copying when the memory counter reaches the length of the
            // first bytes array.
            let end := add(mc, length)

            for {
                // Initialize a copy counter to the start of the _preBytes data,
                // 32 bytes into its memory.
                let cc := add(_preBytes, 0x20)
            } lt(mc, end) {
                // Increase both counters by 32 bytes each iteration.
                mc := add(mc, 0x20)
                cc := add(cc, 0x20)
            } {
                // Write the _preBytes data into the tempBytes memory 32 bytes
                // at a time.
                mstore(mc, mload(cc))
            }

            // Add the length of _postBytes to the current length of tempBytes
            // and store it as the new length in the first 32 bytes of the
            // tempBytes memory.
            length := mload(_postBytes)
            mstore(tempBytes, add(length, mload(tempBytes)))

            // Move the memory counter back from a multiple of 0x20 to the
            // actual end of the _preBytes data.
            mc := end
            // Stop copying when the memory counter reaches the new combined
            // length of the arrays.
            end := add(mc, length)

            for {
                let cc := add(_postBytes, 0x20)
            } lt(mc, end) {
                mc := add(mc, 0x20)
                cc := add(cc, 0x20)
            } {
                mstore(mc, mload(cc))
            }

            // Update the free-memory pointer by padding our last write location
            // to 32 bytes: add 31 bytes to the end of tempBytes to move to the
            // next 32 byte block, then round down to the nearest multiple of
            // 32. If the sum of the length of the two arrays is zero then add
            // one before rounding down to leave a blank 32 bytes (the length block with 0).
            mstore(
                0x40,
                and(
                    add(add(end, iszero(add(length, mload(_preBytes)))), 31),
                    not(31) // Round down to the nearest 32 bytes.
                )
            )
        }

        return tempBytes;
    }

    function concatStorage(
        bytes storage _preBytes,
        bytes memory _postBytes
    ) internal {
        assembly {
            // Read the first 32 bytes of _preBytes storage, which is the length
            // of the array. (We don't need to use the offset into the slot
            // because arrays use the entire slot.)
            let fslot := sload(_preBytes.slot)
            // Arrays of 31 bytes or less have an even value in their slot,
            // while longer arrays have an odd value. The actual length is
            // the slot divided by two for odd values, and the lowest order
            // byte divided by two for even values.
            // If the slot is even, bitwise and the slot with 255 and divide by
            // two to get the length. If the slot is odd, bitwise and the slot
            // with -1 and divide by two.
            let slength := div(
                and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)),
                2
            )
            let mlength := mload(_postBytes)
            let newlength := add(slength, mlength)
            // slength can contain both the length and contents of the array
            // if length < 32 bytes so let's prepare for that
            // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage
            switch add(lt(slength, 32), lt(newlength, 32))
            case 2 {
                // Since the new array still fits in the slot, we just need to
                // update the contents of the slot.
                // uint256(bytes_storage) = uint256(bytes_storage) + uint256(bytes_memory) + new_length
                sstore(
                    _preBytes.slot,
                    // all the modifications to the slot are inside this
                    // next block
                    add(
                        // we can just add to the slot contents because the
                        // bytes we want to change are the LSBs
                        fslot,
                        add(
                            mul(
                                div(
                                    // load the bytes from memory
                                    mload(add(_postBytes, 0x20)),
                                    // zero all bytes to the right
                                    exp(0x100, sub(32, mlength))
                                ),
                                // and now shift left the number of bytes to
                                // leave space for the length in the slot
                                exp(0x100, sub(32, newlength))
                            ),
                            // increase length by the double of the memory
                            // bytes length
                            mul(mlength, 2)
                        )
                    )
                )
            }
            case 1 {
                // The stored value fits in the slot, but the combined value
                // will exceed it.
                // get the keccak hash to get the contents of the array
                mstore(0x0, _preBytes.slot)
                let sc := add(keccak256(0x0, 0x20), div(slength, 32))

                // save new length
                sstore(_preBytes.slot, add(mul(newlength, 2), 1))

                // The contents of the _postBytes array start 32 bytes into
                // the structure. Our first read should obtain the `submod`
                // bytes that can fit into the unused space in the last word
                // of the stored array. To get this, we read 32 bytes starting
                // from `submod`, so the data we read overlaps with the array
                // contents by `submod` bytes. Masking the lowest-order
                // `submod` bytes allows us to add that value directly to the
                // stored value.

                let submod := sub(32, slength)
                let mc := add(_postBytes, submod)
                let end := add(_postBytes, mlength)
                let mask := sub(exp(0x100, submod), 1)

                sstore(
                    sc,
                    add(
                        and(
                            fslot,
                            0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00
                        ),
                        and(mload(mc), mask)
                    )
                )

                for {
                    mc := add(mc, 0x20)
                    sc := add(sc, 1)
                } lt(mc, end) {
                    sc := add(sc, 1)
                    mc := add(mc, 0x20)
                } {
                    sstore(sc, mload(mc))
                }

                mask := exp(0x100, sub(mc, end))

                sstore(sc, mul(div(mload(mc), mask), mask))
            }
            default {
                // get the keccak hash to get the contents of the array
                mstore(0x0, _preBytes.slot)
                // Start copying to the last used word of the stored array.
                let sc := add(keccak256(0x0, 0x20), div(slength, 32))

                // save new length
                sstore(_preBytes.slot, add(mul(newlength, 2), 1))

                // Copy over the first `submod` bytes of the new data as in
                // case 1 above.
                let slengthmod := mod(slength, 32)
                let mlengthmod := mod(mlength, 32)
                let submod := sub(32, slengthmod)
                let mc := add(_postBytes, submod)
                let end := add(_postBytes, mlength)
                let mask := sub(exp(0x100, submod), 1)

                sstore(sc, add(sload(sc), and(mload(mc), mask)))

                for {
                    sc := add(sc, 1)
                    mc := add(mc, 0x20)
                } lt(mc, end) {
                    sc := add(sc, 1)
                    mc := add(mc, 0x20)
                } {
                    sstore(sc, mload(mc))
                }

                mask := exp(0x100, sub(mc, end))

                sstore(sc, mul(div(mload(mc), mask), mask))
            }
        }
    }

    function slice(
        bytes memory _bytes,
        uint _start,
        uint _length
    ) internal pure returns (bytes memory) {
        require(_length + 31 >= _length, "slice_overflow");
        require(_bytes.length >= _start + _length, "slice_outOfBounds");

        bytes memory tempBytes;

        assembly {
            switch iszero(_length)
            case 0 {
                // Get a location of some free memory and store it in tempBytes as
                // Solidity does for memory variables.
                tempBytes := mload(0x40)

                // The first word of the slice result is potentially a partial
                // word read from the original array. To read it, we calculate
                // the length of that partial word and start copying that many
                // bytes into the array. The first word we copy will start with
                // data we don't care about, but the last `lengthmod` bytes will
                // land at the beginning of the contents of the new array. When
                // we're done copying, we overwrite the full first word with
                // the actual length of the slice.
                let lengthmod := and(_length, 31)

                // The multiplication in the next line is necessary
                // because when slicing multiples of 32 bytes (lengthmod == 0)
                // the following copy loop was copying the origin's length
                // and then ending prematurely not copying everything it should.
                let mc := add(
                    add(tempBytes, lengthmod),
                    mul(0x20, iszero(lengthmod))
                )
                let end := add(mc, _length)

                for {
                    // The multiplication in the next line has the same exact purpose
                    // as the one above.
                    let cc := add(
                        add(
                            add(_bytes, lengthmod),
                            mul(0x20, iszero(lengthmod))
                        ),
                        _start
                    )
                } lt(mc, end) {
                    mc := add(mc, 0x20)
                    cc := add(cc, 0x20)
                } {
                    mstore(mc, mload(cc))
                }

                mstore(tempBytes, _length)

                //update free-memory pointer
                //allocating the array padded to 32 bytes like the compiler does now
                mstore(0x40, and(add(mc, 31), not(31)))
            }
            //if we want a zero-length slice let's just return a zero-length array
            default {
                tempBytes := mload(0x40)
                //zero out the 32 bytes slice we are about to return
                //we need to do it because Solidity does not garbage collect
                mstore(tempBytes, 0)

                mstore(0x40, add(tempBytes, 0x20))
            }
        }

        return tempBytes;
    }

    function toAddress(
        bytes memory _bytes,
        uint _start
    ) internal pure returns (address) {
        require(_bytes.length >= _start + 20, "toAddress_outOfBounds");
        address tempAddress;

        assembly {
            tempAddress := div(
                mload(add(add(_bytes, 0x20), _start)),
                0x1000000000000000000000000
            )
        }

        return tempAddress;
    }

    function toUint8(
        bytes memory _bytes,
        uint _start
    ) internal pure returns (uint8) {
        require(_bytes.length >= _start + 1, "toUint8_outOfBounds");
        uint8 tempUint;

        assembly {
            tempUint := mload(add(add(_bytes, 0x1), _start))
        }

        return tempUint;
    }

    function toUint16(
        bytes memory _bytes,
        uint _start
    ) internal pure returns (uint16) {
        require(_bytes.length >= _start + 2, "toUint16_outOfBounds");
        uint16 tempUint;

        assembly {
            tempUint := mload(add(add(_bytes, 0x2), _start))
        }

        return tempUint;
    }

    function toUint32(
        bytes memory _bytes,
        uint _start
    ) internal pure returns (uint32) {
        require(_bytes.length >= _start + 4, "toUint32_outOfBounds");
        uint32 tempUint;

        assembly {
            tempUint := mload(add(add(_bytes, 0x4), _start))
        }

        return tempUint;
    }

    function toUint64(
        bytes memory _bytes,
        uint _start
    ) internal pure returns (uint64) {
        require(_bytes.length >= _start + 8, "toUint64_outOfBounds");
        uint64 tempUint;

        assembly {
            tempUint := mload(add(add(_bytes, 0x8), _start))
        }

        return tempUint;
    }

    function toUint96(
        bytes memory _bytes,
        uint _start
    ) internal pure returns (uint96) {
        require(_bytes.length >= _start + 12, "toUint96_outOfBounds");
        uint96 tempUint;

        assembly {
            tempUint := mload(add(add(_bytes, 0xc), _start))
        }

        return tempUint;
    }

    function toUint128(
        bytes memory _bytes,
        uint _start
    ) internal pure returns (uint128) {
        require(_bytes.length >= _start + 16, "toUint128_outOfBounds");
        uint128 tempUint;

        assembly {
            tempUint := mload(add(add(_bytes, 0x10), _start))
        }

        return tempUint;
    }

    function toUint256(
        bytes memory _bytes,
        uint _start
    ) internal pure returns (uint) {
        require(_bytes.length >= _start + 32, "toUint256_outOfBounds");
        uint tempUint;

        assembly {
            tempUint := mload(add(add(_bytes, 0x20), _start))
        }

        return tempUint;
    }

    function toBytes32(
        bytes memory _bytes,
        uint _start
    ) internal pure returns (bytes32) {
        require(_bytes.length >= _start + 32, "toBytes32_outOfBounds");
        bytes32 tempBytes32;

        assembly {
            tempBytes32 := mload(add(add(_bytes, 0x20), _start))
        }

        return tempBytes32;
    }

    function equal(
        bytes memory _preBytes,
        bytes memory _postBytes
    ) internal pure returns (bool) {
        bool success = true;

        assembly {
            let length := mload(_preBytes)

            // if lengths don't match the arrays are not equal
            switch eq(length, mload(_postBytes))
            case 1 {
                // cb is a circuit breaker in the for loop since there's
                //  no said feature for inline assembly loops
                // cb = 1 - don't breaker
                // cb = 0 - break
                let cb := 1

                let mc := add(_preBytes, 0x20)
                let end := add(mc, length)

                for {
                    let cc := add(_postBytes, 0x20)
                    // the next line is the loop condition:
                    // while(uint256(mc < end) + cb == 2)
                } eq(add(lt(mc, end), cb), 2) {
                    mc := add(mc, 0x20)
                    cc := add(cc, 0x20)
                } {
                    // if any of these checks fails then arrays are not equal
                    if iszero(eq(mload(mc), mload(cc))) {
                        // unsuccess:
                        success := 0
                        cb := 0
                    }
                }
            }
            default {
                // unsuccess:
                success := 0
            }
        }

        return success;
    }

    function equalStorage(
        bytes storage _preBytes,
        bytes memory _postBytes
    ) internal view returns (bool) {
        bool success = true;

        assembly {
            // we know _preBytes_offset is 0
            let fslot := sload(_preBytes.slot)
            // Decode the length of the stored array like in concatStorage().
            let slength := div(
                and(fslot, sub(mul(0x100, iszero(and(fslot, 1))), 1)),
                2
            )
            let mlength := mload(_postBytes)

            // if lengths don't match the arrays are not equal
            switch eq(slength, mlength)
            case 1 {
                // slength can contain both the length and contents of the array
                // if length < 32 bytes so let's prepare for that
                // v. http://solidity.readthedocs.io/en/latest/miscellaneous.html#layout-of-state-variables-in-storage
                if iszero(iszero(slength)) {
                    switch lt(slength, 32)
                    case 1 {
                        // blank the last byte which is the length
                        fslot := mul(div(fslot, 0x100), 0x100)

                        if iszero(eq(fslot, mload(add(_postBytes, 0x20)))) {
                            // unsuccess:
                            success := 0
                        }
                    }
                    default {
                        // cb is a circuit breaker in the for loop since there's
                        //  no said feature for inline assembly loops
                        // cb = 1 - don't breaker
                        // cb = 0 - break
                        let cb := 1

                        // get the keccak hash to get the contents of the array
                        mstore(0x0, _preBytes.slot)
                        let sc := keccak256(0x0, 0x20)

                        let mc := add(_postBytes, 0x20)
                        let end := add(mc, mlength)

                        // the next line is the loop condition:
                        // while(uint256(mc < end) + cb == 2)
                        for {

                        } eq(add(lt(mc, end), cb), 2) {
                            sc := add(sc, 1)
                            mc := add(mc, 0x20)
                        } {
                            if iszero(eq(sload(sc), mload(mc))) {
                                // unsuccess:
                                success := 0
                                cb := 0
                            }
                        }
                    }
                }
            }
            default {
                // unsuccess:
                success := 0
            }
        }

        return success;
    }
}

File 19 of 20 : ExcessivelySafeCall.sol
// SPDX-License-Identifier: MIT OR Apache-2.0
pragma solidity >=0.7.6;

library ExcessivelySafeCall {
    uint constant LOW_28_MASK =
        0x00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff;

    /// @notice Use when you _really_ really _really_ don't trust the called
    /// contract. This prevents the called contract from causing reversion of
    /// the caller in as many ways as we can.
    /// @dev The main difference between this and a solidity low-level call is
    /// that we limit the number of bytes that the callee can cause to be
    /// copied to caller memory. This prevents stupid things like malicious
    /// contracts returning 10,000,000 bytes causing a local OOG when copying
    /// to memory.
    /// @param _target The address to call
    /// @param _gas The amount of gas to forward to the remote contract
    /// @param _maxCopy The maximum number of bytes of returndata to copy
    /// to memory.
    /// @param _calldata The data to send to the remote contract
    /// @return success and returndata, as `.call()`. Returndata is capped to
    /// `_maxCopy` bytes.
    function excessivelySafeCall(
        address _target,
        uint _gas,
        uint16 _maxCopy,
        bytes memory _calldata
    ) internal returns (bool, bytes memory) {
        // set up for assembly call
        uint _toCopy;
        bool _success;
        bytes memory _returnData = new bytes(_maxCopy);
        // dispatch message to recipient
        // by assembly calling "handle" function
        // we call via assembly to avoid memcopying a very large returndata
        // returned by a malicious contract
        assembly {
            _success := call(
                _gas, // gas
                _target, // recipient
                0, // ether value
                add(_calldata, 0x20), // inloc
                mload(_calldata), // inlen
                0, // outloc
                0 // outlen
            )
            // limit our copy to 256 bytes
            _toCopy := returndatasize()
            if gt(_toCopy, _maxCopy) {
                _toCopy := _maxCopy
            }
            // Store the length of the copied bytes
            mstore(_returnData, _toCopy)
            // copy the bytes from returndata[0:_toCopy]
            returndatacopy(add(_returnData, 0x20), 0, _toCopy)
        }
        return (_success, _returnData);
    }

    /// @notice Use when you _really_ really _really_ don't trust the called
    /// contract. This prevents the called contract from causing reversion of
    /// the caller in as many ways as we can.
    /// @dev The main difference between this and a solidity low-level call is
    /// that we limit the number of bytes that the callee can cause to be
    /// copied to caller memory. This prevents stupid things like malicious
    /// contracts returning 10,000,000 bytes causing a local OOG when copying
    /// to memory.
    /// @param _target The address to call
    /// @param _gas The amount of gas to forward to the remote contract
    /// @param _maxCopy The maximum number of bytes of returndata to copy
    /// to memory.
    /// @param _calldata The data to send to the remote contract
    /// @return success and returndata, as `.call()`. Returndata is capped to
    /// `_maxCopy` bytes.
    function excessivelySafeStaticCall(
        address _target,
        uint _gas,
        uint16 _maxCopy,
        bytes memory _calldata
    ) internal view returns (bool, bytes memory) {
        // set up for assembly call
        uint _toCopy;
        bool _success;
        bytes memory _returnData = new bytes(_maxCopy);
        // dispatch message to recipient
        // by assembly calling "handle" function
        // we call via assembly to avoid memcopying a very large returndata
        // returned by a malicious contract
        assembly {
            _success := staticcall(
                _gas, // gas
                _target, // recipient
                add(_calldata, 0x20), // inloc
                mload(_calldata), // inlen
                0, // outloc
                0 // outlen
            )
            // limit our copy to 256 bytes
            _toCopy := returndatasize()
            if gt(_toCopy, _maxCopy) {
                _toCopy := _maxCopy
            }
            // Store the length of the copied bytes
            mstore(_returnData, _toCopy)
            // copy the bytes from returndata[0:_toCopy]
            returndatacopy(add(_returnData, 0x20), 0, _toCopy)
        }
        return (_success, _returnData);
    }

    /**
     * @notice Swaps function selectors in encoded contract calls
     * @dev Allows reuse of encoded calldata for functions with identical
     * argument types but different names. It simply swaps out the first 4 bytes
     * for the new selector. This function modifies memory in place, and should
     * only be used with caution.
     * @param _newSelector The new 4-byte selector
     * @param _buf The encoded contract args
     */
    function swapSelector(
        bytes4 _newSelector,
        bytes memory _buf
    ) internal pure {
        require(_buf.length >= 4);
        uint _mask = LOW_28_MASK;
        assembly {
            // load the first word of
            let _word := mload(add(_buf, 0x20))
            // mask out the top 4 bytes
            // /x
            _word := and(_word, _mask)
            _word := or(_newSelector, _word)
            mstore(add(_buf, 0x20), _word)
        }
    }
}

File 20 of 20 : LzApp.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/access/Ownable.sol";
import "./interfaces/ILayerZeroReceiver.sol";
import "./interfaces/ILayerZeroUserApplicationConfig.sol";
import "./interfaces/ILayerZeroEndpoint.sol";
import "./libraries/BytesLib.sol";

/*
 * a generic LzReceiver implementation
 */
abstract contract LzApp is
    Ownable,
    ILayerZeroReceiver,
    ILayerZeroUserApplicationConfig
{
    using BytesLib for bytes;

    // ua can not send payload larger than this by default, but it can be changed by the ua owner
    uint public constant DEFAULT_PAYLOAD_SIZE_LIMIT = 10000;

    ILayerZeroEndpoint public immutable lzEndpoint;
    mapping(uint16 => bytes) public trustedRemoteLookup;
    mapping(uint16 => mapping(uint16 => uint)) public minDstGasLookup;
    mapping(uint16 => uint) public payloadSizeLimitLookup;
    address public precrime;

    event SetPrecrime(address precrime);
    event SetTrustedRemote(uint16 _remoteChainId, bytes _path);
    event SetTrustedRemoteAddress(uint16 _remoteChainId, bytes _remoteAddress);
    event SetMinDstGas(uint16 _dstChainId, uint16 _type, uint _minDstGas);

    constructor(address _endpoint) {
        lzEndpoint = ILayerZeroEndpoint(_endpoint);
    }

    function lzReceive(
        uint16 _srcChainId,
        bytes calldata _srcAddress,
        uint64 _nonce,
        bytes calldata _payload
    ) public virtual override {
        // lzReceive must be called by the endpoint for security
        require(
            _msgSender() == address(lzEndpoint),
            "LzApp: invalid endpoint caller"
        );

        bytes memory trustedRemote = trustedRemoteLookup[_srcChainId];
        // if will still block the message pathway from (srcChainId, srcAddress). should not receive message from untrusted remote.
        require(
            _srcAddress.length == trustedRemote.length &&
                trustedRemote.length > 0 &&
                keccak256(_srcAddress) == keccak256(trustedRemote),
            "LzApp: invalid source sending contract"
        );

        _blockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);
    }

    // abstract function - the default behaviour of LayerZero is blocking. See: NonblockingLzApp if you dont need to enforce ordered messaging
    function _blockingLzReceive(
        uint16 _srcChainId,
        bytes memory _srcAddress,
        uint64 _nonce,
        bytes memory _payload
    ) internal virtual;

    function _lzSend(
        uint16 _dstChainId,
        bytes memory _payload,
        address payable _refundAddress,
        address _zroPaymentAddress,
        bytes memory _adapterParams,
        uint _nativeFee
    ) internal virtual {
        bytes memory trustedRemote = trustedRemoteLookup[_dstChainId];
        require(
            trustedRemote.length != 0,
            "LzApp: destination chain is not a trusted source"
        );
        _checkPayloadSize(_dstChainId, _payload.length);
        lzEndpoint.send{value: _nativeFee}(
            _dstChainId,
            trustedRemote,
            _payload,
            _refundAddress,
            _zroPaymentAddress,
            _adapterParams
        );
    }

    function _checkGasLimit(
        uint16 _dstChainId,
        uint16 _type,
        bytes memory _adapterParams,
        uint _extraGas
    ) internal view virtual {
        uint providedGasLimit = _getGasLimit(_adapterParams);
        uint minGasLimit = minDstGasLookup[_dstChainId][_type];
        require(minGasLimit > 0, "LzApp: minGasLimit not set");
        require(
            providedGasLimit >= minGasLimit + _extraGas,
            "LzApp: gas limit is too low"
        );
    }

    function _getGasLimit(
        bytes memory _adapterParams
    ) internal pure virtual returns (uint gasLimit) {
        require(_adapterParams.length >= 34, "LzApp: invalid adapterParams");
        assembly {
            gasLimit := mload(add(_adapterParams, 34))
        }
    }

    function _checkPayloadSize(
        uint16 _dstChainId,
        uint _payloadSize
    ) internal view virtual {
        uint payloadSizeLimit = payloadSizeLimitLookup[_dstChainId];
        if (payloadSizeLimit == 0) {
            // use default if not set
            payloadSizeLimit = DEFAULT_PAYLOAD_SIZE_LIMIT;
        }
        require(
            _payloadSize <= payloadSizeLimit,
            "LzApp: payload size is too large"
        );
    }

    //---------------------------UserApplication config----------------------------------------
    function getConfig(
        uint16 _version,
        uint16 _chainId,
        address,
        uint _configType
    ) external view returns (bytes memory) {
        return
            lzEndpoint.getConfig(
                _version,
                _chainId,
                address(this),
                _configType
            );
    }

    // generic config for LayerZero user Application
    function setConfig(
        uint16 _version,
        uint16 _chainId,
        uint _configType,
        bytes calldata _config
    ) external override onlyOwner {
        lzEndpoint.setConfig(_version, _chainId, _configType, _config);
    }

    function setSendVersion(uint16 _version) external override onlyOwner {
        lzEndpoint.setSendVersion(_version);
    }

    function setReceiveVersion(uint16 _version) external override onlyOwner {
        lzEndpoint.setReceiveVersion(_version);
    }

    function forceResumeReceive(
        uint16 _srcChainId,
        bytes calldata _srcAddress
    ) external override onlyOwner {
        lzEndpoint.forceResumeReceive(_srcChainId, _srcAddress);
    }

    // _path = abi.encodePacked(remoteAddress, localAddress)
    // this function set the trusted path for the cross-chain communication
    function setTrustedRemote(
        uint16 _remoteChainId,
        bytes calldata _path
    ) external onlyOwner {
        trustedRemoteLookup[_remoteChainId] = _path;
        emit SetTrustedRemote(_remoteChainId, _path);
    }

    function setTrustedRemoteAddress(
        uint16 _remoteChainId,
        bytes calldata _remoteAddress
    ) external onlyOwner {
        trustedRemoteLookup[_remoteChainId] = abi.encodePacked(
            _remoteAddress,
            address(this)
        );
        emit SetTrustedRemoteAddress(_remoteChainId, _remoteAddress);
    }

    function getTrustedRemoteAddress(
        uint16 _remoteChainId
    ) external view returns (bytes memory) {
        bytes memory path = trustedRemoteLookup[_remoteChainId];
        require(path.length != 0, "LzApp: no trusted path record");
        return path.slice(0, path.length - 20); // the last 20 bytes should be address(this)
    }

    function setPrecrime(address _precrime) external onlyOwner {
        precrime = _precrime;
        emit SetPrecrime(_precrime);
    }

    function setMinDstGas(
        uint16 _dstChainId,
        uint16 _packetType,
        uint _minGas
    ) external onlyOwner {
        minDstGasLookup[_dstChainId][_packetType] = _minGas;
        emit SetMinDstGas(_dstChainId, _packetType, _minGas);
    }

    // if the size is 0, it means default size limit
    function setPayloadSizeLimit(
        uint16 _dstChainId,
        uint _size
    ) external onlyOwner {
        payloadSizeLimitLookup[_dstChainId] = _size;
    }

    //--------------------------- VIEW FUNCTION ----------------------------------------
    function isTrustedRemote(
        uint16 _srcChainId,
        bytes calldata _srcAddress
    ) external view returns (bool) {
        bytes memory trustedSource = trustedRemoteLookup[_srcChainId];
        return keccak256(trustedSource) == keccak256(_srcAddress);
    }
}

File 21 of 20 : NonblockingLzApp.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./LzApp.sol";
import "./libraries/ExcessivelySafeCall.sol";

/*
 * the default LayerZero messaging behaviour is blocking, i.e. any failed message will block the channel
 * this abstract class try-catch all fail messages and store locally for future retry. hence, non-blocking
 * NOTE: if the srcAddress is not configured properly, it will still block the message pathway from (srcChainId, srcAddress)
 */
abstract contract NonblockingLzApp is LzApp {
    using ExcessivelySafeCall for address;

    constructor(address _endpoint) LzApp(_endpoint) {}

    mapping(uint16 => mapping(bytes => mapping(uint64 => bytes32)))
        public failedMessages;

    event MessageFailed(
        uint16 _srcChainId,
        bytes _srcAddress,
        uint64 _nonce,
        bytes _payload,
        bytes _reason
    );
    event RetryMessageSuccess(
        uint16 _srcChainId,
        bytes _srcAddress,
        uint64 _nonce,
        bytes32 _payloadHash
    );

    // overriding the virtual function in LzReceiver
    function _blockingLzReceive(
        uint16 _srcChainId,
        bytes memory _srcAddress,
        uint64 _nonce,
        bytes memory _payload
    ) internal virtual override {
        (bool success, bytes memory reason) = address(this).excessivelySafeCall(
            gasleft(),
            150,
            abi.encodeWithSelector(
                this.nonblockingLzReceive.selector,
                _srcChainId,
                _srcAddress,
                _nonce,
                _payload
            )
        );
        if (!success) {
            _storeFailedMessage(
                _srcChainId,
                _srcAddress,
                _nonce,
                _payload,
                reason
            );
        }
    }

    function _storeFailedMessage(
        uint16 _srcChainId,
        bytes memory _srcAddress,
        uint64 _nonce,
        bytes memory _payload,
        bytes memory _reason
    ) internal virtual {
        failedMessages[_srcChainId][_srcAddress][_nonce] = keccak256(_payload);
        emit MessageFailed(_srcChainId, _srcAddress, _nonce, _payload, _reason);
    }

    function nonblockingLzReceive(
        uint16 _srcChainId,
        bytes calldata _srcAddress,
        uint64 _nonce,
        bytes calldata _payload
    ) public virtual {
        // only internal transaction
        require(
            _msgSender() == address(this),
            "NonblockingLzApp: caller must be LzApp"
        );
        _nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);
    }

    //@notice override this function
    function _nonblockingLzReceive(
        uint16 _srcChainId,
        bytes memory _srcAddress,
        uint64 _nonce,
        bytes memory _payload
    ) internal virtual;

    function retryMessage(
        uint16 _srcChainId,
        bytes calldata _srcAddress,
        uint64 _nonce,
        bytes calldata _payload
    ) public payable virtual {
        // assert there is message to retry
        bytes32 payloadHash = failedMessages[_srcChainId][_srcAddress][_nonce];
        require(
            payloadHash != bytes32(0),
            "NonblockingLzApp: no stored message"
        );
        require(
            keccak256(_payload) == payloadHash,
            "NonblockingLzApp: invalid payload"
        );
        // clear the stored message
        failedMessages[_srcChainId][_srcAddress][_nonce] = bytes32(0);
        // execute the message. revert if it fails again
        _nonblockingLzReceive(_srcChainId, _srcAddress, _nonce, _payload);
        emit RetryMessageSuccess(_srcChainId, _srcAddress, _nonce, payloadHash);
    }
}

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

Contract ABI

[{"inputs":[{"internalType":"address","name":"_endpoint","type":"address"},{"internalType":"string","name":"_uri","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AlreadyMinted","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"owner","type":"address"}],"name":"ERC721IncorrectOwner","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ERC721InsufficientApproval","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC721InvalidApprover","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"ERC721InvalidOperator","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"ERC721InvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC721InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC721InvalidSender","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ERC721NonexistentToken","type":"error"},{"inputs":[],"name":"InsufficientGas","type":"error"},{"inputs":[],"name":"OneWayBridge","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"Soulbound","type":"error"},{"inputs":[],"name":"TokenDoesNotExist","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"indexed":false,"internalType":"bytes","name":"_srcAddress","type":"bytes"},{"indexed":false,"internalType":"uint64","name":"_nonce","type":"uint64"},{"indexed":false,"internalType":"bytes","name":"_payload","type":"bytes"},{"indexed":false,"internalType":"bytes","name":"_reason","type":"bytes"}],"name":"MessageFailed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"indexed":false,"internalType":"bytes","name":"_srcAddress","type":"bytes"},{"indexed":false,"internalType":"uint64","name":"_nonce","type":"uint64"},{"indexed":false,"internalType":"bytes32","name":"_payloadHash","type":"bytes32"}],"name":"RetryMessageSuccess","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"_dstChainId","type":"uint16"},{"indexed":false,"internalType":"uint16","name":"_type","type":"uint16"},{"indexed":false,"internalType":"uint256","name":"_minDstGas","type":"uint256"}],"name":"SetMinDstGas","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"precrime","type":"address"}],"name":"SetPrecrime","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"_remoteChainId","type":"uint16"},{"indexed":false,"internalType":"bytes","name":"_path","type":"bytes"}],"name":"SetTrustedRemote","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"_remoteChainId","type":"uint16"},{"indexed":false,"internalType":"bytes","name":"_remoteAddress","type":"bytes"}],"name":"SetTrustedRemoteAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DEFAULT_PAYLOAD_SIZE_LIMIT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FRAME_CHAIN_ID","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bridgeToFrame","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"bridged","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"estimateFees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"},{"internalType":"bytes","name":"","type":"bytes"},{"internalType":"uint64","name":"","type":"uint64"}],"name":"failedMessages","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"internalType":"bytes","name":"_srcAddress","type":"bytes"}],"name":"forceResumeReceive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_version","type":"uint16"},{"internalType":"uint16","name":"_chainId","type":"uint16"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"_configType","type":"uint256"}],"name":"getConfig","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_remoteChainId","type":"uint16"}],"name":"getTrustedRemoteAddress","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"internalType":"bytes","name":"_srcAddress","type":"bytes"}],"name":"isTrustedRemote","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lzEndpoint","outputs":[{"internalType":"contract ILayerZeroEndpoint","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"internalType":"bytes","name":"_srcAddress","type":"bytes"},{"internalType":"uint64","name":"_nonce","type":"uint64"},{"internalType":"bytes","name":"_payload","type":"bytes"}],"name":"lzReceive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"},{"internalType":"uint16","name":"","type":"uint16"}],"name":"minDstGasLookup","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"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":"uint16","name":"_srcChainId","type":"uint16"},{"internalType":"bytes","name":"_srcAddress","type":"bytes"},{"internalType":"uint64","name":"_nonce","type":"uint64"},{"internalType":"bytes","name":"_payload","type":"bytes"}],"name":"nonblockingLzReceive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"}],"name":"payloadSizeLimitLookup","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"precrime","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_srcChainId","type":"uint16"},{"internalType":"bytes","name":"_srcAddress","type":"bytes"},{"internalType":"uint64","name":"_nonce","type":"uint64"},{"internalType":"bytes","name":"_payload","type":"bytes"}],"name":"retryMessage","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_version","type":"uint16"},{"internalType":"uint16","name":"_chainId","type":"uint16"},{"internalType":"uint256","name":"_configType","type":"uint256"},{"internalType":"bytes","name":"_config","type":"bytes"}],"name":"setConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_dstChainId","type":"uint16"},{"internalType":"uint16","name":"_packetType","type":"uint16"},{"internalType":"uint256","name":"_minGas","type":"uint256"}],"name":"setMinDstGas","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_dstChainId","type":"uint16"},{"internalType":"uint256","name":"_size","type":"uint256"}],"name":"setPayloadSizeLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_precrime","type":"address"}],"name":"setPrecrime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_version","type":"uint16"}],"name":"setReceiveVersion","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_version","type":"uint16"}],"name":"setSendVersion","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_remoteChainId","type":"uint16"},{"internalType":"bytes","name":"_path","type":"bytes"}],"name":"setTrustedRemote","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_remoteChainId","type":"uint16"},{"internalType":"bytes","name":"_remoteAddress","type":"bytes"}],"name":"setTrustedRemoteAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"status","outputs":[{"internalType":"enum FrameLayerZeroNFT_Sepolia.STATUS","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"}],"name":"trustedRemoteLookup","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_uri","type":"string"}],"name":"updateUri","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60a06040526001600f553480156200001657600080fd5b5060405162005e4f38038062005e4f83398181016040528101906200003c919062000464565b81806040518060400160405280601b81526020017f4672616d65204c617965725a65726f20546573746e6574204e465400000000008152506040518060400160405280600781526020017f464c5a544e46540000000000000000000000000000000000000000000000000081525033600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603620001205760006040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401620001179190620004db565b60405180910390fd5b6200013181620001a860201b60201c565b50816001908162000143919062000743565b50806002908162000155919062000743565b5050508073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1681525050505080601090816200019f919062000743565b5050506200082a565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620002ad8262000280565b9050919050565b620002bf81620002a0565b8114620002cb57600080fd5b50565b600081519050620002df81620002b4565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200033a82620002ef565b810181811067ffffffffffffffff821117156200035c576200035b62000300565b5b80604052505050565b6000620003716200026c565b90506200037f82826200032f565b919050565b600067ffffffffffffffff821115620003a257620003a162000300565b5b620003ad82620002ef565b9050602081019050919050565b60005b83811015620003da578082015181840152602081019050620003bd565b60008484015250505050565b6000620003fd620003f78462000384565b62000365565b9050828152602081018484840111156200041c576200041b620002ea565b5b62000429848285620003ba565b509392505050565b600082601f830112620004495762000448620002e5565b5b81516200045b848260208601620003e6565b91505092915050565b600080604083850312156200047e576200047d62000276565b5b60006200048e85828601620002ce565b925050602083015167ffffffffffffffff811115620004b257620004b16200027b565b5b620004c08582860162000431565b9150509250929050565b620004d581620002a0565b82525050565b6000602082019050620004f26000830184620004ca565b92915050565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200054b57607f821691505b60208210810362000561576200056062000503565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b600060088302620005cb7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826200058c565b620005d786836200058c565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620006246200061e6200061884620005ef565b620005f9565b620005ef565b9050919050565b6000819050919050565b620006408362000603565b620006586200064f826200062b565b84845462000599565b825550505050565b600090565b6200066f62000660565b6200067c81848462000635565b505050565b5b81811015620006a4576200069860008262000665565b60018101905062000682565b5050565b601f821115620006f357620006bd8162000567565b620006c8846200057c565b81016020851015620006d8578190505b620006f0620006e7856200057c565b83018262000681565b50505b505050565b600082821c905092915050565b60006200071860001984600802620006f8565b1980831691505092915050565b600062000733838362000705565b9150826002028217905092915050565b6200074e82620004f8565b67ffffffffffffffff8111156200076a576200076962000300565b5b62000776825462000532565b62000783828285620006a8565b600060209050601f831160018114620007bb5760008415620007a6578287015190505b620007b2858262000725565b86555062000822565b601f198416620007cb8662000567565b60005b82811015620007f557848901518255600182019150602085019450602081019050620007ce565b8683101562000815578489015162000811601f89168262000705565b8355505b6001600288020188555050505b505050505050565b6080516155ca6200088560003960008181610b7201528181610f4a0152818161103e0152818161128c0152818161145201528181611b9e01528181611c9701528181611f81015281816124740152612db701526155ca6000f3fe6080604052600436106102915760003560e01c8063715018a61161015a578063b88d4fde116100c1578063df2a5b3b1161007a578063df2a5b3b14610a50578063e2b3682314610a79578063e985e9c514610aa4578063eb8d72b714610ae1578063f2fde38b14610b0a578063f5ecbdbc14610b3357610291565b8063b88d4fde14610951578063baf3292d1461097a578063c4461834146109a3578063c87b56dd146109ce578063cbed8b9c14610a0b578063d1deba1f14610a3457610291565b80639ba3277a116101135780639ba3277a146108505780639f38369a1461088d578063a22cb465146108ca578063a6c3d165146108f3578063b353aaa71461091c578063b58ec1491461094757610291565b8063715018a61461073e5780637533d788146107555780638cfd8f5c146107925780638da5cb5b146107cf578063950c8a74146107fa57806395d89b411461082557610291565b806325a32ecb116101fe578063570b3c6a116101b7578063570b3c6a146105f85780635b8c41e6146106215780636352211e1461065e578063645b8b1b1461069b57806366ad5c8a146106d857806370a082311461070157610291565b806325a32ecb146104c45780633d8b38f6146104ef5780633f1f4fa41461052c57806342842e0e1461056957806342d65a8d146105925780634f558e79146105bb57610291565b8063095ea7b311610250578063095ea7b3146103b85780630df37483146103e157806310ddb1371461040a5780631249c58b146104335780631e7269c51461045e57806323b872dd1461049b57610291565b80621d3567146102965780629a9b7b146102bf57806301ffc9a7146102ea57806306fdde031461032757806307e0db1714610352578063081812fc1461037b575b600080fd5b3480156102a257600080fd5b506102bd60048036038101906102b8919061385b565b610b70565b005b3480156102cb57600080fd5b506102d4610dc6565b6040516102e1919061391b565b60405180910390f35b3480156102f657600080fd5b50610311600480360381019061030c919061398e565b610dcc565b60405161031e91906139d6565b60405180910390f35b34801561033357600080fd5b5061033c610eae565b6040516103499190613a81565b60405180910390f35b34801561035e57600080fd5b5061037960048036038101906103749190613aa3565b610f40565b005b34801561038757600080fd5b506103a2600480360381019061039d9190613afc565b610fd6565b6040516103af9190613b6a565b60405180910390f35b3480156103c457600080fd5b506103df60048036038101906103da9190613bb1565b610ff2565b005b3480156103ed57600080fd5b5061040860048036038101906104039190613bf1565b611008565b005b34801561041657600080fd5b50610431600480360381019061042c9190613aa3565b611034565b005b34801561043f57600080fd5b506104486110ca565b604051610455919061391b565b60405180910390f35b34801561046a57600080fd5b5061048560048036038101906104809190613c31565b6111e2565b604051610492919061391b565b60405180910390f35b3480156104a757600080fd5b506104c260048036038101906104bd9190613c5e565b6111fa565b005b3480156104d057600080fd5b506104d961122c565b6040516104e6919061391b565b60405180910390f35b3480156104fb57600080fd5b5061051660048036038101906105119190613cb1565b61133c565b60405161052391906139d6565b60405180910390f35b34801561053857600080fd5b50610553600480360381019061054e9190613aa3565b611410565b604051610560919061391b565b60405180910390f35b34801561057557600080fd5b50610590600480360381019061058b9190613c5e565b611428565b005b34801561059e57600080fd5b506105b960048036038101906105b49190613cb1565b611448565b005b3480156105c757600080fd5b506105e260048036038101906105dd9190613afc565b6114e4565b6040516105ef91906139d6565b60405180910390f35b34801561060457600080fd5b5061061f600480360381019061061a9190613d67565b611504565b005b34801561062d57600080fd5b5061064860048036038101906106439190613ee4565b611522565b6040516106559190613f6c565b60405180910390f35b34801561066a57600080fd5b5061068560048036038101906106809190613afc565b61156a565b6040516106929190613b6a565b60405180910390f35b3480156106a757600080fd5b506106c260048036038101906106bd9190613c31565b61157c565b6040516106cf9190613ffe565b60405180910390f35b3480156106e457600080fd5b506106ff60048036038101906106fa919061385b565b611634565b005b34801561070d57600080fd5b5061072860048036038101906107239190613c31565b611745565b604051610735919061391b565b60405180910390f35b34801561074a57600080fd5b506107536117ff565b005b34801561076157600080fd5b5061077c60048036038101906107779190613aa3565b611813565b604051610789919061406e565b60405180910390f35b34801561079e57600080fd5b506107b960048036038101906107b49190614090565b6118b3565b6040516107c6919061391b565b60405180910390f35b3480156107db57600080fd5b506107e46118d8565b6040516107f19190613b6a565b60405180910390f35b34801561080657600080fd5b5061080f611901565b60405161081c9190613b6a565b60405180910390f35b34801561083157600080fd5b5061083a611927565b6040516108479190613a81565b60405180910390f35b34801561085c57600080fd5b5061087760048036038101906108729190613c31565b6119b9565b60405161088491906139d6565b60405180910390f35b34801561089957600080fd5b506108b460048036038101906108af9190613aa3565b6119d9565b6040516108c1919061406e565b60405180910390f35b3480156108d657600080fd5b506108f160048036038101906108ec91906140fc565b611af2565b005b3480156108ff57600080fd5b5061091a60048036038101906109159190613cb1565b611b08565b005b34801561092857600080fd5b50610931611b9c565b60405161093e919061419b565b60405180910390f35b61094f611bc0565b005b34801561095d57600080fd5b50610978600480360381019061097391906141b6565b611de6565b005b34801561098657600080fd5b506109a1600480360381019061099c9190613c31565b611e03565b005b3480156109af57600080fd5b506109b8611e86565b6040516109c5919061391b565b60405180910390f35b3480156109da57600080fd5b506109f560048036038101906109f09190613afc565b611e8c565b604051610a029190613a81565b60405180910390f35b348015610a1757600080fd5b50610a326004803603810190610a2d9190614239565b611f77565b005b610a4e6004803603810190610a49919061385b565b612019565b005b348015610a5c57600080fd5b50610a776004803603810190610a7291906142c1565b61225c565b005b348015610a8557600080fd5b50610a8e6122dd565b604051610a9b9190614323565b60405180910390f35b348015610ab057600080fd5b50610acb6004803603810190610ac6919061433e565b6122e3565b604051610ad891906139d6565b60405180910390f35b348015610aed57600080fd5b50610b086004803603810190610b039190613cb1565b612377565b005b348015610b1657600080fd5b50610b316004803603810190610b2c9190613c31565b6123ea565b005b348015610b3f57600080fd5b50610b5a6004803603810190610b55919061437e565b612470565b604051610b67919061406e565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16610baf612521565b73ffffffffffffffffffffffffffffffffffffffff1614610c05576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bfc90614431565b60405180910390fd5b6000600760008861ffff1661ffff1681526020019081526020016000208054610c2d90614480565b80601f0160208091040260200160405190810160405280929190818152602001828054610c5990614480565b8015610ca65780601f10610c7b57610100808354040283529160200191610ca6565b820191906000526020600020905b815481529060010190602001808311610c8957829003601f168201915b50505050509050805186869050148015610cc1575060008151115b8015610cea575080805190602001208686604051610ce09291906144e1565b6040518091039020145b610d29576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d209061456c565b60405180910390fd5b610dbd8787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508686868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050612529565b50505050505050565b600f5481565b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610e9757507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610ea75750610ea6826125f4565b5b9050919050565b606060018054610ebd90614480565b80601f0160208091040260200160405190810160405280929190818152602001828054610ee990614480565b8015610f365780601f10610f0b57610100808354040283529160200191610f36565b820191906000526020600020905b815481529060010190602001808311610f1957829003601f168201915b5050505050905090565b610f4861265e565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166307e0db17826040518263ffffffff1660e01b8152600401610fa19190614323565b600060405180830381600087803b158015610fbb57600080fd5b505af1158015610fcf573d6000803e3d6000fd5b5050505050565b6000610fe1826126e5565b50610feb8261276d565b9050919050565b6110048282610fff612521565b6127aa565b5050565b61101061265e565b80600960008461ffff1661ffff168152602001908152602001600020819055505050565b61103c61265e565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166310ddb137826040518263ffffffff1660e01b81526004016110959190614323565b600060405180830381600087803b1580156110af57600080fd5b505af11580156110c3573d6000803e3d6000fd5b5050505050565b600080600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414611144576040517fddefae2800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600f5490506001600d600083815260200190815260200160002060006101000a81548160ff02191690831515021790555080600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506111c533826127bc565b600f60008154809291906111d8906145bb565b9190505591505090565b600c6020528060005260406000206000915090505481565b6040517fa4420a9500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008033600160405160200161124392919061464b565b60405160208183030381529060405290506000600190506000620557309050600082826040516020016112779291906146cb565b604051602081830303815290604052905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166340a7bb106127ee30886000876040518663ffffffff1660e01b81526004016112ee9594939291906146f7565b6040805180830381865afa15801561130a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061132e919061476d565b509050809550505050505090565b600080600760008661ffff1661ffff168152602001908152602001600020805461136590614480565b80601f016020809104026020016040519081016040528092919081815260200182805461139190614480565b80156113de5780601f106113b3576101008083540402835291602001916113de565b820191906000526020600020905b8154815290600101906020018083116113c157829003601f168201915b5050505050905083836040516113f59291906144e1565b60405180910390208180519060200120149150509392505050565b60096020528060005260406000206000915090505481565b61144383838360405180602001604052806000815250611de6565b505050565b61145061265e565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166342d65a8d8484846040518463ffffffff1660e01b81526004016114ad939291906147da565b600060405180830381600087803b1580156114c757600080fd5b505af11580156114db573d6000803e3d6000fd5b50505050505050565b600d6020528060005260406000206000915054906101000a900460ff1681565b61150c61265e565b81816010918261151d9291906149b9565b505050565b600b6020528260005260406000208280516020810182018051848252602083016020850120818352809550505050505060205280600052604060002060009250925050505481565b6000611575826126e5565b9050919050565b6000600e60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156115d9576002905061162f565b6000600c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054111561162a576001905061162f565b600090505b919050565b3073ffffffffffffffffffffffffffffffffffffffff16611653612521565b73ffffffffffffffffffffffffffffffffffffffff16146116a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116a090614afb565b60405180910390fd5b61173d8686868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506128b5565b505050505050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036117b85760006040517f89c62b640000000000000000000000000000000000000000000000000000000081526004016117af9190613b6a565b60405180910390fd5b600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b61180761265e565b61181160006128e7565b565b6007602052806000526040600020600091509050805461183290614480565b80601f016020809104026020016040519081016040528092919081815260200182805461185e90614480565b80156118ab5780601f10611880576101008083540402835291602001916118ab565b820191906000526020600020905b81548152906001019060200180831161188e57829003601f168201915b505050505081565b6008602052816000526040600020602052806000526040600020600091509150505481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60606002805461193690614480565b80601f016020809104026020016040519081016040528092919081815260200182805461196290614480565b80156119af5780601f10611984576101008083540402835291602001916119af565b820191906000526020600020905b81548152906001019060200180831161199257829003601f168201915b5050505050905090565b600e6020528060005260406000206000915054906101000a900460ff1681565b60606000600760008461ffff1661ffff1681526020019081526020016000208054611a0390614480565b80601f0160208091040260200160405190810160405280929190818152602001828054611a2f90614480565b8015611a7c5780601f10611a5157610100808354040283529160200191611a7c565b820191906000526020600020905b815481529060010190602001808311611a5f57829003601f168201915b505050505090506000815103611ac7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611abe90614b67565b60405180910390fd5b611aea600060148351611ada9190614b87565b836129ab9092919063ffffffff16565b915050919050565b611b04611afd612521565b8383612ac9565b5050565b611b1061265e565b818130604051602001611b2593929190614c03565b604051602081830303815290604052600760008561ffff1661ffff1681526020019081526020016000209081611b5b9190614c88565b507f8c0400cfe2d1199b1a725c78960bcc2a344d869b80590d0f2bd005db15a572ce838383604051611b8f939291906147da565b60405180910390a1505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000600d600083815260200190815260200160002060006101000a81548160ff021916908315150217905550611c3981612c38565b60003382604051602001611c4e929190614d5a565b6040516020818303038152906040529050600060019050600062055730905060008282604051602001611c829291906146cb565b604051602081830303815290604052905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166340a7bb106127ee30886000876040518663ffffffff1660e01b8152600401611cf99594939291906146f7565b6040805180830381865afa158015611d15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d39919061476d565b509050803411611d75576040517f1c26714c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600e60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550611dde6127ee863360008634612cbe565b505050505050565b611df18484846111fa565b611dfd84848484612e54565b50505050565b611e0b61265e565b80600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f5db758e995a17ec1ad84bdef7e8c3293a0bd6179bcce400dff5d4c3d87db726b81604051611e7b9190613b6a565b60405180910390a150565b61271081565b6060600d600083815260200190815260200160002060009054906101000a900460ff16611ee5576040517fceea21b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60108054611ef290614480565b80601f0160208091040260200160405190810160405280929190818152602001828054611f1e90614480565b8015611f6b5780601f10611f4057610100808354040283529160200191611f6b565b820191906000526020600020905b815481529060010190602001808311611f4e57829003601f168201915b50505050509050919050565b611f7f61265e565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663cbed8b9c86868686866040518663ffffffff1660e01b8152600401611fe0959493929190614d83565b600060405180830381600087803b158015611ffa57600080fd5b505af115801561200e573d6000803e3d6000fd5b505050505050505050565b6000600b60008861ffff1661ffff16815260200190815260200160002086866040516120469291906144e1565b908152602001604051809103902060008567ffffffffffffffff1667ffffffffffffffff1681526020019081526020016000205490506000801b81036120c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120b890614e43565b60405180910390fd5b8083836040516120d29291906144e1565b60405180910390201461211a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161211190614ed5565b60405180910390fd5b6000801b600b60008961ffff1661ffff16815260200190815260200160002087876040516121499291906144e1565b908152602001604051809103902060008667ffffffffffffffff1667ffffffffffffffff168152602001908152602001600020819055506122148787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508686868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506128b5565b7fc264d91f3adc5588250e1551f547752ca0cfa8f6b530d243b9f9f4cab10ea8e5878787878560405161224b959493929190614f04565b60405180910390a150505050505050565b61226461265e565b80600860008561ffff1661ffff16815260200190815260200160002060008461ffff1661ffff168152602001908152602001600020819055507f9d5c7c0b934da8fefa9c7760c98383778a12dfbfc0c3b3106518f43fb9508ac08383836040516122d093929190614f52565b60405180910390a1505050565b6127ee81565b6000600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b61237f61265e565b8181600760008661ffff1661ffff16815260200190815260200160002091826123a9929190614f94565b507ffa41487ad5d6728f0b19276fa1eddc16558578f5109fc39d2dc33c3230470dab8383836040516123dd939291906147da565b60405180910390a1505050565b6123f261265e565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036124645760006040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260040161245b9190613b6a565b60405180910390fd5b61246d816128e7565b50565b60607f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663f5ecbdbc868630866040518563ffffffff1660e01b81526004016124d19493929190615064565b600060405180830381865afa1580156124ee573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906125179190615119565b9050949350505050565b600033905090565b6000806125d55a60966366ad5c8a60e01b898989896040516024016125519493929190615162565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050503073ffffffffffffffffffffffffffffffffffffffff1661300b909392919063ffffffff16565b91509150816125ec576125eb86868686856130a3565b5b505050505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b612666612521565b73ffffffffffffffffffffffffffffffffffffffff166126846118d8565b73ffffffffffffffffffffffffffffffffffffffff16146126e3576126a7612521565b6040517f118cdaa70000000000000000000000000000000000000000000000000000000081526004016126da9190613b6a565b60405180910390fd5b565b6000806126f183613151565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361276457826040517f7e27328900000000000000000000000000000000000000000000000000000000815260040161275b919061391b565b60405180910390fd5b80915050919050565b60006005600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6127b7838383600161318e565b505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361282e5760006040517f64a0ae920000000000000000000000000000000000000000000000000000000081526004016128259190613b6a565b60405180910390fd5b600061283c83836000613353565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146128b05760006040517f73c6ac6e0000000000000000000000000000000000000000000000000000000081526004016128a79190613b6a565b60405180910390fd5b505050565b6040517f3a5cf9cb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b606081601f836129bb91906151b5565b10156129fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129f390615235565b60405180910390fd5b8183612a0891906151b5565b84511015612a4b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a42906152a1565b60405180910390fd5b6060821560008114612a6c5760405191506000825260208201604052612abd565b6040519150601f8416801560200281840101858101878315602002848b0101015b81831015612aaa5780518352602083019250602081019050612a8d565b50868552601f19601f8301166040525050505b50809150509392505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603612b3a57816040517f5b08ba18000000000000000000000000000000000000000000000000000000008152600401612b319190613b6a565b60405180910390fd5b80600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051612c2b91906139d6565b60405180910390a3505050565b6000612c476000836000613353565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603612cba57816040517f7e273289000000000000000000000000000000000000000000000000000000008152600401612cb1919061391b565b60405180910390fd5b5050565b6000600760008861ffff1661ffff1681526020019081526020016000208054612ce690614480565b80601f0160208091040260200160405190810160405280929190818152602001828054612d1290614480565b8015612d5f5780601f10612d3457610100808354040283529160200191612d5f565b820191906000526020600020905b815481529060010190602001808311612d4257829003601f168201915b505050505090506000815103612daa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612da190615333565b60405180910390fd5b612db587875161356d565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663c58031008389848a8a8a8a6040518863ffffffff1660e01b8152600401612e1996959493929190615374565b6000604051808303818588803b158015612e3257600080fd5b505af1158015612e46573d6000803e3d6000fd5b505050505050505050505050565b60008373ffffffffffffffffffffffffffffffffffffffff163b1115613005578273ffffffffffffffffffffffffffffffffffffffff1663150b7a02612e98612521565b8685856040518563ffffffff1660e01b8152600401612eba94939291906153ea565b6020604051808303816000875af1925050508015612ef657506040513d601f19601f82011682018060405250810190612ef3919061544b565b60015b612f7a573d8060008114612f26576040519150601f19603f3d011682016040523d82523d6000602084013e612f2b565b606091505b506000815103612f7257836040517f64a0ae92000000000000000000000000000000000000000000000000000000008152600401612f699190613b6a565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161461300357836040517f64a0ae92000000000000000000000000000000000000000000000000000000008152600401612ffa9190613b6a565b60405180910390fd5b505b50505050565b6000606060008060008661ffff1667ffffffffffffffff81111561303257613031613db9565b5b6040519080825280601f01601f1916602001820160405280156130645781602001600182028036833780820191505090505b50905060008087516020890160008d8df191503d925086831115613086578692505b828152826000602083013e81819450945050505094509492505050565b8180519060200120600b60008761ffff1661ffff168152602001908152602001600020856040516130d491906154a9565b908152602001604051809103902060008567ffffffffffffffff1667ffffffffffffffff168152602001908152602001600020819055507fe183f33de2837795525b4792ca4cd60535bd77c53b7e7030060bfcf5734d6b0c85858585856040516131429594939291906154c0565b60405180910390a15050505050565b60006003600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b80806131c75750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b156132fb5760006131d7846126e5565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561324257508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b8015613255575061325381846122e3565b155b1561329757826040517fa9fbf51f00000000000000000000000000000000000000000000000000000000815260040161328e9190613b6a565b60405180910390fd5b81156132f957838573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45b505b836005600085815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b60008061335f84613151565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16146133a1576133a08184866135e3565b5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614613432576133e360008560008061318e565b6001600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055505b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16146134b5576001600460008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055505b846003600086815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550838573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4809150509392505050565b6000600960008461ffff1661ffff1681526020019081526020016000205490506000810361359b5761271090505b808211156135de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016135d590615574565b60405180910390fd5b505050565b6135ee8383836136a7565b6136a257600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361366357806040517f7e27328900000000000000000000000000000000000000000000000000000000815260040161365a919061391b565b60405180910390fd5b81816040517f177e802f000000000000000000000000000000000000000000000000000000008152600401613699929190614d5a565b60405180910390fd5b505050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561375f57508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480613720575061371f84846122e3565b5b8061375e57508273ffffffffffffffffffffffffffffffffffffffff166137468361276d565b73ffffffffffffffffffffffffffffffffffffffff16145b5b90509392505050565b6000604051905090565b600080fd5b600080fd5b600061ffff82169050919050565b6137938161377c565b811461379e57600080fd5b50565b6000813590506137b08161378a565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f8401126137db576137da6137b6565b5b8235905067ffffffffffffffff8111156137f8576137f76137bb565b5b602083019150836001820283011115613814576138136137c0565b5b9250929050565b600067ffffffffffffffff82169050919050565b6138388161381b565b811461384357600080fd5b50565b6000813590506138558161382f565b92915050565b6000806000806000806080878903121561387857613877613772565b5b600061388689828a016137a1565b965050602087013567ffffffffffffffff8111156138a7576138a6613777565b5b6138b389828a016137c5565b955095505060406138c689828a01613846565b935050606087013567ffffffffffffffff8111156138e7576138e6613777565b5b6138f389828a016137c5565b92509250509295509295509295565b6000819050919050565b61391581613902565b82525050565b6000602082019050613930600083018461390c565b92915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61396b81613936565b811461397657600080fd5b50565b60008135905061398881613962565b92915050565b6000602082840312156139a4576139a3613772565b5b60006139b284828501613979565b91505092915050565b60008115159050919050565b6139d0816139bb565b82525050565b60006020820190506139eb60008301846139c7565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015613a2b578082015181840152602081019050613a10565b60008484015250505050565b6000601f19601f8301169050919050565b6000613a53826139f1565b613a5d81856139fc565b9350613a6d818560208601613a0d565b613a7681613a37565b840191505092915050565b60006020820190508181036000830152613a9b8184613a48565b905092915050565b600060208284031215613ab957613ab8613772565b5b6000613ac7848285016137a1565b91505092915050565b613ad981613902565b8114613ae457600080fd5b50565b600081359050613af681613ad0565b92915050565b600060208284031215613b1257613b11613772565b5b6000613b2084828501613ae7565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000613b5482613b29565b9050919050565b613b6481613b49565b82525050565b6000602082019050613b7f6000830184613b5b565b92915050565b613b8e81613b49565b8114613b9957600080fd5b50565b600081359050613bab81613b85565b92915050565b60008060408385031215613bc857613bc7613772565b5b6000613bd685828601613b9c565b9250506020613be785828601613ae7565b9150509250929050565b60008060408385031215613c0857613c07613772565b5b6000613c16858286016137a1565b9250506020613c2785828601613ae7565b9150509250929050565b600060208284031215613c4757613c46613772565b5b6000613c5584828501613b9c565b91505092915050565b600080600060608486031215613c7757613c76613772565b5b6000613c8586828701613b9c565b9350506020613c9686828701613b9c565b9250506040613ca786828701613ae7565b9150509250925092565b600080600060408486031215613cca57613cc9613772565b5b6000613cd8868287016137a1565b935050602084013567ffffffffffffffff811115613cf957613cf8613777565b5b613d05868287016137c5565b92509250509250925092565b60008083601f840112613d2757613d266137b6565b5b8235905067ffffffffffffffff811115613d4457613d436137bb565b5b602083019150836001820283011115613d6057613d5f6137c0565b5b9250929050565b60008060208385031215613d7e57613d7d613772565b5b600083013567ffffffffffffffff811115613d9c57613d9b613777565b5b613da885828601613d11565b92509250509250929050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b613df182613a37565b810181811067ffffffffffffffff82111715613e1057613e0f613db9565b5b80604052505050565b6000613e23613768565b9050613e2f8282613de8565b919050565b600067ffffffffffffffff821115613e4f57613e4e613db9565b5b613e5882613a37565b9050602081019050919050565b82818337600083830152505050565b6000613e87613e8284613e34565b613e19565b905082815260208101848484011115613ea357613ea2613db4565b5b613eae848285613e65565b509392505050565b600082601f830112613ecb57613eca6137b6565b5b8135613edb848260208601613e74565b91505092915050565b600080600060608486031215613efd57613efc613772565b5b6000613f0b868287016137a1565b935050602084013567ffffffffffffffff811115613f2c57613f2b613777565b5b613f3886828701613eb6565b9250506040613f4986828701613846565b9150509250925092565b6000819050919050565b613f6681613f53565b82525050565b6000602082019050613f816000830184613f5d565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60038110613fc757613fc6613f87565b5b50565b6000819050613fd882613fb6565b919050565b6000613fe882613fca565b9050919050565b613ff881613fdd565b82525050565b60006020820190506140136000830184613fef565b92915050565b600081519050919050565b600082825260208201905092915050565b600061404082614019565b61404a8185614024565b935061405a818560208601613a0d565b61406381613a37565b840191505092915050565b600060208201905081810360008301526140888184614035565b905092915050565b600080604083850312156140a7576140a6613772565b5b60006140b5858286016137a1565b92505060206140c6858286016137a1565b9150509250929050565b6140d9816139bb565b81146140e457600080fd5b50565b6000813590506140f6816140d0565b92915050565b6000806040838503121561411357614112613772565b5b600061412185828601613b9c565b9250506020614132858286016140e7565b9150509250929050565b6000819050919050565b600061416161415c61415784613b29565b61413c565b613b29565b9050919050565b600061417382614146565b9050919050565b600061418582614168565b9050919050565b6141958161417a565b82525050565b60006020820190506141b0600083018461418c565b92915050565b600080600080608085870312156141d0576141cf613772565b5b60006141de87828801613b9c565b94505060206141ef87828801613b9c565b935050604061420087828801613ae7565b925050606085013567ffffffffffffffff81111561422157614220613777565b5b61422d87828801613eb6565b91505092959194509250565b60008060008060006080868803121561425557614254613772565b5b6000614263888289016137a1565b9550506020614274888289016137a1565b945050604061428588828901613ae7565b935050606086013567ffffffffffffffff8111156142a6576142a5613777565b5b6142b2888289016137c5565b92509250509295509295909350565b6000806000606084860312156142da576142d9613772565b5b60006142e8868287016137a1565b93505060206142f9868287016137a1565b925050604061430a86828701613ae7565b9150509250925092565b61431d8161377c565b82525050565b60006020820190506143386000830184614314565b92915050565b6000806040838503121561435557614354613772565b5b600061436385828601613b9c565b925050602061437485828601613b9c565b9150509250929050565b6000806000806080858703121561439857614397613772565b5b60006143a6878288016137a1565b94505060206143b7878288016137a1565b93505060406143c887828801613b9c565b92505060606143d987828801613ae7565b91505092959194509250565b7f4c7a4170703a20696e76616c696420656e64706f696e742063616c6c65720000600082015250565b600061441b601e836139fc565b9150614426826143e5565b602082019050919050565b6000602082019050818103600083015261444a8161440e565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061449857607f821691505b6020821081036144ab576144aa614451565b5b50919050565b600081905092915050565b60006144c883856144b1565b93506144d5838584613e65565b82840190509392505050565b60006144ee8284866144bc565b91508190509392505050565b7f4c7a4170703a20696e76616c696420736f757263652073656e64696e6720636f60008201527f6e74726163740000000000000000000000000000000000000000000000000000602082015250565b60006145566026836139fc565b9150614561826144fa565b604082019050919050565b6000602082019050818103600083015261458581614549565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006145c682613902565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036145f8576145f761458c565b5b600182019050919050565b6000819050919050565b600060ff82169050919050565b600061463561463061462b84614603565b61413c565b61460d565b9050919050565b6146458161461a565b82525050565b60006040820190506146606000830185613b5b565b61466d602083018461463c565b9392505050565b60008160f01b9050919050565b600061468c82614674565b9050919050565b6146a461469f8261377c565b614681565b82525050565b6000819050919050565b6146c56146c082613902565b6146aa565b82525050565b60006146d78285614693565b6002820191506146e782846146b4565b6020820191508190509392505050565b600060a08201905061470c6000830188614314565b6147196020830187613b5b565b818103604083015261472b8186614035565b905061473a60608301856139c7565b818103608083015261474c8184614035565b90509695505050505050565b60008151905061476781613ad0565b92915050565b6000806040838503121561478457614783613772565b5b600061479285828601614758565b92505060206147a385828601614758565b9150509250929050565b60006147b98385614024565b93506147c6838584613e65565b6147cf83613a37565b840190509392505050565b60006040820190506147ef6000830186614314565b81810360208301526148028184866147ad565b9050949350505050565b600082905092915050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026148797fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8261483c565b614883868361483c565b95508019841693508086168417925050509392505050565b60006148b66148b16148ac84613902565b61413c565b613902565b9050919050565b6000819050919050565b6148d08361489b565b6148e46148dc826148bd565b848454614849565b825550505050565b600090565b6148f96148ec565b6149048184846148c7565b505050565b5b818110156149285761491d6000826148f1565b60018101905061490a565b5050565b601f82111561496d5761493e81614817565b6149478461482c565b81016020851015614956578190505b61496a6149628561482c565b830182614909565b50505b505050565b600082821c905092915050565b600061499060001984600802614972565b1980831691505092915050565b60006149a9838361497f565b9150826002028217905092915050565b6149c3838361480c565b67ffffffffffffffff8111156149dc576149db613db9565b5b6149e68254614480565b6149f182828561492c565b6000601f831160018114614a205760008415614a0e578287013590505b614a18858261499d565b865550614a80565b601f198416614a2e86614817565b60005b82811015614a5657848901358255600182019150602085019450602081019050614a31565b86831015614a735784890135614a6f601f89168261497f565b8355505b6001600288020188555050505b50505050505050565b7f4e6f6e626c6f636b696e674c7a4170703a2063616c6c6572206d75737420626560008201527f204c7a4170700000000000000000000000000000000000000000000000000000602082015250565b6000614ae56026836139fc565b9150614af082614a89565b604082019050919050565b60006020820190508181036000830152614b1481614ad8565b9050919050565b7f4c7a4170703a206e6f20747275737465642070617468207265636f7264000000600082015250565b6000614b51601d836139fc565b9150614b5c82614b1b565b602082019050919050565b60006020820190508181036000830152614b8081614b44565b9050919050565b6000614b9282613902565b9150614b9d83613902565b9250828203905081811115614bb557614bb461458c565b5b92915050565b60008160601b9050919050565b6000614bd382614bbb565b9050919050565b6000614be582614bc8565b9050919050565b614bfd614bf882613b49565b614bda565b82525050565b6000614c108285876144bc565b9150614c1c8284614bec565b601482019150819050949350505050565b60008190508160005260206000209050919050565b601f821115614c8357614c5481614c2d565b614c5d8461482c565b81016020851015614c6c578190505b614c80614c788561482c565b830182614909565b50505b505050565b614c9182614019565b67ffffffffffffffff811115614caa57614ca9613db9565b5b614cb48254614480565b614cbf828285614c42565b600060209050601f831160018114614cf25760008415614ce0578287015190505b614cea858261499d565b865550614d52565b601f198416614d0086614c2d565b60005b82811015614d2857848901518255600182019150602085019450602081019050614d03565b86831015614d455784890151614d41601f89168261497f565b8355505b6001600288020188555050505b505050505050565b6000604082019050614d6f6000830185613b5b565b614d7c602083018461390c565b9392505050565b6000608082019050614d986000830188614314565b614da56020830187614314565b614db2604083018661390c565b8181036060830152614dc58184866147ad565b90509695505050505050565b7f4e6f6e626c6f636b696e674c7a4170703a206e6f2073746f726564206d65737360008201527f6167650000000000000000000000000000000000000000000000000000000000602082015250565b6000614e2d6023836139fc565b9150614e3882614dd1565b604082019050919050565b60006020820190508181036000830152614e5c81614e20565b9050919050565b7f4e6f6e626c6f636b696e674c7a4170703a20696e76616c6964207061796c6f6160008201527f6400000000000000000000000000000000000000000000000000000000000000602082015250565b6000614ebf6021836139fc565b9150614eca82614e63565b604082019050919050565b60006020820190508181036000830152614eee81614eb2565b9050919050565b614efe8161381b565b82525050565b6000608082019050614f196000830188614314565b8181036020830152614f2c8186886147ad565b9050614f3b6040830185614ef5565b614f486060830184613f5d565b9695505050505050565b6000606082019050614f676000830186614314565b614f746020830185614314565b614f81604083018461390c565b949350505050565b600082905092915050565b614f9e8383614f89565b67ffffffffffffffff811115614fb757614fb6613db9565b5b614fc18254614480565b614fcc828285614c42565b6000601f831160018114614ffb5760008415614fe9578287013590505b614ff3858261499d565b86555061505b565b601f19841661500986614c2d565b60005b828110156150315784890135825560018201915060208501945060208101905061500c565b8683101561504e578489013561504a601f89168261497f565b8355505b6001600288020188555050505b50505050505050565b60006080820190506150796000830187614314565b6150866020830186614314565b6150936040830185613b5b565b6150a0606083018461390c565b95945050505050565b60006150bc6150b784613e34565b613e19565b9050828152602081018484840111156150d8576150d7613db4565b5b6150e3848285613a0d565b509392505050565b600082601f830112615100576150ff6137b6565b5b81516151108482602086016150a9565b91505092915050565b60006020828403121561512f5761512e613772565b5b600082015167ffffffffffffffff81111561514d5761514c613777565b5b615159848285016150eb565b91505092915050565b60006080820190506151776000830187614314565b81810360208301526151898186614035565b90506151986040830185614ef5565b81810360608301526151aa8184614035565b905095945050505050565b60006151c082613902565b91506151cb83613902565b92508282019050808211156151e3576151e261458c565b5b92915050565b7f736c6963655f6f766572666c6f77000000000000000000000000000000000000600082015250565b600061521f600e836139fc565b915061522a826151e9565b602082019050919050565b6000602082019050818103600083015261524e81615212565b9050919050565b7f736c6963655f6f75744f66426f756e6473000000000000000000000000000000600082015250565b600061528b6011836139fc565b915061529682615255565b602082019050919050565b600060208201905081810360008301526152ba8161527e565b9050919050565b7f4c7a4170703a2064657374696e6174696f6e20636861696e206973206e6f742060008201527f61207472757374656420736f7572636500000000000000000000000000000000602082015250565b600061531d6030836139fc565b9150615328826152c1565b604082019050919050565b6000602082019050818103600083015261534c81615310565b9050919050565b600061535e82613b29565b9050919050565b61536e81615353565b82525050565b600060c0820190506153896000830189614314565b818103602083015261539b8188614035565b905081810360408301526153af8187614035565b90506153be6060830186615365565b6153cb6080830185613b5b565b81810360a08301526153dd8184614035565b9050979650505050505050565b60006080820190506153ff6000830187613b5b565b61540c6020830186613b5b565b615419604083018561390c565b818103606083015261542b8184614035565b905095945050505050565b60008151905061544581613962565b92915050565b60006020828403121561546157615460613772565b5b600061546f84828501615436565b91505092915050565b600061548382614019565b61548d81856144b1565b935061549d818560208601613a0d565b80840191505092915050565b60006154b58284615478565b915081905092915050565b600060a0820190506154d56000830188614314565b81810360208301526154e78187614035565b90506154f66040830186614ef5565b81810360608301526155088185614035565b9050818103608083015261551c8184614035565b90509695505050505050565b7f4c7a4170703a207061796c6f61642073697a6520697320746f6f206c61726765600082015250565b600061555e6020836139fc565b915061556982615528565b602082019050919050565b6000602082019050818103600083015261558d81615551565b905091905056fea2646970667358221220d03fce64d893b0f778ea923f03a7f6e0dc580dbf661e889d6ed467630dce1e4264736f6c63430008160033000000000000000000000000ae92d5ad7583ad66e49a0c67bad18f6ba52dddc10000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000003368747470733a2f2f71756573742d66696c65732e6672616d652e78797a2f6d657461646174612f7365706f6c69612e6a736f6e00000000000000000000000000

Deployed Bytecode

0x6080604052600436106102915760003560e01c8063715018a61161015a578063b88d4fde116100c1578063df2a5b3b1161007a578063df2a5b3b14610a50578063e2b3682314610a79578063e985e9c514610aa4578063eb8d72b714610ae1578063f2fde38b14610b0a578063f5ecbdbc14610b3357610291565b8063b88d4fde14610951578063baf3292d1461097a578063c4461834146109a3578063c87b56dd146109ce578063cbed8b9c14610a0b578063d1deba1f14610a3457610291565b80639ba3277a116101135780639ba3277a146108505780639f38369a1461088d578063a22cb465146108ca578063a6c3d165146108f3578063b353aaa71461091c578063b58ec1491461094757610291565b8063715018a61461073e5780637533d788146107555780638cfd8f5c146107925780638da5cb5b146107cf578063950c8a74146107fa57806395d89b411461082557610291565b806325a32ecb116101fe578063570b3c6a116101b7578063570b3c6a146105f85780635b8c41e6146106215780636352211e1461065e578063645b8b1b1461069b57806366ad5c8a146106d857806370a082311461070157610291565b806325a32ecb146104c45780633d8b38f6146104ef5780633f1f4fa41461052c57806342842e0e1461056957806342d65a8d146105925780634f558e79146105bb57610291565b8063095ea7b311610250578063095ea7b3146103b85780630df37483146103e157806310ddb1371461040a5780631249c58b146104335780631e7269c51461045e57806323b872dd1461049b57610291565b80621d3567146102965780629a9b7b146102bf57806301ffc9a7146102ea57806306fdde031461032757806307e0db1714610352578063081812fc1461037b575b600080fd5b3480156102a257600080fd5b506102bd60048036038101906102b8919061385b565b610b70565b005b3480156102cb57600080fd5b506102d4610dc6565b6040516102e1919061391b565b60405180910390f35b3480156102f657600080fd5b50610311600480360381019061030c919061398e565b610dcc565b60405161031e91906139d6565b60405180910390f35b34801561033357600080fd5b5061033c610eae565b6040516103499190613a81565b60405180910390f35b34801561035e57600080fd5b5061037960048036038101906103749190613aa3565b610f40565b005b34801561038757600080fd5b506103a2600480360381019061039d9190613afc565b610fd6565b6040516103af9190613b6a565b60405180910390f35b3480156103c457600080fd5b506103df60048036038101906103da9190613bb1565b610ff2565b005b3480156103ed57600080fd5b5061040860048036038101906104039190613bf1565b611008565b005b34801561041657600080fd5b50610431600480360381019061042c9190613aa3565b611034565b005b34801561043f57600080fd5b506104486110ca565b604051610455919061391b565b60405180910390f35b34801561046a57600080fd5b5061048560048036038101906104809190613c31565b6111e2565b604051610492919061391b565b60405180910390f35b3480156104a757600080fd5b506104c260048036038101906104bd9190613c5e565b6111fa565b005b3480156104d057600080fd5b506104d961122c565b6040516104e6919061391b565b60405180910390f35b3480156104fb57600080fd5b5061051660048036038101906105119190613cb1565b61133c565b60405161052391906139d6565b60405180910390f35b34801561053857600080fd5b50610553600480360381019061054e9190613aa3565b611410565b604051610560919061391b565b60405180910390f35b34801561057557600080fd5b50610590600480360381019061058b9190613c5e565b611428565b005b34801561059e57600080fd5b506105b960048036038101906105b49190613cb1565b611448565b005b3480156105c757600080fd5b506105e260048036038101906105dd9190613afc565b6114e4565b6040516105ef91906139d6565b60405180910390f35b34801561060457600080fd5b5061061f600480360381019061061a9190613d67565b611504565b005b34801561062d57600080fd5b5061064860048036038101906106439190613ee4565b611522565b6040516106559190613f6c565b60405180910390f35b34801561066a57600080fd5b5061068560048036038101906106809190613afc565b61156a565b6040516106929190613b6a565b60405180910390f35b3480156106a757600080fd5b506106c260048036038101906106bd9190613c31565b61157c565b6040516106cf9190613ffe565b60405180910390f35b3480156106e457600080fd5b506106ff60048036038101906106fa919061385b565b611634565b005b34801561070d57600080fd5b5061072860048036038101906107239190613c31565b611745565b604051610735919061391b565b60405180910390f35b34801561074a57600080fd5b506107536117ff565b005b34801561076157600080fd5b5061077c60048036038101906107779190613aa3565b611813565b604051610789919061406e565b60405180910390f35b34801561079e57600080fd5b506107b960048036038101906107b49190614090565b6118b3565b6040516107c6919061391b565b60405180910390f35b3480156107db57600080fd5b506107e46118d8565b6040516107f19190613b6a565b60405180910390f35b34801561080657600080fd5b5061080f611901565b60405161081c9190613b6a565b60405180910390f35b34801561083157600080fd5b5061083a611927565b6040516108479190613a81565b60405180910390f35b34801561085c57600080fd5b5061087760048036038101906108729190613c31565b6119b9565b60405161088491906139d6565b60405180910390f35b34801561089957600080fd5b506108b460048036038101906108af9190613aa3565b6119d9565b6040516108c1919061406e565b60405180910390f35b3480156108d657600080fd5b506108f160048036038101906108ec91906140fc565b611af2565b005b3480156108ff57600080fd5b5061091a60048036038101906109159190613cb1565b611b08565b005b34801561092857600080fd5b50610931611b9c565b60405161093e919061419b565b60405180910390f35b61094f611bc0565b005b34801561095d57600080fd5b50610978600480360381019061097391906141b6565b611de6565b005b34801561098657600080fd5b506109a1600480360381019061099c9190613c31565b611e03565b005b3480156109af57600080fd5b506109b8611e86565b6040516109c5919061391b565b60405180910390f35b3480156109da57600080fd5b506109f560048036038101906109f09190613afc565b611e8c565b604051610a029190613a81565b60405180910390f35b348015610a1757600080fd5b50610a326004803603810190610a2d9190614239565b611f77565b005b610a4e6004803603810190610a49919061385b565b612019565b005b348015610a5c57600080fd5b50610a776004803603810190610a7291906142c1565b61225c565b005b348015610a8557600080fd5b50610a8e6122dd565b604051610a9b9190614323565b60405180910390f35b348015610ab057600080fd5b50610acb6004803603810190610ac6919061433e565b6122e3565b604051610ad891906139d6565b60405180910390f35b348015610aed57600080fd5b50610b086004803603810190610b039190613cb1565b612377565b005b348015610b1657600080fd5b50610b316004803603810190610b2c9190613c31565b6123ea565b005b348015610b3f57600080fd5b50610b5a6004803603810190610b55919061437e565b612470565b604051610b67919061406e565b60405180910390f35b7f000000000000000000000000ae92d5ad7583ad66e49a0c67bad18f6ba52dddc173ffffffffffffffffffffffffffffffffffffffff16610baf612521565b73ffffffffffffffffffffffffffffffffffffffff1614610c05576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bfc90614431565b60405180910390fd5b6000600760008861ffff1661ffff1681526020019081526020016000208054610c2d90614480565b80601f0160208091040260200160405190810160405280929190818152602001828054610c5990614480565b8015610ca65780601f10610c7b57610100808354040283529160200191610ca6565b820191906000526020600020905b815481529060010190602001808311610c8957829003601f168201915b50505050509050805186869050148015610cc1575060008151115b8015610cea575080805190602001208686604051610ce09291906144e1565b6040518091039020145b610d29576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d209061456c565b60405180910390fd5b610dbd8787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508686868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050612529565b50505050505050565b600f5481565b60007f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610e9757507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610ea75750610ea6826125f4565b5b9050919050565b606060018054610ebd90614480565b80601f0160208091040260200160405190810160405280929190818152602001828054610ee990614480565b8015610f365780601f10610f0b57610100808354040283529160200191610f36565b820191906000526020600020905b815481529060010190602001808311610f1957829003601f168201915b5050505050905090565b610f4861265e565b7f000000000000000000000000ae92d5ad7583ad66e49a0c67bad18f6ba52dddc173ffffffffffffffffffffffffffffffffffffffff166307e0db17826040518263ffffffff1660e01b8152600401610fa19190614323565b600060405180830381600087803b158015610fbb57600080fd5b505af1158015610fcf573d6000803e3d6000fd5b5050505050565b6000610fe1826126e5565b50610feb8261276d565b9050919050565b6110048282610fff612521565b6127aa565b5050565b61101061265e565b80600960008461ffff1661ffff168152602001908152602001600020819055505050565b61103c61265e565b7f000000000000000000000000ae92d5ad7583ad66e49a0c67bad18f6ba52dddc173ffffffffffffffffffffffffffffffffffffffff166310ddb137826040518263ffffffff1660e01b81526004016110959190614323565b600060405180830381600087803b1580156110af57600080fd5b505af11580156110c3573d6000803e3d6000fd5b5050505050565b600080600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414611144576040517fddefae2800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600f5490506001600d600083815260200190815260200160002060006101000a81548160ff02191690831515021790555080600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506111c533826127bc565b600f60008154809291906111d8906145bb565b9190505591505090565b600c6020528060005260406000206000915090505481565b6040517fa4420a9500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008033600160405160200161124392919061464b565b60405160208183030381529060405290506000600190506000620557309050600082826040516020016112779291906146cb565b604051602081830303815290604052905060007f000000000000000000000000ae92d5ad7583ad66e49a0c67bad18f6ba52dddc173ffffffffffffffffffffffffffffffffffffffff166340a7bb106127ee30886000876040518663ffffffff1660e01b81526004016112ee9594939291906146f7565b6040805180830381865afa15801561130a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061132e919061476d565b509050809550505050505090565b600080600760008661ffff1661ffff168152602001908152602001600020805461136590614480565b80601f016020809104026020016040519081016040528092919081815260200182805461139190614480565b80156113de5780601f106113b3576101008083540402835291602001916113de565b820191906000526020600020905b8154815290600101906020018083116113c157829003601f168201915b5050505050905083836040516113f59291906144e1565b60405180910390208180519060200120149150509392505050565b60096020528060005260406000206000915090505481565b61144383838360405180602001604052806000815250611de6565b505050565b61145061265e565b7f000000000000000000000000ae92d5ad7583ad66e49a0c67bad18f6ba52dddc173ffffffffffffffffffffffffffffffffffffffff166342d65a8d8484846040518463ffffffff1660e01b81526004016114ad939291906147da565b600060405180830381600087803b1580156114c757600080fd5b505af11580156114db573d6000803e3d6000fd5b50505050505050565b600d6020528060005260406000206000915054906101000a900460ff1681565b61150c61265e565b81816010918261151d9291906149b9565b505050565b600b6020528260005260406000208280516020810182018051848252602083016020850120818352809550505050505060205280600052604060002060009250925050505481565b6000611575826126e5565b9050919050565b6000600e60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156115d9576002905061162f565b6000600c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054111561162a576001905061162f565b600090505b919050565b3073ffffffffffffffffffffffffffffffffffffffff16611653612521565b73ffffffffffffffffffffffffffffffffffffffff16146116a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116a090614afb565b60405180910390fd5b61173d8686868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506128b5565b505050505050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036117b85760006040517f89c62b640000000000000000000000000000000000000000000000000000000081526004016117af9190613b6a565b60405180910390fd5b600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b61180761265e565b61181160006128e7565b565b6007602052806000526040600020600091509050805461183290614480565b80601f016020809104026020016040519081016040528092919081815260200182805461185e90614480565b80156118ab5780601f10611880576101008083540402835291602001916118ab565b820191906000526020600020905b81548152906001019060200180831161188e57829003601f168201915b505050505081565b6008602052816000526040600020602052806000526040600020600091509150505481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60606002805461193690614480565b80601f016020809104026020016040519081016040528092919081815260200182805461196290614480565b80156119af5780601f10611984576101008083540402835291602001916119af565b820191906000526020600020905b81548152906001019060200180831161199257829003601f168201915b5050505050905090565b600e6020528060005260406000206000915054906101000a900460ff1681565b60606000600760008461ffff1661ffff1681526020019081526020016000208054611a0390614480565b80601f0160208091040260200160405190810160405280929190818152602001828054611a2f90614480565b8015611a7c5780601f10611a5157610100808354040283529160200191611a7c565b820191906000526020600020905b815481529060010190602001808311611a5f57829003601f168201915b505050505090506000815103611ac7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611abe90614b67565b60405180910390fd5b611aea600060148351611ada9190614b87565b836129ab9092919063ffffffff16565b915050919050565b611b04611afd612521565b8383612ac9565b5050565b611b1061265e565b818130604051602001611b2593929190614c03565b604051602081830303815290604052600760008561ffff1661ffff1681526020019081526020016000209081611b5b9190614c88565b507f8c0400cfe2d1199b1a725c78960bcc2a344d869b80590d0f2bd005db15a572ce838383604051611b8f939291906147da565b60405180910390a1505050565b7f000000000000000000000000ae92d5ad7583ad66e49a0c67bad18f6ba52dddc181565b6000600c60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000600d600083815260200190815260200160002060006101000a81548160ff021916908315150217905550611c3981612c38565b60003382604051602001611c4e929190614d5a565b6040516020818303038152906040529050600060019050600062055730905060008282604051602001611c829291906146cb565b604051602081830303815290604052905060007f000000000000000000000000ae92d5ad7583ad66e49a0c67bad18f6ba52dddc173ffffffffffffffffffffffffffffffffffffffff166340a7bb106127ee30886000876040518663ffffffff1660e01b8152600401611cf99594939291906146f7565b6040805180830381865afa158015611d15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d39919061476d565b509050803411611d75576040517f1c26714c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600e60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550611dde6127ee863360008634612cbe565b505050505050565b611df18484846111fa565b611dfd84848484612e54565b50505050565b611e0b61265e565b80600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f5db758e995a17ec1ad84bdef7e8c3293a0bd6179bcce400dff5d4c3d87db726b81604051611e7b9190613b6a565b60405180910390a150565b61271081565b6060600d600083815260200190815260200160002060009054906101000a900460ff16611ee5576040517fceea21b600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60108054611ef290614480565b80601f0160208091040260200160405190810160405280929190818152602001828054611f1e90614480565b8015611f6b5780601f10611f4057610100808354040283529160200191611f6b565b820191906000526020600020905b815481529060010190602001808311611f4e57829003601f168201915b50505050509050919050565b611f7f61265e565b7f000000000000000000000000ae92d5ad7583ad66e49a0c67bad18f6ba52dddc173ffffffffffffffffffffffffffffffffffffffff1663cbed8b9c86868686866040518663ffffffff1660e01b8152600401611fe0959493929190614d83565b600060405180830381600087803b158015611ffa57600080fd5b505af115801561200e573d6000803e3d6000fd5b505050505050505050565b6000600b60008861ffff1661ffff16815260200190815260200160002086866040516120469291906144e1565b908152602001604051809103902060008567ffffffffffffffff1667ffffffffffffffff1681526020019081526020016000205490506000801b81036120c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120b890614e43565b60405180910390fd5b8083836040516120d29291906144e1565b60405180910390201461211a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161211190614ed5565b60405180910390fd5b6000801b600b60008961ffff1661ffff16815260200190815260200160002087876040516121499291906144e1565b908152602001604051809103902060008667ffffffffffffffff1667ffffffffffffffff168152602001908152602001600020819055506122148787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508686868080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506128b5565b7fc264d91f3adc5588250e1551f547752ca0cfa8f6b530d243b9f9f4cab10ea8e5878787878560405161224b959493929190614f04565b60405180910390a150505050505050565b61226461265e565b80600860008561ffff1661ffff16815260200190815260200160002060008461ffff1661ffff168152602001908152602001600020819055507f9d5c7c0b934da8fefa9c7760c98383778a12dfbfc0c3b3106518f43fb9508ac08383836040516122d093929190614f52565b60405180910390a1505050565b6127ee81565b6000600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b61237f61265e565b8181600760008661ffff1661ffff16815260200190815260200160002091826123a9929190614f94565b507ffa41487ad5d6728f0b19276fa1eddc16558578f5109fc39d2dc33c3230470dab8383836040516123dd939291906147da565b60405180910390a1505050565b6123f261265e565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036124645760006040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260040161245b9190613b6a565b60405180910390fd5b61246d816128e7565b50565b60607f000000000000000000000000ae92d5ad7583ad66e49a0c67bad18f6ba52dddc173ffffffffffffffffffffffffffffffffffffffff1663f5ecbdbc868630866040518563ffffffff1660e01b81526004016124d19493929190615064565b600060405180830381865afa1580156124ee573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052508101906125179190615119565b9050949350505050565b600033905090565b6000806125d55a60966366ad5c8a60e01b898989896040516024016125519493929190615162565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050503073ffffffffffffffffffffffffffffffffffffffff1661300b909392919063ffffffff16565b91509150816125ec576125eb86868686856130a3565b5b505050505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b612666612521565b73ffffffffffffffffffffffffffffffffffffffff166126846118d8565b73ffffffffffffffffffffffffffffffffffffffff16146126e3576126a7612521565b6040517f118cdaa70000000000000000000000000000000000000000000000000000000081526004016126da9190613b6a565b60405180910390fd5b565b6000806126f183613151565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361276457826040517f7e27328900000000000000000000000000000000000000000000000000000000815260040161275b919061391b565b60405180910390fd5b80915050919050565b60006005600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6127b7838383600161318e565b505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361282e5760006040517f64a0ae920000000000000000000000000000000000000000000000000000000081526004016128259190613b6a565b60405180910390fd5b600061283c83836000613353565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146128b05760006040517f73c6ac6e0000000000000000000000000000000000000000000000000000000081526004016128a79190613b6a565b60405180910390fd5b505050565b6040517f3a5cf9cb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b606081601f836129bb91906151b5565b10156129fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129f390615235565b60405180910390fd5b8183612a0891906151b5565b84511015612a4b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a42906152a1565b60405180910390fd5b6060821560008114612a6c5760405191506000825260208201604052612abd565b6040519150601f8416801560200281840101858101878315602002848b0101015b81831015612aaa5780518352602083019250602081019050612a8d565b50868552601f19601f8301166040525050505b50809150509392505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603612b3a57816040517f5b08ba18000000000000000000000000000000000000000000000000000000008152600401612b319190613b6a565b60405180910390fd5b80600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051612c2b91906139d6565b60405180910390a3505050565b6000612c476000836000613353565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603612cba57816040517f7e273289000000000000000000000000000000000000000000000000000000008152600401612cb1919061391b565b60405180910390fd5b5050565b6000600760008861ffff1661ffff1681526020019081526020016000208054612ce690614480565b80601f0160208091040260200160405190810160405280929190818152602001828054612d1290614480565b8015612d5f5780601f10612d3457610100808354040283529160200191612d5f565b820191906000526020600020905b815481529060010190602001808311612d4257829003601f168201915b505050505090506000815103612daa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612da190615333565b60405180910390fd5b612db587875161356d565b7f000000000000000000000000ae92d5ad7583ad66e49a0c67bad18f6ba52dddc173ffffffffffffffffffffffffffffffffffffffff1663c58031008389848a8a8a8a6040518863ffffffff1660e01b8152600401612e1996959493929190615374565b6000604051808303818588803b158015612e3257600080fd5b505af1158015612e46573d6000803e3d6000fd5b505050505050505050505050565b60008373ffffffffffffffffffffffffffffffffffffffff163b1115613005578273ffffffffffffffffffffffffffffffffffffffff1663150b7a02612e98612521565b8685856040518563ffffffff1660e01b8152600401612eba94939291906153ea565b6020604051808303816000875af1925050508015612ef657506040513d601f19601f82011682018060405250810190612ef3919061544b565b60015b612f7a573d8060008114612f26576040519150601f19603f3d011682016040523d82523d6000602084013e612f2b565b606091505b506000815103612f7257836040517f64a0ae92000000000000000000000000000000000000000000000000000000008152600401612f699190613b6a565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161461300357836040517f64a0ae92000000000000000000000000000000000000000000000000000000008152600401612ffa9190613b6a565b60405180910390fd5b505b50505050565b6000606060008060008661ffff1667ffffffffffffffff81111561303257613031613db9565b5b6040519080825280601f01601f1916602001820160405280156130645781602001600182028036833780820191505090505b50905060008087516020890160008d8df191503d925086831115613086578692505b828152826000602083013e81819450945050505094509492505050565b8180519060200120600b60008761ffff1661ffff168152602001908152602001600020856040516130d491906154a9565b908152602001604051809103902060008567ffffffffffffffff1667ffffffffffffffff168152602001908152602001600020819055507fe183f33de2837795525b4792ca4cd60535bd77c53b7e7030060bfcf5734d6b0c85858585856040516131429594939291906154c0565b60405180910390a15050505050565b60006003600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b80806131c75750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b156132fb5760006131d7846126e5565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561324257508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b8015613255575061325381846122e3565b155b1561329757826040517fa9fbf51f00000000000000000000000000000000000000000000000000000000815260040161328e9190613b6a565b60405180910390fd5b81156132f957838573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45b505b836005600085815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b60008061335f84613151565b9050600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16146133a1576133a08184866135e3565b5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614613432576133e360008560008061318e565b6001600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055505b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16146134b5576001600460008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055505b846003600086815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550838573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4809150509392505050565b6000600960008461ffff1661ffff1681526020019081526020016000205490506000810361359b5761271090505b808211156135de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016135d590615574565b60405180910390fd5b505050565b6135ee8383836136a7565b6136a257600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361366357806040517f7e27328900000000000000000000000000000000000000000000000000000000815260040161365a919061391b565b60405180910390fd5b81816040517f177e802f000000000000000000000000000000000000000000000000000000008152600401613699929190614d5a565b60405180910390fd5b505050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561375f57508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480613720575061371f84846122e3565b5b8061375e57508273ffffffffffffffffffffffffffffffffffffffff166137468361276d565b73ffffffffffffffffffffffffffffffffffffffff16145b5b90509392505050565b6000604051905090565b600080fd5b600080fd5b600061ffff82169050919050565b6137938161377c565b811461379e57600080fd5b50565b6000813590506137b08161378a565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f8401126137db576137da6137b6565b5b8235905067ffffffffffffffff8111156137f8576137f76137bb565b5b602083019150836001820283011115613814576138136137c0565b5b9250929050565b600067ffffffffffffffff82169050919050565b6138388161381b565b811461384357600080fd5b50565b6000813590506138558161382f565b92915050565b6000806000806000806080878903121561387857613877613772565b5b600061388689828a016137a1565b965050602087013567ffffffffffffffff8111156138a7576138a6613777565b5b6138b389828a016137c5565b955095505060406138c689828a01613846565b935050606087013567ffffffffffffffff8111156138e7576138e6613777565b5b6138f389828a016137c5565b92509250509295509295509295565b6000819050919050565b61391581613902565b82525050565b6000602082019050613930600083018461390c565b92915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61396b81613936565b811461397657600080fd5b50565b60008135905061398881613962565b92915050565b6000602082840312156139a4576139a3613772565b5b60006139b284828501613979565b91505092915050565b60008115159050919050565b6139d0816139bb565b82525050565b60006020820190506139eb60008301846139c7565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015613a2b578082015181840152602081019050613a10565b60008484015250505050565b6000601f19601f8301169050919050565b6000613a53826139f1565b613a5d81856139fc565b9350613a6d818560208601613a0d565b613a7681613a37565b840191505092915050565b60006020820190508181036000830152613a9b8184613a48565b905092915050565b600060208284031215613ab957613ab8613772565b5b6000613ac7848285016137a1565b91505092915050565b613ad981613902565b8114613ae457600080fd5b50565b600081359050613af681613ad0565b92915050565b600060208284031215613b1257613b11613772565b5b6000613b2084828501613ae7565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000613b5482613b29565b9050919050565b613b6481613b49565b82525050565b6000602082019050613b7f6000830184613b5b565b92915050565b613b8e81613b49565b8114613b9957600080fd5b50565b600081359050613bab81613b85565b92915050565b60008060408385031215613bc857613bc7613772565b5b6000613bd685828601613b9c565b9250506020613be785828601613ae7565b9150509250929050565b60008060408385031215613c0857613c07613772565b5b6000613c16858286016137a1565b9250506020613c2785828601613ae7565b9150509250929050565b600060208284031215613c4757613c46613772565b5b6000613c5584828501613b9c565b91505092915050565b600080600060608486031215613c7757613c76613772565b5b6000613c8586828701613b9c565b9350506020613c9686828701613b9c565b9250506040613ca786828701613ae7565b9150509250925092565b600080600060408486031215613cca57613cc9613772565b5b6000613cd8868287016137a1565b935050602084013567ffffffffffffffff811115613cf957613cf8613777565b5b613d05868287016137c5565b92509250509250925092565b60008083601f840112613d2757613d266137b6565b5b8235905067ffffffffffffffff811115613d4457613d436137bb565b5b602083019150836001820283011115613d6057613d5f6137c0565b5b9250929050565b60008060208385031215613d7e57613d7d613772565b5b600083013567ffffffffffffffff811115613d9c57613d9b613777565b5b613da885828601613d11565b92509250509250929050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b613df182613a37565b810181811067ffffffffffffffff82111715613e1057613e0f613db9565b5b80604052505050565b6000613e23613768565b9050613e2f8282613de8565b919050565b600067ffffffffffffffff821115613e4f57613e4e613db9565b5b613e5882613a37565b9050602081019050919050565b82818337600083830152505050565b6000613e87613e8284613e34565b613e19565b905082815260208101848484011115613ea357613ea2613db4565b5b613eae848285613e65565b509392505050565b600082601f830112613ecb57613eca6137b6565b5b8135613edb848260208601613e74565b91505092915050565b600080600060608486031215613efd57613efc613772565b5b6000613f0b868287016137a1565b935050602084013567ffffffffffffffff811115613f2c57613f2b613777565b5b613f3886828701613eb6565b9250506040613f4986828701613846565b9150509250925092565b6000819050919050565b613f6681613f53565b82525050565b6000602082019050613f816000830184613f5d565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60038110613fc757613fc6613f87565b5b50565b6000819050613fd882613fb6565b919050565b6000613fe882613fca565b9050919050565b613ff881613fdd565b82525050565b60006020820190506140136000830184613fef565b92915050565b600081519050919050565b600082825260208201905092915050565b600061404082614019565b61404a8185614024565b935061405a818560208601613a0d565b61406381613a37565b840191505092915050565b600060208201905081810360008301526140888184614035565b905092915050565b600080604083850312156140a7576140a6613772565b5b60006140b5858286016137a1565b92505060206140c6858286016137a1565b9150509250929050565b6140d9816139bb565b81146140e457600080fd5b50565b6000813590506140f6816140d0565b92915050565b6000806040838503121561411357614112613772565b5b600061412185828601613b9c565b9250506020614132858286016140e7565b9150509250929050565b6000819050919050565b600061416161415c61415784613b29565b61413c565b613b29565b9050919050565b600061417382614146565b9050919050565b600061418582614168565b9050919050565b6141958161417a565b82525050565b60006020820190506141b0600083018461418c565b92915050565b600080600080608085870312156141d0576141cf613772565b5b60006141de87828801613b9c565b94505060206141ef87828801613b9c565b935050604061420087828801613ae7565b925050606085013567ffffffffffffffff81111561422157614220613777565b5b61422d87828801613eb6565b91505092959194509250565b60008060008060006080868803121561425557614254613772565b5b6000614263888289016137a1565b9550506020614274888289016137a1565b945050604061428588828901613ae7565b935050606086013567ffffffffffffffff8111156142a6576142a5613777565b5b6142b2888289016137c5565b92509250509295509295909350565b6000806000606084860312156142da576142d9613772565b5b60006142e8868287016137a1565b93505060206142f9868287016137a1565b925050604061430a86828701613ae7565b9150509250925092565b61431d8161377c565b82525050565b60006020820190506143386000830184614314565b92915050565b6000806040838503121561435557614354613772565b5b600061436385828601613b9c565b925050602061437485828601613b9c565b9150509250929050565b6000806000806080858703121561439857614397613772565b5b60006143a6878288016137a1565b94505060206143b7878288016137a1565b93505060406143c887828801613b9c565b92505060606143d987828801613ae7565b91505092959194509250565b7f4c7a4170703a20696e76616c696420656e64706f696e742063616c6c65720000600082015250565b600061441b601e836139fc565b9150614426826143e5565b602082019050919050565b6000602082019050818103600083015261444a8161440e565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061449857607f821691505b6020821081036144ab576144aa614451565b5b50919050565b600081905092915050565b60006144c883856144b1565b93506144d5838584613e65565b82840190509392505050565b60006144ee8284866144bc565b91508190509392505050565b7f4c7a4170703a20696e76616c696420736f757263652073656e64696e6720636f60008201527f6e74726163740000000000000000000000000000000000000000000000000000602082015250565b60006145566026836139fc565b9150614561826144fa565b604082019050919050565b6000602082019050818103600083015261458581614549565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006145c682613902565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036145f8576145f761458c565b5b600182019050919050565b6000819050919050565b600060ff82169050919050565b600061463561463061462b84614603565b61413c565b61460d565b9050919050565b6146458161461a565b82525050565b60006040820190506146606000830185613b5b565b61466d602083018461463c565b9392505050565b60008160f01b9050919050565b600061468c82614674565b9050919050565b6146a461469f8261377c565b614681565b82525050565b6000819050919050565b6146c56146c082613902565b6146aa565b82525050565b60006146d78285614693565b6002820191506146e782846146b4565b6020820191508190509392505050565b600060a08201905061470c6000830188614314565b6147196020830187613b5b565b818103604083015261472b8186614035565b905061473a60608301856139c7565b818103608083015261474c8184614035565b90509695505050505050565b60008151905061476781613ad0565b92915050565b6000806040838503121561478457614783613772565b5b600061479285828601614758565b92505060206147a385828601614758565b9150509250929050565b60006147b98385614024565b93506147c6838584613e65565b6147cf83613a37565b840190509392505050565b60006040820190506147ef6000830186614314565b81810360208301526148028184866147ad565b9050949350505050565b600082905092915050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026148797fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8261483c565b614883868361483c565b95508019841693508086168417925050509392505050565b60006148b66148b16148ac84613902565b61413c565b613902565b9050919050565b6000819050919050565b6148d08361489b565b6148e46148dc826148bd565b848454614849565b825550505050565b600090565b6148f96148ec565b6149048184846148c7565b505050565b5b818110156149285761491d6000826148f1565b60018101905061490a565b5050565b601f82111561496d5761493e81614817565b6149478461482c565b81016020851015614956578190505b61496a6149628561482c565b830182614909565b50505b505050565b600082821c905092915050565b600061499060001984600802614972565b1980831691505092915050565b60006149a9838361497f565b9150826002028217905092915050565b6149c3838361480c565b67ffffffffffffffff8111156149dc576149db613db9565b5b6149e68254614480565b6149f182828561492c565b6000601f831160018114614a205760008415614a0e578287013590505b614a18858261499d565b865550614a80565b601f198416614a2e86614817565b60005b82811015614a5657848901358255600182019150602085019450602081019050614a31565b86831015614a735784890135614a6f601f89168261497f565b8355505b6001600288020188555050505b50505050505050565b7f4e6f6e626c6f636b696e674c7a4170703a2063616c6c6572206d75737420626560008201527f204c7a4170700000000000000000000000000000000000000000000000000000602082015250565b6000614ae56026836139fc565b9150614af082614a89565b604082019050919050565b60006020820190508181036000830152614b1481614ad8565b9050919050565b7f4c7a4170703a206e6f20747275737465642070617468207265636f7264000000600082015250565b6000614b51601d836139fc565b9150614b5c82614b1b565b602082019050919050565b60006020820190508181036000830152614b8081614b44565b9050919050565b6000614b9282613902565b9150614b9d83613902565b9250828203905081811115614bb557614bb461458c565b5b92915050565b60008160601b9050919050565b6000614bd382614bbb565b9050919050565b6000614be582614bc8565b9050919050565b614bfd614bf882613b49565b614bda565b82525050565b6000614c108285876144bc565b9150614c1c8284614bec565b601482019150819050949350505050565b60008190508160005260206000209050919050565b601f821115614c8357614c5481614c2d565b614c5d8461482c565b81016020851015614c6c578190505b614c80614c788561482c565b830182614909565b50505b505050565b614c9182614019565b67ffffffffffffffff811115614caa57614ca9613db9565b5b614cb48254614480565b614cbf828285614c42565b600060209050601f831160018114614cf25760008415614ce0578287015190505b614cea858261499d565b865550614d52565b601f198416614d0086614c2d565b60005b82811015614d2857848901518255600182019150602085019450602081019050614d03565b86831015614d455784890151614d41601f89168261497f565b8355505b6001600288020188555050505b505050505050565b6000604082019050614d6f6000830185613b5b565b614d7c602083018461390c565b9392505050565b6000608082019050614d986000830188614314565b614da56020830187614314565b614db2604083018661390c565b8181036060830152614dc58184866147ad565b90509695505050505050565b7f4e6f6e626c6f636b696e674c7a4170703a206e6f2073746f726564206d65737360008201527f6167650000000000000000000000000000000000000000000000000000000000602082015250565b6000614e2d6023836139fc565b9150614e3882614dd1565b604082019050919050565b60006020820190508181036000830152614e5c81614e20565b9050919050565b7f4e6f6e626c6f636b696e674c7a4170703a20696e76616c6964207061796c6f6160008201527f6400000000000000000000000000000000000000000000000000000000000000602082015250565b6000614ebf6021836139fc565b9150614eca82614e63565b604082019050919050565b60006020820190508181036000830152614eee81614eb2565b9050919050565b614efe8161381b565b82525050565b6000608082019050614f196000830188614314565b8181036020830152614f2c8186886147ad565b9050614f3b6040830185614ef5565b614f486060830184613f5d565b9695505050505050565b6000606082019050614f676000830186614314565b614f746020830185614314565b614f81604083018461390c565b949350505050565b600082905092915050565b614f9e8383614f89565b67ffffffffffffffff811115614fb757614fb6613db9565b5b614fc18254614480565b614fcc828285614c42565b6000601f831160018114614ffb5760008415614fe9578287013590505b614ff3858261499d565b86555061505b565b601f19841661500986614c2d565b60005b828110156150315784890135825560018201915060208501945060208101905061500c565b8683101561504e578489013561504a601f89168261497f565b8355505b6001600288020188555050505b50505050505050565b60006080820190506150796000830187614314565b6150866020830186614314565b6150936040830185613b5b565b6150a0606083018461390c565b95945050505050565b60006150bc6150b784613e34565b613e19565b9050828152602081018484840111156150d8576150d7613db4565b5b6150e3848285613a0d565b509392505050565b600082601f830112615100576150ff6137b6565b5b81516151108482602086016150a9565b91505092915050565b60006020828403121561512f5761512e613772565b5b600082015167ffffffffffffffff81111561514d5761514c613777565b5b615159848285016150eb565b91505092915050565b60006080820190506151776000830187614314565b81810360208301526151898186614035565b90506151986040830185614ef5565b81810360608301526151aa8184614035565b905095945050505050565b60006151c082613902565b91506151cb83613902565b92508282019050808211156151e3576151e261458c565b5b92915050565b7f736c6963655f6f766572666c6f77000000000000000000000000000000000000600082015250565b600061521f600e836139fc565b915061522a826151e9565b602082019050919050565b6000602082019050818103600083015261524e81615212565b9050919050565b7f736c6963655f6f75744f66426f756e6473000000000000000000000000000000600082015250565b600061528b6011836139fc565b915061529682615255565b602082019050919050565b600060208201905081810360008301526152ba8161527e565b9050919050565b7f4c7a4170703a2064657374696e6174696f6e20636861696e206973206e6f742060008201527f61207472757374656420736f7572636500000000000000000000000000000000602082015250565b600061531d6030836139fc565b9150615328826152c1565b604082019050919050565b6000602082019050818103600083015261534c81615310565b9050919050565b600061535e82613b29565b9050919050565b61536e81615353565b82525050565b600060c0820190506153896000830189614314565b818103602083015261539b8188614035565b905081810360408301526153af8187614035565b90506153be6060830186615365565b6153cb6080830185613b5b565b81810360a08301526153dd8184614035565b9050979650505050505050565b60006080820190506153ff6000830187613b5b565b61540c6020830186613b5b565b615419604083018561390c565b818103606083015261542b8184614035565b905095945050505050565b60008151905061544581613962565b92915050565b60006020828403121561546157615460613772565b5b600061546f84828501615436565b91505092915050565b600061548382614019565b61548d81856144b1565b935061549d818560208601613a0d565b80840191505092915050565b60006154b58284615478565b915081905092915050565b600060a0820190506154d56000830188614314565b81810360208301526154e78187614035565b90506154f66040830186614ef5565b81810360608301526155088185614035565b9050818103608083015261551c8184614035565b90509695505050505050565b7f4c7a4170703a207061796c6f61642073697a6520697320746f6f206c61726765600082015250565b600061555e6020836139fc565b915061556982615528565b602082019050919050565b6000602082019050818103600083015261558d81615551565b905091905056fea2646970667358221220d03fce64d893b0f778ea923f03a7f6e0dc580dbf661e889d6ed467630dce1e4264736f6c63430008160033

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

000000000000000000000000ae92d5ad7583ad66e49a0c67bad18f6ba52dddc10000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000003368747470733a2f2f71756573742d66696c65732e6672616d652e78797a2f6d657461646174612f7365706f6c69612e6a736f6e00000000000000000000000000

-----Decoded View---------------
Arg [0] : _endpoint (address): 0xae92d5aD7583AD66E49A0c67BAd18F6ba52dDDc1
Arg [1] : _uri (string): https://quest-files.frame.xyz/metadata/sepolia.json

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 000000000000000000000000ae92d5ad7583ad66e49a0c67bad18f6ba52dddc1
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000033
Arg [3] : 68747470733a2f2f71756573742d66696c65732e6672616d652e78797a2f6d65
Arg [4] : 7461646174612f7365706f6c69612e6a736f6e00000000000000000000000000


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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