ETH Price: $1,818.58 (-3.53%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Collect From245168832026-02-23 3:25:5927 hrs ago1771817159IN
0x30B2abE0...D52b2f4Bf
0 ETH0.000003040.04284754
Collect From245168232026-02-23 3:13:4727 hrs ago1771816427IN
0x30B2abE0...D52b2f4Bf
0 ETH0.000002490.03292365
Collect From245168142026-02-23 3:11:5927 hrs ago1771816319IN
0x30B2abE0...D52b2f4Bf
0 ETH0.000003030.04001406
Set Operator245166322026-02-23 2:35:3528 hrs ago1771814135IN
0x30B2abE0...D52b2f4Bf
0 ETH0.00000250.08945918
Set Operator245166292026-02-23 2:34:5928 hrs ago1771814099IN
0x30B2abE0...D52b2f4Bf
0 ETH0.000004290.0896071

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

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

Contract Name:
USDTreasury

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion, MIT license

Contract Source Code (Solidity Standard Json-Input format)

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/access/Ownable2Step.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/Pausable.sol";

/**
 * @title USDTreasury
 * @author Mac Mining Platform
 * @notice ERC20 稳定币托管合约,用于接收用户授权并由管理员划扣资金
 * @dev
 *   - 用户授权 (approve) 此合约地址后,管理员可调用 collectFrom 划扣资金
 *   - 使用 Ownable2Step 实现两步所有权转移,防止意外转移
 *   - 支持暂停功能,紧急情况下可暂停所有操作
 *   - 支持多个操作员 (operator) 执行划扣操作
 */
contract USDTreasury is Ownable2Step, ReentrancyGuard, Pausable {
    using SafeERC20 for IERC20;

    // ============ 状态变量 ============

    /// @notice 支持的代币白名单
    mapping(address => bool) public supportedTokens;

    /// @notice 操作员权限(可执行 collectFrom)
    mapping(address => bool) public operators;

    /// @notice 资金接收地址(划扣的资金发送到这里)
    address public treasury;

    // ============ 事件 ============

    /// @notice 资金划扣事件
    event Collected(
        address indexed token,
        address indexed from,
        address indexed to,
        uint256 amount,
        string orderId
    );

    /// @notice 代币白名单更新事件
    event TokenUpdated(address indexed token, bool supported);

    /// @notice 操作员更新事件
    event OperatorUpdated(address indexed operator, bool status);

    /// @notice 资金接收地址更新事件
    event TreasuryUpdated(address indexed oldTreasury, address indexed newTreasury);

    /// @notice 紧急提取事件
    event EmergencyWithdraw(address indexed token, address indexed to, uint256 amount);

    // ============ 错误定义 ============

    error TokenNotSupported(address token);
    error NotOperator(address caller);
    error InvalidAddress();
    error InsufficientAllowance(uint256 required, uint256 actual);
    error InsufficientBalance(uint256 required, uint256 actual);

    // ============ 修饰器 ============

    modifier onlyOperator() {
        if (!operators[msg.sender] && msg.sender != owner()) {
            revert NotOperator(msg.sender);
        }
        _;
    }

    modifier validAddress(address addr) {
        if (addr == address(0)) {
            revert InvalidAddress();
        }
        _;
    }

    // ============ 构造函数 ============

    /**
     * @notice 部署合约
     * @param _treasury 资金接收地址
     * @param _supportedTokens 初始支持的代币列表
     */
    constructor(
        address _treasury,
        address[] memory _supportedTokens
    ) Ownable(msg.sender) validAddress(_treasury) {
        treasury = _treasury;

        for (uint256 i = 0; i < _supportedTokens.length; i++) {
            if (_supportedTokens[i] != address(0)) {
                supportedTokens[_supportedTokens[i]] = true;
                emit TokenUpdated(_supportedTokens[i], true);
            }
        }
    }

    // ============ 核心功能 ============

    /**
     * @notice 从用户地址划扣代币(需用户预先 approve 本合约)
     * @param token 代币合约地址
     * @param from 用户地址
     * @param amount 划扣金额
     * @param orderId 订单 ID(用于链下对账)
     */
    function collectFrom(
        address token,
        address from,
        uint256 amount,
        string calldata orderId
    ) external nonReentrant whenNotPaused onlyOperator validAddress(from) {
        // 检查代币是否支持
        if (!supportedTokens[token]) {
            revert TokenNotSupported(token);
        }

        IERC20 erc20 = IERC20(token);

        // 检查授权额度
        uint256 allowance = erc20.allowance(from, address(this));
        if (allowance < amount) {
            revert InsufficientAllowance(amount, allowance);
        }

        // 检查余额
        uint256 balance = erc20.balanceOf(from);
        if (balance < amount) {
            revert InsufficientBalance(amount, balance);
        }

        // 执行转账
        erc20.safeTransferFrom(from, treasury, amount);

        emit Collected(token, from, treasury, amount, orderId);
    }

    /**
     * @notice 批量划扣(节省 Gas)
     * @param token 代币合约地址
     * @param froms 用户地址数组
     * @param amounts 金额数组
     * @param orderIds 订单 ID 数组
     */
    function batchCollect(
        address token,
        address[] calldata froms,
        uint256[] calldata amounts,
        string[] calldata orderIds
    ) external nonReentrant whenNotPaused onlyOperator {
        require(
            froms.length == amounts.length && amounts.length == orderIds.length,
            "Array length mismatch"
        );

        if (!supportedTokens[token]) {
            revert TokenNotSupported(token);
        }

        IERC20 erc20 = IERC20(token);

        for (uint256 i = 0; i < froms.length; i++) {
            address from = froms[i];
            uint256 amount = amounts[i];

            if (from == address(0) || amount == 0) continue;

            uint256 allowance = erc20.allowance(from, address(this));
            uint256 balance = erc20.balanceOf(from);

            // 跳过授权或余额不足的地址(不 revert,继续处理其他)
            if (allowance >= amount && balance >= amount) {
                erc20.safeTransferFrom(from, treasury, amount);
                emit Collected(token, from, treasury, amount, orderIds[i]);
            }
        }
    }

    // ============ 查询功能 ============

    /**
     * @notice 检查用户的授权额度
     * @param token 代币地址
     * @param user 用户地址
     * @return 授权额度
     */
    function getAllowance(address token, address user) external view returns (uint256) {
        return IERC20(token).allowance(user, address(this));
    }

    /**
     * @notice 检查用户是否可以被划扣
     * @param token 代币地址
     * @param user 用户地址
     * @param amount 期望划扣金额
     * @return canCollect 是否可划扣
     * @return allowance 当前授权额度
     * @return balance 当前余额
     */
    function checkCollectable(
        address token,
        address user,
        uint256 amount
    ) external view returns (bool canCollect, uint256 allowance, uint256 balance) {
        IERC20 erc20 = IERC20(token);
        allowance = erc20.allowance(user, address(this));
        balance = erc20.balanceOf(user);
        canCollect = supportedTokens[token] && allowance >= amount && balance >= amount;
    }

    // ============ 管理功能 ============

    /**
     * @notice 添加/移除支持的代币
     * @param token 代币地址
     * @param supported 是否支持
     */
    function setTokenSupport(address token, bool supported) external onlyOwner validAddress(token) {
        supportedTokens[token] = supported;
        emit TokenUpdated(token, supported);
    }

    /**
     * @notice 批量设置支持的代币
     * @param tokens 代币地址数组
     * @param supported 是否支持
     */
    function setTokenSupportBatch(address[] calldata tokens, bool supported) external onlyOwner {
        for (uint256 i = 0; i < tokens.length; i++) {
            if (tokens[i] != address(0)) {
                supportedTokens[tokens[i]] = supported;
                emit TokenUpdated(tokens[i], supported);
            }
        }
    }

    /**
     * @notice 添加/移除操作员
     * @param operator 操作员地址
     * @param status 是否启用
     */
    function setOperator(address operator, bool status) external onlyOwner validAddress(operator) {
        operators[operator] = status;
        emit OperatorUpdated(operator, status);
    }

    /**
     * @notice 更新资金接收地址
     * @param newTreasury 新地址
     */
    function setTreasury(address newTreasury) external onlyOwner validAddress(newTreasury) {
        address oldTreasury = treasury;
        treasury = newTreasury;
        emit TreasuryUpdated(oldTreasury, newTreasury);
    }

    /**
     * @notice 暂停合约
     */
    function pause() external onlyOwner {
        _pause();
    }

    /**
     * @notice 恢复合约
     */
    function unpause() external onlyOwner {
        _unpause();
    }

    /**
     * @notice 紧急提取合约中的代币(以防误转入)
     * @param token 代币地址
     * @param to 接收地址
     * @param amount 金额
     */
    function emergencyWithdraw(
        address token,
        address to,
        uint256 amount
    ) external onlyOwner validAddress(to) {
        IERC20(token).safeTransfer(to, amount);
        emit EmergencyWithdraw(token, to, amount);
    }

    /**
     * @notice 紧急提取 ETH(以防误转入)
     * @param to 接收地址
     */
    function emergencyWithdrawETH(address payable to) external onlyOwner validAddress(to) {
        uint256 balance = address(this).balance;
        to.transfer(balance);
    }

    // 允许接收 ETH(以防误转入)
    receive() external payable {}
}

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (access/Ownable2Step.sol)

pragma solidity ^0.8.20;

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

/**
 * @dev Contract module which provides access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * This extension of the {Ownable} contract includes a two-step mechanism to transfer
 * ownership, where the new owner must call {acceptOwnership} in order to replace the
 * old one. This can help prevent common mistakes, such as transfers of ownership to
 * incorrect accounts, or to contracts that are unable to interact with the
 * permission system.
 *
 * The initial owner is specified at deployment time in the constructor for `Ownable`. This
 * can later be changed with {transferOwnership} and {acceptOwnership}.
 *
 * This module is used through inheritance. It will make available all functions
 * from parent (Ownable).
 */
abstract contract Ownable2Step is Ownable {
    address private _pendingOwner;

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

    /**
     * @dev Returns the address of the pending owner.
     */
    function pendingOwner() public view virtual returns (address) {
        return _pendingOwner;
    }

    /**
     * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one.
     * Can only be called by the current owner.
     *
     * Setting `newOwner` to the zero address is allowed; this can be used to cancel an initiated ownership transfer.
     */
    function transferOwnership(address newOwner) public virtual override onlyOwner {
        _pendingOwner = newOwner;
        emit OwnershipTransferStarted(owner(), newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner.
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual override {
        delete _pendingOwner;
        super._transferOwnership(newOwner);
    }

    /**
     * @dev The new owner accepts the ownership transfer.
     */
    function acceptOwnership() public virtual {
        address sender = _msgSender();
        if (pendingOwner() != sender) {
            revert OwnableUnauthorizedAccount(sender);
        }
        _transferOwnership(sender);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/draft-IERC6093.sol)
pragma solidity >=0.8.4;

/**
 * @dev Standard ERC-20 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-20 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 ERC-721 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-721 tokens.
 */
interface IERC721Errors {
    /**
     * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in ERC-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 ERC-1155 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-1155 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);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363.sol)

pragma solidity >=0.6.2;

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

/**
 * @title IERC1363
 * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].
 *
 * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract
 * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.
 */
interface IERC1363 is IERC20, IERC165 {
    /*
     * Note: the ERC-165 identifier for this interface is 0xb0202a11.
     * 0xb0202a11 ===
     *   bytes4(keccak256('transferAndCall(address,uint256)')) ^
     *   bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^
     *   bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^
     *   bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^
     *   bytes4(keccak256('approveAndCall(address,uint256)')) ^
     *   bytes4(keccak256('approveAndCall(address,uint256,bytes)'))
     */

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferAndCall(address to, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @param data Additional data with no specified format, sent in call to `to`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param from The address which you want to send tokens from.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferFromAndCall(address from, address to, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param from The address which you want to send tokens from.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @param data Additional data with no specified format, sent in call to `to`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
     * @param spender The address which will spend the funds.
     * @param value The amount of tokens to be spent.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function approveAndCall(address spender, uint256 value) external returns (bool);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
     * @param spender The address which will spend the funds.
     * @param value The amount of tokens to be spent.
     * @param data Additional data with no specified format, sent in call to `spender`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);
}

File 6 of 16 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)

pragma solidity >=0.4.16;

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

File 7 of 16 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20.sol)

pragma solidity >=0.4.16;

import {IERC20} from "../token/ERC20/IERC20.sol";

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "./IERC20.sol";
import {IERC20Metadata} from "./extensions/IERC20Metadata.sol";
import {Context} from "../../utils/Context.sol";
import {IERC20Errors} from "../../interfaces/draft-IERC6093.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * The default value of {decimals} is 18. To change this, you should override
 * this function so it returns a different value.
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC-20
 * applications.
 */
abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {
    mapping(address account => uint256) private _balances;

    mapping(address account => mapping(address spender => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * Both values are immutable: they can only be set once during construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the default value returned by this function, unless
     * it's overridden.
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual returns (uint8) {
        return 18;
    }

    /// @inheritdoc IERC20
    function totalSupply() public view virtual returns (uint256) {
        return _totalSupply;
    }

    /// @inheritdoc IERC20
    function balanceOf(address account) public view virtual returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - the caller must have a balance of at least `value`.
     */
    function transfer(address to, uint256 value) public virtual returns (bool) {
        address owner = _msgSender();
        _transfer(owner, to, value);
        return true;
    }

    /// @inheritdoc IERC20
    function allowance(address owner, address spender) public view virtual returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 value) public virtual returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, value);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Skips emitting an {Approval} event indicating an allowance update. This is not
     * required by the ERC. See {xref-ERC20-_approve-address-address-uint256-bool-}[_approve].
     *
     * NOTE: Does not update the allowance if the current allowance
     * is the maximum `uint256`.
     *
     * Requirements:
     *
     * - `from` and `to` cannot be the zero address.
     * - `from` must have a balance of at least `value`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `value`.
     */
    function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, value);
        _transfer(from, to, value);
        return true;
    }

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * NOTE: This function is not virtual, {_update} should be overridden instead.
     */
    function _transfer(address from, address to, uint256 value) internal {
        if (from == address(0)) {
            revert ERC20InvalidSender(address(0));
        }
        if (to == address(0)) {
            revert ERC20InvalidReceiver(address(0));
        }
        _update(from, to, value);
    }

    /**
     * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`
     * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding
     * this function.
     *
     * Emits a {Transfer} event.
     */
    function _update(address from, address to, uint256 value) internal virtual {
        if (from == address(0)) {
            // Overflow check required: The rest of the code assumes that totalSupply never overflows
            _totalSupply += value;
        } else {
            uint256 fromBalance = _balances[from];
            if (fromBalance < value) {
                revert ERC20InsufficientBalance(from, fromBalance, value);
            }
            unchecked {
                // Overflow not possible: value <= fromBalance <= totalSupply.
                _balances[from] = fromBalance - value;
            }
        }

        if (to == address(0)) {
            unchecked {
                // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.
                _totalSupply -= value;
            }
        } else {
            unchecked {
                // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.
                _balances[to] += value;
            }
        }

        emit Transfer(from, to, value);
    }

    /**
     * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).
     * Relies on the `_update` mechanism
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * NOTE: This function is not virtual, {_update} should be overridden instead.
     */
    function _mint(address account, uint256 value) internal {
        if (account == address(0)) {
            revert ERC20InvalidReceiver(address(0));
        }
        _update(address(0), account, value);
    }

    /**
     * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.
     * Relies on the `_update` mechanism.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * NOTE: This function is not virtual, {_update} should be overridden instead
     */
    function _burn(address account, uint256 value) internal {
        if (account == address(0)) {
            revert ERC20InvalidSender(address(0));
        }
        _update(account, address(0), value);
    }

    /**
     * @dev Sets `value` as the allowance of `spender` over the `owner`'s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     *
     * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.
     */
    function _approve(address owner, address spender, uint256 value) internal {
        _approve(owner, spender, value, true);
    }

    /**
     * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.
     *
     * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by
     * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any
     * `Approval` event during `transferFrom` operations.
     *
     * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to
     * true using the following override:
     *
     * ```solidity
     * function _approve(address owner, address spender, uint256 value, bool) internal virtual override {
     *     super._approve(owner, spender, value, true);
     * }
     * ```
     *
     * Requirements are the same as {_approve}.
     */
    function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {
        if (owner == address(0)) {
            revert ERC20InvalidApprover(address(0));
        }
        if (spender == address(0)) {
            revert ERC20InvalidSpender(address(0));
        }
        _allowances[owner][spender] = value;
        if (emitEvent) {
            emit Approval(owner, spender, value);
        }
    }

    /**
     * @dev Updates `owner`'s allowance for `spender` based on spent `value`.
     *
     * Does not update the allowance value in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Does not emit an {Approval} event.
     */
    function _spendAllowance(address owner, address spender, uint256 value) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance < type(uint256).max) {
            if (currentAllowance < value) {
                revert ERC20InsufficientAllowance(spender, currentAllowance, value);
            }
            unchecked {
                _approve(owner, spender, currentAllowance - value, false);
            }
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity >=0.6.2;

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

/**
 * @dev Interface for the optional metadata functions from the ERC-20 standard.
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

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

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

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

pragma solidity >=0.4.16;

/**
 * @dev Interface of the ERC-20 standard as defined in the ERC.
 */
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);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../IERC20.sol";
import {IERC1363} from "../../../interfaces/IERC1363.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC-20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    /**
     * @dev An operation with an ERC-20 token failed.
     */
    error SafeERC20FailedOperation(address token);

    /**
     * @dev Indicates a failed `decreaseAllowance` request.
     */
    error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);

    /**
     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value)));
    }

    /**
     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
     */
    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));
    }

    /**
     * @dev Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.
     */
    function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {
        return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));
    }

    /**
     * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.
     */
    function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {
        return _callOptionalReturnBool(token, abi.encodeCall(token.transferFrom, (from, to, value)));
    }

    /**
     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     *
     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
     * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
     */
    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 oldAllowance = token.allowance(address(this), spender);
        forceApprove(token, spender, oldAllowance + value);
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no
     * value, non-reverting calls are assumed to be successful.
     *
     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
     * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
     */
    function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {
        unchecked {
            uint256 currentAllowance = token.allowance(address(this), spender);
            if (currentAllowance < requestedDecrease) {
                revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);
            }
            forceApprove(token, spender, currentAllowance - requestedDecrease);
        }
    }

    /**
     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
     * to be set to zero before setting it to a non-zero value, such as USDT.
     *
     * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function
     * only sets the "standard" allowance. Any temporary allowance will remain active, in addition to the value being
     * set here.
     */
    function forceApprove(IERC20 token, address spender, uint256 value) internal {
        bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));

        if (!_callOptionalReturnBool(token, approvalCall)) {
            _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));
            _callOptionalReturn(token, approvalCall);
        }
    }

    /**
     * @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no
     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * Reverts if the returned value is other than `true`.
     */
    function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
        if (to.code.length == 0) {
            safeTransfer(token, to, value);
        } else if (!token.transferAndCall(to, value, data)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target
     * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * Reverts if the returned value is other than `true`.
     */
    function transferFromAndCallRelaxed(
        IERC1363 token,
        address from,
        address to,
        uint256 value,
        bytes memory data
    ) internal {
        if (to.code.length == 0) {
            safeTransferFrom(token, from, to, value);
        } else if (!token.transferFromAndCall(from, to, value, data)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no
     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.
     * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}
     * once without retrying, and relies on the returned value to be true.
     *
     * Reverts if the returned value is other than `true`.
     */
    function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
        if (to.code.length == 0) {
            forceApprove(token, to, value);
        } else if (!token.approveAndCall(to, value, data)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     *
     * This is a variant of {_callOptionalReturnBool} that reverts if call fails to meet the requirements.
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        uint256 returnSize;
        uint256 returnValue;
        assembly ("memory-safe") {
            let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
            // bubble errors
            if iszero(success) {
                let ptr := mload(0x40)
                returndatacopy(ptr, 0, returndatasize())
                revert(ptr, returndatasize())
            }
            returnSize := returndatasize()
            returnValue := mload(0)
        }

        if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     *
     * This is a variant of {_callOptionalReturn} that silently catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        bool success;
        uint256 returnSize;
        uint256 returnValue;
        assembly ("memory-safe") {
            success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
            returnSize := returndatasize()
            returnValue := mload(0)
        }
        return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);
    }
}

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)

