ETH Price: $3,396.23 (+1.44%)

Contract

0x1A0FC2c95Fe3DFc9007C3b93d121d5590211E10b
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Withdraw GALA214303692024-12-18 15:40:1110 days ago1734536411IN
0x1A0FC2c9...90211E10b
0 ETH0.0015735923.50681396
Mint NFT214102902024-12-15 20:25:5913 days ago1734294359IN
0x1A0FC2c9...90211E10b
0 ETH0.0017836611.07383664
Withdraw USDC213154392024-12-02 14:32:1126 days ago1733149931IN
0x1A0FC2c9...90211E10b
0 ETH0.0015546623.54514854
Mint NFT212889312024-11-28 21:38:3530 days ago1732829915IN
0x1A0FC2c9...90211E10b
0 ETH0.001501399.52157446
Mint NFT212862702024-11-28 12:42:2330 days ago1732797743IN
0x1A0FC2c9...90211E10b
0 ETH0.0015252910.84978338
Withdraw GALA212663792024-11-25 17:52:2333 days ago1732557143IN
0x1A0FC2c9...90211E10b
0 ETH0.0010956116.36375668
Mint NFT212662572024-11-25 17:27:3533 days ago1732555655IN
0x1A0FC2c9...90211E10b
0 ETH0.0026495815.97153453
Withdraw USDC210412132024-10-25 7:44:1165 days ago1729842251IN
0x1A0FC2c9...90211E10b
0 ETH0.000354175.0013347
Mint NFT210256112024-10-23 3:31:4767 days ago1729654307IN
0x1A0FC2c9...90211E10b
0 ETH0.000257186.48215532
Mint NFT210256092024-10-23 3:31:2367 days ago1729654283IN
0x1A0FC2c9...90211E10b
0 ETH0.001167146.67720892
Withdraw GALA208715222024-10-01 15:24:5988 days ago1727796299IN
0x1A0FC2c9...90211E10b
0 ETH0.0027809341.54239435
Mint NFT208464892024-09-28 3:37:1192 days ago1727494631IN
0x1A0FC2c9...90211E10b
0 ETH0.001131887.3824199
Withdraw ETH207130902024-09-09 12:35:59110 days ago1725885359IN
0x1A0FC2c9...90211E10b
0 ETH0.000122173.58369426
Withdraw USDC207130782024-09-09 12:33:35110 days ago1725885215IN
0x1A0FC2c9...90211E10b
0 ETH0.000238953.61900478
Withdraw GALA207130662024-09-09 12:31:11110 days ago1725885071IN
0x1A0FC2c9...90211E10b
0 ETH0.000229553.42849492
Mint NFT206939052024-09-06 20:21:23113 days ago1725654083IN
0x1A0FC2c9...90211E10b
0.391 ETH0.000775027.30187252
Mint NFT206924632024-09-06 15:31:35113 days ago1725636695IN
0x1A0FC2c9...90211E10b
0 ETH0.006374721.334004
Mint NFT206900762024-09-06 7:31:35114 days ago1725607895IN
0x1A0FC2c9...90211E10b
0 ETH0.0020282212.22605714
Mint NFT206888742024-09-06 3:29:59114 days ago1725593399IN
0x1A0FC2c9...90211E10b
0.3655 ETH0.000164861.55331661
Mint NFT206878712024-09-06 0:08:11114 days ago1725581291IN
0x1A0FC2c9...90211E10b
0 ETH0.001391437.96095077
Withdraw ETH204347612024-08-01 16:01:59149 days ago1722528119IN
0x1A0FC2c9...90211E10b
0 ETH0.0008815625.85829843
Withdraw GALA204345172024-08-01 15:13:11149 days ago1722525191IN
0x1A0FC2c9...90211E10b
0 ETH0.00109116.29481371
Withdraw USDC204344982024-08-01 15:09:23149 days ago1722524963IN
0x1A0FC2c9...90211E10b
0 ETH0.0008422617.20986648
Mint NFT203739832024-07-24 4:22:35158 days ago1721794955IN
0x1A0FC2c9...90211E10b
0.285 ETH0.000344353.24468386
Mint NFT203457912024-07-20 5:55:59162 days ago1721454959IN
0x1A0FC2c9...90211E10b
0 ETH0.000433542.69144386
View all transactions

Latest 9 internal transactions

Advanced mode:
Parent Transaction Hash Block
From
To
207130902024-09-09 12:35:59110 days ago1725885359
0x1A0FC2c9...90211E10b
0.661555 ETH
206939052024-09-06 20:21:23113 days ago1725654083
0x1A0FC2c9...90211E10b
0.05474 ETH
206888742024-09-06 3:29:59114 days ago1725593399
0x1A0FC2c9...90211E10b
0.040205 ETH
204347612024-08-01 16:01:59149 days ago1722528119
0x1A0FC2c9...90211E10b
0.4845 ETH
203739832024-07-24 4:22:35158 days ago1721794955
0x1A0FC2c9...90211E10b
0.04275 ETH
200919522024-06-14 18:50:59197 days ago1718391059
0x1A0FC2c9...90211E10b
0.04275 ETH
199894632024-05-31 11:17:35212 days ago1717154255
0x1A0FC2c9...90211E10b
0.637925 ETH
199761982024-05-29 14:45:23213 days ago1716993923
0x1A0FC2c9...90211E10b
0.075525 ETH
199757802024-05-29 13:21:35213 days ago1716988895
0x1A0FC2c9...90211E10b
0.03705 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
NodeNFT

Compiler Version
v0.8.24+commit.e11b9ed9

Optimization Enabled:
No with 200 runs

Other Settings:
paris EvmVersion
File 1 of 17 : NodeNFT.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.20;

import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";

contract NodeNFT is ERC1155, Ownable {
    using Strings for uint256;
    using ECDSA for bytes32;

    uint256 public maxSupply;

    address public usdcAddress; // Address of the USDC token contract
    address public usdtAddress; // Address of the USDT token contract
    address public galaAddress; // Address of the GALAv2 token contract

    mapping(address => uint256) public _nftBalance;

    mapping(uint256 => uint256) private _tokenPrices;

    uint256 public mintedAmount;

    address public signer;

    event Purchase(
        address indexed buyer,
        address indexed referrer,
        uint256 amountPaid,
        uint8 nftAmount
    );

    /* ERC 5192 */
    function locked(uint256 /*tokenId*/) external pure returns (bool) {
        // soulbound token
        return true;
    }
    event Locked(uint256 tokenId);
    event Unlocked(uint256 tokenId);
    /* ERC 5192 END */

    /* ERC 4906 */
    event MetadataUpdate(uint256 _tokenId);
    event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId);
    /* ERC 4906 END */

    constructor(
        address _usdcAddress,
        address _usdtAddress,
        address _galaAddress,
        uint256 _maxSupply,
        address _signer,
        string memory uri
    ) ERC1155(uri) Ownable(msg.sender) {
        usdcAddress = _usdcAddress;
        usdtAddress = _usdtAddress;
        galaAddress = _galaAddress;
        maxSupply = _maxSupply;
        signer = _signer;
        mintedAmount = 0;
    }

    function name() public pure returns (string memory) {
        return "Node NFT";
    }

    function symbol() public pure returns (string memory) {
        return "NNT";
    }

    function mintNFT(
        address referrer,
        uint8 referralPercent,
        uint8 payCurrency,
        uint256 payAmount,
        uint256 mintHeight,
        uint8 nftAmount,
        uint256 timestamp,
        bytes memory signature
    ) external payable {
        bytes32 msgHash = keccak256(
            abi.encodePacked(
                referrer,
                referralPercent,
                payCurrency,
                payAmount,
                mintHeight,
                nftAmount,
                msg.sender,
                timestamp
            )
        );
        require(isValidSignature(msgHash, signature), "Invalid signature");

        require(referralPercent <= 100, "Max referral amount exceeded");
        require(mintedAmount + nftAmount <= maxSupply, "Max supply exceeded");

        require(mintedAmount == mintHeight, "Mint request expired");

        require(referrer != address(0), "Invalid address!");

        require(payAmount > 0, "Invalid pay amount");

        if (payCurrency == 1) {
            require(msg.value >= payAmount, "ETH payment failed");

            if (referralPercent != 0) {
                uint256 rewardAmount = (payAmount * referralPercent) / 100;
                payable(referrer).transfer(rewardAmount);
            }
        } else if (payCurrency == 2) {
            require(
                IERC20(usdcAddress).allowance(msg.sender, address(this)) >=
                    payAmount,
                "Insufficient allowance amount"
            );

            IERC20(usdcAddress).transferFrom(
                msg.sender,
                address(this),
                payAmount
            );

            if (referralPercent != 0) {
                uint256 rewardAmount = (payAmount * referralPercent) / 100;
                IERC20(usdcAddress).transfer(referrer, rewardAmount);
            }
        } else if (payCurrency == 3) {
            require(
                IERC20(usdtAddress).allowance(msg.sender, address(this)) >=
                    payAmount,
                "Insufficient allowance amount"
            );

            require(
                IERC20(usdtAddress).transferFrom(
                    msg.sender,
                    address(this),
                    payAmount
                ),
                "USDT transfer failed"
            );

            if (referralPercent != 0) {
                uint256 rewardAmount = (payAmount * referralPercent) / 100;
                IERC20(usdtAddress).transfer(referrer, rewardAmount);
            }
        } else if (payCurrency == 4) {
            require(
                IERC20(galaAddress).allowance(msg.sender, address(this)) >=
                    payAmount,
                "Insufficient allowance amount"
            );

            require(
                IERC20(galaAddress).transferFrom(
                    msg.sender,
                    address(this),
                    payAmount
                ),
                "GALA transfer failed"
            );

            if (referralPercent != 0) {
                uint256 rewardAmount = (payAmount * referralPercent) / 100;
                IERC20(galaAddress).transfer(referrer, rewardAmount);
            }
        }

        uint256[] memory ids = new uint256[](nftAmount);
        uint256[] memory amounts = new uint256[](nftAmount);

        for (uint256 i = 0; i < nftAmount; i++) {
            uint256 currentId = mintedAmount + i;
            ids[i] = currentId;
            amounts[i] = 1;
            emit Locked(currentId);
        }

        _nftBalance[msg.sender] += nftAmount;
        mintedAmount += nftAmount;
        _mintBatch(msg.sender, ids, amounts, "");
        emit Purchase(msg.sender, referrer, payAmount, nftAmount);
    }

    function adminMint(uint8 nftAmount) external onlyOwner {
        uint256[] memory ids = new uint256[](nftAmount);
        uint256[] memory amounts = new uint256[](nftAmount);

        for (uint256 i = 0; i < nftAmount; i++) {
            ids[i] = mintedAmount + i;
            amounts[i] = 1;
        }

        _nftBalance[msg.sender] += nftAmount;
        mintedAmount += nftAmount;
        _mintBatch(msg.sender, ids, amounts, "");
        emit Purchase(msg.sender, msg.sender, 0, nftAmount);
    }

    function _update(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory values
    ) internal override {
        if (from != address(0) && to != address(0)) {
            revert("Soulbound: Transfer failed");
        }

        return super._update(from, to, ids, values);
    }

    function isValidSignature(
        bytes32 hash,
        bytes memory signature
    ) internal view returns (bool isValid) {
        bytes32 signedHash = keccak256(
            abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)
        );
        return signedHash.recover(signature) == signer;
    }

    function updateUSDTAddress(address _address) external onlyOwner {
        usdtAddress = _address;
    }

    function updateUSDCAddress(address _address) external onlyOwner {
        usdcAddress = _address;
    }

    function updateGALAAddress(address _address) external onlyOwner {
        galaAddress = _address;
    }

    function updateMaxSupply(uint256 _maxSupply) external onlyOwner {
        maxSupply = _maxSupply;
    }

    function setSignerAddress(address _signer) public onlyOwner {
        signer = _signer;
    }

    function withdrawETH(
        address payable to,
        uint256 amount
    ) external onlyOwner {
        require(to != address(0), "Invalid recipient address");
        require(amount <= address(this).balance, "Insufficient balance");
        to.transfer(amount);
    }

    function withdrawUSDC(
        address payable to,
        uint256 amount
    ) external onlyOwner {
        IERC20(usdcAddress).transfer(to, amount);
    }

    function withdrawUSDT(
        address payable to,
        uint256 amount
    ) external onlyOwner {
        IERC20(usdtAddress).transfer(to, amount);
    }

    function withdrawGALA(
        address payable to,
        uint256 amount
    ) external onlyOwner {
        IERC20(galaAddress).transfer(to, amount);
    }

    function setURI(string memory newuri) public onlyOwner {
        _setURI(newuri);
        emit BatchMetadataUpdate(0, type(uint256).max);
    }

    receive() external payable {}

    fallback() external payable {}
}

File 2 of 17 : 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 17 : 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 17 : ERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/ERC1155.sol)

pragma solidity ^0.8.20;

