Goerli Testnet

Token

USDC (USDC)
ERC-20

Overview

Max Total Supply

200,112,301 USDC

Holders

55

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 18 Decimals)

Balance
2.07 USDC
0x07865c6e87b9f70255377e024ace6630c1eaa37f
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
TestToken

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 4 : AddressPool.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

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

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

enum VaultStatus {INUSE, AVAILABLE}

struct VaultInfo {
    string vaultAddress;
    VaultStatus status;
}

interface IAddressPool {
    // get an available payment vault from address pool to receive payments
    function getAvailableVault(string memory chain) external view returns (string memory vaultAddress);
    // use vault to receive payment, the vault status will be set to INUSE
    function useVault(string memory chain, string memory vaultAddress) external;
    // return a payment vault to the address pool, the vault status will be set to AVAILABLE and be able be selected for next payment
    function releaseVault(string memory chain, string memory vaultAddress) external;
    // add a new payment vault address into the address pool, the vault status will be set to AVAILABLE
    function addNewVault(string memory chain, string memory vaultAddress) external;
    // clean all vaults from the address pool, and fill up the address with given vaults
    function resetVaults(string memory chain, string[] memory vaultAddresses) external;
    // get current status of the given vault
    function getVaultStatus(string memory chain, string memory vaultAddress) external view returns (string memory vaultStatus);
}