pragma solidity >=0.4.16;

/**
 * @dev Interface of the ERC-165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[ERC].
 *
 * 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[ERC section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.3.0) (utils/Pausable.sol)

pragma solidity ^0.8.20;

import {Context} from "../utils/Context.sol";

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    bool private _paused;

    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    /**
     * @dev The operation failed because the contract is paused.
     */
    error EnforcedPause();

    /**
     * @dev The operation failed because the contract is not paused.
     */
    error ExpectedPause();

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        _requireNotPaused();
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        _requirePaused();
        _;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        if (paused()) {
            revert EnforcedPause();
        }
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        if (!paused()) {
            revert ExpectedPause();
        }
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuard.sol)

pragma solidity ^0.8.20;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If EIP-1153 (transient storage) is available on the chain you're deploying at,
 * consider using {ReentrancyGuardTransient} instead.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant NOT_ENTERED = 1;
    uint256 private constant ENTERED = 2;

    uint256 private _status;

    /**
     * @dev Unauthorized reentrant call.
     */
    error ReentrancyGuardReentrantCall();

    constructor() {
        _status = NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be NOT_ENTERED
        if (_status == ENTERED) {
            revert ReentrancyGuardReentrantCall();
        }

        // Any calls to nonReentrant after this point will fail
        _status = ENTERED;
    }

    function _nonReentrantAfter() private {
        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = NOT_ENTERED;
    }

    /**
     * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
     * `nonReentrant` function in the call stack.
     */
    function _reentrancyGuardEntered() internal view returns (bool) {
        return _status == ENTERED;
    }
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";