import {IERC1155} from "./IERC1155.sol";
import {IERC1155Receiver} from "./IERC1155Receiver.sol";
import {IERC1155MetadataURI} from "./extensions/IERC1155MetadataURI.sol";
import {Context} from "../../utils/Context.sol";
import {IERC165, ERC165} from "../../utils/introspection/ERC165.sol";
import {Arrays} from "../../utils/Arrays.sol";
import {IERC1155Errors} from "../../interfaces/draft-IERC6093.sol";

/**
 * @dev Implementation of the basic standard multi-token.
 * See https://eips.ethereum.org/EIPS/eip-1155
 * Originally based on code by Enjin: https://github.com/enjin/erc-1155
 */
abstract contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI, IERC1155Errors {
    using Arrays for uint256[];
    using Arrays for address[];

    mapping(uint256 id => mapping(address account => uint256)) private _balances;

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

    // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json
    string private _uri;

    /**
     * @dev See {_setURI}.
     */
    constructor(string memory uri_) {
        _setURI(uri_);
    }

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

    /**
     * @dev See {IERC1155MetadataURI-uri}.
     *
     * This implementation returns the same URI for *all* token types. It relies
     * on the token type ID substitution mechanism
     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
     *
     * Clients calling this function must replace the `\{id\}` substring with the
     * actual token type ID.
     */
    function uri(uint256 /* id */) public view virtual returns (string memory) {
        return _uri;
    }

    /**
     * @dev See {IERC1155-balanceOf}.
     */
    function balanceOf(address account, uint256 id) public view virtual returns (uint256) {
        return _balances[id][account];
    }

    /**
     * @dev See {IERC1155-balanceOfBatch}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(
        address[] memory accounts,
        uint256[] memory ids
    ) public view virtual returns (uint256[] memory) {
        if (accounts.length != ids.length) {
            revert ERC1155InvalidArrayLength(ids.length, accounts.length);
        }

        uint256[] memory batchBalances = new uint256[](accounts.length);

        for (uint256 i = 0; i < accounts.length; ++i) {
            batchBalances[i] = balanceOf(accounts.unsafeMemoryAccess(i), ids.unsafeMemoryAccess(i));
        }

        return batchBalances;
    }

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

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

    /**
     * @dev See {IERC1155-safeTransferFrom}.
     */
    function safeTransferFrom(address from, address to, uint256 id, uint256 value, bytes memory data) public virtual {
        address sender = _msgSender();
        if (from != sender && !isApprovedForAll(from, sender)) {
            revert ERC1155MissingApprovalForAll(sender, from);
        }
        _safeTransferFrom(from, to, id, value, data);
    }

    /**
     * @dev See {IERC1155-safeBatchTransferFrom}.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory values,
        bytes memory data
    ) public virtual {
        address sender = _msgSender();
        if (from != sender && !isApprovedForAll(from, sender)) {
            revert ERC1155MissingApprovalForAll(sender, from);
        }
        _safeBatchTransferFrom(from, to, ids, values, data);
    }

    /**
     * @dev Transfers a `value` amount of tokens of type `id` from `from` to `to`. Will mint (or burn) if `from`
     * (or `to`) is the zero address.
     *
     * Emits a {TransferSingle} event if the arrays contain one element, and {TransferBatch} otherwise.
     *
     * Requirements:
     *
     * - If `to` refers to a smart contract, it must implement either {IERC1155Receiver-onERC1155Received}
     *   or {IERC1155Receiver-onERC1155BatchReceived} and return the acceptance magic value.
     * - `ids` and `values` must have the same length.
     *
     * NOTE: The ERC-1155 acceptance check is not performed in this function. See {_updateWithAcceptanceCheck} instead.
     */
    function _update(address from, address to, uint256[] memory ids, uint256[] memory values) internal virtual {
        if (ids.length != values.length) {
            revert ERC1155InvalidArrayLength(ids.length, values.length);
        }

        address operator = _msgSender();

        for (uint256 i = 0; i < ids.length; ++i) {
            uint256 id = ids.unsafeMemoryAccess(i);
            uint256 value = values.unsafeMemoryAccess(i);

            if (from != address(0)) {
                uint256 fromBalance = _balances[id][from];
                if (fromBalance < value) {
                    revert ERC1155InsufficientBalance(from, fromBalance, value, id);
                }
                unchecked {
                    // Overflow not possible: value <= fromBalance
                    _balances[id][from] = fromBalance - value;
                }
            }

            if (to != address(0)) {
                _balances[id][to] += value;
            }
        }

        if (ids.length == 1) {
            uint256 id = ids.unsafeMemoryAccess(0);
            uint256 value = values.unsafeMemoryAccess(0);
            emit TransferSingle(operator, from, to, id, value);
        } else {
            emit TransferBatch(operator, from, to, ids, values);
        }
    }

    /**
     * @dev Version of {_update} that performs the token acceptance check by calling
     * {IERC1155Receiver-onERC1155Received} or {IERC1155Receiver-onERC1155BatchReceived} on the receiver address if it
     * contains code (eg. is a smart contract at the moment of execution).
     *
     * IMPORTANT: Overriding this function is discouraged because it poses a reentrancy risk from the receiver. So any
     * update to the contract state after this function would break the check-effect-interaction pattern. Consider
     * overriding {_update} instead.
     */
    function _updateWithAcceptanceCheck(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory values,
        bytes memory data
    ) internal virtual {
        _update(from, to, ids, values);
        if (to != address(0)) {
            address operator = _msgSender();
            if (ids.length == 1) {
                uint256 id = ids.unsafeMemoryAccess(0);
                uint256 value = values.unsafeMemoryAccess(0);
                _doSafeTransferAcceptanceCheck(operator, from, to, id, value, data);
            } else {
                _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, values, data);
            }
        }
    }

    /**
     * @dev Transfers a `value` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `from` must have a balance of tokens of type `id` of at least `value` amount.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function _safeTransferFrom(address from, address to, uint256 id, uint256 value, bytes memory data) internal {
        if (to == address(0)) {
            revert ERC1155InvalidReceiver(address(0));
        }
        if (from == address(0)) {
            revert ERC1155InvalidSender(address(0));
        }
        (uint256[] memory ids, uint256[] memory values) = _asSingletonArrays(id, value);
        _updateWithAcceptanceCheck(from, to, ids, values, data);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     * - `ids` and `values` must have the same length.
     */
    function _safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory values,
        bytes memory data
    ) internal {
        if (to == address(0)) {
            revert ERC1155InvalidReceiver(address(0));
        }
        if (from == address(0)) {
            revert ERC1155InvalidSender(address(0));
        }
        _updateWithAcceptanceCheck(from, to, ids, values, data);
    }

    /**
     * @dev Sets a new URI for all token types, by relying on the token type ID
     * substitution mechanism
     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
     *
     * By this mechanism, any occurrence of the `\{id\}` substring in either the
     * URI or any of the values in the JSON file at said URI will be replaced by
     * clients with the token type ID.
     *
     * For example, the `https://token-cdn-domain/\{id\}.json` URI would be
     * interpreted by clients as
     * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`
     * for token type ID 0x4cce0.
     *
     * See {uri}.
     *
     * Because these URIs cannot be meaningfully represented by the {URI} event,
     * this function emits no events.
     */
    function _setURI(string memory newuri) internal virtual {
        _uri = newuri;
    }

    /**
     * @dev Creates a `value` amount of tokens of type `id`, and assigns them to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function _mint(address to, uint256 id, uint256 value, bytes memory data) internal {
        if (to == address(0)) {
            revert ERC1155InvalidReceiver(address(0));
        }
        (uint256[] memory ids, uint256[] memory values) = _asSingletonArrays(id, value);
        _updateWithAcceptanceCheck(address(0), to, ids, values, data);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `values` must have the same length.
     * - `to` cannot be the zero address.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function _mintBatch(address to, uint256[] memory ids, uint256[] memory values, bytes memory data) internal {
        if (to == address(0)) {
            revert ERC1155InvalidReceiver(address(0));
        }
        _updateWithAcceptanceCheck(address(0), to, ids, values, data);
    }

    /**
     * @dev Destroys a `value` amount of tokens of type `id` from `from`
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `from` must have at least `value` amount of tokens of type `id`.
     */
    function _burn(address from, uint256 id, uint256 value) internal {
        if (from == address(0)) {
            revert ERC1155InvalidSender(address(0));
        }
        (uint256[] memory ids, uint256[] memory values) = _asSingletonArrays(id, value);
        _updateWithAcceptanceCheck(from, address(0), ids, values, "");
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `from` must have at least `value` amount of tokens of type `id`.
     * - `ids` and `values` must have the same length.
     */
    function _burnBatch(address from, uint256[] memory ids, uint256[] memory values) internal {
        if (from == address(0)) {
            revert ERC1155InvalidSender(address(0));
        }
        _updateWithAcceptanceCheck(from, address(0), ids, values, "");
    }

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

    /**
     * @dev Performs an acceptance check by calling {IERC1155-onERC1155Received} on the `to` address
     * if it contains code at the moment of execution.
     */
    function _doSafeTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256 id,
        uint256 value,
        bytes memory data
    ) private {
        if (to.code.length > 0) {
            try IERC1155Receiver(to).onERC1155Received(operator, from, id, value, data) returns (bytes4 response) {
                if (response != IERC1155Receiver.onERC1155Received.selector) {
                    // Tokens rejected
                    revert ERC1155InvalidReceiver(to);
                }
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    // non-ERC1155Receiver implementer
                    revert ERC1155InvalidReceiver(to);
                } else {
                    /// @solidity memory-safe-assembly
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        }
    }

    /**
     * @dev Performs a batch acceptance check by calling {IERC1155-onERC1155BatchReceived} on the `to` address
     * if it contains code at the moment of execution.
     */
    function _doSafeBatchTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory values,
        bytes memory data
    ) private {
        if (to.code.length > 0) {
            try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, values, data) returns (
                bytes4 response
            ) {
                if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {
                    // Tokens rejected
                    revert ERC1155InvalidReceiver(to);
                }
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    // non-ERC1155Receiver implementer
                    revert ERC1155InvalidReceiver(to);
                } else {
                    /// @solidity memory-safe-assembly
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        }
    }

    /**
     * @dev Creates an array in memory with only one value for each of the elements provided.
     */
    function _asSingletonArrays(
        uint256 element1,
        uint256 element2
    ) private pure returns (uint256[] memory array1, uint256[] memory array2) {
        /// @solidity memory-safe-assembly
        assembly {
            // Load the free memory pointer
            array1 := mload(0x40)
            // Set array length to 1
            mstore(array1, 1)
            // Store the single element at the next word after the length (where content starts)
            mstore(add(array1, 0x20), element1)

            // Repeat for next array locating it right after the first array
            array2 := add(array1, 0x40)
            mstore(array2, 1)
            mstore(add(array2, 0x20), element2)

            // Update the free memory pointer by pointing after the second array
            mstore(0x40, add(array2, 0x40))
        }
    }
}

File 5 of 17 : IERC1155MetadataURI.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/extensions/IERC1155MetadataURI.sol)

pragma solidity ^0.8.20;

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

/**
 * @dev Interface of the optional ERC1155MetadataExtension interface, as defined
 * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].
 */
interface IERC1155MetadataURI is IERC1155 {
    /**
     * @dev Returns the URI for token type `id`.
     *
     * If the `\{id\}` substring is present in the URI, it must be replaced by
     * clients with the actual token type ID.
     */
    function uri(uint256 id) external view returns (string memory);
}

File 6 of 17 : IERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (token/ERC1155/IERC1155.sol)

pragma solidity ^0.8.20;

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

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

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

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

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

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

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

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

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

    /**
     * @dev Transfers a `value` amount of tokens of type `id` from `from` to `to`.
     *
     * WARNING: This function can potentially allow a reentrancy attack when transferring tokens
     * to an untrusted contract, when invoking {onERC1155Received} on the receiver.
     * Ensure to follow the checks-effects-interactions pattern and consider employing
     * reentrancy guards when interacting with untrusted contracts.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.
     * - `from` must have a balance of tokens of type `id` of at least `value` amount.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function safeTransferFrom(address from, address to, uint256 id, uint256 value, bytes calldata data) external;

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
     *
     * WARNING: This function can potentially allow a reentrancy attack when transferring tokens
     * to an untrusted contract, when invoking {onERC1155BatchReceived} on the receiver.
     * Ensure to follow the checks-effects-interactions pattern and consider employing
     * reentrancy guards when interacting with untrusted contracts.
     *
     * Emits either a {TransferSingle} or a {TransferBatch} event, depending on the length of the array arguments.
     *
     * Requirements:
     *
     * - `ids` and `values` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes calldata data
    ) external;
}

File 7 of 17 : IERC1155Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/IERC1155Receiver.sol)

pragma solidity ^0.8.20;

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

/**
 * @dev Interface that must be implemented by smart contracts in order to receive
 * ERC-1155 token transfers.
 */
interface IERC1155Receiver is IERC165 {
    /**
     * @dev Handles the receipt of a single ERC1155 token type. This function is
     * called at the end of a `safeTransferFrom` after the balance has been updated.
     *
     * NOTE: To accept the transfer, this must return
     * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
     * (i.e. 0xf23a6e61, or its own function selector).
     *
     * @param operator The address which initiated the transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param id The ID of the token being transferred
     * @param value The amount of tokens being transferred
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed
     */
    function onERC1155Received(
        address operator,
        address from,
        uint256 id,
        uint256 value,
        bytes calldata data
    ) external returns (bytes4);