contract AddressPool is Ownable, IAddressPool {

    enum RequestStatus {PENDING, CANCELED, COMPLETED, FAILED}

    struct Request {
        string requester; // sender of the request.
        string token;
        uint amount; // amount of token to deposit/withdraw.
        string txid; // asset txid for the deposit/withdraw process.
        string vault;
        uint nonce; // serial number allocated for each request.
        uint timestamp; // time of the request creation.
        RequestStatus status; // status of the request.
    }

    Request[] public paymentRequests;
    Request[] public withdrawRequests;

    mapping(string=>VaultInfo[]) public vaults;
    string[] public supportedChains;
    // vault chain => (address => vault nonce)
    mapping(string=>mapping(string=>uint)) public vaultInfoNonce;

    // mapping between a payment request hash and the corresponding request nonce.
    mapping(bytes32=>uint) public paymentRequestNonce;
    // txid => payment request hash
    mapping(string=>bytes32) public paymentRequestTxid;

    mapping(bytes32=>uint) public withdrawRequestNonce;
    mapping(string=>bytes32) public withdrawRequestTxid;

    // vault address => (token ==> balance)
    mapping(string=>mapping(string=>uint)) public vaultTokenBalance;

    constructor() {
        supportedChains.push("ETH");
        supportedChains.push("TRON");
    }

    event PaymentRequestAdd(
        uint indexed nonce,
        string indexed requester,
        string indexed token,
        uint amount,
        string txid,
        string vault,
        uint timestamp,
        bytes32 requestHash
    );

//////    function AddPaymentRequest(
//////        string memory tokenAddress_,
//////        uint amount_,
//////        string memory txid_,
//////        string memory requester_
//////    )
//////    external
//////    onlyOwner
//////    returns (bool)
//////    {
//////        require(!isEmptyString(requester_), "invalid requester");
//////
//////        uint nonce = paymentRequests.length;
//////        uint timestamp = getTimestamp();
//////
//////        // get available vault
//////        uint vaultNonce = getAvailableVault();
//////        vaults[vaultNonce].status = VaultStatus.INUSE;
//////
//////        Request memory request = Request({
//////        requester: requester_,
//////        token: tokenAddress_,
//////        amount: amount_,
//////        txid: txid_,
//////        vault: vaults[vaultNonce].vaultAddress,
//////        nonce: nonce,
//////        timestamp: timestamp,
//////        status: RequestStatus.PENDING
//////        });
//////
//////        bytes32 requestHash = calcRequestHash(request);
//////        paymentRequestNonce[requestHash] = nonce;
//////        paymentRequestTxid[txid_] = requestHash;
//////        paymentRequests.push(request);
//////
//////        emit PaymentRequestAdd(nonce, requester_, tokenAddress_, amount_, txid_,
//////            vaults[vaultNonce].vaultAddress, timestamp, requestHash);
//////        return true;
//////    }
//////
//////    event PaymentRequestCancel(uint indexed nonce, string indexed txid, string indexed requester, bytes32 requestHash);
//////
//////    function cancelPaymentRequest(string memory txid_, string memory requester_) external onlyOwner returns (bool) {
//////        require(!isEmptyString(txid_), "transaction id must not be empty");
//////        require(!isEmptyString(requester_), "requester must not be empty");
//////        uint nonce;
//////        Request memory request;
//////        bytes32 requestHash = paymentRequestTxid[txid_];
//////        (nonce, request) = getPendingPaymentRequest(requestHash);
//////
//////        uint vaultNonce = vaultInfoNonce[request.vault];
//////        vaults[vaultNonce].status = VaultStatus.AVAILABLE;
//////
//////        require(compareStrings(requester_, request.requester), "cancel sender is different than pending request initiator");
//////        paymentRequests[nonce].status = RequestStatus.CANCELED;
//////
//////        emit PaymentRequestCancel(nonce, txid_, requester_, requestHash);
//////        return true;
//////    }
//////
//////    event PaymentConfirmed(
//////        uint indexed nonce,
//////        string indexed requester,
//////        string indexed token,
//////        uint amount,
//////        string txid,
//////        string vault,
//////        uint timestamp,
//////        bytes32 requestHash
//////    );
//////
//////    function confirmPaymentRequest(string memory txid_, string memory requester_) external onlyOwner returns (bool) {
//////        require(!isEmptyString(txid_), "transaction id must not be empty");
//////        require(!isEmptyString(requester_), "requester must not be empty");
//////        // change vault balance
//////        uint nonce;
//////        Request memory request;
//////        bytes32 requestHash = paymentRequestTxid[txid_];
//////
//////        (nonce, request) = getPendingPaymentRequest(requestHash);
//////
//////
//////        uint vaultNonce = vaultInfoNonce[request.vault];
//////        vaults[vaultNonce].status = VaultStatus.AVAILABLE;
//////        vaultTokenBalance[request.vault][request.token] += request.amount;
//////
//////        paymentRequests[nonce].status = RequestStatus.COMPLETED;
//////
//////        emit PaymentConfirmed(
//////            request.nonce,
//////            request.requester,
//////            request.token,
//////            request.amount,
//////            request.txid,
//////            request.vault,
//////            request.timestamp,
//////            requestHash
//////        );
//////        return true;
//////    }
//////
//////    event WithdrawRequestAdd(
//////        uint indexed nonce,
//////        string indexed requester,
//////        string indexed token,
//////        uint amount,
//////        string txid,
//////        string vault,
//////        uint timestamp,
//////        bytes32 requestHash
//////    );
//////
//////    function AddWithdrawRequest(
//////        string memory tokenAddress_,
//////        uint amount_,
//////        string memory txid_,
//////        string memory vault_,
//////        string memory requester_
//////    )
//////    external
//////    onlyOwner
//////    returns (bool)
//////    {
//////        require(!isEmptyString(requester_), "invalid requester");
//////        require(!isEmptyString(txid_), "invalid transaction id");
//////
//////        uint nonce = withdrawRequests.length;
//////        uint timestamp = getTimestamp();
//////
//////        // get available vault
//////        uint vaultNonce = vaultInfoNonce[vault_];
//////        require(vaults[vaultNonce].status == VaultStatus.AVAILABLE, "the vault is not available");
//////        require(vaultTokenBalance[vault_][tokenAddress_] >= amount_,
//////            "The vault has insufficient amount to withdraw");
//////
//////        vaults[vaultNonce].status = VaultStatus.INUSE;
//////
//////        Request memory request = Request({
//////        requester: requester_,
//////        token: tokenAddress_,
//////        amount: amount_,
//////        txid: txid_,
//////        vault: vaults[vaultNonce].vaultAddress,
//////        nonce: nonce,
//////        timestamp: timestamp,
//////        status: RequestStatus.PENDING
//////        });
//////
//////        bytes32 requestHash = calcRequestHash(request);
//////        withdrawRequestNonce[requestHash] = nonce;
//////        withdrawRequestTxid[txid_] = requestHash;
//////        withdrawRequests.push(request);
//////
//////        emit WithdrawRequestAdd(nonce, requester_, tokenAddress_, amount_, txid_,
//////            vaults[vaultNonce].vaultAddress, timestamp, requestHash);
//////        return true;
//////    }
////
////    event WithdrawRequestCancel(uint indexed nonce, string indexed txid, string indexed requester, bytes32 requestHash);
//
//    function cancelWithdrawRequest(string memory txid_, string memory requester_) external onlyOwner returns (bool) {
//        require(!isEmptyString(txid_), "transaction id must not be empty");
//        require(!isEmptyString(requester_), "requester must not be empty");
//
//        uint nonce;
//        Request memory request;
//
//        bytes32 requestHash = withdrawRequestTxid[txid_];
//        (nonce, request) = getPendingWithdrawRequest(requestHash);
//
//        uint vaultNonce = vaultInfoNonce[request.vault];
//        vaults[vaultNonce].status = VaultStatus.AVAILABLE;
//
//        require(compareStrings(requester_, request.requester), "cancel sender is different than pending request initiator");
//        paymentRequests[nonce].status = RequestStatus.CANCELED;
//
//        emit WithdrawRequestCancel(nonce, txid_, requester_, requestHash);
//        return true;
//    }
//
//    event WithdrawConfirmed(
//        uint indexed nonce,
//        string indexed requester,
//        string indexed token,
//        uint amount,
//        string txid,
//        string vault,
//        uint timestamp,
//        bytes32 requestHash
//    );
//
//    function confirmWithdrawRequest(string memory txid_, string memory requester_) external onlyOwner returns (bool) {
//        require(!isEmptyString(txid_), "transaction id must not be empty");
//        require(!isEmptyString(requester_), "requester must not be empty");
//        // change vault balance
//        uint nonce;
//        Request memory request;
//        bytes32 requestHash = withdrawRequestTxid[txid_];
//
//        (nonce, request) = getPendingWithdrawRequest(requestHash);
//
//
//        uint vaultNonce = vaultInfoNonce[request.vault];
//        vaults[vaultNonce].status = VaultStatus.AVAILABLE;
//        vaultTokenBalance[request.vault][request.token] -= request.amount;
//
//        withdrawRequests[nonce].status = RequestStatus.COMPLETED;
//
//        emit WithdrawConfirmed(
//            request.nonce,
//            request.requester,
//            request.token,
//            request.amount,
//            request.txid,
//            request.vault,
//            request.timestamp,
//            requestHash
//        );
//        return true;
//    }
//
//    function resetPaymentVaults(string[] memory vaultAddresses_) external onlyOwner {
//        while (vaults.length != 0) {
//            vaults.pop();
//        }
//
//        for (uint i = 0; i < vaultAddresses_.length; i++) {
//            require(!isEmptyString(vaultAddresses_[i]), "invalid vault address");
//            vaults.push(VaultInfo({
//                vaultAddress: vaultAddresses_[i],
//                status: VaultStatus.AVAILABLE
//            }));
//        }
//    }
//
    function getTimestamp() internal view returns (uint) {
        // timestamp is only used for data maintaining purpose, it is not relied on for critical logic.
        return block.timestamp; // solhint-disable-line not-rely-on-time
    }

    function compareStrings (string memory a, string memory b) internal pure returns (bool) {
        return (keccak256(abi.encodePacked(a)) == keccak256(abi.encodePacked(b)));
    }

    function isEmptyString (string memory a) internal pure returns (bool) {
        return (compareStrings(a, ""));
    }

//    function calcRequestHash(Request memory request) internal pure returns (bytes32) {
//        return keccak256(abi.encode(
//                request.requester,
//                request.amount,
//                request.token,
//                request.txid,
//                request.vault,
//                request.nonce,
//                request.timestamp
//            ));
//    }
//
//    function getPendingPaymentRequest(bytes32 requestHash) internal view returns (uint nonce, Request memory request) {
//        require(requestHash != 0, "request hash is 0");
//        nonce = paymentRequestNonce[requestHash];
//        request = paymentRequests[nonce];
//        validatePendingRequest(request, requestHash);
//    }
//
//    function validatePendingRequest(Request memory request, bytes32 requestHash) internal pure {
//        require(request.status == RequestStatus.PENDING, "request is not pending");
//        require(requestHash == calcRequestHash(request), "given request hash does not match a pending request");
//    }
//
//    function getPendingWithdrawRequest(bytes32 requestHash) internal view returns (uint nonce, Request memory request) {
//        require(requestHash != 0, "request hash is 0");
//        nonce = withdrawRequestNonce[requestHash];
//        request = withdrawRequests[nonce];
//        validatePendingRequest(request, requestHash);
//    }

//    function getAvailableVault() public view override returns (uint) {
//        for (uint i = 0; i < vaults.length; i++) {
//            VaultInfo storage vault = vaults[i];
//            if (vault.status == VaultStatus.AVAILABLE) {
//                return i;
//            }
//        }
//        revert("No vault available");
//    }

    function getAvailableVault(string memory chain_) external view override returns (string memory vaultAddress) {
        vaultAddress = "no available vault";
        for (uint i = 0; i < vaults[chain_].length; i++) {
            VaultInfo storage vault = vaults[chain_][i];
            if (vault.status == VaultStatus.AVAILABLE) {
                vaultAddress = vault.vaultAddress;
                break;
            }
        }
    }

    event UsingVault(
        string chain,
        string vaultAddress
    );

    function useVault(string memory chain_, string memory vaultAddress_) external override onlyOwner {
        uint vaultNonce = vaultInfoNonce[chain_][vaultAddress_];
        string memory vaultAddress = vaults[chain_][vaultNonce].vaultAddress;
        require(compareStrings(vaultAddress, vaultAddress_), "unrecognized vault address");
        vaults[chain_][vaultNonce].status = VaultStatus.INUSE;
        emit UsingVault(chain_, vaultAddress_);
    }

    event VaultReleased(
        string chain,
        string vaultAddress
    );

    function releaseVault(string memory chain_, string memory vaultAddress_) external override onlyOwner {
        uint vaultNonce = vaultInfoNonce[chain_][vaultAddress_];
        string memory vaultAddress = vaults[chain_][vaultNonce].vaultAddress;
        require(compareStrings(vaultAddress, vaultAddress_), "unrecognized vault address");
        vaults[chain_][vaultNonce].status = VaultStatus.AVAILABLE;
        emit VaultReleased(chain_, vaultAddress_);
    }

    event AddedNewVault(
        string chain,
        string vaultAddress,
        uint nonce
    );
    function addNewVault(string memory chain_, string memory vaultAddress_) external override onlyOwner {
        uint vaultNonce = vaults[chain_].length;
        vaults[chain_].push(VaultInfo({
            vaultAddress: vaultAddress_,
            status: VaultStatus.AVAILABLE
        }));
        vaultInfoNonce[chain_][vaultAddress_]=vaultNonce;

        emit AddedNewVault(chain_, vaultAddress_, vaultNonce);
    }

    event ResetVaults(
        string chain,
        uint numberOfvaults
    );
    function resetVaults(string memory chain_, string[] memory vaultAddresses_) external override onlyOwner {
        for (uint i = 0; i < vaults[chain_].length; i++) {
            delete vaultInfoNonce[chain_][vaults[chain_][i].vaultAddress];
        }
        while (vaults[chain_].length != 0) {
            vaults[chain_].pop();
        }

        for (uint i = 0; i < vaultAddresses_.length; i++) {
            require(!isEmptyString(vaultAddresses_[i]), "invalid vault address");
            vaults[chain_].push(VaultInfo({
                vaultAddress: vaultAddresses_[i],
                status: VaultStatus.AVAILABLE
            }));
            vaultInfoNonce[chain_][vaultAddresses_[i]] = i;
        }
        emit ResetVaults(chain_, vaultAddresses_.length);
    }

    function getVaultStatus(string memory chain_, string memory vaultAddress_) external override view returns (string memory vaultStatus) {
        require(!isEmptyString(vaultAddress_), "invalid vault address");
        uint vaultNonce = vaultInfoNonce[chain_][vaultAddress_];
        string memory vaultAddress = vaults[chain_][vaultNonce].vaultAddress;
        require(compareStrings(vaultAddress, vaultAddress_), "unrecognized vault address");
        if (vaults[chain_][vaultNonce].status == VaultStatus.AVAILABLE) {
            vaultStatus = "AVAILABLE";
        } else {
            vaultStatus = "INUSE";
        }
    }
}