/**
 * @title MockERC20
 * @notice 仅用于测试的 ERC20 代币
 */
contract MockERC20 is ERC20 {
    uint8 private _decimals;

    constructor(string memory name, string memory symbol, uint8 decimals_) ERC20(name, symbol) {
        _decimals = decimals_;
    }

    function decimals() public view override returns (uint8) {
        return _decimals;
    }

    function mint(address to, uint256 amount) external {
        _mint(to, amount);
    }

    function burn(address from, uint256 amount) external {
        _burn(from, amount);
    }
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_treasury","type":"address"},{"internalType":"address[]","name":"_supportedTokens","type":"address[]"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"EnforcedPause","type":"error"},{"inputs":[],"name":"ExpectedPause","type":"error"},{"inputs":[{"internalType":"uint256","name":"required","type":"uint256"},{"internalType":"uint256","name":"actual","type":"uint256"}],"name":"InsufficientAllowance","type":"error"},{"inputs":[{"internalType":"uint256","name":"required","type":"uint256"},{"internalType":"uint256","name":"actual","type":"uint256"}],"name":"InsufficientBalance","type":"error"},{"inputs":[],"name":"InvalidAddress","type":"error"},{"inputs":[{"internalType":"address","name":"caller","type":"address"}],"name":"NotOperator","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"TokenNotSupported","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"string","name":"orderId","type":"string"}],"name":"Collected","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"status","type":"bool"}],"name":"OperatorUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"bool","name":"supported","type":"bool"}],"name":"TokenUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldTreasury","type":"address"},{"indexed":true,"internalType":"address","name":"newTreasury","type":"address"}],"name":"TreasuryUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address[]","name":"froms","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"string[]","name":"orderIds","type":"string[]"}],"name":"batchCollect","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"checkCollectable","outputs":[{"internalType":"bool","name":"canCollect","type":"bool"},{"internalType":"uint256","name":"allowance","type":"uint256"},{"internalType":"uint256","name":"balance","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"string","name":"orderId","type":"string"}],"name":"collectFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"to","type":"address"}],"name":"emergencyWithdrawETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"user","type":"address"}],"name":"getAllowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"operators","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"status","type":"bool"}],"name":"setOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"bool","name":"supported","type":"bool"}],"name":"setTokenSupport","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"tokens","type":"address[]"},{"internalType":"bool","name":"supported","type":"bool"}],"name":"setTokenSupportBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newTreasury","type":"address"}],"name":"setTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"supportedTokens","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