    /**
     * @dev Handles the receipt of a multiple ERC1155 token types. This function
     * is called at the end of a `safeBatchTransferFrom` after the balances have
     * been updated.
     *
     * NOTE: To accept the transfer(s), this must return
     * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
     * (i.e. 0xbc197c81, or its own function selector).
     *
     * @param operator The address which initiated the batch transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param ids An array containing ids of each token being transferred (order and length must match values array)
     * @param values An array containing amounts of each token being transferred (order and length must match ids array)
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed
     */
    function onERC1155BatchReceived(
        address operator,
        address from,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes calldata data
    ) external returns (bytes4);
}

File 8 of 17 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.20;

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

/**
 * @dev Collection of functions related to array types.
 */
library Arrays {
    using StorageSlot for bytes32;

    /**
     * @dev Searches a sorted `array` and returns the first index that contains
     * a value greater or equal to `element`. If no such index exists (i.e. all
     * values in the array are strictly less than `element`), the array length is
     * returned. Time complexity O(log n).
     *
     * `array` is expected to be sorted in ascending order, and to contain no
     * repeated elements.
     */
    function findUpperBound(uint256[] storage array, uint256 element) internal view returns (uint256) {
        uint256 low = 0;
        uint256 high = array.length;

        if (high == 0) {
            return 0;
        }

        while (low < high) {
            uint256 mid = Math.average(low, high);

            // Note that mid will always be strictly less than high (i.e. it will be a valid array index)
            // because Math.average rounds towards zero (it does integer division with truncation).
            if (unsafeAccess(array, mid).value > element) {
                high = mid;
            } else {
                low = mid + 1;
            }
        }

        // At this point `low` is the exclusive upper bound. We will return the inclusive upper bound.
        if (low > 0 && unsafeAccess(array, low - 1).value == element) {
            return low - 1;
        } else {
            return low;
        }
    }

    /**
     * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check.
     *
     * WARNING: Only use if you are certain `pos` is lower than the array length.
     */
    function unsafeAccess(address[] storage arr, uint256 pos) internal pure returns (StorageSlot.AddressSlot storage) {
        bytes32 slot;
        // We use assembly to calculate the storage slot of the element at index `pos` of the dynamic array `arr`
        // following https://docs.soliditylang.org/en/v0.8.20/internals/layout_in_storage.html#mappings-and-dynamic-arrays.

        /// @solidity memory-safe-assembly
        assembly {
            mstore(0, arr.slot)
            slot := add(keccak256(0, 0x20), pos)
        }
        return slot.getAddressSlot();
    }

    /**
     * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check.
     *
     * WARNING: Only use if you are certain `pos` is lower than the array length.
     */
    function unsafeAccess(bytes32[] storage arr, uint256 pos) internal pure returns (StorageSlot.Bytes32Slot storage) {
        bytes32 slot;
        // We use assembly to calculate the storage slot of the element at index `pos` of the dynamic array `arr`
        // following https://docs.soliditylang.org/en/v0.8.20/internals/layout_in_storage.html#mappings-and-dynamic-arrays.

        /// @solidity memory-safe-assembly
        assembly {
            mstore(0, arr.slot)
            slot := add(keccak256(0, 0x20), pos)
        }
        return slot.getBytes32Slot();
    }

    /**
     * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check.
     *
     * WARNING: Only use if you are certain `pos` is lower than the array length.
     */
    function unsafeAccess(uint256[] storage arr, uint256 pos) internal pure returns (StorageSlot.Uint256Slot storage) {
        bytes32 slot;
        // We use assembly to calculate the storage slot of the element at index `pos` of the dynamic array `arr`
        // following https://docs.soliditylang.org/en/v0.8.20/internals/layout_in_storage.html#mappings-and-dynamic-arrays.

        /// @solidity memory-safe-assembly
        assembly {
            mstore(0, arr.slot)
            slot := add(keccak256(0, 0x20), pos)
        }
        return slot.getUint256Slot();
    }

    /**
     * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check.
     *
     * WARNING: Only use if you are certain `pos` is lower than the array length.
     */
    function unsafeMemoryAccess(uint256[] memory arr, uint256 pos) internal pure returns (uint256 res) {
        assembly {
            res := mload(add(add(arr, 0x20), mul(pos, 0x20)))
        }
    }

    /**
     * @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check.
     *
     * WARNING: Only use if you are certain `pos` is lower than the array length.
     */
    function unsafeMemoryAccess(address[] memory arr, uint256 pos) internal pure returns (address res) {
        assembly {
            res := mload(add(add(arr, 0x20), mul(pos, 0x20)))
        }
    }
}

File 10 of 17 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (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;
    }

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

File 11 of 17 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.20;

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS
    }

    /**
     * @dev The signature derives the `address(0)`.
     */
    error ECDSAInvalidSignature();

    /**
     * @dev The signature has an invalid length.
     */
    error ECDSAInvalidSignatureLength(uint256 length);

    /**
     * @dev The signature has an S value that is in the upper half order.
     */
    error ECDSAInvalidSignatureS(bytes32 s);

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not
     * return address(0) without also returning an error description. Errors are documented using an enum (error type)
     * and a bytes32 providing additional information about the error.
     *
     * If no error is returned, then the address can be used for verification purposes.
     *
     * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     */
    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) {
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            /// @solidity memory-safe-assembly
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return tryRecover(hash, v, r, s);
        } else {
            return (address(0), RecoverError.InvalidSignatureLength, bytes32(signature.length));
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature);
        _throwError(error, errorArg);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     */
    function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) {
        unchecked {
            bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
            // We do not check for an overflow here since the shift operation results in 0 or 1.
            uint8 v = uint8((uint256(vs) >> 255) + 27);
            return tryRecover(hash, v, r, s);
        }
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
     */
    function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) {
        (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs);
        _throwError(error, errorArg);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function tryRecover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address, RecoverError, bytes32) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return (address(0), RecoverError.InvalidSignatureS, s);
        }

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            return (address(0), RecoverError.InvalidSignature, bytes32(0));
        }

        return (signer, RecoverError.NoError, bytes32(0));
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {
        (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, v, r, s);
        _throwError(error, errorArg);
        return recovered;
    }

    /**
     * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided.
     */
    function _throwError(RecoverError error, bytes32 errorArg) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert ECDSAInvalidSignature();
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert ECDSAInvalidSignatureLength(uint256(errorArg));
        } else if (error == RecoverError.InvalidSignatureS) {
            revert ECDSAInvalidSignatureS(errorArg);
        }
    }
}

File 12 of 17 : 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 13 of 17 : 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 14 of 17 : 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 15 of 17 : 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 16 of 17 : StorageSlot.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/StorageSlot.sol)
// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.

pragma solidity ^0.8.20;

/**
 * @dev Library for reading and writing primitive types to specific storage slots.
 *
 * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.
 * This library helps with reading and writing to such slots without the need for inline assembly.
 *
 * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.
 *
 * Example usage to set ERC1967 implementation slot:
 * ```solidity
 * contract ERC1967 {
 *     bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
 *
 *     function _getImplementation() internal view returns (address) {
 *         return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
 *     }
 *
 *     function _setImplementation(address newImplementation) internal {
 *         require(newImplementation.code.length > 0);
 *         StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
 *     }
 * }
 * ```
 */