File 2 of 4 : LPManager.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

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

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/ERC20.sol)

// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

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

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

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

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

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

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

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

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

// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
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);
}

/**
 * @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}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * 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 ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20, IERC20Metadata {
    mapping(address => uint256) private _balances;

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

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All two of these 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 override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override 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 value {ERC20} uses, unless this function is
     * 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 override returns (uint8) {
        return 18;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override 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 `amount`.
     */
    function transfer(address to, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _transfer(owner, to, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * NOTE: If `amount` 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 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * 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 `amount`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public virtual override returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, amount);
        _transfer(from, to, amount);
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, allowance(owner, spender) + addedValue);
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        address owner = _msgSender();
        uint256 currentAllowance = allowance(owner, spender);
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(owner, spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `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.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     */
    function _transfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {
        require(from != address(0), "ERC20: transfer from the zero address");
        require(to != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(from, to, amount);

        uint256 fromBalance = _balances[from];
        require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[from] = fromBalance - amount;
        }
        _balances[to] += amount;

        emit Transfer(from, to, amount);

        _afterTokenTransfer(from, to, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
        }
        _totalSupply -= amount;

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` 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.
     */
    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Updates `owner` s allowance for `spender` based on spent `amount`.
     *
     * Does not update the allowance amount in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Might emit an {Approval} event.
     */
    function _spendAllowance(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            require(currentAllowance >= amount, "ERC20: insufficient allowance");
            unchecked {
                _approve(owner, spender, currentAllowance - amount);
            }
        }
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * has been transferred to `to`.
     * - when `from` is zero, `amount` tokens have been minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens have been burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}
}

// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol)

// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly
                /// @solidity memory-safe-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 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 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

    /**
     * @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).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

interface ILPPool {
    function initialize(address) external;
    function getReserves() external view returns (uint reserve, uint32 blockTimestampLast);
    function mint(address to, uint amount) external returns (uint liquidity);
    function burn(address to) external returns (uint amount);
}

contract LPPool is ILPPool, ERC20 {
    using SafeERC20 for IERC20;

    address public factory;
    address public token;

    uint private reserve;
    uint private rewards;
    uint32  private blockTimestampLast;

    bytes4 private constant SELECTOR = bytes4(keccak256(bytes('transfer(address,uint256)')));

    uint private unlocked = 1;
    modifier lock() {
        require(unlocked == 1, 'LPPool: LOCKED');
        unlocked = 0;
        _;
        unlocked = 1;
    }

    function getReserves() public override view returns (uint _reserve, uint32 _blockTimestampLast) {
        _reserve = reserve;
        _blockTimestampLast = blockTimestampLast;
    }

    function _safeTransfer(address token_, address to_, uint value_) private {
        (bool success, bytes memory data) = token_.call(abi.encodeWithSelector(SELECTOR, to_, value_));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'LPPool: TRANSFER_FAILED');
    }

    event Mint(address indexed sender, uint amount);
    event Burn(address indexed sender, uint amount, address indexed to);

    constructor() ERC20("AIRSWIFT LP", "ASLP") {
    }

    // called once by the factory at time of deployment
    function initialize(address _token) override external {
        require(msg.sender == factory, 'LPPool: FORBIDDEN'); // sufficient check
        token = _token;
    }

    function addRewards(uint amount) external lock {
        require(amount > 0, "LPPool: invalid reward amount");
        IERC20(token).safeTransfer(address(this), amount);
        rewards += amount;
    }

    // this low-level function shouldaddress token, address to be called from a contract which performs important safety checks
    function mint(address to, uint amount) override external lock returns (uint liquidity) {
        (uint _reserve,) = getReserves(); // gas savings
//        uint balance = IERC20(token).balanceOf(address(this));
        uint _totalSupply = totalSupply();
        liquidity = amount * _totalSupply / _reserve;
        require(liquidity > 0, 'LPPool: INSUFFICIENT_LIQUIDITY_MINTED');
        _mint(to, liquidity);
        emit Mint(msg.sender, amount);
    }

    // this low-level function should be called from a contract which performs important safety checks
    function burn(address to) override external lock returns (uint amount) {
        (uint _reserve,) = getReserves(); // gas savings
        address _token = token;                                // gas savings
        uint balance = IERC20(_token).balanceOf(address(this));
        uint liquidity = balanceOf(address(this));

        uint _totalSupply = totalSupply(); // gas savings, must be defined here since totalSupply can update in _mintFee
        amount = liquidity * (_reserve + rewards) / _totalSupply; // using balances ensures pro-rata distribution
        require(amount > 0, 'LPPool: INSUFFICIENT_LIQUIDITY_BURNED');
        _burn(address(this), liquidity);
        require(balance > amount, 'LPPool: INSUFFICIENT_LIQUIDITY');
        _safeTransfer(_token, to, amount);
        emit Burn(msg.sender, amount, to);
    }

    // force balances to match reserves
    function skim(address to) external lock {
        address _token = token; // gas savings
        _safeTransfer(_token, to, IERC20(_token).balanceOf(address(this)) - (reserve));
    }

}

interface ILPManager {
    event PoolCreated(address indexed token, address pool, uint);
    event LiquidityAdded(address indexed token, address to, uint);
    event LiquidityRemoved(address indexed token, address to, uint);
    function createPool(address token) external returns (address pool);
    function removeLiquidity(address token, uint liquidity, address to) external returns (uint amount);
    function addLiquidity(address token, uint amount, address to) external returns (uint liquidity);
}

contract LPManager is ILPManager {
    using SafeERC20 for IERC20;

    mapping(address=>address) public getPool;
    address[] public allPools;

    modifier ensure(uint deadline) {
        require(deadline >= block.timestamp, 'LPManager: EXPIRED');
        _;
    }

    constructor() {}

    function poolsLength() external view returns (uint) {
        return allPools.length;
    }

    function createPool(address token) override external returns (address pool) {
        require(token != address(0), 'LPManager: ZERO_ADDRESS');
        require(getPool[token] == address(0), 'LPManager: POOL_EXISTS');
        bytes memory bytecode = type(LPPool).creationCode;
        bytes32 salt = keccak256(abi.encodePacked(token));
        assembly {
            pool := create2(0, add(bytecode, 32), mload(bytecode), salt)
        }
        ILPPool(pool).initialize(token);
        getPool[token] = pool;
        allPools.push(pool);
        emit PoolCreated(token, pool, allPools.length);
    }

    function addLiquidity(
        address token,
        uint amount,
        address to
    ) override external returns (uint liquidity) {
        // create the pair if it doesn't exist yet
        require(getPool[token] != address(0), "LPManager: pool does not exist");
        address pool = getPool[token];
        IERC20(token).safeTransfer(pool, amount);
        liquidity = ILPPool(pool).mint(to, amount);
        emit LiquidityAdded(token, to, liquidity);
    }

    // **** REMOVE LIQUIDITY ****
    function removeLiquidity(
        address token,
        uint liquidity,
        address to
    ) external override returns (uint amount) {
        address pool = getPool[token];
        IERC20(pool).safeTransfer(pool, liquidity);
        amount = ILPPool(pool).burn(to);
        emit LiquidityRemoved(token, to, amount);
    }
}

File 3 of 4 : PaymentVault.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

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

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

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

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

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

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

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

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

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

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

// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol)

// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly
                /// @solidity memory-safe-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 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 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

    /**
     * @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).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

contract PaymentVault is Ownable{
    using SafeERC20 for IERC20;

    event Withdrawn(address indexed _who, address indexed _tokenAddress, uint indexed _amount);

    constructor() {}

    function withdraw(IERC20 token_, address recipient_, uint amount_) external onlyOwner {
        require(token_ != IERC20(address(0)), "The address of IERC20 token is null");
        require(recipient_ != address(0), "The address of recipient is null");
        require(token_.balanceOf(address(this)) >= amount_, "This vault doesn't have enough balance");
        token_.safeTransfer(recipient_, amount_);
        emit Withdrawn(recipient_, address(token_), amount_);
    }

}

File 4 of 4 : TestToken.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.4;

// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol)

// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/ERC20.sol)

// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

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

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

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

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

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

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

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

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

// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
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);
}

// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

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

/**
 * @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}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * 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 ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20, IERC20Metadata {
    mapping(address => uint256) private _balances;

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

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All two of these 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 override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override 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 value {ERC20} uses, unless this function is
     * 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 override returns (uint8) {
        return 18;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override 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 `amount`.
     */
    function transfer(address to, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _transfer(owner, to, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * NOTE: If `amount` 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 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * 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 `amount`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public virtual override returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, amount);
        _transfer(from, to, amount);
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, allowance(owner, spender) + addedValue);
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        address owner = _msgSender();
        uint256 currentAllowance = allowance(owner, spender);
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(owner, spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `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.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     */
    function _transfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {
        require(from != address(0), "ERC20: transfer from the zero address");
        require(to != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(from, to, amount);

        uint256 fromBalance = _balances[from];
        require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[from] = fromBalance - amount;
        }
        _balances[to] += amount;

        emit Transfer(from, to, amount);

        _afterTokenTransfer(from, to, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
        }
        _totalSupply -= amount;

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` 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.
     */
    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Updates `owner` s allowance for `spender` based on spent `amount`.
     *
     * Does not update the allowance amount in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Might emit an {Approval} event.
     */
    function _spendAllowance(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            require(currentAllowance >= amount, "ERC20: insufficient allowance");
            unchecked {
                _approve(owner, spender, currentAllowance - amount);
            }
        }
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * has been transferred to `to`.
     * - when `from` is zero, `amount` tokens have been minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens have been burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}
}