0x60806040523480156200001157600080fd5b5060405162001a4738038062001a47833981016040819052620000349162000272565b33806200005b57604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b6200006681620001d1565b506001600255816001600160a01b038116620000955760405163e6c4247b60e01b815260040160405180910390fd5b600680546001600160a01b0319166001600160a01b03851617905560005b8251811015620001c75760006001600160a01b0316838281518110620000dd57620000dd6200035b565b60200260200101516001600160a01b031614620001b2576001600460008584815181106200010f576200010f6200035b565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055508281815181106200016357620001636200035b565b60200260200101516001600160a01b03167fdcb2804db02b95bdd568fd11a31c5577ffdf36538c0f670e92930d9c1e8518ab6001604051620001a9911515815260200190565b60405180910390a25b80620001be8162000371565b915050620000b3565b5050505062000399565b600180546001600160a01b0319169055620001ec81620001ef565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b03811681146200025757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600080604083850312156200028657600080fd5b62000291836200023f565b602084810151919350906001600160401b0380821115620002b157600080fd5b818601915086601f830112620002c657600080fd5b815181811115620002db57620002db6200025c565b8060051b604051601f19603f830116810181811085821117156200030357620003036200025c565b6040529182528482019250838101850191898311156200032257600080fd5b938501935b828510156200034b576200033b856200023f565b8452938501939285019262000327565b8096505050505050509250929050565b634e487b7160e01b600052603260045260246000fd5b6000600182016200039257634e487b7160e01b600052601160045260246000fd5b5060010190565b61169e80620003a96000396000f3fe60806040526004361061012e5760003560e01c806368c4ac26116100ab5780638da5cb5b1161006f5780638da5cb5b14610360578063d05dc2971461037e578063e30c39781461039e578063e63ea408146103bc578063f0f44260146103dc578063f2fde38b146103fc57600080fd5b806368c4ac26146102d1578063715018a61461030157806379ba5097146103165780638456cb591461032b578063858e7a4c1461034057600080fd5b80633f4ba83a116100f25780633f4ba83a1461022c578063558a7297146102415780635c975abb1461026157806361d027b31461027957806366197f9d146102b157600080fd5b806307cacfd71461013a5780630af4187d1461017c5780630c6a753f146101aa57806313e7c9d8146101cc578063214ff4591461020c57600080fd5b3661013557005b600080fd5b34801561014657600080fd5b5061015a6101553660046112c8565b61041c565b6040805193151584526020840192909252908201526060015b60405180910390f35b34801561018857600080fd5b5061019c610197366004611309565b610546565b604051908152602001610173565b3480156101b657600080fd5b506101ca6101c5366004611357565b6105c1565b005b3480156101d857600080fd5b506101fc6101e736600461138c565b60056020526000908152604090205460ff1681565b6040519015158152602001610173565b34801561021857600080fd5b506101ca61022736600461138c565b610652565b34801561023857600080fd5b506101ca6106c0565b34801561024d57600080fd5b506101ca61025c366004611357565b6106d2565b34801561026d57600080fd5b5060035460ff166101fc565b34801561028557600080fd5b50600654610299906001600160a01b031681565b6040516001600160a01b039091168152602001610173565b3480156102bd57600080fd5b506101ca6102cc3660046113a9565b61075a565b3480156102dd57600080fd5b506101fc6102ec36600461138c565b60046020526000908152604090205460ff1681565b34801561030d57600080fd5b506101ca6109e7565b34801561032257600080fd5b506101ca6109f9565b34801561033757600080fd5b506101ca610a3d565b34801561034c57600080fd5b506101ca61035b366004611494565b610a4d565b34801561036c57600080fd5b506000546001600160a01b0316610299565b34801561038a57600080fd5b506101ca610399366004611541565b610d6a565b3480156103aa57600080fd5b506001546001600160a01b0316610299565b3480156103c857600080fd5b506101ca6103d73660046112c8565b610e86565b3480156103e857600080fd5b506101ca6103f736600461138c565b610f1d565b34801561040857600080fd5b506101ca61041736600461138c565b610fa0565b604051636eb1769f60e11b81526001600160a01b03838116600483015230602483015260009182918291879182169063dd62ed3e90604401602060405180830381865afa158015610471573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104959190611595565b6040516370a0823160e01b81526001600160a01b038881166004830152919450908216906370a0823190602401602060405180830381865afa1580156104df573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105039190611595565b6001600160a01b03881660009081526004602052604090205490925060ff16801561052e5750848310155b801561053a5750848210155b93505093509350939050565b604051636eb1769f60e11b81526001600160a01b0382811660048301523060248301526000919084169063dd62ed3e90604401602060405180830381865afa158015610596573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105ba9190611595565b9392505050565b6105c9611011565b816001600160a01b0381166105f15760405163e6c4247b60e01b815260040160405180910390fd5b6001600160a01b038316600081815260046020908152604091829020805460ff191686151590811790915591519182527fdcb2804db02b95bdd568fd11a31c5577ffdf36538c0f670e92930d9c1e8518ab91015b60405180910390a2505050565b61065a611011565b806001600160a01b0381166106825760405163e6c4247b60e01b815260040160405180910390fd5b60405147906001600160a01b0384169082156108fc029083906000818181858888f193505050501580156106ba573d6000803e3d6000fd5b50505050565b6106c8611011565b6106d061103e565b565b6106da611011565b816001600160a01b0381166107025760405163e6c4247b60e01b815260040160405180910390fd5b6001600160a01b038316600081815260056020908152604091829020805460ff191686151590811790915591519182527f966c160e1c4dbc7df8d69af4ace01e9297c3cf016397b7914971f2fbfa32672d9101610645565b610762611090565b61076a6110b8565b3360009081526005602052604090205460ff1615801561079557506000546001600160a01b03163314155b156107ba57604051633b63649d60e11b81523360048201526024015b60405180910390fd5b836001600160a01b0381166107e25760405163e6c4247b60e01b815260040160405180910390fd5b6001600160a01b03861660009081526004602052604090205460ff16610826576040516306439c6b60e01b81526001600160a01b03871660048201526024016107b1565b604051636eb1769f60e11b81526001600160a01b038681166004830152306024830152879160009183169063dd62ed3e90604401602060405180830381865afa158015610877573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061089b9190611595565b9050858110156108c85760405163054365bb60e31b815260048101879052602481018290526044016107b1565b6040516370a0823160e01b81526001600160a01b038881166004830152600091908416906370a0823190602401602060405180830381865afa158015610912573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109369190611595565b9050868110156109635760405163cf47918160e01b815260048101889052602481018290526044016107b1565b60065461097f906001600160a01b03858116918b91168a6110dc565b6006546040516001600160a01b03918216918a811691908c16907fec7fd1cc6d3284197b02d5219fdb2c49e384a47fce777f207572b03b864a5eb0906109ca908c908c908c906115ae565b60405180910390a4505050506109e06001600255565b5050505050565b6109ef611011565b6106d06000611143565b60015433906001600160a01b03168114610a315760405163118cdaa760e01b81526001600160a01b03821660048201526024016107b1565b610a3a81611143565b50565b610a45611011565b6106d061115c565b610a55611090565b610a5d6110b8565b3360009081526005602052604090205460ff16158015610a8857506000546001600160a01b03163314155b15610aa857604051633b63649d60e11b81523360048201526024016107b1565b8483148015610ab657508281145b610afa5760405162461bcd60e51b8152602060048201526015602482015274082e4e4c2f240d8cadccee8d040dad2e6dac2e8c6d605b1b60448201526064016107b1565b6001600160a01b03871660009081526004602052604090205460ff16610b3e576040516306439c6b60e01b81526001600160a01b03881660048201526024016107b1565b8660005b86811015610d55576000888883818110610b5e57610b5e6115e4565b9050602002016020810190610b73919061138c565b90506000878784818110610b8957610b896115e4565b60200291909101359150506001600160a01b0382161580610ba8575080155b15610bb4575050610d43565b604051636eb1769f60e11b81526001600160a01b0383811660048301523060248301526000919086169063dd62ed3e90604401602060405180830381865afa158015610c04573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c289190611595565b6040516370a0823160e01b81526001600160a01b0385811660048301529192506000918716906370a0823190602401602060405180830381865afa158015610c74573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c989190611595565b9050828210158015610caa5750828110155b15610d3e57600654610ccb906001600160a01b0388811691879116866110dc565b6006546001600160a01b0390811690858116908f167fec7fd1cc6d3284197b02d5219fdb2c49e384a47fce777f207572b03b864a5eb0868c8c8b818110610d1457610d146115e4565b9050602002810190610d2691906115fa565b604051610d35939291906115ae565b60405180910390a45b505050505b80610d4d81611641565b915050610b42565b5050610d616001600255565b50505050505050565b610d72611011565b60005b828110156106ba576000848483818110610d9157610d916115e4565b9050602002016020810190610da6919061138c565b6001600160a01b031614610e74578160046000868685818110610dcb57610dcb6115e4565b9050602002016020810190610de0919061138c565b6001600160a01b031681526020810191909152604001600020805460ff1916911515919091179055838382818110610e1a57610e1a6115e4565b9050602002016020810190610e2f919061138c565b6001600160a01b03167fdcb2804db02b95bdd568fd11a31c5577ffdf36538c0f670e92930d9c1e8518ab83604051610e6b911515815260200190565b60405180910390a25b80610e7e81611641565b915050610d75565b610e8e611011565b816001600160a01b038116610eb65760405163e6c4247b60e01b815260040160405180910390fd5b610eca6001600160a01b0385168484611199565b826001600160a01b0316846001600160a01b03167ff24ef89f38eadc1bde50701ad6e4d6d11a2dc24f7cf834a486991f388332850484604051610f0f91815260200190565b60405180910390a350505050565b610f25611011565b806001600160a01b038116610f4d5760405163e6c4247b60e01b815260040160405180910390fd5b600680546001600160a01b038481166001600160a01b0319831681179093556040519116919082907f4ab5be82436d353e61ca18726e984e561f5c1cc7c6d38b29d2553c790434705a90600090a3505050565b610fa8611011565b600180546001600160a01b0383166001600160a01b03199091168117909155610fd96000546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6000546001600160a01b031633146106d05760405163118cdaa760e01b81523360048201526024016107b1565b6110466111cf565b6003805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60028054036110b257604051633ee5aeb560e01b815260040160405180910390fd5b60028055565b60035460ff16156106d05760405163d93c066560e01b815260040160405180910390fd5b6040516001600160a01b0384811660248301528381166044830152606482018390526106ba9186918216906323b872dd906084015b604051602081830303815290604052915060e01b6020820180516001600160e01b0383818316178352505050506111f2565b600180546001600160a01b0319169055610a3a81611263565b6111646110b8565b6003805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586110733390565b6040516001600160a01b038381166024830152604482018390526111ca91859182169063a9059cbb90606401611111565b505050565b60035460ff166106d057604051638dfc202b60e01b815260040160405180910390fd5b600080602060008451602086016000885af180611215576040513d6000823e3d81fd5b50506000513d9150811561122d57806001141561123a565b6001600160a01b0384163b155b156106ba57604051635274afe760e01b81526001600160a01b03851660048201526024016107b1565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0381168114610a3a57600080fd5b6000806000606084860312156112dd57600080fd5b83356112e8816112b3565b925060208401356112f8816112b3565b929592945050506040919091013590565b6000806040838503121561131c57600080fd5b8235611327816112b3565b91506020830135611337816112b3565b809150509250929050565b8035801515811461135257600080fd5b919050565b6000806040838503121561136a57600080fd5b8235611375816112b3565b915061138360208401611342565b90509250929050565b60006020828403121561139e57600080fd5b81356105ba816112b3565b6000806000806000608086880312156113c157600080fd5b85356113cc816112b3565b945060208601356113dc816112b3565b935060408601359250606086013567ffffffffffffffff8082111561140057600080fd5b818801915088601f83011261141457600080fd5b81358181111561142357600080fd5b89602082850101111561143557600080fd5b9699959850939650602001949392505050565b60008083601f84011261145a57600080fd5b50813567ffffffffffffffff81111561147257600080fd5b6020830191508360208260051b850101111561148d57600080fd5b9250929050565b60008060008060008060006080888a0312156114af57600080fd5b87356114ba816112b3565b9650602088013567ffffffffffffffff808211156114d757600080fd5b6114e38b838c01611448565b909850965060408a01359150808211156114fc57600080fd5b6115088b838c01611448565b909650945060608a013591508082111561152157600080fd5b5061152e8a828b01611448565b989b979a50959850939692959293505050565b60008060006040848603121561155657600080fd5b833567ffffffffffffffff81111561156d57600080fd5b61157986828701611448565b909450925061158c905060208501611342565b90509250925092565b6000602082840312156115a757600080fd5b5051919050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b634e487b7160e01b600052603260045260246000fd5b6000808335601e1984360301811261161157600080fd5b83018035915067ffffffffffffffff82111561162c57600080fd5b60200191503681900382131561148d57600080fd5b60006001820161166157634e487b7160e01b600052601160045260246000fd5b506001019056fea26469706673582212200d6f69aaeaebbe6d8a7b8208d00535b75e81e91fcba79227941453357147d0e464736f6c63430008140033000000000000000000000000a21e92a983e54aefd68c49b2ba2db399719a148900000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000002000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7

Deployed Bytecode