library StorageSlot {
    struct AddressSlot {
        address value;
    }

    struct BooleanSlot {
        bool value;
    }

    struct Bytes32Slot {
        bytes32 value;
    }

    struct Uint256Slot {
        uint256 value;
    }

    struct StringSlot {
        string value;
    }

    struct BytesSlot {
        bytes value;
    }

    /**
     * @dev Returns an `AddressSlot` with member `value` located at `slot`.
     */
    function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `BooleanSlot` with member `value` located at `slot`.
     */
    function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.
     */
    function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `Uint256Slot` with member `value` located at `slot`.
     */
    function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `StringSlot` with member `value` located at `slot`.
     */
    function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `StringSlot` representation of the string storage pointer `store`.
     */
    function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := store.slot
        }
    }

    /**
     * @dev Returns an `BytesSlot` with member `value` located at `slot`.
     */
    function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.
     */
    function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {
        /// @solidity memory-safe-assembly
        assembly {
            r.slot := store.slot
        }
    }
}

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_usdcAddress","type":"address"},{"internalType":"address","name":"_usdtAddress","type":"address"},{"internalType":"address","name":"_galaAddress","type":"address"},{"internalType":"uint256","name":"_maxSupply","type":"uint256"},{"internalType":"address","name":"_signer","type":"address"},{"internalType":"string","name":"uri","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ECDSAInvalidSignature","type":"error"},{"inputs":[{"internalType":"uint256","name":"length","type":"uint256"}],"name":"ECDSAInvalidSignatureLength","type":"error"},{"inputs":[{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"ECDSAInvalidSignatureS","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ERC1155InsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC1155InvalidApprover","type":"error"},{"inputs":[{"internalType":"uint256","name":"idsLength","type":"uint256"},{"internalType":"uint256","name":"valuesLength","type":"uint256"}],"name":"ERC1155InvalidArrayLength","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"ERC1155InvalidOperator","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC1155InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC1155InvalidSender","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"address","name":"owner","type":"address"}],"name":"ERC1155MissingApprovalForAll","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_toTokenId","type":"uint256"}],"name":"BatchMetadataUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Locked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"MetadataUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"buyer","type":"address"},{"indexed":true,"internalType":"address","name":"referrer","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountPaid","type":"uint256"},{"indexed":false,"internalType":"uint8","name":"nftAmount","type":"uint8"}],"name":"Purchase","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Unlocked","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"_nftBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"nftAmount","type":"uint8"}],"name":"adminMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"galaAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"locked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"referrer","type":"address"},{"internalType":"uint8","name":"referralPercent","type":"uint8"},{"internalType":"uint8","name":"payCurrency","type":"uint8"},{"internalType":"uint256","name":"payAmount","type":"uint256"},{"internalType":"uint256","name":"mintHeight","type":"uint256"},{"internalType":"uint8","name":"nftAmount","type":"uint8"},{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"mintNFT","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_signer","type":"address"}],"name":"setSignerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newuri","type":"string"}],"name":"setURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"signer","outputs":[{"internalType":"address","name":"","type":"address"}],"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":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"updateGALAAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxSupply","type":"uint256"}],"name":"updateMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"updateUSDCAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"updateUSDTAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"usdcAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"usdtAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawGALA","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawUSDC","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawUSDT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040523480156200001157600080fd5b50604051620059b4380380620059b48339818101604052810190620000379190620004ff565b33816200004a81620001f160201b60201c565b50600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603620000c05760006040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401620000b79190620005cb565b60405180910390fd5b620000d1816200020660201b60201c565b5085600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555084600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508260048190555081600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600a8190555050505050505062000910565b806002908162000202919062000829565b5050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006200030d82620002e0565b9050919050565b6200031f8162000300565b81146200032b57600080fd5b50565b6000815190506200033f8162000314565b92915050565b6000819050919050565b6200035a8162000345565b81146200036657600080fd5b50565b6000815190506200037a816200034f565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b620003d5826200038a565b810181811067ffffffffffffffff82111715620003f757620003f66200039b565b5b80604052505050565b60006200040c620002cc565b90506200041a8282620003ca565b919050565b600067ffffffffffffffff8211156200043d576200043c6200039b565b5b62000448826200038a565b9050602081019050919050565b60005b838110156200047557808201518184015260208101905062000458565b60008484015250505050565b60006200049862000492846200041f565b62000400565b905082815260208101848484011115620004b757620004b662000385565b5b620004c484828562000455565b509392505050565b600082601f830112620004e457620004e362000380565b5b8151620004f684826020860162000481565b91505092915050565b60008060008060008060c087890312156200051f576200051e620002d6565b5b60006200052f89828a016200032e565b96505060206200054289828a016200032e565b95505060406200055589828a016200032e565b94505060606200056889828a0162000369565b93505060806200057b89828a016200032e565b92505060a087015167ffffffffffffffff8111156200059f576200059e620002db565b5b620005ad89828a01620004cc565b9150509295509295509295565b620005c58162000300565b82525050565b6000602082019050620005e26000830184620005ba565b92915050565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200063b57607f821691505b602082108103620006515762000650620005f3565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b600060088302620006bb7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826200067c565b620006c786836200067c565b95508019841693508086168417925050509392505050565b6000819050919050565b60006200070a62000704620006fe8462000345565b620006df565b62000345565b9050919050565b6000819050919050565b6200072683620006e9565b6200073e620007358262000711565b84845462000689565b825550505050565b600090565b6200075562000746565b620007628184846200071b565b505050565b5b818110156200078a576200077e6000826200074b565b60018101905062000768565b5050565b601f821115620007d957620007a38162000657565b620007ae846200066c565b81016020851015620007be578190505b620007d6620007cd856200066c565b83018262000767565b50505b505050565b600082821c905092915050565b6000620007fe60001984600802620007de565b1980831691505092915050565b6000620008198383620007eb565b9150826002028217905092915050565b6200083482620005e8565b67ffffffffffffffff81111562000850576200084f6200039b565b5b6200085c825462000622565b620008698282856200078e565b600060209050601f831160018114620008a157600084156200088c578287015190505b6200089885826200080b565b86555062000908565b601f198416620008b18662000657565b60005b82811015620008db57848901518255600182019150602085019450602081019050620008b4565b86831015620008fb5784890151620008f7601f891682620007eb565b8355505b6001600288020188555050505b505050505050565b61509480620009206000396000f3fe6080604052600436106101f15760003560e01c806356b8d8c61161010d57806395d89b41116100a0578063d5abeb011161006f578063d5abeb01146106df578063e985e9c51461070a578063f103b43314610747578063f242432a14610770578063f2fde38b14610799576101f8565b806395d89b41146106235780639ab4a4451461064e578063a22cb46514610679578063b45a3c0e146106a2576101f8565b80638c774f03116100dc5780638c774f03146105885780638ce667bc146105a45780638da5cb5b146105cd57806392fbc4b7146105f8576101f8565b806356b8d8c6146104f6578063715018a61461051f57806375d60372146105365780637d81c4c11461055f576101f8565b80631481794e1161018557806344471fd91161015457806344471fd91461043e578063467a0d91146104675780634782f779146104905780634e1273f4146104b9576101f8565b80631481794e14610396578063238ac933146103bf5780632d380242146103ea5780632eb2c2d614610415576101f8565b8063046dc166116101c1578063046dc166146102c857806306fdde03146102f15780630e89341c1461031c57806311075be814610359576101f8565b8062fdd58e146101fa57806301ffc9a71461023757806302d454571461027457806302fe53051461029f576101f8565b366101f857005b005b34801561020657600080fd5b50610221600480360381019061021c91906134e6565b6107c2565b60405161022e9190613535565b60405180910390f35b34801561024357600080fd5b5061025e600480360381019061025991906135a8565b61081c565b60405161026b91906135f0565b60405180910390f35b34801561028057600080fd5b506102896108fe565b604051610296919061361a565b60405180910390f35b3480156102ab57600080fd5b506102c660048036038101906102c1919061377b565b610924565b005b3480156102d457600080fd5b506102ef60048036038101906102ea91906137c4565b610992565b005b3480156102fd57600080fd5b506103066109de565b6040516103139190613870565b60405180910390f35b34801561032857600080fd5b50610343600480360381019061033e9190613892565b610a1b565b6040516103509190613870565b60405180910390f35b34801561036557600080fd5b50610380600480360381019061037b91906137c4565b610aaf565b60405161038d9190613535565b60405180910390f35b3480156103a257600080fd5b506103bd60048036038101906103b891906138fd565b610ac7565b005b3480156103cb57600080fd5b506103d4610b74565b6040516103e1919061361a565b60405180910390f35b3480156103f657600080fd5b506103ff610b9a565b60405161040c9190613535565b60405180910390f35b34801561042157600080fd5b5061043c60048036038101906104379190613aa6565b610ba0565b005b34801561044a57600080fd5b50610465600480360381019061046091906138fd565b610c48565b005b34801561047357600080fd5b5061048e600480360381019061048991906137c4565b610cf5565b005b34801561049c57600080fd5b506104b760048036038101906104b291906138fd565b610d41565b005b3480156104c557600080fd5b506104e060048036038101906104db9190613c38565b610e46565b6040516104ed9190613d6e565b60405180910390f35b34801561050257600080fd5b5061051d600480360381019061051891906138fd565b610f4f565b005b34801561052b57600080fd5b50610534610ffc565b005b34801561054257600080fd5b5061055d600480360381019061055891906137c4565b611010565b005b34801561056b57600080fd5b50610586600480360381019061058191906137c4565b61105c565b005b6105a2600480360381019061059d9190613dc9565b6110a8565b005b3480156105b057600080fd5b506105cb60048036038101906105c69190613e9b565b611d68565b005b3480156105d957600080fd5b506105e2611f77565b6040516105ef919061361a565b60405180910390f35b34801561060457600080fd5b5061060d611fa1565b60405161061a919061361a565b60405180910390f35b34801561062f57600080fd5b50610638611fc7565b6040516106459190613870565b60405180910390f35b34801561065a57600080fd5b50610663612004565b604051610670919061361a565b60405180910390f35b34801561068557600080fd5b506106a0600480360381019061069b9190613ef4565b61202a565b005b3480156106ae57600080fd5b506106c960048036038101906106c49190613892565b612040565b6040516106d691906135f0565b60405180910390f35b3480156106eb57600080fd5b506106f461204b565b6040516107019190613535565b60405180910390f35b34801561071657600080fd5b50610731600480360381019061072c9190613f34565b612051565b60405161073e91906135f0565b60405180910390f35b34801561075357600080fd5b5061076e60048036038101906107699190613892565b6120e5565b005b34801561077c57600080fd5b5061079760048036038101906107929190613f74565b6120f7565b005b3480156107a557600080fd5b506107c060048036038101906107bb91906137c4565b61219f565b005b600080600083815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60007fd9b67a26000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806108e757507f0e89341c000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806108f757506108f682612225565b5b9050919050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61092c61228f565b61093581612316565b7f6bd5c950a8d8df17f772f5af37cb3655737899cbf903264b9795592da439661c60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff604051610987929190614050565b60405180910390a150565b61099a61228f565b80600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60606040518060400160405280600881526020017f4e6f6465204e4654000000000000000000000000000000000000000000000000815250905090565b606060028054610a2a906140a8565b80601f0160208091040260200160405190810160405280929190818152602001828054610a56906140a8565b8015610aa35780601f10610a7857610100808354040283529160200191610aa3565b820191906000526020600020905b815481529060010190602001808311610a8657829003601f168201915b50505050509050919050565b60086020528060005260406000206000915090505481565b610acf61228f565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff1660e01b8152600401610b2c92919061412e565b6020604051808303816000875af1158015610b4b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b6f919061416c565b505050565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600a5481565b6000610baa612329565b90508073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614158015610bef5750610bed8682612051565b155b15610c335780866040517fe237d922000000000000000000000000000000000000000000000000000000008152600401610c2a929190614199565b60405180910390fd5b610c408686868686612331565b505050505050565b610c5061228f565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff1660e01b8152600401610cad92919061412e565b6020604051808303816000875af1158015610ccc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf0919061416c565b505050565b610cfd61228f565b80600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b610d4961228f565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610db8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610daf9061420e565b60405180910390fd5b47811115610dfb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610df29061427a565b60405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610e41573d6000803e3d6000fd5b505050565b60608151835114610e9257815183516040517f5b059991000000000000000000000000000000000000000000000000000000008152600401610e8992919061429a565b60405180910390fd5b6000835167ffffffffffffffff811115610eaf57610eae613650565b5b604051908082528060200260200182016040528015610edd5781602001602082028036833780820191505090505b50905060005b8451811015610f4457610f1a610f02828761242990919063ffffffff16565b610f15838761243d90919063ffffffff16565b6107c2565b828281518110610f2d57610f2c6142c3565b5b602002602001018181525050806001019050610ee3565b508091505092915050565b610f5761228f565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff1660e01b8152600401610fb492919061412e565b6020604051808303816000875af1158015610fd3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ff7919061416c565b505050565b61100461228f565b61100e6000612451565b565b61101861228f565b80600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61106461228f565b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600088888888888833896040516020016110c9989796959493929190614391565b6040516020818303038152906040528051906020012090506110eb8183612517565b61112a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111219061446f565b60405180910390fd5b60648860ff161115611171576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611168906144db565b60405180910390fd5b6004548460ff16600a54611185919061452a565b11156111c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111bd906145aa565b60405180910390fd5b84600a541461120a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161120190614616565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff1603611279576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161127090614682565b60405180910390fd5b600086116112bc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112b3906146ee565b60405180910390fd5b60018760ff1603611382578534101561130a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113019061475a565b60405180910390fd5b60008860ff161461137d57600060648960ff1688611328919061477a565b61133291906147eb565b90508973ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505015801561137a573d6000803e3d6000fd5b50505b611b1d565b60028760ff16036115e25785600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e33306040518363ffffffff1660e01b81526004016113eb929190614199565b602060405180830381865afa158015611408573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061142c9190614831565b101561146d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611464906148aa565b60405180910390fd5b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330896040518463ffffffff1660e01b81526004016114cc939291906148ca565b6020604051808303816000875af11580156114eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061150f919061416c565b5060008860ff16146115dd57600060648960ff168861152e919061477a565b61153891906147eb565b9050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8b836040518363ffffffff1660e01b8152600401611597929190614901565b6020604051808303816000875af11580156115b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115da919061416c565b50505b611b1c565b60038760ff16036118805785600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e33306040518363ffffffff1660e01b815260040161164b929190614199565b602060405180830381865afa158015611668573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061168c9190614831565b10156116cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116c4906148aa565b60405180910390fd5b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330896040518463ffffffff1660e01b815260040161172c939291906148ca565b6020604051808303816000875af115801561174b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061176f919061416c565b6117ae576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117a590614976565b60405180910390fd5b60008860ff161461187b57600060648960ff16886117cc919061477a565b6117d691906147eb565b9050600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8b836040518363ffffffff1660e01b8152600401611835929190614901565b6020604051808303816000875af1158015611854573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611878919061416c565b50505b611b1b565b60048760ff1603611b1a5785600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e33306040518363ffffffff1660e01b81526004016118e9929190614199565b602060405180830381865afa158015611906573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061192a9190614831565b101561196b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611962906148aa565b60405180910390fd5b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330896040518463ffffffff1660e01b81526004016119ca939291906148ca565b6020604051808303816000875af11580156119e9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a0d919061416c565b611a4c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a43906149e2565b60405180910390fd5b60008860ff1614611b1957600060648960ff1688611a6a919061477a565b611a7491906147eb565b9050600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8b836040518363ffffffff1660e01b8152600401611ad3929190614901565b6020604051808303816000875af1158015611af2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b16919061416c565b50505b5b5b5b5b60008460ff1667ffffffffffffffff811115611b3c57611b3b613650565b5b604051908082528060200260200182016040528015611b6a5781602001602082028036833780820191505090505b50905060008560ff1667ffffffffffffffff811115611b8c57611b8b613650565b5b604051908082528060200260200182016040528015611bba5781602001602082028036833780820191505090505b50905060005b8660ff16811015611c6357600081600a54611bdb919061452a565b905080848381518110611bf157611bf06142c3565b5b6020026020010181815250506001838381518110611c1257611c116142c3565b5b6020026020010181815250507f032bc66be43dbccb7487781d168eb7bda224628a3b2c3388bdf69b532a3a161181604051611c4d9190613535565b60405180910390a1508080600101915050611bc0565b508560ff16600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611cb6919061452a565b925050819055508560ff16600a6000828254611cd2919061452a565b92505081905550611cf4338383604051806020016040528060008152506125af565b8a73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f89d44a6910c623e11f7e483ba819960fb5a2a8d2db76b6a7debce601b4323b398a89604051611d53929190614a11565b60405180910390a35050505050505050505050565b611d7061228f565b60008160ff1667ffffffffffffffff811115611d8f57611d8e613650565b5b604051908082528060200260200182016040528015611dbd5781602001602082028036833780820191505090505b50905060008260ff1667ffffffffffffffff811115611ddf57611dde613650565b5b604051908082528060200260200182016040528015611e0d5781602001602082028036833780820191505090505b50905060005b8360ff16811015611e795780600a54611e2c919061452a565b838281518110611e3f57611e3e6142c3565b5b6020026020010181815250506001828281518110611e6057611e5f6142c3565b5b6020026020010181815250508080600101915050611e13565b508260ff16600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611ecc919061452a565b925050819055508260ff16600a6000828254611ee8919061452a565b92505081905550611f0a338383604051806020016040528060008152506125af565b3373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f89d44a6910c623e11f7e483ba819960fb5a2a8d2db76b6a7debce601b4323b39600086604051611f6a929190614a3a565b60405180910390a3505050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60606040518060400160405280600381526020017f4e4e540000000000000000000000000000000000000000000000000000000000815250905090565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61203c612035612329565b8383612635565b5050565b600060019050919050565b60045481565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6120ed61228f565b8060048190555050565b6000612101612329565b90508073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161415801561214657506121448682612051565b155b1561218a5780866040517fe237d922000000000000000000000000000000000000000000000000000000008152600401612181929190614199565b60405180910390fd5b61219786868686866127a5565b505050505050565b6121a761228f565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036122195760006040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401612210919061361a565b60405180910390fd5b61222281612451565b50565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b612297612329565b73ffffffffffffffffffffffffffffffffffffffff166122b5611f77565b73ffffffffffffffffffffffffffffffffffffffff1614612314576122d8612329565b6040517f118cdaa700000000000000000000000000000000000000000000000000000000815260040161230b919061361a565b60405180910390fd5b565b80600290816123259190614c05565b5050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16036123a35760006040517f57f447ce00000000000000000000000000000000000000000000000000000000815260040161239a919061361a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16036124155760006040517f01a8351400000000000000000000000000000000000000000000000000000000815260040161240c919061361a565b60405180910390fd5b61242285858585856128b0565b5050505050565b600060208202602084010151905092915050565b600060208202602084010151905092915050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000808360405160200161252b9190614d59565b604051602081830303815290604052805190602001209050600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661258f848361296290919063ffffffff16565b73ffffffffffffffffffffffffffffffffffffffff161491505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16036126215760006040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401612618919061361a565b60405180910390fd5b61262f6000858585856128b0565b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036126a75760006040517fced3e10000000000000000000000000000000000000000000000000000000000815260040161269e919061361a565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405161279891906135f0565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16036128175760006040517f57f447ce00000000000000000000000000000000000000000000000000000000815260040161280e919061361a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16036128895760006040517f01a83514000000000000000000000000000000000000000000000000000000008152600401612880919061361a565b60405180910390fd5b600080612896858561298e565b915091506128a787878484876128b0565b50505050505050565b6128bc858585856129be565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161461295b5760006128fa612329565b9050600184510361294a57600061291b60008661243d90919063ffffffff16565b9050600061293360008661243d90919063ffffffff16565b9050612943838989858589612a7a565b5050612959565b612958818787878787612c2e565b5b505b5050505050565b6000806000806129728686612de2565b9250925092506129828282612e3e565b82935050505092915050565b60608060405191506001825283602083015260408201905060018152826020820152604081016040529250929050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614158015612a285750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b15612a68576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a5f90614dcb565b60405180910390fd5b612a7484848484612fa2565b50505050565b60008473ffffffffffffffffffffffffffffffffffffffff163b1115612c26578373ffffffffffffffffffffffffffffffffffffffff1663f23a6e6187878686866040518663ffffffff1660e01b8152600401612adb959493929190614e40565b6020604051808303816000875af1925050508015612b1757506040513d601f19601f82011682018060405250810190612b149190614eaf565b60015b612b9b573d8060008114612b47576040519150601f19603f3d011682016040523d82523d6000602084013e612b4c565b606091505b506000815103612b9357846040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401612b8a919061361a565b60405180910390fd5b805181602001fd5b63f23a6e6160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614612c2457846040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401612c1b919061361a565b60405180910390fd5b505b505050505050565b60008473ffffffffffffffffffffffffffffffffffffffff163b1115612dda578373ffffffffffffffffffffffffffffffffffffffff1663bc197c8187878686866040518663ffffffff1660e01b8152600401612c8f959493929190614edc565b6020604051808303816000875af1925050508015612ccb57506040513d601f19601f82011682018060405250810190612cc89190614eaf565b60015b612d4f573d8060008114612cfb576040519150601f19603f3d011682016040523d82523d6000602084013e612d00565b606091505b506000815103612d4757846040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401612d3e919061361a565b60405180910390fd5b805181602001fd5b63bc197c8160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614612dd857846040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401612dcf919061361a565b60405180910390fd5b505b505050505050565b60008060006041845103612e275760008060006020870151925060408701519150606087015160001a9050612e198882858561334a565b955095509550505050612e37565b60006002855160001b9250925092505b9250925092565b60006003811115612e5257612e51614f44565b5b826003811115612e6557612e64614f44565b5b0315612f9e5760016003811115612e7f57612e7e614f44565b5b826003811115612e9257612e91614f44565b5b03612ec9576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60026003811115612edd57612edc614f44565b5b826003811115612ef057612eef614f44565b5b03612f35578060001c6040517ffce698f7000000000000000000000000000000000000000000000000000000008152600401612f2c9190613535565b60405180910390fd5b600380811115612f4857612f47614f44565b5b826003811115612f5b57612f5a614f44565b5b03612f9d57806040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600401612f949190614f82565b60405180910390fd5b5b5050565b8051825114612fec57815181516040517f5b059991000000000000000000000000000000000000000000000000000000008152600401612fe392919061429a565b60405180910390fd5b6000612ff6612329565b905060005b8351811015613205576000613019828661243d90919063ffffffff16565b90506000613030838661243d90919063ffffffff16565b9050600073ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff161461315d57600080600084815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508181101561310557888183856040517f03dee4c50000000000000000000000000000000000000000000000000000000081526004016130fc9493929190614f9d565b60405180910390fd5b81810360008085815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505b600073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff16146131f8578060008084815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546131f0919061452a565b925050819055505b5050806001019050612ffb565b5060018351036132c457600061322560008561243d90919063ffffffff16565b9050600061323d60008561243d90919063ffffffff16565b90508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6285856040516132b592919061429a565b60405180910390a45050613343565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb868660405161333a929190614fe2565b60405180910390a45b5050505050565b60008060007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08460001c111561338a576000600385925092509250613434565b6000600188888888604051600081526020016040526040516133af9493929190615019565b6020604051602081039080840390855afa1580156133d1573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361342557600060016000801b93509350935050613434565b8060008060001b935093509350505b9450945094915050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061347d82613452565b9050919050565b61348d81613472565b811461349857600080fd5b50565b6000813590506134aa81613484565b92915050565b6000819050919050565b6134c3816134b0565b81146134ce57600080fd5b50565b6000813590506134e0816134ba565b92915050565b600080604083850312156134fd576134fc613448565b5b600061350b8582860161349b565b925050602061351c858286016134d1565b9150509250929050565b61352f816134b0565b82525050565b600060208201905061354a6000830184613526565b92915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61358581613550565b811461359057600080fd5b50565b6000813590506135a28161357c565b92915050565b6000602082840312156135be576135bd613448565b5b60006135cc84828501613593565b91505092915050565b60008115159050919050565b6135ea816135d5565b82525050565b600060208201905061360560008301846135e1565b92915050565b61361481613472565b82525050565b600060208201905061362f600083018461360b565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6136888261363f565b810181811067ffffffffffffffff821117156136a7576136a6613650565b5b80604052505050565b60006136ba61343e565b90506136c6828261367f565b919050565b600067ffffffffffffffff8211156136e6576136e5613650565b5b6136ef8261363f565b9050602081019050919050565b82818337600083830152505050565b600061371e613719846136cb565b6136b0565b90508281526020810184848401111561373a5761373961363a565b5b6137458482856136fc565b509392505050565b600082601f83011261376257613761613635565b5b813561377284826020860161370b565b91505092915050565b60006020828403121561379157613790613448565b5b600082013567ffffffffffffffff8111156137af576137ae61344d565b5b6137bb8482850161374d565b91505092915050565b6000602082840312156137da576137d9613448565b5b60006137e88482850161349b565b91505092915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561382b578082015181840152602081019050613810565b60008484015250505050565b6000613842826137f1565b61384c81856137fc565b935061385c81856020860161380d565b6138658161363f565b840191505092915050565b6000602082019050818103600083015261388a8184613837565b905092915050565b6000602082840312156138a8576138a7613448565b5b60006138b6848285016134d1565b91505092915050565b60006138ca82613452565b9050919050565b6138da816138bf565b81146138e557600080fd5b50565b6000813590506138f7816138d1565b92915050565b6000806040838503121561391457613913613448565b5b6000613922858286016138e8565b9250506020613933858286016134d1565b9150509250929050565b600067ffffffffffffffff82111561395857613957613650565b5b602082029050602081019050919050565b600080fd5b600061398161397c8461393d565b6136b0565b905080838252602082019050602084028301858111156139a4576139a3613969565b5b835b818110156139cd57806139b988826134d1565b8452602084019350506020810190506139a6565b5050509392505050565b600082601f8301126139ec576139eb613635565b5b81356139fc84826020860161396e565b91505092915050565b600067ffffffffffffffff821115613a2057613a1f613650565b5b613a298261363f565b9050602081019050919050565b6000613a49613a4484613a05565b6136b0565b905082815260208101848484011115613a6557613a6461363a565b5b613a708482856136fc565b509392505050565b600082601f830112613a8d57613a8c613635565b5b8135613a9d848260208601613a36565b91505092915050565b600080600080600060a08688031215613ac257613ac1613448565b5b6000613ad08882890161349b565b9550506020613ae18882890161349b565b945050604086013567ffffffffffffffff811115613b0257613b0161344d565b5b613b0e888289016139d7565b935050606086013567ffffffffffffffff811115613b2f57613b2e61344d565b5b613b3b888289016139d7565b925050608086013567ffffffffffffffff811115613b5c57613b5b61344d565b5b613b6888828901613a78565b9150509295509295909350565b600067ffffffffffffffff821115613b9057613b8f613650565b5b602082029050602081019050919050565b6000613bb4613baf84613b75565b6136b0565b90508083825260208201905060208402830185811115613bd757613bd6613969565b5b835b81811015613c005780613bec888261349b565b845260208401935050602081019050613bd9565b5050509392505050565b600082601f830112613c1f57613c1e613635565b5b8135613c2f848260208601613ba1565b91505092915050565b60008060408385031215613c4f57613c4e613448565b5b600083013567ffffffffffffffff811115613c6d57613c6c61344d565b5b613c7985828601613c0a565b925050602083013567ffffffffffffffff811115613c9a57613c9961344d565b5b613ca6858286016139d7565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b613ce5816134b0565b82525050565b6000613cf78383613cdc565b60208301905092915050565b6000602082019050919050565b6000613d1b82613cb0565b613d258185613cbb565b9350613d3083613ccc565b8060005b83811015613d61578151613d488882613ceb565b9750613d5383613d03565b925050600181019050613d34565b5085935050505092915050565b60006020820190508181036000830152613d888184613d10565b905092915050565b600060ff82169050919050565b613da681613d90565b8114613db157600080fd5b50565b600081359050613dc381613d9d565b92915050565b600080600080600080600080610100898b031215613dea57613de9613448565b5b6000613df88b828c0161349b565b9850506020613e098b828c01613db4565b9750506040613e1a8b828c01613db4565b9650506060613e2b8b828c016134d1565b9550506080613e3c8b828c016134d1565b94505060a0613e4d8b828c01613db4565b93505060c0613e5e8b828c016134d1565b92505060e089013567ffffffffffffffff811115613e7f57613e7e61344d565b5b613e8b8b828c01613a78565b9150509295985092959890939650565b600060208284031215613eb157613eb0613448565b5b6000613ebf84828501613db4565b91505092915050565b613ed1816135d5565b8114613edc57600080fd5b50565b600081359050613eee81613ec8565b92915050565b60008060408385031215613f0b57613f0a613448565b5b6000613f198582860161349b565b9250506020613f2a85828601613edf565b9150509250929050565b60008060408385031215613f4b57613f4a613448565b5b6000613f598582860161349b565b9250506020613f6a8582860161349b565b9150509250929050565b600080600080600060a08688031215613f9057613f8f613448565b5b6000613f9e8882890161349b565b9550506020613faf8882890161349b565b9450506040613fc0888289016134d1565b9350506060613fd1888289016134d1565b925050608086013567ffffffffffffffff811115613ff257613ff161344d565b5b613ffe88828901613a78565b9150509295509295909350565b6000819050919050565b6000819050919050565b600061403a6140356140308461400b565b614015565b6134b0565b9050919050565b61404a8161401f565b82525050565b60006040820190506140656000830185614041565b6140726020830184613526565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806140c057607f821691505b6020821081036140d3576140d2614079565b5b50919050565b60006140f46140ef6140ea84613452565b614015565b613452565b9050919050565b6000614106826140d9565b9050919050565b6000614118826140fb565b9050919050565b6141288161410d565b82525050565b6000604082019050614143600083018561411f565b6141506020830184613526565b9392505050565b60008151905061416681613ec8565b92915050565b60006020828403121561418257614181613448565b5b600061419084828501614157565b91505092915050565b60006040820190506141ae600083018561360b565b6141bb602083018461360b565b9392505050565b7f496e76616c696420726563697069656e74206164647265737300000000000000600082015250565b60006141f86019836137fc565b9150614203826141c2565b602082019050919050565b60006020820190508181036000830152614227816141eb565b9050919050565b7f496e73756666696369656e742062616c616e6365000000000000000000000000600082015250565b60006142646014836137fc565b915061426f8261422e565b602082019050919050565b6000602082019050818103600083015261429381614257565b9050919050565b60006040820190506142af6000830185613526565b6142bc6020830184613526565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008160601b9050919050565b600061430a826142f2565b9050919050565b600061431c826142ff565b9050919050565b61433461432f82613472565b614311565b82525050565b60008160f81b9050919050565b60006143528261433a565b9050919050565b61436a61436582613d90565b614347565b82525050565b6000819050919050565b61438b614386826134b0565b614370565b82525050565b600061439d828b614323565b6014820191506143ad828a614359565b6001820191506143bd8289614359565b6001820191506143cd828861437a565b6020820191506143dd828761437a565b6020820191506143ed8286614359565b6001820191506143fd8285614323565b60148201915061440d828461437a565b6020820191508190509998505050505050505050565b7f496e76616c6964207369676e6174757265000000000000000000000000000000600082015250565b60006144596011836137fc565b915061446482614423565b602082019050919050565b600060208201905081810360008301526144888161444c565b9050919050565b7f4d617820726566657272616c20616d6f756e7420657863656564656400000000600082015250565b60006144c5601c836137fc565b91506144d08261448f565b602082019050919050565b600060208201905081810360008301526144f4816144b8565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000614535826134b0565b9150614540836134b0565b9250828201905080821115614558576145576144fb565b5b92915050565b7f4d617820737570706c7920657863656564656400000000000000000000000000600082015250565b60006145946013836137fc565b915061459f8261455e565b602082019050919050565b600060208201905081810360008301526145c381614587565b9050919050565b7f4d696e7420726571756573742065787069726564000000000000000000000000600082015250565b60006146006014836137fc565b915061460b826145ca565b602082019050919050565b6000602082019050818103600083015261462f816145f3565b9050919050565b7f496e76616c696420616464726573732100000000000000000000000000000000600082015250565b600061466c6010836137fc565b915061467782614636565b602082019050919050565b6000602082019050818103600083015261469b8161465f565b9050919050565b7f496e76616c69642070617920616d6f756e740000000000000000000000000000600082015250565b60006146d86012836137fc565b91506146e3826146a2565b602082019050919050565b60006020820190508181036000830152614707816146cb565b9050919050565b7f455448207061796d656e74206661696c65640000000000000000000000000000600082015250565b60006147446012836137fc565b915061474f8261470e565b602082019050919050565b6000602082019050818103600083015261477381614737565b9050919050565b6000614785826134b0565b9150614790836134b0565b925082820261479e816134b0565b915082820484148315176147b5576147b46144fb565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006147f6826134b0565b9150614801836134b0565b925082614811576148106147bc565b5b828204905092915050565b60008151905061482b816134ba565b92915050565b60006020828403121561484757614846613448565b5b60006148558482850161481c565b91505092915050565b7f496e73756666696369656e7420616c6c6f77616e636520616d6f756e74000000600082015250565b6000614894601d836137fc565b915061489f8261485e565b602082019050919050565b600060208201905081810360008301526148c381614887565b9050919050565b60006060820190506148df600083018661360b565b6148ec602083018561360b565b6148f96040830184613526565b949350505050565b6000604082019050614916600083018561360b565b6149236020830184613526565b9392505050565b7f55534454207472616e73666572206661696c6564000000000000000000000000600082015250565b60006149606014836137fc565b915061496b8261492a565b602082019050919050565b6000602082019050818103600083015261498f81614953565b9050919050565b7f47414c41207472616e73666572206661696c6564000000000000000000000000600082015250565b60006149cc6014836137fc565b91506149d782614996565b602082019050919050565b600060208201905081810360008301526149fb816149bf565b9050919050565b614a0b81613d90565b82525050565b6000604082019050614a266000830185613526565b614a336020830184614a02565b9392505050565b6000604082019050614a4f6000830185614041565b614a5c6020830184614a02565b9392505050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b600060088302614ac57fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82614a88565b614acf8683614a88565b95508019841693508086168417925050509392505050565b6000614b02614afd614af8846134b0565b614015565b6134b0565b9050919050565b6000819050919050565b614b1c83614ae7565b614b30614b2882614b09565b848454614a95565b825550505050565b600090565b614b45614b38565b614b50818484614b13565b505050565b5b81811015614b7457614b69600082614b3d565b600181019050614b56565b5050565b601f821115614bb957614b8a81614a63565b614b9384614a78565b81016020851015614ba2578190505b614bb6614bae85614a78565b830182614b55565b50505b505050565b600082821c905092915050565b6000614bdc60001984600802614bbe565b1980831691505092915050565b6000614bf58383614bcb565b9150826002028217905092915050565b614c0e826137f1565b67ffffffffffffffff811115614c2757614c26613650565b5b614c3182546140a8565b614c3c828285614b78565b600060209050601f831160018114614c6f5760008415614c5d578287015190505b614c678582614be9565b865550614ccf565b601f198416614c7d86614a63565b60005b82811015614ca557848901518255600182019150602085019450602081019050614c80565b86831015614cc25784890151614cbe601f891682614bcb565b8355505b6001600288020188555050505b505050505050565b600081905092915050565b7f19457468657265756d205369676e6564204d6573736167653a0a333200000000600082015250565b6000614d18601c83614cd7565b9150614d2382614ce2565b601c82019050919050565b6000819050919050565b6000819050919050565b614d53614d4e82614d2e565b614d38565b82525050565b6000614d6482614d0b565b9150614d708284614d42565b60208201915081905092915050565b7f536f756c626f756e643a205472616e73666572206661696c6564000000000000600082015250565b6000614db5601a836137fc565b9150614dc082614d7f565b602082019050919050565b60006020820190508181036000830152614de481614da8565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000614e1282614deb565b614e1c8185614df6565b9350614e2c81856020860161380d565b614e358161363f565b840191505092915050565b600060a082019050614e55600083018861360b565b614e62602083018761360b565b614e6f6040830186613526565b614e7c6060830185613526565b8181036080830152614e8e8184614e07565b90509695505050505050565b600081519050614ea98161357c565b92915050565b600060208284031215614ec557614ec4613448565b5b6000614ed384828501614e9a565b91505092915050565b600060a082019050614ef1600083018861360b565b614efe602083018761360b565b8181036040830152614f108186613d10565b90508181036060830152614f248185613d10565b90508181036080830152614f388184614e07565b90509695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b614f7c81614d2e565b82525050565b6000602082019050614f976000830184614f73565b92915050565b6000608082019050614fb2600083018761360b565b614fbf6020830186613526565b614fcc6040830185613526565b614fd96060830184613526565b95945050505050565b60006040820190508181036000830152614ffc8185613d10565b905081810360208301526150108184613d10565b90509392505050565b600060808201905061502e6000830187614f73565b61503b6020830186614a02565b6150486040830185614f73565b6150556060830184614f73565b9594505050505056fea2646970667358221220e40229078e710343896e7108c6b8963d5686ae64e2d8e88d4be67ce48ecee2aa64736f6c63430008180033000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7000000000000000000000000d1d2eb1b1e90b638588728b4130137d262c87cae00000000000000000000000000000000000000000000000000000000000026ac0000000000000000000000006bb02a67fab5a43101399eeecdf64f9600765b3f00000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000002e68747470733a2f2f6d657461666c6f72612e78797a2f6170692f6d657461646174612f636f6e6e6f697373657572000000000000000000000000000000000000