/**
 * @dev Extension of {ERC20} that allows token holders to destroy both their own
 * tokens and those that they have an allowance for, in a way that can be
 * recognized off-chain (via event analysis).
 */
abstract contract ERC20Burnable is Context, ERC20 {
    /**
     * @dev Destroys `amount` tokens from the caller.
     *
     * See {ERC20-_burn}.
     */
    function burn(uint256 amount) public virtual {
        _burn(_msgSender(), amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, deducting from the caller's
     * allowance.
     *
     * See {ERC20-_burn} and {ERC20-allowance}.
     *
     * Requirements:
     *
     * - the caller must have allowance for ``accounts``'s tokens of at least
     * `amount`.
     */
    function burnFrom(address account, uint256 amount) public virtual {
        _spendAllowance(account, _msgSender(), amount);
        _burn(account, amount);
    }
}

// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/ERC20Pausable.sol)

// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.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 {
    /**
     * @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);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

    /**
     * @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 {
        require(!paused(), "Pausable: paused");
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        require(paused(), "Pausable: not paused");
    }

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

/**
 * @dev ERC20 token with pausable token transfers, minting and burning.
 *
 * Useful for scenarios such as preventing trades until the end of an evaluation
 * period, or having an emergency switch for freezing all token transfers in the
 * event of a large bug.
 */
abstract contract ERC20Pausable is ERC20, Pausable {
    /**
     * @dev See {ERC20-_beforeTokenTransfer}.
     *
     * Requirements:
     *
     * - the contract must not be paused.
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual override {
        super._beforeTokenTransfer(from, to, amount);

        require(!paused(), "ERC20Pausable: token transfer while paused");
    }
}

// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

contract TestToken is Ownable, ERC20Burnable, ERC20Pausable {

    constructor(string memory name, string memory symbol) ERC20(name, symbol) {
    }

    function burn(uint value) public override {
        super.burn(value);
    }

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

    function pause() public virtual onlyOwner {
        _pause();
    }

    function unpause() public virtual onlyOwner {
        _unpause();
    }

    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual override(ERC20, ERC20Pausable) {
        super._beforeTokenTransfer(from, to, amount);
    }

}

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

Contract ABI

[{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"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":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burnFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"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":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b506040516200243b3803806200243b83398181016040528101906200003791906200029e565b8181620000596200004d620000b060201b60201c565b620000b860201b60201c565b8160049080519060200190620000719291906200017c565b5080600590805190602001906200008a9291906200017c565b5050506000600660006101000a81548160ff021916908315150217905550505062000481565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b8280546200018a90620003a6565b90600052602060002090601f016020900481019282620001ae5760008555620001fa565b82601f10620001c957805160ff1916838001178555620001fa565b82800160010185558215620001fa579182015b82811115620001f9578251825591602001919060010190620001dc565b5b5090506200020991906200020d565b5090565b5b80821115620002285760008160009055506001016200020e565b5090565b6000620002436200023d846200033a565b62000311565b9050828152602081018484840111156200025c57600080fd5b6200026984828562000370565b509392505050565b600082601f8301126200028357600080fd5b8151620002958482602086016200022c565b91505092915050565b60008060408385031215620002b257600080fd5b600083015167ffffffffffffffff811115620002cd57600080fd5b620002db8582860162000271565b925050602083015167ffffffffffffffff811115620002f957600080fd5b620003078582860162000271565b9150509250929050565b60006200031d62000330565b90506200032b8282620003dc565b919050565b6000604051905090565b600067ffffffffffffffff82111562000358576200035762000441565b5b620003638262000470565b9050602081019050919050565b60005b838110156200039057808201518184015260208101905062000373565b83811115620003a0576000848401525b50505050565b60006002820490506001821680620003bf57607f821691505b60208210811415620003d657620003d562000412565b5b50919050565b620003e78262000470565b810181811067ffffffffffffffff8211171562000409576200040862000441565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b611faa80620004916000396000f3fe608060405234801561001057600080fd5b506004361061012c5760003560e01c806370a08231116100ad57806395d89b411161007157806395d89b41146102f9578063a457c2d714610317578063a9059cbb14610347578063dd62ed3e14610377578063f2fde38b146103a75761012c565b806370a082311461027b578063715018a6146102ab57806379cc6790146102b55780638456cb59146102d15780638da5cb5b146102db5761012c565b806339509351116100f457806339509351146101eb5780633f4ba83a1461021b57806340c10f191461022557806342966c68146102415780635c975abb1461025d5761012c565b806306fdde0314610131578063095ea7b31461014f57806318160ddd1461017f57806323b872dd1461019d578063313ce567146101cd575b600080fd5b6101396103c3565b604051610146919061175c565b60405180910390f35b6101696004803603810190610164919061143f565b610455565b6040516101769190611741565b60405180910390f35b610187610478565b604051610194919061195e565b60405180910390f35b6101b760048036038101906101b291906113f0565b610482565b6040516101c49190611741565b60405180910390f35b6101d56104b1565b6040516101e29190611979565b60405180910390f35b6102056004803603810190610200919061143f565b6104ba565b6040516102129190611741565b60405180910390f35b6102236104f1565b005b61023f600480360381019061023a919061143f565b610503565b005b61025b6004803603810190610256919061147b565b610511565b005b61026561051d565b6040516102729190611741565b60405180910390f35b6102956004803603810190610290919061138b565b610534565b6040516102a2919061195e565b60405180910390f35b6102b361057d565b005b6102cf60048036038101906102ca919061143f565b610591565b005b6102d96105b1565b005b6102e36105c3565b6040516102f09190611726565b60405180910390f35b6103016105ec565b60405161030e919061175c565b60405180910390f35b610331600480360381019061032c919061143f565b61067e565b60405161033e9190611741565b60405180910390f35b610361600480360381019061035c919061143f565b6106f5565b60405161036e9190611741565b60405180910390f35b610391600480360381019061038c91906113b4565b610718565b60405161039e919061195e565b60405180910390f35b6103c160048036038101906103bc919061138b565b61079f565b005b6060600480546103d290611ac2565b80601f01602080910402602001604051908101604052809291908181526020018280546103fe90611ac2565b801561044b5780601f106104205761010080835404028352916020019161044b565b820191906000526020600020905b81548152906001019060200180831161042e57829003601f168201915b5050505050905090565b600080610460610823565b905061046d81858561082b565b600191505092915050565b6000600354905090565b60008061048d610823565b905061049a8582856109f6565b6104a5858585610a82565b60019150509392505050565b60006012905090565b6000806104c5610823565b90506104e68185856104d78589610718565b6104e191906119b0565b61082b565b600191505092915050565b6104f9610d06565b610501610d84565b565b61050d8282610de7565b5050565b61051a81610f48565b50565b6000600660009054906101000a900460ff16905090565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610585610d06565b61058f6000610f5c565b565b6105a38261059d610823565b836109f6565b6105ad8282611020565b5050565b6105b9610d06565b6105c16111f9565b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6060600580546105fb90611ac2565b80601f016020809104026020016040519081016040528092919081815260200182805461062790611ac2565b80156106745780601f1061064957610100808354040283529160200191610674565b820191906000526020600020905b81548152906001019060200180831161065757829003601f168201915b5050505050905090565b600080610689610823565b905060006106978286610718565b9050838110156106dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106d3906118fe565b60405180910390fd5b6106e9828686840361082b565b60019250505092915050565b600080610700610823565b905061070d818585610a82565b600191505092915050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6107a7610d06565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610817576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161080e906117de565b60405180910390fd5b61082081610f5c565b50565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561089b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610892906118de565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561090b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610902906117fe565b60405180910390fd5b80600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516109e9919061195e565b60405180910390a3505050565b6000610a028484610718565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610a7c5781811015610a6e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a659061181e565b60405180910390fd5b610a7b848484840361082b565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610af2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ae9906118be565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610b62576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b599061177e565b60405180910390fd5b610b6d83838361125c565b6000600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015610bf4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610beb9061183e565b60405180910390fd5b818103600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610c8991906119b0565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610ced919061195e565b60405180910390a3610d0084848461126c565b50505050565b610d0e610823565b73ffffffffffffffffffffffffffffffffffffffff16610d2c6105c3565b73ffffffffffffffffffffffffffffffffffffffff1614610d82576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d799061187e565b60405180910390fd5b565b610d8c611271565b6000600660006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa610dd0610823565b604051610ddd9190611726565b60405180910390a1565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610e57576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e4e9061191e565b60405180910390fd5b610e636000838361125c565b8060036000828254610e7591906119b0565b9250508190555080600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610ecb91906119b0565b925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610f30919061195e565b60405180910390a3610f446000838361126c565b5050565b610f59610f53610823565b82611020565b50565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611090576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110879061189e565b60405180910390fd5b61109c8260008361125c565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015611123576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161111a906117be565b60405180910390fd5b818103600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816003600082825461117b9190611a06565b92505081905550600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516111e0919061195e565b60405180910390a36111f48360008461126c565b505050565b6112016112ba565b6001600660006101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611245610823565b6040516112529190611726565b60405180910390a1565b611267838383611304565b505050565b505050565b61127961051d565b6112b8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112af9061179e565b60405180910390fd5b565b6112c261051d565b15611302576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112f99061185e565b60405180910390fd5b565b61130f83838361135c565b61131761051d565b15611357576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161134e9061193e565b60405180910390fd5b505050565b505050565b60008135905061137081611f46565b92915050565b60008135905061138581611f5d565b92915050565b60006020828403121561139d57600080fd5b60006113ab84828501611361565b91505092915050565b600080604083850312156113c757600080fd5b60006113d585828601611361565b92505060206113e685828601611361565b9150509250929050565b60008060006060848603121561140557600080fd5b600061141386828701611361565b935050602061142486828701611361565b925050604061143586828701611376565b9150509250925092565b6000806040838503121561145257600080fd5b600061146085828601611361565b925050602061147185828601611376565b9150509250929050565b60006020828403121561148d57600080fd5b600061149b84828501611376565b91505092915050565b6114ad81611a3a565b82525050565b6114bc81611a4c565b82525050565b60006114cd82611994565b6114d7818561199f565b93506114e7818560208601611a8f565b6114f081611b52565b840191505092915050565b600061150860238361199f565b915061151382611b63565b604082019050919050565b600061152b60148361199f565b915061153682611bb2565b602082019050919050565b600061154e60228361199f565b915061155982611bdb565b604082019050919050565b600061157160268361199f565b915061157c82611c2a565b604082019050919050565b600061159460228361199f565b915061159f82611c79565b604082019050919050565b60006115b7601d8361199f565b91506115c282611cc8565b602082019050919050565b60006115da60268361199f565b91506115e582611cf1565b604082019050919050565b60006115fd60108361199f565b915061160882611d40565b602082019050919050565b600061162060208361199f565b915061162b82611d69565b602082019050919050565b600061164360218361199f565b915061164e82611d92565b604082019050919050565b600061166660258361199f565b915061167182611de1565b604082019050919050565b600061168960248361199f565b915061169482611e30565b604082019050919050565b60006116ac60258361199f565b91506116b782611e7f565b604082019050919050565b60006116cf601f8361199f565b91506116da82611ece565b602082019050919050565b60006116f2602a8361199f565b91506116fd82611ef7565b604082019050919050565b61171181611a78565b82525050565b61172081611a82565b82525050565b600060208201905061173b60008301846114a4565b92915050565b600060208201905061175660008301846114b3565b92915050565b6000602082019050818103600083015261177681846114c2565b905092915050565b60006020820190508181036000830152611797816114fb565b9050919050565b600060208201905081810360008301526117b78161151e565b9050919050565b600060208201905081810360008301526117d781611541565b9050919050565b600060208201905081810360008301526117f781611564565b9050919050565b6000602082019050818103600083015261181781611587565b9050919050565b60006020820190508181036000830152611837816115aa565b9050919050565b60006020820190508181036000830152611857816115cd565b9050919050565b60006020820190508181036000830152611877816115f0565b9050919050565b6000602082019050818103600083015261189781611613565b9050919050565b600060208201905081810360008301526118b781611636565b9050919050565b600060208201905081810360008301526118d781611659565b9050919050565b600060208201905081810360008301526118f78161167c565b9050919050565b600060208201905081810360008301526119178161169f565b9050919050565b60006020820190508181036000830152611937816116c2565b9050919050565b60006020820190508181036000830152611957816116e5565b9050919050565b60006020820190506119736000830184611708565b92915050565b600060208201905061198e6000830184611717565b92915050565b600081519050919050565b600082825260208201905092915050565b60006119bb82611a78565b91506119c683611a78565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156119fb576119fa611af4565b5b828201905092915050565b6000611a1182611a78565b9150611a1c83611a78565b925082821015611a2f57611a2e611af4565b5b828203905092915050565b6000611a4582611a58565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b83811015611aad578082015181840152602081019050611a92565b83811115611abc576000848401525b50505050565b60006002820490506001821680611ada57607f821691505b60208210811415611aee57611aed611b23565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b7f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60008201527f6365000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b7f45524332305061757361626c653a20746f6b656e207472616e7366657220776860008201527f696c652070617573656400000000000000000000000000000000000000000000602082015250565b611f4f81611a3a565b8114611f5a57600080fd5b50565b611f6681611a78565b8114611f7157600080fd5b5056fea26469706673582212203d84f029126ebafbea948ca95fc98eddd0bd917505480b3d2ca4286f610159e064736f6c63430008040033000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000004555344430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045553444300000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061012c5760003560e01c806370a08231116100ad57806395d89b411161007157806395d89b41146102f9578063a457c2d714610317578063a9059cbb14610347578063dd62ed3e14610377578063f2fde38b146103a75761012c565b806370a082311461027b578063715018a6146102ab57806379cc6790146102b55780638456cb59146102d15780638da5cb5b146102db5761012c565b806339509351116100f457806339509351146101eb5780633f4ba83a1461021b57806340c10f191461022557806342966c68146102415780635c975abb1461025d5761012c565b806306fdde0314610131578063095ea7b31461014f57806318160ddd1461017f57806323b872dd1461019d578063313ce567146101cd575b600080fd5b6101396103c3565b604051610146919061175c565b60405180910390f35b6101696004803603810190610164919061143f565b610455565b6040516101769190611741565b60405180910390f35b610187610478565b604051610194919061195e565b60405180910390f35b6101b760048036038101906101b291906113f0565b610482565b6040516101c49190611741565b60405180910390f35b6101d56104b1565b6040516101e29190611979565b60405180910390f35b6102056004803603810190610200919061143f565b6104ba565b6040516102129190611741565b60405180910390f35b6102236104f1565b005b61023f600480360381019061023a919061143f565b610503565b005b61025b6004803603810190610256919061147b565b610511565b005b61026561051d565b6040516102729190611741565b60405180910390f35b6102956004803603810190610290919061138b565b610534565b6040516102a2919061195e565b60405180910390f35b6102b361057d565b005b6102cf60048036038101906102ca919061143f565b610591565b005b6102d96105b1565b005b6102e36105c3565b6040516102f09190611726565b60405180910390f35b6103016105ec565b60405161030e919061175c565b60405180910390f35b610331600480360381019061032c919061143f565b61067e565b60405161033e9190611741565b60405180910390f35b610361600480360381019061035c919061143f565b6106f5565b60405161036e9190611741565b60405180910390f35b610391600480360381019061038c91906113b4565b610718565b60405161039e919061195e565b60405180910390f35b6103c160048036038101906103bc919061138b565b61079f565b005b6060600480546103d290611ac2565b80601f01602080910402602001604051908101604052809291908181526020018280546103fe90611ac2565b801561044b5780601f106104205761010080835404028352916020019161044b565b820191906000526020600020905b81548152906001019060200180831161042e57829003601f168201915b5050505050905090565b600080610460610823565b905061046d81858561082b565b600191505092915050565b6000600354905090565b60008061048d610823565b905061049a8582856109f6565b6104a5858585610a82565b60019150509392505050565b60006012905090565b6000806104c5610823565b90506104e68185856104d78589610718565b6104e191906119b0565b61082b565b600191505092915050565b6104f9610d06565b610501610d84565b565b61050d8282610de7565b5050565b61051a81610f48565b50565b6000600660009054906101000a900460ff16905090565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610585610d06565b61058f6000610f5c565b565b6105a38261059d610823565b836109f6565b6105ad8282611020565b5050565b6105b9610d06565b6105c16111f9565b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6060600580546105fb90611ac2565b80601f016020809104026020016040519081016040528092919081815260200182805461062790611ac2565b80156106745780601f1061064957610100808354040283529160200191610674565b820191906000526020600020905b81548152906001019060200180831161065757829003601f168201915b5050505050905090565b600080610689610823565b905060006106978286610718565b9050838110156106dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106d3906118fe565b60405180910390fd5b6106e9828686840361082b565b60019250505092915050565b600080610700610823565b905061070d818585610a82565b600191505092915050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6107a7610d06565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610817576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161080e906117de565b60405180910390fd5b61082081610f5c565b50565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561089b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610892906118de565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561090b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610902906117fe565b60405180910390fd5b80600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516109e9919061195e565b60405180910390a3505050565b6000610a028484610718565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610a7c5781811015610a6e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a659061181e565b60405180910390fd5b610a7b848484840361082b565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610af2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ae9906118be565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610b62576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b599061177e565b60405180910390fd5b610b6d83838361125c565b6000600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015610bf4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610beb9061183e565b60405180910390fd5b818103600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610c8991906119b0565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610ced919061195e565b60405180910390a3610d0084848461126c565b50505050565b610d0e610823565b73ffffffffffffffffffffffffffffffffffffffff16610d2c6105c3565b73ffffffffffffffffffffffffffffffffffffffff1614610d82576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d799061187e565b60405180910390fd5b565b610d8c611271565b6000600660006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa610dd0610823565b604051610ddd9190611726565b60405180910390a1565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610e57576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e4e9061191e565b60405180910390fd5b610e636000838361125c565b8060036000828254610e7591906119b0565b9250508190555080600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610ecb91906119b0565b925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610f30919061195e565b60405180910390a3610f446000838361126c565b5050565b610f59610f53610823565b82611020565b50565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611090576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110879061189e565b60405180910390fd5b61109c8260008361125c565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015611123576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161111a906117be565b60405180910390fd5b818103600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816003600082825461117b9190611a06565b92505081905550600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516111e0919061195e565b60405180910390a36111f48360008461126c565b505050565b6112016112ba565b6001600660006101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611245610823565b6040516112529190611726565b60405180910390a1565b611267838383611304565b505050565b505050565b61127961051d565b6112b8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112af9061179e565b60405180910390fd5b565b6112c261051d565b15611302576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112f99061185e565b60405180910390fd5b565b61130f83838361135c565b61131761051d565b15611357576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161134e9061193e565b60405180910390fd5b505050565b505050565b60008135905061137081611f46565b92915050565b60008135905061138581611f5d565b92915050565b60006020828403121561139d57600080fd5b60006113ab84828501611361565b91505092915050565b600080604083850312156113c757600080fd5b60006113d585828601611361565b92505060206113e685828601611361565b9150509250929050565b60008060006060848603121561140557600080fd5b600061141386828701611361565b935050602061142486828701611361565b925050604061143586828701611376565b9150509250925092565b6000806040838503121561145257600080fd5b600061146085828601611361565b925050602061147185828601611376565b9150509250929050565b60006020828403121561148d57600080fd5b600061149b84828501611376565b91505092915050565b6114ad81611a3a565b82525050565b6114bc81611a4c565b82525050565b60006114cd82611994565b6114d7818561199f565b93506114e7818560208601611a8f565b6114f081611b52565b840191505092915050565b600061150860238361199f565b915061151382611b63565b604082019050919050565b600061152b60148361199f565b915061153682611bb2565b602082019050919050565b600061154e60228361199f565b915061155982611bdb565b604082019050919050565b600061157160268361199f565b915061157c82611c2a565b604082019050919050565b600061159460228361199f565b915061159f82611c79565b604082019050919050565b60006115b7601d8361199f565b91506115c282611cc8565b602082019050919050565b60006115da60268361199f565b91506115e582611cf1565b604082019050919050565b60006115fd60108361199f565b915061160882611d40565b602082019050919050565b600061162060208361199f565b915061162b82611d69565b602082019050919050565b600061164360218361199f565b915061164e82611d92565b604082019050919050565b600061166660258361199f565b915061167182611de1565b604082019050919050565b600061168960248361199f565b915061169482611e30565b604082019050919050565b60006116ac60258361199f565b91506116b782611e7f565b604082019050919050565b60006116cf601f8361199f565b91506116da82611ece565b602082019050919050565b60006116f2602a8361199f565b91506116fd82611ef7565b604082019050919050565b61171181611a78565b82525050565b61172081611a82565b82525050565b600060208201905061173b60008301846114a4565b92915050565b600060208201905061175660008301846114b3565b92915050565b6000602082019050818103600083015261177681846114c2565b905092915050565b60006020820190508181036000830152611797816114fb565b9050919050565b600060208201905081810360008301526117b78161151e565b9050919050565b600060208201905081810360008301526117d781611541565b9050919050565b600060208201905081810360008301526117f781611564565b9050919050565b6000602082019050818103600083015261181781611587565b9050919050565b60006020820190508181036000830152611837816115aa565b9050919050565b60006020820190508181036000830152611857816115cd565b9050919050565b60006020820190508181036000830152611877816115f0565b9050919050565b6000602082019050818103600083015261189781611613565b9050919050565b600060208201905081810360008301526118b781611636565b9050919050565b600060208201905081810360008301526118d781611659565b9050919050565b600060208201905081810360008301526118f78161167c565b9050919050565b600060208201905081810360008301526119178161169f565b9050919050565b60006020820190508181036000830152611937816116c2565b9050919050565b60006020820190508181036000830152611957816116e5565b9050919050565b60006020820190506119736000830184611708565b92915050565b600060208201905061198e6000830184611717565b92915050565b600081519050919050565b600082825260208201905092915050565b60006119bb82611a78565b91506119c683611a78565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156119fb576119fa611af4565b5b828201905092915050565b6000611a1182611a78565b9150611a1c83611a78565b925082821015611a2f57611a2e611af4565b5b828203905092915050565b6000611a4582611a58565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b83811015611aad578082015181840152602081019050611a92565b83811115611abc576000848401525b50505050565b60006002820490506001821680611ada57607f821691505b60208210811415611aee57611aed611b23565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b7f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60008201527f6365000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b7f45524332305061757361626c653a20746f6b656e207472616e7366657220776860008201527f696c652070617573656400000000000000000000000000000000000000000000602082015250565b611f4f81611a3a565b8114611f5a57600080fd5b50565b611f6681611a78565b8114611f7157600080fd5b5056fea26469706673582212203d84f029126ebafbea948ca95fc98eddd0bd917505480b3d2ca4286f610159e064736f6c63430008040033

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

000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000004555344430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045553444300000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : name (string): USDC
Arg [1] : symbol (string): USDC

-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [3] : 5553444300000000000000000000000000000000000000000000000000000000
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [5] : 5553444300000000000000000000000000000000000000000000000000000000


[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.