0x60806040526004361061012e5760003560e01c806368c4ac26116100ab5780638da5cb5b1161006f5780638da5cb5b14610360578063d05dc2971461037e578063e30c39781461039e578063e63ea408146103bc578063f0f44260146103dc578063f2fde38b146103fc57600080fd5b806368c4ac26146102d1578063715018a61461030157806379ba5097146103165780638456cb591461032b578063858e7a4c1461034057600080fd5b80633f4ba83a116100f25780633f4ba83a1461022c578063558a7297146102415780635c975abb1461026157806361d027b31461027957806366197f9d146102b157600080fd5b806307cacfd71461013a5780630af4187d1461017c5780630c6a753f146101aa57806313e7c9d8146101cc578063214ff4591461020c57600080fd5b3661013557005b600080fd5b34801561014657600080fd5b5061015a6101553660046112c8565b61041c565b6040805193151584526020840192909252908201526060015b60405180910390f35b34801561018857600080fd5b5061019c610197366004611309565b610546565b604051908152602001610173565b3480156101b657600080fd5b506101ca6101c5366004611357565b6105c1565b005b3480156101d857600080fd5b506101fc6101e736600461138c565b60056020526000908152604090205460ff1681565b6040519015158152602001610173565b34801561021857600080fd5b506101ca61022736600461138c565b610652565b34801561023857600080fd5b506101ca6106c0565b34801561024d57600080fd5b506101ca61025c366004611357565b6106d2565b34801561026d57600080fd5b5060035460ff166101fc565b34801561028557600080fd5b50600654610299906001600160a01b031681565b6040516001600160a01b039091168152602001610173565b3480156102bd57600080fd5b506101ca6102cc3660046113a9565b61075a565b3480156102dd57600080fd5b506101fc6102ec36600461138c565b60046020526000908152604090205460ff1681565b34801561030d57600080fd5b506101ca6109e7565b34801561032257600080fd5b506101ca6109f9565b34801561033757600080fd5b506101ca610a3d565b34801561034c57600080fd5b506101ca61035b366004611494565b610a4d565b34801561036c57600080fd5b506000546001600160a01b0316610299565b34801561038a57600080fd5b506101ca610399366004611541565b610d6a565b3480156103aa57600080fd5b506001546001600160a01b0316610299565b3480156103c857600080fd5b506101ca6103d73660046112c8565b610e86565b3480156103e857600080fd5b506101ca6103f736600461138c565b610f1d565b34801561040857600080fd5b506101ca61041736600461138c565b610fa0565b604051636eb1769f60e11b81526001600160a01b03838116600483015230602483015260009182918291879182169063dd62ed3e90604401602060405180830381865afa158015610471573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104959190611595565b6040516370a0823160e01b81526001600160a01b038881166004830152919450908216906370a0823190602401602060405180830381865afa1580156104df573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105039190611595565b6001600160a01b03881660009081526004602052604090205490925060ff16801561052e5750848310155b801561053a5750848210155b93505093509350939050565b604051636eb1769f60e11b81526001600160a01b0382811660048301523060248301526000919084169063dd62ed3e90604401602060405180830381865afa158015610596573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105ba9190611595565b9392505050565b6105c9611011565b816001600160a01b0381166105f15760405163e6c4247b60e01b815260040160405180910390fd5b6001600160a01b038316600081815260046020908152604091829020805460ff191686151590811790915591519182527fdcb2804db02b95bdd568fd11a31c5577ffdf36538c0f670e92930d9c1e8518ab91015b60405180910390a2505050565b61065a611011565b806001600160a01b0381166106825760405163e6c4247b60e01b815260040160405180910390fd5b60405147906001600160a01b0384169082156108fc029083906000818181858888f193505050501580156106ba573d6000803e3d6000fd5b50505050565b6106c8611011565b6106d061103e565b565b6106da611011565b816001600160a01b0381166107025760405163e6c4247b60e01b815260040160405180910390fd5b6001600160a01b038316600081815260056020908152604091829020805460ff191686151590811790915591519182527f966c160e1c4dbc7df8d69af4ace01e9297c3cf016397b7914971f2fbfa32672d9101610645565b610762611090565b61076a6110b8565b3360009081526005602052604090205460ff1615801561079557506000546001600160a01b03163314155b156107ba57604051633b63649d60e11b81523360048201526024015b60405180910390fd5b836001600160a01b0381166107e25760405163e6c4247b60e01b815260040160405180910390fd5b6001600160a01b03861660009081526004602052604090205460ff16610826576040516306439c6b60e01b81526001600160a01b03871660048201526024016107b1565b604051636eb1769f60e11b81526001600160a01b038681166004830152306024830152879160009183169063dd62ed3e90604401602060405180830381865afa158015610877573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061089b9190611595565b9050858110156108c85760405163054365bb60e31b815260048101879052602481018290526044016107b1565b6040516370a0823160e01b81526001600160a01b038881166004830152600091908416906370a0823190602401602060405180830381865afa158015610912573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109369190611595565b9050868110156109635760405163cf47918160e01b815260048101889052602481018290526044016107b1565b60065461097f906001600160a01b03858116918b91168a6110dc565b6006546040516001600160a01b03918216918a811691908c16907fec7fd1cc6d3284197b02d5219fdb2c49e384a47fce777f207572b03b864a5eb0906109ca908c908c908c906115ae565b60405180910390a4505050506109e06001600255565b5050505050565b6109ef611011565b6106d06000611143565b60015433906001600160a01b03168114610a315760405163118cdaa760e01b81526001600160a01b03821660048201526024016107b1565b610a3a81611143565b50565b610a45611011565b6106d061115c565b610a55611090565b610a5d6110b8565b3360009081526005602052604090205460ff16158015610a8857506000546001600160a01b03163314155b15610aa857604051633b63649d60e11b81523360048201526024016107b1565b8483148015610ab657508281145b610afa5760405162461bcd60e51b8152602060048201526015602482015274082e4e4c2f240d8cadccee8d040dad2e6dac2e8c6d605b1b60448201526064016107b1565b6001600160a01b03871660009081526004602052604090205460ff16610b3e576040516306439c6b60e01b81526001600160a01b03881660048201526024016107b1565b8660005b86811015610d55576000888883818110610b5e57610b5e6115e4565b9050602002016020810190610b73919061138c565b90506000878784818110610b8957610b896115e4565b60200291909101359150506001600160a01b0382161580610ba8575080155b15610bb4575050610d43565b604051636eb1769f60e11b81526001600160a01b0383811660048301523060248301526000919086169063dd62ed3e90604401602060405180830381865afa158015610c04573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c289190611595565b6040516370a0823160e01b81526001600160a01b0385811660048301529192506000918716906370a0823190602401602060405180830381865afa158015610c74573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c989190611595565b9050828210158015610caa5750828110155b15610d3e57600654610ccb906001600160a01b0388811691879116866110dc565b6006546001600160a01b0390811690858116908f167fec7fd1cc6d3284197b02d5219fdb2c49e384a47fce777f207572b03b864a5eb0868c8c8b818110610d1457610d146115e4565b9050602002810190610d2691906115fa565b604051610d35939291906115ae565b60405180910390a45b505050505b80610d4d81611641565b915050610b42565b5050610d616001600255565b50505050505050565b610d72611011565b60005b828110156106ba576000848483818110610d9157610d916115e4565b9050602002016020810190610da6919061138c565b6001600160a01b031614610e74578160046000868685818110610dcb57610dcb6115e4565b9050602002016020810190610de0919061138c565b6001600160a01b031681526020810191909152604001600020805460ff1916911515919091179055838382818110610e1a57610e1a6115e4565b9050602002016020810190610e2f919061138c565b6001600160a01b03167fdcb2804db02b95bdd568fd11a31c5577ffdf36538c0f670e92930d9c1e8518ab83604051610e6b911515815260200190565b60405180910390a25b80610e7e81611641565b915050610d75565b610e8e611011565b816001600160a01b038116610eb65760405163e6c4247b60e01b815260040160405180910390fd5b610eca6001600160a01b0385168484611199565b826001600160a01b0316846001600160a01b03167ff24ef89f38eadc1bde50701ad6e4d6d11a2dc24f7cf834a486991f388332850484604051610f0f91815260200190565b60405180910390a350505050565b610f25611011565b806001600160a01b038116610f4d5760405163e6c4247b60e01b815260040160405180910390fd5b600680546001600160a01b038481166001600160a01b0319831681179093556040519116919082907f4ab5be82436d353e61ca18726e984e561f5c1cc7c6d38b29d2553c790434705a90600090a3505050565b610fa8611011565b600180546001600160a01b0383166001600160a01b03199091168117909155610fd96000546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6000546001600160a01b031633146106d05760405163118cdaa760e01b81523360048201526024016107b1565b6110466111cf565b6003805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60028054036110b257604051633ee5aeb560e01b815260040160405180910390fd5b60028055565b60035460ff16156106d05760405163d93c066560e01b815260040160405180910390fd5b6040516001600160a01b0384811660248301528381166044830152606482018390526106ba9186918216906323b872dd906084015b604051602081830303815290604052915060e01b6020820180516001600160e01b0383818316178352505050506111f2565b600180546001600160a01b0319169055610a3a81611263565b6111646110b8565b6003805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586110733390565b6040516001600160a01b038381166024830152604482018390526111ca91859182169063a9059cbb90606401611111565b505050565b60035460ff166106d057604051638dfc202b60e01b815260040160405180910390fd5b600080602060008451602086016000885af180611215576040513d6000823e3d81fd5b50506000513d9150811561122d57806001141561123a565b6001600160a01b0384163b155b156106ba57604051635274afe760e01b81526001600160a01b03851660048201526024016107b1565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0381168114610a3a57600080fd5b6000806000606084860312156112dd57600080fd5b83356112e8816112b3565b925060208401356112f8816112b3565b929592945050506040919091013590565b6000806040838503121561131c57600080fd5b8235611327816112b3565b91506020830135611337816112b3565b809150509250929050565b8035801515811461135257600080fd5b919050565b6000806040838503121561136a57600080fd5b8235611375816112b3565b915061138360208401611342565b90509250929050565b60006020828403121561139e57600080fd5b81356105ba816112b3565b6000806000806000608086880312156113c157600080fd5b85356113cc816112b3565b945060208601356113dc816112b3565b935060408601359250606086013567ffffffffffffffff8082111561140057600080fd5b818801915088601f83011261141457600080fd5b81358181111561142357600080fd5b89602082850101111561143557600080fd5b9699959850939650602001949392505050565b60008083601f84011261145a57600080fd5b50813567ffffffffffffffff81111561147257600080fd5b6020830191508360208260051b850101111561148d57600080fd5b9250929050565b60008060008060008060006080888a0312156114af57600080fd5b87356114ba816112b3565b9650602088013567ffffffffffffffff808211156114d757600080fd5b6114e38b838c01611448565b909850965060408a01359150808211156114fc57600080fd5b6115088b838c01611448565b909650945060608a013591508082111561152157600080fd5b5061152e8a828b01611448565b989b979a50959850939692959293505050565b60008060006040848603121561155657600080fd5b833567ffffffffffffffff81111561156d57600080fd5b61157986828701611448565b909450925061158c905060208501611342565b90509250925092565b6000602082840312156115a757600080fd5b5051919050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b634e487b7160e01b600052603260045260246000fd5b6000808335601e1984360301811261161157600080fd5b83018035915067ffffffffffffffff82111561162c57600080fd5b60200191503681900382131561148d57600080fd5b60006001820161166157634e487b7160e01b600052601160045260246000fd5b506001019056fea26469706673582212200d6f69aaeaebbe6d8a7b8208d00535b75e81e91fcba79227941453357147d0e464736f6c63430008140033