Deployed Bytecode

0x6080604052600436106101f15760003560e01c806356b8d8c61161010d57806395d89b41116100a0578063d5abeb011161006f578063d5abeb01146106df578063e985e9c51461070a578063f103b43314610747578063f242432a14610770578063f2fde38b14610799576101f8565b806395d89b41146106235780639ab4a4451461064e578063a22cb46514610679578063b45a3c0e146106a2576101f8565b80638c774f03116100dc5780638c774f03146105885780638ce667bc146105a45780638da5cb5b146105cd57806392fbc4b7146105f8576101f8565b806356b8d8c6146104f6578063715018a61461051f57806375d60372146105365780637d81c4c11461055f576101f8565b80631481794e1161018557806344471fd91161015457806344471fd91461043e578063467a0d91146104675780634782f779146104905780634e1273f4146104b9576101f8565b80631481794e14610396578063238ac933146103bf5780632d380242146103ea5780632eb2c2d614610415576101f8565b8063046dc166116101c1578063046dc166146102c857806306fdde03146102f15780630e89341c1461031c57806311075be814610359576101f8565b8062fdd58e146101fa57806301ffc9a71461023757806302d454571461027457806302fe53051461029f576101f8565b366101f857005b005b34801561020657600080fd5b50610221600480360381019061021c91906134e6565b6107c2565b60405161022e9190613535565b60405180910390f35b34801561024357600080fd5b5061025e600480360381019061025991906135a8565b61081c565b60405161026b91906135f0565b60405180910390f35b34801561028057600080fd5b506102896108fe565b604051610296919061361a565b60405180910390f35b3480156102ab57600080fd5b506102c660048036038101906102c1919061377b565b610924565b005b3480156102d457600080fd5b506102ef60048036038101906102ea91906137c4565b610992565b005b3480156102fd57600080fd5b506103066109de565b6040516103139190613870565b60405180910390f35b34801561032857600080fd5b50610343600480360381019061033e9190613892565b610a1b565b6040516103509190613870565b60405180910390f35b34801561036557600080fd5b50610380600480360381019061037b91906137c4565b610aaf565b60405161038d9190613535565b60405180910390f35b3480156103a257600080fd5b506103bd60048036038101906103b891906138fd565b610ac7565b005b3480156103cb57600080fd5b506103d4610b74565b6040516103e1919061361a565b60405180910390f35b3480156103f657600080fd5b506103ff610b9a565b60405161040c9190613535565b60405180910390f35b34801561042157600080fd5b5061043c60048036038101906104379190613aa6565b610ba0565b005b34801561044a57600080fd5b50610465600480360381019061046091906138fd565b610c48565b005b34801561047357600080fd5b5061048e600480360381019061048991906137c4565b610cf5565b005b34801561049c57600080fd5b506104b760048036038101906104b291906138fd565b610d41565b005b3480156104c557600080fd5b506104e060048036038101906104db9190613c38565b610e46565b6040516104ed9190613d6e565b60405180910390f35b34801561050257600080fd5b5061051d600480360381019061051891906138fd565b610f4f565b005b34801561052b57600080fd5b50610534610ffc565b005b34801561054257600080fd5b5061055d600480360381019061055891906137c4565b611010565b005b34801561056b57600080fd5b50610586600480360381019061058191906137c4565b61105c565b005b6105a2600480360381019061059d9190613dc9565b6110a8565b005b3480156105b057600080fd5b506105cb60048036038101906105c69190613e9b565b611d68565b005b3480156105d957600080fd5b506105e2611f77565b6040516105ef919061361a565b60405180910390f35b34801561060457600080fd5b5061060d611fa1565b60405161061a919061361a565b60405180910390f35b34801561062f57600080fd5b50610638611fc7565b6040516106459190613870565b60405180910390f35b34801561065a57600080fd5b50610663612004565b604051610670919061361a565b60405180910390f35b34801561068557600080fd5b506106a0600480360381019061069b9190613ef4565b61202a565b005b3480156106ae57600080fd5b506106c960048036038101906106c49190613892565b612040565b6040516106d691906135f0565b60405180910390f35b3480156106eb57600080fd5b506106f461204b565b6040516107019190613535565b60405180910390f35b34801561071657600080fd5b50610731600480360381019061072c9190613f34565b612051565b60405161073e91906135f0565b60405180910390f35b34801561075357600080fd5b5061076e60048036038101906107699190613892565b6120e5565b005b34801561077c57600080fd5b5061079760048036038101906107929190613f74565b6120f7565b005b3480156107a557600080fd5b506107c060048036038101906107bb91906137c4565b61219f565b005b600080600083815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60007fd9b67a26000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806108e757507f0e89341c000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b806108f757506108f682612225565b5b9050919050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61092c61228f565b61093581612316565b7f6bd5c950a8d8df17f772f5af37cb3655737899cbf903264b9795592da439661c60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff604051610987929190614050565b60405180910390a150565b61099a61228f565b80600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60606040518060400160405280600881526020017f4e6f6465204e4654000000000000000000000000000000000000000000000000815250905090565b606060028054610a2a906140a8565b80601f0160208091040260200160405190810160405280929190818152602001828054610a56906140a8565b8015610aa35780601f10610a7857610100808354040283529160200191610aa3565b820191906000526020600020905b815481529060010190602001808311610a8657829003601f168201915b50505050509050919050565b60086020528060005260406000206000915090505481565b610acf61228f565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff1660e01b8152600401610b2c92919061412e565b6020604051808303816000875af1158015610b4b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b6f919061416c565b505050565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600a5481565b6000610baa612329565b90508073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614158015610bef5750610bed8682612051565b155b15610c335780866040517fe237d922000000000000000000000000000000000000000000000000000000008152600401610c2a929190614199565b60405180910390fd5b610c408686868686612331565b505050505050565b610c5061228f565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff1660e01b8152600401610cad92919061412e565b6020604051808303816000875af1158015610ccc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf0919061416c565b505050565b610cfd61228f565b80600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b610d4961228f565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610db8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610daf9061420e565b60405180910390fd5b47811115610dfb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610df29061427a565b60405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610e41573d6000803e3d6000fd5b505050565b60608151835114610e9257815183516040517f5b059991000000000000000000000000000000000000000000000000000000008152600401610e8992919061429a565b60405180910390fd5b6000835167ffffffffffffffff811115610eaf57610eae613650565b5b604051908082528060200260200182016040528015610edd5781602001602082028036833780820191505090505b50905060005b8451811015610f4457610f1a610f02828761242990919063ffffffff16565b610f15838761243d90919063ffffffff16565b6107c2565b828281518110610f2d57610f2c6142c3565b5b602002602001018181525050806001019050610ee3565b508091505092915050565b610f5761228f565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff1660e01b8152600401610fb492919061412e565b6020604051808303816000875af1158015610fd3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ff7919061416c565b505050565b61100461228f565b61100e6000612451565b565b61101861228f565b80600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61106461228f565b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600088888888888833896040516020016110c9989796959493929190614391565b6040516020818303038152906040528051906020012090506110eb8183612517565b61112a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111219061446f565b60405180910390fd5b60648860ff161115611171576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611168906144db565b60405180910390fd5b6004548460ff16600a54611185919061452a565b11156111c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111bd906145aa565b60405180910390fd5b84600a541461120a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161120190614616565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff1603611279576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161127090614682565b60405180910390fd5b600086116112bc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112b3906146ee565b60405180910390fd5b60018760ff1603611382578534101561130a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113019061475a565b60405180910390fd5b60008860ff161461137d57600060648960ff1688611328919061477a565b61133291906147eb565b90508973ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505015801561137a573d6000803e3d6000fd5b50505b611b1d565b60028760ff16036115e25785600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e33306040518363ffffffff1660e01b81526004016113eb929190614199565b602060405180830381865afa158015611408573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061142c9190614831565b101561146d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611464906148aa565b60405180910390fd5b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330896040518463ffffffff1660e01b81526004016114cc939291906148ca565b6020604051808303816000875af11580156114eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061150f919061416c565b5060008860ff16146115dd57600060648960ff168861152e919061477a565b61153891906147eb565b9050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8b836040518363ffffffff1660e01b8152600401611597929190614901565b6020604051808303816000875af11580156115b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115da919061416c565b50505b611b1c565b60038760ff16036118805785600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e33306040518363ffffffff1660e01b815260040161164b929190614199565b602060405180830381865afa158015611668573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061168c9190614831565b10156116cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116c4906148aa565b60405180910390fd5b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330896040518463ffffffff1660e01b815260040161172c939291906148ca565b6020604051808303816000875af115801561174b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061176f919061416c565b6117ae576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117a590614976565b60405180910390fd5b60008860ff161461187b57600060648960ff16886117cc919061477a565b6117d691906147eb565b9050600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8b836040518363ffffffff1660e01b8152600401611835929190614901565b6020604051808303816000875af1158015611854573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611878919061416c565b50505b611b1b565b60048760ff1603611b1a5785600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e33306040518363ffffffff1660e01b81526004016118e9929190614199565b602060405180830381865afa158015611906573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061192a9190614831565b101561196b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611962906148aa565b60405180910390fd5b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330896040518463ffffffff1660e01b81526004016119ca939291906148ca565b6020604051808303816000875af11580156119e9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a0d919061416c565b611a4c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a43906149e2565b60405180910390fd5b60008860ff1614611b1957600060648960ff1688611a6a919061477a565b611a7491906147eb565b9050600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8b836040518363ffffffff1660e01b8152600401611ad3929190614901565b6020604051808303816000875af1158015611af2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b16919061416c565b50505b5b5b5b5b60008460ff1667ffffffffffffffff811115611b3c57611b3b613650565b5b604051908082528060200260200182016040528015611b6a5781602001602082028036833780820191505090505b50905060008560ff1667ffffffffffffffff811115611b8c57611b8b613650565b5b604051908082528060200260200182016040528015611bba5781602001602082028036833780820191505090505b50905060005b8660ff16811015611c6357600081600a54611bdb919061452a565b905080848381518110611bf157611bf06142c3565b5b6020026020010181815250506001838381518110611c1257611c116142c3565b5b6020026020010181815250507f032bc66be43dbccb7487781d168eb7bda224628a3b2c3388bdf69b532a3a161181604051611c4d9190613535565b60405180910390a1508080600101915050611bc0565b508560ff16600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611cb6919061452a565b925050819055508560ff16600a6000828254611cd2919061452a565b92505081905550611cf4338383604051806020016040528060008152506125af565b8a73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f89d44a6910c623e11f7e483ba819960fb5a2a8d2db76b6a7debce601b4323b398a89604051611d53929190614a11565b60405180910390a35050505050505050505050565b611d7061228f565b60008160ff1667ffffffffffffffff811115611d8f57611d8e613650565b5b604051908082528060200260200182016040528015611dbd5781602001602082028036833780820191505090505b50905060008260ff1667ffffffffffffffff811115611ddf57611dde613650565b5b604051908082528060200260200182016040528015611e0d5781602001602082028036833780820191505090505b50905060005b8360ff16811015611e795780600a54611e2c919061452a565b838281518110611e3f57611e3e6142c3565b5b6020026020010181815250506001828281518110611e6057611e5f6142c3565b5b6020026020010181815250508080600101915050611e13565b508260ff16600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611ecc919061452a565b925050819055508260ff16600a6000828254611ee8919061452a565b92505081905550611f0a338383604051806020016040528060008152506125af565b3373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f89d44a6910c623e11f7e483ba819960fb5a2a8d2db76b6a7debce601b4323b39600086604051611f6a929190614a3a565b60405180910390a3505050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60606040518060400160405280600381526020017f4e4e540000000000000000000000000000000000000000000000000000000000815250905090565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61203c612035612329565b8383612635565b5050565b600060019050919050565b60045481565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6120ed61228f565b8060048190555050565b6000612101612329565b90508073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161415801561214657506121448682612051565b155b1561218a5780866040517fe237d922000000000000000000000000000000000000000000000000000000008152600401612181929190614199565b60405180910390fd5b61219786868686866127a5565b505050505050565b6121a761228f565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036122195760006040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401612210919061361a565b60405180910390fd5b61222281612451565b50565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b612297612329565b73ffffffffffffffffffffffffffffffffffffffff166122b5611f77565b73ffffffffffffffffffffffffffffffffffffffff1614612314576122d8612329565b6040517f118cdaa700000000000000000000000000000000000000000000000000000000815260040161230b919061361a565b60405180910390fd5b565b80600290816123259190614c05565b5050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16036123a35760006040517f57f447ce00000000000000000000000000000000000000000000000000000000815260040161239a919061361a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16036124155760006040517f01a8351400000000000000000000000000000000000000000000000000000000815260040161240c919061361a565b60405180910390fd5b61242285858585856128b0565b5050505050565b600060208202602084010151905092915050565b600060208202602084010151905092915050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000808360405160200161252b9190614d59565b604051602081830303815290604052805190602001209050600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661258f848361296290919063ffffffff16565b73ffffffffffffffffffffffffffffffffffffffff161491505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16036126215760006040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401612618919061361a565b60405180910390fd5b61262f6000858585856128b0565b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036126a75760006040517fced3e10000000000000000000000000000000000000000000000000000000000815260040161269e919061361a565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405161279891906135f0565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16036128175760006040517f57f447ce00000000000000000000000000000000000000000000000000000000815260040161280e919061361a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16036128895760006040517f01a83514000000000000000000000000000000000000000000000000000000008152600401612880919061361a565b60405180910390fd5b600080612896858561298e565b915091506128a787878484876128b0565b50505050505050565b6128bc858585856129be565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161461295b5760006128fa612329565b9050600184510361294a57600061291b60008661243d90919063ffffffff16565b9050600061293360008661243d90919063ffffffff16565b9050612943838989858589612a7a565b5050612959565b612958818787878787612c2e565b5b505b5050505050565b6000806000806129728686612de2565b9250925092506129828282612e3e565b82935050505092915050565b60608060405191506001825283602083015260408201905060018152826020820152604081016040529250929050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614158015612a285750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b15612a68576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a5f90614dcb565b60405180910390fd5b612a7484848484612fa2565b50505050565b60008473ffffffffffffffffffffffffffffffffffffffff163b1115612c26578373ffffffffffffffffffffffffffffffffffffffff1663f23a6e6187878686866040518663ffffffff1660e01b8152600401612adb959493929190614e40565b6020604051808303816000875af1925050508015612b1757506040513d601f19601f82011682018060405250810190612b149190614eaf565b60015b612b9b573d8060008114612b47576040519150601f19603f3d011682016040523d82523d6000602084013e612b4c565b606091505b506000815103612b9357846040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401612b8a919061361a565b60405180910390fd5b805181602001fd5b63f23a6e6160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614612c2457846040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401612c1b919061361a565b60405180910390fd5b505b505050505050565b60008473ffffffffffffffffffffffffffffffffffffffff163b1115612dda578373ffffffffffffffffffffffffffffffffffffffff1663bc197c8187878686866040518663ffffffff1660e01b8152600401612c8f959493929190614edc565b6020604051808303816000875af1925050508015612ccb57506040513d601f19601f82011682018060405250810190612cc89190614eaf565b60015b612d4f573d8060008114612cfb576040519150601f19603f3d011682016040523d82523d6000602084013e612d00565b606091505b506000815103612d4757846040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401612d3e919061361a565b60405180910390fd5b805181602001fd5b63bc197c8160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614612dd857846040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401612dcf919061361a565b60405180910390fd5b505b505050505050565b60008060006041845103612e275760008060006020870151925060408701519150606087015160001a9050612e198882858561334a565b955095509550505050612e37565b60006002855160001b9250925092505b9250925092565b60006003811115612e5257612e51614f44565b5b826003811115612e6557612e64614f44565b5b0315612f9e5760016003811115612e7f57612e7e614f44565b5b826003811115612e9257612e91614f44565b5b03612ec9576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60026003811115612edd57612edc614f44565b5b826003811115612ef057612eef614f44565b5b03612f35578060001c6040517ffce698f7000000000000000000000000000000000000000000000000000000008152600401612f2c9190613535565b60405180910390fd5b600380811115612f4857612f47614f44565b5b826003811115612f5b57612f5a614f44565b5b03612f9d57806040517fd78bce0c000000000000000000000000000000000000000000000000000000008152600401612f949190614f82565b60405180910390fd5b5b5050565b8051825114612fec57815181516040517f5b059991000000000000000000000000000000000000000000000000000000008152600401612fe392919061429a565b60405180910390fd5b6000612ff6612329565b905060005b8351811015613205576000613019828661243d90919063ffffffff16565b90506000613030838661243d90919063ffffffff16565b9050600073ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff161461315d57600080600084815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508181101561310557888183856040517f03dee4c50000000000000000000000000000000000000000000000000000000081526004016130fc9493929190614f9d565b60405180910390fd5b81810360008085815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505b600073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff16146131f8578060008084815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546131f0919061452a565b925050819055505b5050806001019050612ffb565b5060018351036132c457600061322560008561243d90919063ffffffff16565b9050600061323d60008561243d90919063ffffffff16565b90508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6285856040516132b592919061429a565b60405180910390a45050613343565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb868660405161333a929190614fe2565b60405180910390a45b5050505050565b60008060007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08460001c111561338a576000600385925092509250613434565b6000600188888888604051600081526020016040526040516133af9493929190615019565b6020604051602081039080840390855afa1580156133d1573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361342557600060016000801b93509350935050613434565b8060008060001b935093509350505b9450945094915050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061347d82613452565b9050919050565b61348d81613472565b811461349857600080fd5b50565b6000813590506134aa81613484565b92915050565b6000819050919050565b6134c3816134b0565b81146134ce57600080fd5b50565b6000813590506134e0816134ba565b92915050565b600080604083850312156134fd576134fc613448565b5b600061350b8582860161349b565b925050602061351c858286016134d1565b9150509250929050565b61352f816134b0565b82525050565b600060208201905061354a6000830184613526565b92915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61358581613550565b811461359057600080fd5b50565b6000813590506135a28161357c565b92915050565b6000602082840312156135be576135bd613448565b5b60006135cc84828501613593565b91505092915050565b60008115159050919050565b6135ea816135d5565b82525050565b600060208201905061360560008301846135e1565b92915050565b61361481613472565b82525050565b600060208201905061362f600083018461360b565b92915050565b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6136888261363f565b810181811067ffffffffffffffff821117156136a7576136a6613650565b5b80604052505050565b60006136ba61343e565b90506136c6828261367f565b919050565b600067ffffffffffffffff8211156136e6576136e5613650565b5b6136ef8261363f565b9050602081019050919050565b82818337600083830152505050565b600061371e613719846136cb565b6136b0565b90508281526020810184848401111561373a5761373961363a565b5b6137458482856136fc565b509392505050565b600082601f83011261376257613761613635565b5b813561377284826020860161370b565b91505092915050565b60006020828403121561379157613790613448565b5b600082013567ffffffffffffffff8111156137af576137ae61344d565b5b6137bb8482850161374d565b91505092915050565b6000602082840312156137da576137d9613448565b5b60006137e88482850161349b565b91505092915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561382b578082015181840152602081019050613810565b60008484015250505050565b6000613842826137f1565b61384c81856137fc565b935061385c81856020860161380d565b6138658161363f565b840191505092915050565b6000602082019050818103600083015261388a8184613837565b905092915050565b6000602082840312156138a8576138a7613448565b5b60006138b6848285016134d1565b91505092915050565b60006138ca82613452565b9050919050565b6138da816138bf565b81146138e557600080fd5b50565b6000813590506138f7816138d1565b92915050565b6000806040838503121561391457613913613448565b5b6000613922858286016138e8565b9250506020613933858286016134d1565b9150509250929050565b600067ffffffffffffffff82111561395857613957613650565b5b602082029050602081019050919050565b600080fd5b600061398161397c8461393d565b6136b0565b905080838252602082019050602084028301858111156139a4576139a3613969565b5b835b818110156139cd57806139b988826134d1565b8452602084019350506020810190506139a6565b5050509392505050565b600082601f8301126139ec576139eb613635565b5b81356139fc84826020860161396e565b91505092915050565b600067ffffffffffffffff821115613a2057613a1f613650565b5b613a298261363f565b9050602081019050919050565b6000613a49613a4484613a05565b6136b0565b905082815260208101848484011115613a6557613a6461363a565b5b613a708482856136fc565b509392505050565b600082601f830112613a8d57613a8c613635565b5b8135613a9d848260208601613a36565b91505092915050565b600080600080600060a08688031215613ac257613ac1613448565b5b6000613ad08882890161349b565b9550506020613ae18882890161349b565b945050604086013567ffffffffffffffff811115613b0257613b0161344d565b5b613b0e888289016139d7565b935050606086013567ffffffffffffffff811115613b2f57613b2e61344d565b5b613b3b888289016139d7565b925050608086013567ffffffffffffffff811115613b5c57613b5b61344d565b5b613b6888828901613a78565b9150509295509295909350565b600067ffffffffffffffff821115613b9057613b8f613650565b5b602082029050602081019050919050565b6000613bb4613baf84613b75565b6136b0565b90508083825260208201905060208402830185811115613bd757613bd6613969565b5b835b81811015613c005780613bec888261349b565b845260208401935050602081019050613bd9565b5050509392505050565b600082601f830112613c1f57613c1e613635565b5b8135613c2f848260208601613ba1565b91505092915050565b60008060408385031215613c4f57613c4e613448565b5b600083013567ffffffffffffffff811115613c6d57613c6c61344d565b5b613c7985828601613c0a565b925050602083013567ffffffffffffffff811115613c9a57613c9961344d565b5b613ca6858286016139d7565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b613ce5816134b0565b82525050565b6000613cf78383613cdc565b60208301905092915050565b6000602082019050919050565b6000613d1b82613cb0565b613d258185613cbb565b9350613d3083613ccc565b8060005b83811015613d61578151613d488882613ceb565b9750613d5383613d03565b925050600181019050613d34565b5085935050505092915050565b60006020820190508181036000830152613d888184613d10565b905092915050565b600060ff82169050919050565b613da681613d90565b8114613db157600080fd5b50565b600081359050613dc381613d9d565b92915050565b600080600080600080600080610100898b031215613dea57613de9613448565b5b6000613df88b828c0161349b565b9850506020613e098b828c01613db4565b9750506040613e1a8b828c01613db4565b9650506060613e2b8b828c016134d1565b9550506080613e3c8b828c016134d1565b94505060a0613e4d8b828c01613db4565b93505060c0613e5e8b828c016134d1565b92505060e089013567ffffffffffffffff811115613e7f57613e7e61344d565b5b613e8b8b828c01613a78565b9150509295985092959890939650565b600060208284031215613eb157613eb0613448565b5b6000613ebf84828501613db4565b91505092915050565b613ed1816135d5565b8114613edc57600080fd5b50565b600081359050613eee81613ec8565b92915050565b60008060408385031215613f0b57613f0a613448565b5b6000613f198582860161349b565b9250506020613f2a85828601613edf565b9150509250929050565b60008060408385031215613f4b57613f4a613448565b5b6000613f598582860161349b565b9250506020613f6a8582860161349b565b9150509250929050565b600080600080600060a08688031215613f9057613f8f613448565b5b6000613f9e8882890161349b565b9550506020613faf8882890161349b565b9450506040613fc0888289016134d1565b9350506060613fd1888289016134d1565b925050608086013567ffffffffffffffff811115613ff257613ff161344d565b5b613ffe88828901613a78565b9150509295509295909350565b6000819050919050565b6000819050919050565b600061403a6140356140308461400b565b614015565b6134b0565b9050919050565b61404a8161401f565b82525050565b60006040820190506140656000830185614041565b6140726020830184613526565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806140c057607f821691505b6020821081036140d3576140d2614079565b5b50919050565b60006140f46140ef6140ea84613452565b614015565b613452565b9050919050565b6000614106826140d9565b9050919050565b6000614118826140fb565b9050919050565b6141288161410d565b82525050565b6000604082019050614143600083018561411f565b6141506020830184613526565b9392505050565b60008151905061416681613ec8565b92915050565b60006020828403121561418257614181613448565b5b600061419084828501614157565b91505092915050565b60006040820190506141ae600083018561360b565b6141bb602083018461360b565b9392505050565b7f496e76616c696420726563697069656e74206164647265737300000000000000600082015250565b60006141f86019836137fc565b9150614203826141c2565b602082019050919050565b60006020820190508181036000830152614227816141eb565b9050919050565b7f496e73756666696369656e742062616c616e6365000000000000000000000000600082015250565b60006142646014836137fc565b915061426f8261422e565b602082019050919050565b6000602082019050818103600083015261429381614257565b9050919050565b60006040820190506142af6000830185613526565b6142bc6020830184613526565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008160601b9050919050565b600061430a826142f2565b9050919050565b600061431c826142ff565b9050919050565b61433461432f82613472565b614311565b82525050565b60008160f81b9050919050565b60006143528261433a565b9050919050565b61436a61436582613d90565b614347565b82525050565b6000819050919050565b61438b614386826134b0565b614370565b82525050565b600061439d828b614323565b6014820191506143ad828a614359565b6001820191506143bd8289614359565b6001820191506143cd828861437a565b6020820191506143dd828761437a565b6020820191506143ed8286614359565b6001820191506143fd8285614323565b60148201915061440d828461437a565b6020820191508190509998505050505050505050565b7f496e76616c6964207369676e6174757265000000000000000000000000000000600082015250565b60006144596011836137fc565b915061446482614423565b602082019050919050565b600060208201905081810360008301526144888161444c565b9050919050565b7f4d617820726566657272616c20616d6f756e7420657863656564656400000000600082015250565b60006144c5601c836137fc565b91506144d08261448f565b602082019050919050565b600060208201905081810360008301526144f4816144b8565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000614535826134b0565b9150614540836134b0565b9250828201905080821115614558576145576144fb565b5b92915050565b7f4d617820737570706c7920657863656564656400000000000000000000000000600082015250565b60006145946013836137fc565b915061459f8261455e565b602082019050919050565b600060208201905081810360008301526145c381614587565b9050919050565b7f4d696e7420726571756573742065787069726564000000000000000000000000600082015250565b60006146006014836137fc565b915061460b826145ca565b602082019050919050565b6000602082019050818103600083015261462f816145f3565b9050919050565b7f496e76616c696420616464726573732100000000000000000000000000000000600082015250565b600061466c6010836137fc565b915061467782614636565b602082019050919050565b6000602082019050818103600083015261469b8161465f565b9050919050565b7f496e76616c69642070617920616d6f756e740000000000000000000000000000600082015250565b60006146d86012836137fc565b91506146e3826146a2565b602082019050919050565b60006020820190508181036000830152614707816146cb565b9050919050565b7f455448207061796d656e74206661696c65640000000000000000000000000000600082015250565b60006147446012836137fc565b915061474f8261470e565b602082019050919050565b6000602082019050818103600083015261477381614737565b9050919050565b6000614785826134b0565b9150614790836134b0565b925082820261479e816134b0565b915082820484148315176147b5576147b46144fb565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006147f6826134b0565b9150614801836134b0565b925082614811576148106147bc565b5b828204905092915050565b60008151905061482b816134ba565b92915050565b60006020828403121561484757614846613448565b5b60006148558482850161481c565b91505092915050565b7f496e73756666696369656e7420616c6c6f77616e636520616d6f756e74000000600082015250565b6000614894601d836137fc565b915061489f8261485e565b602082019050919050565b600060208201905081810360008301526148c381614887565b9050919050565b60006060820190506148df600083018661360b565b6148ec602083018561360b565b6148f96040830184613526565b949350505050565b6000604082019050614916600083018561360b565b6149236020830184613526565b9392505050565b7f55534454207472616e73666572206661696c6564000000000000000000000000600082015250565b60006149606014836137fc565b915061496b8261492a565b602082019050919050565b6000602082019050818103600083015261498f81614953565b9050919050565b7f47414c41207472616e73666572206661696c6564000000000000000000000000600082015250565b60006149cc6014836137fc565b91506149d782614996565b602082019050919050565b600060208201905081810360008301526149fb816149bf565b9050919050565b614a0b81613d90565b82525050565b6000604082019050614a266000830185613526565b614a336020830184614a02565b9392505050565b6000604082019050614a4f6000830185614041565b614a5c6020830184614a02565b9392505050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b600060088302614ac57fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82614a88565b614acf8683614a88565b95508019841693508086168417925050509392505050565b6000614b02614afd614af8846134b0565b614015565b6134b0565b9050919050565b6000819050919050565b614b1c83614ae7565b614b30614b2882614b09565b848454614a95565b825550505050565b600090565b614b45614b38565b614b50818484614b13565b505050565b5b81811015614b7457614b69600082614b3d565b600181019050614b56565b5050565b601f821115614bb957614b8a81614a63565b614b9384614a78565b81016020851015614ba2578190505b614bb6614bae85614a78565b830182614b55565b50505b505050565b600082821c905092915050565b6000614bdc60001984600802614bbe565b1980831691505092915050565b6000614bf58383614bcb565b9150826002028217905092915050565b614c0e826137f1565b67ffffffffffffffff811115614c2757614c26613650565b5b614c3182546140a8565b614c3c828285614b78565b600060209050601f831160018114614c6f5760008415614c5d578287015190505b614c678582614be9565b865550614ccf565b601f198416614c7d86614a63565b60005b82811015614ca557848901518255600182019150602085019450602081019050614c80565b86831015614cc25784890151614cbe601f891682614bcb565b8355505b6001600288020188555050505b505050505050565b600081905092915050565b7f19457468657265756d205369676e6564204d6573736167653a0a333200000000600082015250565b6000614d18601c83614cd7565b9150614d2382614ce2565b601c82019050919050565b6000819050919050565b6000819050919050565b614d53614d4e82614d2e565b614d38565b82525050565b6000614d6482614d0b565b9150614d708284614d42565b60208201915081905092915050565b7f536f756c626f756e643a205472616e73666572206661696c6564000000000000600082015250565b6000614db5601a836137fc565b9150614dc082614d7f565b602082019050919050565b60006020820190508181036000830152614de481614da8565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000614e1282614deb565b614e1c8185614df6565b9350614e2c81856020860161380d565b614e358161363f565b840191505092915050565b600060a082019050614e55600083018861360b565b614e62602083018761360b565b614e6f6040830186613526565b614e7c6060830185613526565b8181036080830152614e8e8184614e07565b90509695505050505050565b600081519050614ea98161357c565b92915050565b600060208284031215614ec557614ec4613448565b5b6000614ed384828501614e9a565b91505092915050565b600060a082019050614ef1600083018861360b565b614efe602083018761360b565b8181036040830152614f108186613d10565b90508181036060830152614f248185613d10565b90508181036080830152614f388184614e07565b90509695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b614f7c81614d2e565b82525050565b6000602082019050614f976000830184614f73565b92915050565b6000608082019050614fb2600083018761360b565b614fbf6020830186613526565b614fcc6040830185613526565b614fd96060830184613526565b95945050505050565b60006040820190508181036000830152614ffc8185613d10565b905081810360208301526150108184613d10565b90509392505050565b600060808201905061502e6000830187614f73565b61503b6020830186614a02565b6150486040830185614f73565b6150556060830184614f73565b9594505050505056fea2646970667358221220e40229078e710343896e7108c6b8963d5686ae64e2d8e88d4be67ce48ecee2aa64736f6c63430008180033

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

000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7000000000000000000000000d1d2eb1b1e90b638588728b4130137d262c87cae00000000000000000000000000000000000000000000000000000000000026ac0000000000000000000000006bb02a67fab5a43101399eeecdf64f9600765b3f00000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000002e68747470733a2f2f6d657461666c6f72612e78797a2f6170692f6d657461646174612f636f6e6e6f697373657572000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _usdcAddress (address): 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
Arg [1] : _usdtAddress (address): 0xdAC17F958D2ee523a2206206994597C13D831ec7
Arg [2] : _galaAddress (address): 0xd1d2Eb1B1e90B638588728b4130137D262C87cae
Arg [3] : _maxSupply (uint256): 9900
Arg [4] : _signer (address): 0x6Bb02a67FAB5a43101399eeEcDF64F9600765B3f
Arg [5] : uri (string): https://metaflora.xyz/api/metadata/connoisseur

-----Encoded View---------------
9 Constructor Arguments found :
Arg [0] : 000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
Arg [1] : 000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7
Arg [2] : 000000000000000000000000d1d2eb1b1e90b638588728b4130137d262c87cae
Arg [3] : 00000000000000000000000000000000000000000000000000000000000026ac
Arg [4] : 0000000000000000000000006bb02a67fab5a43101399eeecdf64f9600765b3f
Arg [5] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [6] : 000000000000000000000000000000000000000000000000000000000000002e
Arg [7] : 68747470733a2f2f6d657461666c6f72612e78797a2f6170692f6d6574616461
Arg [8] : 74612f636f6e6e6f697373657572000000000000000000000000000000000000


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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