Deployed Bytecode Sourcemap

810:8541:15:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6445:410;;;;;;;;;;-1:-1:-1;6445:410:15;;;;;:::i;:::-;;:::i;:::-;;;;832:14:16;;825:22;807:41;;879:2;864:18;;857:34;;;;907:18;;;900:34;795:2;780:18;6445:410:15;;;;;;;;5996:151;;;;;;;;;;-1:-1:-1;5996:151:15;;;;;:::i;:::-;;:::i;:::-;;;1484:25:16;;;1472:2;1457:18;5996:151:15;1338:177:16;7038:191:15;;;;;;;;;;-1:-1:-1;7038:191:15;;;;;:::i;:::-;;:::i;:::-;;1114:41;;;;;;;;;;-1:-1:-1;1114:41:15;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;2422:14:16;;2415:22;2397:41;;2385:2;2370:18;1114:41:15;2257:187:16;9097:172:15;;;;;;;;;;-1:-1:-1;9097:172:15;;;;;:::i;:::-;;:::i;8505:65::-;;;;;;;;;;;;;:::i;7837:187::-;;;;;;;;;;-1:-1:-1;7837:187:15;;;;;:::i;:::-;;:::i;1726:84:11:-;;;;;;;;;;-1:-1:-1;1796:7:11;;;;1726:84;;1233:23:15;;;;;;;;;;-1:-1:-1;1233:23:15;;;;-1:-1:-1;;;;;1233:23:15;;;;;;-1:-1:-1;;;;;2873:32:16;;;2855:51;;2843:2;2828:18;1233:23:15;2709:203:16;3554:894:15;;;;;;;;;;-1:-1:-1;3554:894:15;;;;;:::i;:::-;;:::i;1001:47::-;;;;;;;;;;-1:-1:-1;1001:47:15;;;;;:::i;:::-;;;;;;;;;;;;;;;;2293:101:0;;;;;;;;;;;;;:::i;2244:229:1:-;;;;;;;;;;;;;:::i;8394:61:15:-;;;;;;;;;;;;;:::i;4667:1124::-;;;;;;;;;;-1:-1:-1;4667:1124:15;;;;;:::i;:::-;;:::i;1638:85:0:-;;;;;;;;;;-1:-1:-1;1684:7:0;1710:6;-1:-1:-1;;;;;1710:6:0;1638:85;;7371:333:15;;;;;;;;;;-1:-1:-1;7371:333:15;;;;;:::i;:::-;;:::i;1232:99:1:-;;;;;;;;;;-1:-1:-1;1311:13:1;;-1:-1:-1;;;;;1311:13:1;1232:99;;8750:242:15;;;;;;;;;;-1:-1:-1;8750:242:15;;;;;:::i;:::-;;:::i;8122:222::-;;;;;;;;;;-1:-1:-1;8122:222:15;;;;;:::i;:::-;;:::i;1649:178:1:-;;;;;;;;;;-1:-1:-1;1649:178:1;;;;;:::i;:::-;;:::i;6445:410:15:-;6682:36;;-1:-1:-1;;;6682:36:15;;-1:-1:-1;;;;;6212:15:16;;;6682:36:15;;;6194:34:16;6712:4:15;6244:18:16;;;6237:43;6569:15:15;;;;;;6654:5;;6682:15;;;;;6129:18:16;;6682:36:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;6738:21;;-1:-1:-1;;;6738:21:15;;-1:-1:-1;;;;;2873:32:16;;;6738:21:15;;;2855:51:16;6670:48:15;;-1:-1:-1;6738:15:15;;;;;;2828:18:16;;6738:21:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;;;;;6782:22:15;;;;;;:15;:22;;;;;;6728:31;;-1:-1:-1;6782:22:15;;:45;;;;;6821:6;6808:9;:19;;6782:45;:66;;;;;6842:6;6831:7;:17;;6782:66;6769:79;;6622:233;6445:410;;;;;;;:::o;5996:151::-;6096:44;;-1:-1:-1;;;6096:44:15;;-1:-1:-1;;;;;6212:15:16;;;6096:44:15;;;6194:34:16;6134:4:15;6244:18:16;;;6237:43;6070:7:15;;6096:23;;;;;;6129:18:16;;6096:44:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;6089:51;5996:151;-1:-1:-1;;;5996:151:15:o;7038:191::-;1531:13:0;:11;:13::i;:::-;7126:5:15;-1:-1:-1;;;;;2524:18:15;::::1;2520:72;;2565:16;;-1:-1:-1::0;;;2565:16:15::1;;;;;;;;;;;2520:72;-1:-1:-1::0;;;;;7143:22:15;::::2;;::::0;;;:15:::2;:22;::::0;;;;;;;;:34;;-1:-1:-1;;7143:34:15::2;::::0;::::2;;::::0;;::::2;::::0;;;7192:30;;2397:41:16;;;7192:30:15::2;::::0;2370:18:16;7192:30:15::2;;;;;;;;1554:1:0::1;7038:191:15::0;;:::o;9097:172::-;1531:13:0;:11;:13::i;:::-;9179:2:15;-1:-1:-1;;;;;2524:18:15;::::1;2520:72;;2565:16;;-1:-1:-1::0;;;2565:16:15::1;;;;;;;;;;;2520:72;9242:20:::2;::::0;9211:21:::2;::::0;-1:-1:-1;;;;;9242:11:15;::::2;::::0;:20;::::2;;;::::0;9211:21;;9193:15:::2;9242:20:::0;9193:15;9242:20;9211:21;9242:11;:20;::::2;;;;;;;;;;;;;::::0;::::2;;;;;;9183:86;1554:1:0::1;9097:172:15::0;:::o;8505:65::-;1531:13:0;:11;:13::i;:::-;8553:10:15::1;:8;:10::i;:::-;8505:65::o:0;7837:187::-;1531:13:0;:11;:13::i;:::-;7921:8:15;-1:-1:-1;;;;;2524:18:15;::::1;2520:72;;2565:16;;-1:-1:-1::0;;;2565:16:15::1;;;;;;;;;;;2520:72;-1:-1:-1::0;;;;;7941:19:15;::::2;;::::0;;;:9:::2;:19;::::0;;;;;;;;:28;;-1:-1:-1;;7941:28:15::2;::::0;::::2;;::::0;;::::2;::::0;;;7984:33;;2397:41:16;;;7984:33:15::2;::::0;2370:18:16;7984:33:15::2;2257:187:16::0;3554:894:15;2500:21:12;:19;:21::i;:::-;1350:19:11::1;:17;:19::i;:::-;2358:10:15::2;2348:21;::::0;;;:9:::2;:21;::::0;;;;;::::2;;2347:22;:47:::0;::::2;;;-1:-1:-1::0;1684:7:0;1710:6;-1:-1:-1;;;;;1710:6:0;2373:10:15::2;:21;;2347:47;2343:108;;;2417:23;::::0;-1:-1:-1;;;2417:23:15;;2429:10:::2;2417:23;::::0;::::2;2855:51:16::0;2828:18;;2417:23:15::2;;;;;;;;2343:108;3745:4:::0;-1:-1:-1;;;;;2524:18:15;::::3;2520:72;;2565:16;;-1:-1:-1::0;;;2565:16:15::3;;;;;;;;;;;2520:72;-1:-1:-1::0;;;;;3802:22:15;::::4;;::::0;;;:15:::4;:22;::::0;;;;;::::4;;3797:85;;3847:24;::::0;-1:-1:-1;;;3847:24:15;;-1:-1:-1;;;;;2873:32:16;;3847:24:15::4;::::0;::::4;2855:51:16::0;2828:18;;3847:24:15::4;2709:203:16::0;3797:85:15::4;3981:36;::::0;-1:-1:-1;;;3981:36:15;;-1:-1:-1;;;;;6212:15:16;;;3981:36:15::4;::::0;::::4;6194:34:16::0;4011:4:15::4;6244:18:16::0;;;6237:43;3914:5:15;;3892:12:::4;::::0;3981:15;::::4;::::0;::::4;::::0;6129:18:16;;3981:36:15::4;;;;;;;;;;;;;;;;;::::0;::::4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3961:56;;4043:6;4031:9;:18;4027:96;;;4072:40;::::0;-1:-1:-1;;;4072:40:15;;::::4;::::0;::::4;6654:25:16::0;;;6695:18;;;6688:34;;;6627:18;;4072:40:15::4;6480:248:16::0;4027:96:15::4;4175:21;::::0;-1:-1:-1;;;4175:21:15;;-1:-1:-1;;;;;2873:32:16;;;4175:21:15::4;::::0;::::4;2855:51:16::0;4157:15:15::4;::::0;4175;;::::4;::::0;::::4;::::0;2828:18:16;;4175:21:15::4;;;;;;;;;;;;;;;;;::::0;::::4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4157:39;;4220:6;4210:7;:16;4206:90;;;4249:36;::::0;-1:-1:-1;;;4249:36:15;;::::4;::::0;::::4;6654:25:16::0;;;6695:18;;;6688:34;;;6627:18;;4249:36:15::4;6480:248:16::0;4206:90:15::4;4359:8;::::0;4330:46:::4;::::0;-1:-1:-1;;;;;4330:22:15;;::::4;::::0;4353:4;;4359:8:::4;4369:6:::0;4330:22:::4;:46::i;:::-;4415:8;::::0;4392:49:::4;::::0;-1:-1:-1;;;;;4415:8:15;;::::4;::::0;4392:49;;::::4;::::0;;;::::4;::::0;::::4;::::0;::::4;::::0;4425:6;;4433:7;;;;4392:49:::4;:::i;:::-;;;;;;;;3751:697;;;2460:1:::3;2542:20:12::0;1857:1;3068:7;:21;2888:208;2542:20;3554:894:15;;;;;:::o;2293:101:0:-;1531:13;:11;:13::i;:::-;2357:30:::1;2384:1;2357:18;:30::i;2244:229:1:-:0;1311:13;;735:10:10;;-1:-1:-1;;;;;1311:13:1;2339:24;;2335:96;;2386:34;;-1:-1:-1;;;2386:34:1;;-1:-1:-1;;;;;2873:32:16;;2386:34:1;;;2855:51:16;2828:18;;2386:34:1;2709:203:16;2335:96:1;2440:26;2459:6;2440:18;:26::i;:::-;2286:187;2244:229::o;8394:61:15:-;1531:13:0;:11;:13::i;:::-;8440:8:15::1;:6;:8::i;4667:1124::-:0;2500:21:12;:19;:21::i;:::-;1350:19:11::1;:17;:19::i;:::-;2358:10:15::2;2348:21;::::0;;;:9:::2;:21;::::0;;;;;::::2;;2347:22;:47:::0;::::2;;;-1:-1:-1::0;1684:7:0;1710:6;-1:-1:-1;;;;;1710:6:0;2373:10:15::2;:21;;2347:47;2343:108;;;2417:23;::::0;-1:-1:-1;;;2417:23:15;;2429:10:::2;2417:23;::::0;::::2;2855:51:16::0;2828:18;;2417:23:15::2;2709:203:16::0;2343:108:15::2;4904:30:::0;;::::3;:67:::0;::::3;;;-1:-1:-1::0;4938:33:15;;::::3;4904:67;4883:135;;;::::0;-1:-1:-1;;;4883:135:15;;7401:2:16;4883:135:15::3;::::0;::::3;7383:21:16::0;7440:2;7420:18;;;7413:30;-1:-1:-1;;;7459:18:16;;;7452:51;7520:18;;4883:135:15::3;7199:345:16::0;4883:135:15::3;-1:-1:-1::0;;;;;5034:22:15;::::3;;::::0;;;:15:::3;:22;::::0;;;;;::::3;;5029:85;;5079:24;::::0;-1:-1:-1;;;5079:24:15;;-1:-1:-1;;;;;2873:32:16;;5079:24:15::3;::::0;::::3;2855:51:16::0;2828:18;;5079:24:15::3;2709:203:16::0;5029:85:15::3;5146:5:::0;5124:12:::3;5163:622;5183:16:::0;;::::3;5163:622;;;5220:12;5235:5;;5241:1;5235:8;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;5220:23;;5257:14;5274:7;;5282:1;5274:10;;;;;;;:::i;:::-;;;::::0;;;::::3;;::::0;-1:-1:-1;;;;;;;5303:18:15;::::3;::::0;;:33:::3;;-1:-1:-1::0;5325:11:15;;5303:33:::3;5299:47;;;5338:8;;;;5299:47;5381:36;::::0;-1:-1:-1;;;5381:36:15;;-1:-1:-1;;;;;6212:15:16;;;5381:36:15::3;::::0;::::3;6194:34:16::0;5411:4:15::3;6244:18:16::0;;;6237:43;5361:17:15::3;::::0;5381:15;;::::3;::::0;::::3;::::0;6129:18:16;;5381:36:15::3;;;;;;;;;;;;;;;;;::::0;::::3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;5449:21;::::0;-1:-1:-1;;;5449:21:15;;-1:-1:-1;;;;;2873:32:16;;;5449:21:15::3;::::0;::::3;2855:51:16::0;5361:56:15;;-1:-1:-1;5431:15:15::3;::::0;5449;::::3;::::0;::::3;::::0;2828:18:16;;5449:21:15::3;;;;;;;;;;;;;;;;;::::0;::::3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;5431:39;;5591:6;5578:9;:19;;:40;;;;;5612:6;5601:7;:17;;5578:40;5574:201;;;5667:8;::::0;5638:46:::3;::::0;-1:-1:-1;;;;;5638:22:15;;::::3;::::0;5661:4;;5667:8:::3;5677:6:::0;5638:22:::3;:46::i;:::-;5730:8;::::0;-1:-1:-1;;;;;5730:8:15;;::::3;::::0;5707:53;;::::3;::::0;;::::3;;5740:6:::0;5748:8;;5757:1;5748:11;;::::3;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;5707:53;;;;;;;;:::i;:::-;;;;;;;;5574:201;5206:579;;;;5163:622;5201:3:::0;::::3;::::0;::::3;:::i;:::-;;;;5163:622;;;;4873:918;2542:20:12::0;1857:1;3068:7;:21;2888:208;2542:20;4667:1124:15;;;;;;;:::o;7371:333::-;1531:13:0;:11;:13::i;:::-;7478:9:15::1;7473:225;7493:17:::0;;::::1;7473:225;;;7556:1;7535:6:::0;;7542:1;7535:9;;::::1;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1::0;;;;;7535:23:15::1;;7531:157;;7607:9;7578:15;:26;7594:6;;7601:1;7594:9;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1::0;;;;;7578:26:15::1;::::0;;::::1;::::0;::::1;::::0;;;;;;-1:-1:-1;7578:26:15;:38;;-1:-1:-1;;7578:38:15::1;::::0;::::1;;::::0;;;::::1;::::0;;7652:6;;7659:1;7652:9;;::::1;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1::0;;;;;7639:34:15::1;;7663:9;7639:34;;;;2422:14:16::0;2415:22;2397:41;;2385:2;2370:18;;2257:187;7639:34:15::1;;;;;;;;7531:157;7512:3:::0;::::1;::::0;::::1;:::i;:::-;;;;7473:225;;8750:242:::0;1531:13:0;:11;:13::i;:::-;8882:2:15;-1:-1:-1;;;;;2524:18:15;::::1;2520:72;;2565:16;;-1:-1:-1::0;;;2565:16:15::1;;;;;;;;;;;2520:72;8896:38:::2;-1:-1:-1::0;;;;;8896:26:15;::::2;8923:2:::0;8927:6;8896:26:::2;:38::i;:::-;8974:2;-1:-1:-1::0;;;;;8949:36:15::2;8967:5;-1:-1:-1::0;;;;;8949:36:15::2;;8978:6;8949:36;;;;1484:25:16::0;;1472:2;1457:18;;1338:177;8949:36:15::2;;;;;;;;1554:1:0::1;8750:242:15::0;;;:::o;8122:222::-;1531:13:0;:11;:13::i;:::-;8196:11:15;-1:-1:-1;;;;;2524:18:15;::::1;2520:72;;2565:16;;-1:-1:-1::0;;;2565:16:15::1;;;;;;;;;;;2520:72;8241:8:::2;::::0;;-1:-1:-1;;;;;8259:22:15;;::::2;-1:-1:-1::0;;;;;;8259:22:15;::::2;::::0;::::2;::::0;;;8296:41:::2;::::0;8241:8;::::2;::::0;8259:22;8241:8;;8296:41:::2;::::0;8219:19:::2;::::0;8296:41:::2;8209:135;1554:1:0::1;8122:222:15::0;:::o;1649:178:1:-;1531:13:0;:11;:13::i;:::-;1738::1::1;:24:::0;;-1:-1:-1;;;;;1738:24:1;::::1;-1:-1:-1::0;;;;;;1738:24:1;;::::1;::::0;::::1;::::0;;;1802:7:::1;1684::0::0;1710:6;-1:-1:-1;;;;;1710:6:0;;1638:85;1802:7:1::1;-1:-1:-1::0;;;;;1777:43:1::1;;;;;;;;;;;1649:178:::0;:::o;1796:162:0:-;1684:7;1710:6;-1:-1:-1;;;;;1710:6:0;735:10:10;1855:23:0;1851:101;;1901:40;;-1:-1:-1;;;1901:40:0;;735:10:10;1901:40:0;;;2855:51:16;2828:18;;1901:40:0;2709:203:16;2586:117:11;1597:16;:14;:16::i;:::-;2644:7:::1;:15:::0;;-1:-1:-1;;2644:15:11::1;::::0;;2674:22:::1;735:10:10::0;2683:12:11::1;2674:22;::::0;-1:-1:-1;;;;;2873:32:16;;;2855:51;;2843:2;2828:18;2674:22:11::1;;;;;;;2586:117::o:0;2575:307:12:-;1899:1;2702:7;;:18;2698:86;;2743:30;;-1:-1:-1;;;2743:30:12;;;;;;;;;;;2698:86;1899:1;2858:17;;2575:307::o;1878:128:11:-;1796:7;;;;1939:61;;;1974:15;;-1:-1:-1;;;1974:15:11;;;;;;;;;;;1618:188:9;1745:53;;-1:-1:-1;;;;;8703:15:16;;;1745:53:9;;;8685:34:16;8755:15;;;8735:18;;;8728:43;8787:18;;;8780:34;;;1718:81:9;;1738:5;;1760:18;;;;;8620::16;;1745:53:9;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1745:53:9;;;;;;;;;;;1718:19;:81::i;2011:153:1:-;2100:13;2093:20;;-1:-1:-1;;;;;;2093:20:1;;;2123:34;2148:8;2123:24;:34::i;2339:115:11:-;1350:19;:17;:19::i;:::-;2398:7:::1;:14:::0;;-1:-1:-1;;2398:14:11::1;2408:4;2398:14;::::0;;2427:20:::1;2434:12;735:10:10::0;;656:96;1219:160:9;1328:43;;-1:-1:-1;;;;;9017:32:16;;;1328:43:9;;;8999:51:16;9066:18;;;9059:34;;;1301:71:9;;1321:5;;1343:14;;;;;8972:18:16;;1328:43:9;8825:274:16;1301:71:9;1219:160;;;:::o;2078:126:11:-;1796:7;;;;2136:62;;2172:15;;-1:-1:-1;;;2172:15:11;;;;;;;;;;;8370:720:9;8450:18;8478:19;8616:4;8613:1;8606:4;8600:11;8593:4;8587;8583:15;8580:1;8573:5;8566;8561:60;8673:7;8663:176;;8717:4;8711:11;8762:16;8759:1;8754:3;8739:40;8808:16;8803:3;8796:29;8663:176;-1:-1:-1;;8916:1:9;8910:8;8866:16;;-1:-1:-1;8942:15:9;;:68;;8994:11;9009:1;8994:16;;8942:68;;;-1:-1:-1;;;;;8960:26:9;;;:31;8942:68;8938:146;;;9033:40;;-1:-1:-1;;;9033:40:9;;-1:-1:-1;;;;;2873:32:16;;9033:40:9;;;2855:51:16;2828:18;;9033:40:9;2709:203:16;2912:187:0;2985:16;3004:6;;-1:-1:-1;;;;;3020:17:0;;;-1:-1:-1;;;;;;3020:17:0;;;;;;3052:40;;3004:6;;;;;;;3052:40;;2985:16;3052:40;2975:124;2912:187;:::o;14:131:16:-;-1:-1:-1;;;;;89:31:16;;79:42;;69:70;;135:1;132;125:12;150:456;227:6;235;243;296:2;284:9;275:7;271:23;267:32;264:52;;;312:1;309;302:12;264:52;351:9;338:23;370:31;395:5;370:31;:::i;:::-;420:5;-1:-1:-1;477:2:16;462:18;;449:32;490:33;449:32;490:33;:::i;:::-;150:456;;542:7;;-1:-1:-1;;;596:2:16;581:18;;;;568:32;;150:456::o;945:388::-;1013:6;1021;1074:2;1062:9;1053:7;1049:23;1045:32;1042:52;;;1090:1;1087;1080:12;1042:52;1129:9;1116:23;1148:31;1173:5;1148:31;:::i;:::-;1198:5;-1:-1:-1;1255:2:16;1240:18;;1227:32;1268:33;1227:32;1268:33;:::i;:::-;1320:7;1310:17;;;945:388;;;;;:::o;1520:160::-;1585:20;;1641:13;;1634:21;1624:32;;1614:60;;1670:1;1667;1660:12;1614:60;1520:160;;;:::o;1685:315::-;1750:6;1758;1811:2;1799:9;1790:7;1786:23;1782:32;1779:52;;;1827:1;1824;1817:12;1779:52;1866:9;1853:23;1885:31;1910:5;1885:31;:::i;:::-;1935:5;-1:-1:-1;1959:35:16;1990:2;1975:18;;1959:35;:::i;:::-;1949:45;;1685:315;;;;;:::o;2005:247::-;2064:6;2117:2;2105:9;2096:7;2092:23;2088:32;2085:52;;;2133:1;2130;2123:12;2085:52;2172:9;2159:23;2191:31;2216:5;2191:31;:::i;2917:937::-;3015:6;3023;3031;3039;3047;3100:3;3088:9;3079:7;3075:23;3071:33;3068:53;;;3117:1;3114;3107:12;3068:53;3156:9;3143:23;3175:31;3200:5;3175:31;:::i;:::-;3225:5;-1:-1:-1;3282:2:16;3267:18;;3254:32;3295:33;3254:32;3295:33;:::i;:::-;3347:7;-1:-1:-1;3401:2:16;3386:18;;3373:32;;-1:-1:-1;3456:2:16;3441:18;;3428:32;3479:18;3509:14;;;3506:34;;;3536:1;3533;3526:12;3506:34;3574:6;3563:9;3559:22;3549:32;;3619:7;3612:4;3608:2;3604:13;3600:27;3590:55;;3641:1;3638;3631:12;3590:55;3681:2;3668:16;3707:2;3699:6;3696:14;3693:34;;;3723:1;3720;3713:12;3693:34;3768:7;3763:2;3754:6;3750:2;3746:15;3742:24;3739:37;3736:57;;;3789:1;3786;3779:12;3736:57;2917:937;;;;-1:-1:-1;2917:937:16;;-1:-1:-1;3820:2:16;3812:11;;3842:6;2917:937;-1:-1:-1;;;2917:937:16:o;3859:367::-;3922:8;3932:6;3986:3;3979:4;3971:6;3967:17;3963:27;3953:55;;4004:1;4001;3994:12;3953:55;-1:-1:-1;4027:20:16;;4070:18;4059:30;;4056:50;;;4102:1;4099;4092:12;4056:50;4139:4;4131:6;4127:17;4115:29;;4199:3;4192:4;4182:6;4179:1;4175:14;4167:6;4163:27;4159:38;4156:47;4153:67;;;4216:1;4213;4206:12;4153:67;3859:367;;;;;:::o;4231:1236::-;4410:6;4418;4426;4434;4442;4450;4458;4511:3;4499:9;4490:7;4486:23;4482:33;4479:53;;;4528:1;4525;4518:12;4479:53;4567:9;4554:23;4586:31;4611:5;4586:31;:::i;:::-;4636:5;-1:-1:-1;4692:2:16;4677:18;;4664:32;4715:18;4745:14;;;4742:34;;;4772:1;4769;4762:12;4742:34;4811:70;4873:7;4864:6;4853:9;4849:22;4811:70;:::i;:::-;4900:8;;-1:-1:-1;4785:96:16;-1:-1:-1;4988:2:16;4973:18;;4960:32;;-1:-1:-1;5004:16:16;;;5001:36;;;5033:1;5030;5023:12;5001:36;5072:72;5136:7;5125:8;5114:9;5110:24;5072:72;:::i;:::-;5163:8;;-1:-1:-1;5046:98:16;-1:-1:-1;5251:2:16;5236:18;;5223:32;;-1:-1:-1;5267:16:16;;;5264:36;;;5296:1;5293;5286:12;5264:36;;5335:72;5399:7;5388:8;5377:9;5373:24;5335:72;:::i;:::-;4231:1236;;;;-1:-1:-1;4231:1236:16;;-1:-1:-1;4231:1236:16;;;;5309:98;;-1:-1:-1;;;4231:1236:16:o;5472:505::-;5564:6;5572;5580;5633:2;5621:9;5612:7;5608:23;5604:32;5601:52;;;5649:1;5646;5639:12;5601:52;5689:9;5676:23;5722:18;5714:6;5711:30;5708:50;;;5754:1;5751;5744:12;5708:50;5793:70;5855:7;5846:6;5835:9;5831:22;5793:70;:::i;:::-;5882:8;;-1:-1:-1;5767:96:16;-1:-1:-1;5936:35:16;;-1:-1:-1;5967:2:16;5952:18;;5936:35;:::i;:::-;5926:45;;5472:505;;;;;:::o;6291:184::-;6361:6;6414:2;6402:9;6393:7;6389:23;6385:32;6382:52;;;6430:1;6427;6420:12;6382:52;-1:-1:-1;6453:16:16;;6291:184;-1:-1:-1;6291:184:16:o;6733:461::-;6920:6;6909:9;6902:25;6963:2;6958;6947:9;6943:18;6936:30;7002:6;6997:2;6986:9;6982:18;6975:34;7059:6;7051;7046:2;7035:9;7031:18;7018:48;7115:1;7086:22;;;7110:2;7082:31;;;7075:42;;;;7178:2;7157:15;;;-1:-1:-1;;7153:29:16;7138:45;7134:54;;6733:461;-1:-1:-1;;6733:461:16:o;7549:127::-;7610:10;7605:3;7601:20;7598:1;7591:31;7641:4;7638:1;7631:15;7665:4;7662:1;7655:15;7681:522;7759:4;7765:6;7825:11;7812:25;7919:2;7915:7;7904:8;7888:14;7884:29;7880:43;7860:18;7856:68;7846:96;;7938:1;7935;7928:12;7846:96;7965:33;;8017:20;;;-1:-1:-1;8060:18:16;8049:30;;8046:50;;;8092:1;8089;8082:12;8046:50;8125:4;8113:17;;-1:-1:-1;8156:14:16;8152:27;;;8142:38;;8139:58;;;8193:1;8190;8183:12;8208:232;8247:3;8268:17;;;8265:140;;8327:10;8322:3;8318:20;8315:1;8308:31;8362:4;8359:1;8352:15;8390:4;8387:1;8380:15;8265:140;-1:-1:-1;8432:1:16;8421:13;;8208:232::o

Swarm Source

ipfs://0d6f69aaeaebbe6d8a7b8208d00535b75e81e91fcba79227941453357147d0e4

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ 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.