ETH Price: $2,395.28 (-4.38%)

Contract

0x3c6CE18aFDE845635A32a69D0a7721b0Db84118e
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Swap To USDV And...199576762024-05-27 0:37:47100 days ago1716770267IN
0x3c6CE18a...0Db84118e
0.00023682 ETH0.001992394.01984782
Swap To USDV And...199341922024-05-23 17:52:35103 days ago1716486755IN
0x3c6CE18a...0Db84118e
0.00023648 ETH0.0057878911.79126583
Swap To USDV And...199195822024-05-21 16:50:11105 days ago1716310211IN
0x3c6CE18a...0Db84118e
0.00030564 ETH0.0113921823.55913761
Swap To USDV And...199147072024-05-21 0:28:59106 days ago1716251339IN
0x3c6CE18a...0Db84118e
0.00025124 ETH0.0080478616.23696882
Swap To USDV And...198742462024-05-15 8:40:47112 days ago1715762447IN
0x3c6CE18a...0Db84118e
0.00037439 ETH0.004016388.30592194
Swap To USDV And...198280302024-05-08 21:30:59118 days ago1715203859IN
0x3c6CE18a...0Db84118e
0.0003048 ETH0.002543115.15789817
Swap To USDV And...198256972024-05-08 13:39:59118 days ago1715175599IN
0x3c6CE18a...0Db84118e
0.00036695 ETH0.00320586.62963429
Swap To USDV And...197953212024-05-04 7:42:47123 days ago1714808567IN
0x3c6CE18a...0Db84118e
0.00031864 ETH0.002847635.78001271
Swap To USDV And...197735752024-05-01 6:45:35126 days ago1714545935IN
0x3c6CE18a...0Db84118e
0.00036519 ETH0.00300096.20588989
Swap To USDV And...197691442024-04-30 15:53:23126 days ago1714492403IN
0x3c6CE18a...0Db84118e
0.00031355 ETH0.0079948516.46282776
Swap To USDV And...197635282024-04-29 21:04:47127 days ago1714424687IN
0x3c6CE18a...0Db84118e
0.00029323 ETH0.003342886.81621479
Swap To USDV And...197345972024-04-25 19:53:59131 days ago1714074839IN
0x3c6CE18a...0Db84118e
0.00028297 ETH0.004299548.54442984
Swap To USDV And...197336922024-04-25 16:52:11131 days ago1714063931IN
0x3c6CE18a...0Db84118e
0.00028736 ETH0.017015828.39924741
Swap To USDV And...197284082024-04-24 23:08:23132 days ago1714000103IN
0x3c6CE18a...0Db84118e
0.0002832 ETH0.003730457.7915655
Swap To USDV And...197248792024-04-24 11:15:59132 days ago1713957359IN
0x3c6CE18a...0Db84118e
0.00344237 ETH0.0071549714.74113144
Swap To USDV And...197197392024-04-23 17:59:47133 days ago1713895187IN
0x3c6CE18a...0Db84118e
0.00039852 ETH0.0065416113.39514118
Swap To USDV And...197070702024-04-21 23:29:35135 days ago1713742175IN
0x3c6CE18a...0Db84118e
0.00030123 ETH0.003067576.31091584
Swap To USDV And...197034162024-04-21 11:15:11135 days ago1713698111IN
0x3c6CE18a...0Db84118e
0.00030134 ETH0.004075638.30280566
Swap To USDV And...196845762024-04-18 19:58:35138 days ago1713470315IN
0x3c6CE18a...0Db84118e
0.00036323 ETH0.004567519.44519043
Swap To USDV And...196754432024-04-17 13:18:47139 days ago1713359927IN
0x3c6CE18a...0Db84118e
0.00036323 ETH0.0176173136.43276574
Swap To USDV And...196563692024-04-14 21:10:47142 days ago1713129047IN
0x3c6CE18a...0Db84118e
0.00029995 ETH0.004758459.69383051
Swap To USDV And...196539282024-04-14 12:59:23142 days ago1713099563IN
0x3c6CE18a...0Db84118e
0.00040392 ETH0.0066615113.91383642
Swap To USDV And...196484142024-04-13 18:23:59143 days ago1713032639IN
0x3c6CE18a...0Db84118e
0.0003182 ETH0.0105959121.7983828
Swap To USDV And...196466422024-04-13 12:26:47143 days ago1713011207IN
0x3c6CE18a...0Db84118e
0.0002776 ETH0.004820289.8195324
Swap To USDV And...196451982024-04-13 7:34:35144 days ago1712993675IN
0x3c6CE18a...0Db84118e
0.00027788 ETH0.0051323610.45528813
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
199576762024-05-27 0:37:47100 days ago1716770267
0x3c6CE18a...0Db84118e
0.00023682 ETH
199341922024-05-23 17:52:35103 days ago1716486755
0x3c6CE18a...0Db84118e
0.00023648 ETH
199195822024-05-21 16:50:11105 days ago1716310211
0x3c6CE18a...0Db84118e
0.00030564 ETH
199147072024-05-21 0:28:59106 days ago1716251339
0x3c6CE18a...0Db84118e
0.00025124 ETH
198742462024-05-15 8:40:47112 days ago1715762447
0x3c6CE18a...0Db84118e
0.00037439 ETH
198280302024-05-08 21:30:59118 days ago1715203859
0x3c6CE18a...0Db84118e
0.0003048 ETH
198256972024-05-08 13:39:59118 days ago1715175599
0x3c6CE18a...0Db84118e
0.00036695 ETH
197953212024-05-04 7:42:47123 days ago1714808567
0x3c6CE18a...0Db84118e
0.00031864 ETH
197735752024-05-01 6:45:35126 days ago1714545935
0x3c6CE18a...0Db84118e
0.00036519 ETH
197691442024-04-30 15:53:23126 days ago1714492403
0x3c6CE18a...0Db84118e
0.00031355 ETH
197635282024-04-29 21:04:47127 days ago1714424687
0x3c6CE18a...0Db84118e
0.00029323 ETH
197345972024-04-25 19:53:59131 days ago1714074839
0x3c6CE18a...0Db84118e
0.00028297 ETH
197336922024-04-25 16:52:11131 days ago1714063931
0x3c6CE18a...0Db84118e
0.00028736 ETH
197284082024-04-24 23:08:23132 days ago1714000103
0x3c6CE18a...0Db84118e
0.0002832 ETH
197248792024-04-24 11:15:59132 days ago1713957359
0x3c6CE18a...0Db84118e
0.00344237 ETH
197197392024-04-23 17:59:47133 days ago1713895187
0x3c6CE18a...0Db84118e
0.00039852 ETH
197070702024-04-21 23:29:35135 days ago1713742175
0x3c6CE18a...0Db84118e
0.00030123 ETH
197034162024-04-21 11:15:11135 days ago1713698111
0x3c6CE18a...0Db84118e
0.00030134 ETH
196845762024-04-18 19:58:35138 days ago1713470315
0x3c6CE18a...0Db84118e
0.00036323 ETH
196754432024-04-17 13:18:47139 days ago1713359927
0x3c6CE18a...0Db84118e
0.00036323 ETH
196563692024-04-14 21:10:47142 days ago1713129047
0x3c6CE18a...0Db84118e
0.00029995 ETH
196539282024-04-14 12:59:23142 days ago1713099563
0x3c6CE18a...0Db84118e
0.00040392 ETH
196484142024-04-13 18:23:59143 days ago1713032639
0x3c6CE18a...0Db84118e
0.0003182 ETH
196466422024-04-13 12:26:47143 days ago1713011207
0x3c6CE18a...0Db84118e
0.0002776 ETH
196451982024-04-13 7:34:35144 days ago1712993675
0x3c6CE18a...0Db84118e
0.00027788 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MinterProxy

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 5000 runs

Other Settings:
paris EvmVersion, None license
File 1 of 20 : MinterProxy.sol
// SPDX-License-Identifier: LZBL-1.1
// Copyright 2023 LayerZero Labs Ltd.
// You may obtain a copy of the License at
// https://github.com/LayerZero-Labs/license/blob/main/LICENSE-LZBL-1.1

pragma solidity 0.8.19;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";

import "./interfaces/IMinterProxy.sol";
import "./interfaces/IToSTBTLp.sol";
import "./interfaces/IMinter.sol";
import "../../usdv/interfaces/IUSDV.sol";

/// @dev assume that any from/to tokens do not have transfer fee
contract MinterProxy is IMinterProxy, Ownable {
    using SafeERC20 for IERC20;
    using EnumerableSet for EnumerableSet.UintSet;

    address public immutable usdv;

    EnumerableSet.UintSet private minterCodeHashes;
    mapping(uint32 color => address minter) public colorToMinter;
    mapping(address minter => uint32 color) public minterToColor;

    address public toSTBTLp;

    constructor(address _usdv) {
        usdv = _usdv;
    }

    // ------------------ onlyOwner ------------------
    function addMinterCodeHash(uint _hash) external onlyOwner {
        if (minterCodeHashes.contains(_hash)) revert HashExists();
        minterCodeHashes.add(_hash);
        emit AddedMinterCodeHash(_hash);
    }

    function removeMinterCodeHash(uint _hash) external onlyOwner {
        if (!minterCodeHashes.contains(_hash)) revert HashNotExists();
        minterCodeHashes.remove(_hash);
        emit RemovedMinterCodeHash(_hash);
    }

    function registerMinter(address _minter) external onlyOwner {
        _validateMinterCode(_minter);

        IMinter minter = IMinter(_minter);
        if (minter.minterProxy() != address(this)) revert InvalidMinter();
        uint32 color = minter.color();

        if (minterToColor[_minter] != 0 || colorToMinter[color] != address(0)) revert MinterAlreadyRegistered();
        minterToColor[_minter] = color;
        colorToMinter[color] = _minter;

        emit RegisteredMinter(_minter, color);
    }

    function unregisterMinter(address _minter) external onlyOwner {
        uint32 color = minterToColor[_minter];
        if (color == 0) revert MinterNotRegistered(color);

        colorToMinter[color] = address(0);

        minterToColor[_minter] = 0;

        emit UnregisteredMinter(_minter, color);
    }

    function setToSTBTLp(address _toSTBTLp) external onlyOwner {
        toSTBTLp = _toSTBTLp;
        emit SetToSTBTLp(_toSTBTLp);
    }

    // ------------------ external ------------------
    function swapToUSDV(
        IMinter.SwapParam calldata _param,
        address _usdvReceiver,
        uint32 _mintColor
    ) external returns (uint usdvOut) {
        address minter = _getMinterFromColor(_mintColor);
        IERC20(_param.fromToken).safeTransferFrom(msg.sender, minter, _param.fromTokenAmount);
        usdvOut = IMinter(minter).swapToUSDV(msg.sender, toSTBTLp, _param, _usdvReceiver);
    }

    function swapToUSDVAndSend(
        IMinter.SwapParam calldata _param,
        bytes32 _usdvReceiver,
        uint32 _dstEid,
        bytes calldata _extraOptions,
        MessagingFee calldata _msgFee,
        address payable _refundAddress,
        uint32 _mintColor
    ) external payable returns (uint usdvOut) {
        address minter = _getMinterFromColor(_mintColor);

        IERC20(_param.fromToken).safeTransferFrom(msg.sender, minter, _param.fromTokenAmount);
        usdvOut = IMinter(minter).swapToUSDVAndSend{value: msg.value}(
            msg.sender,
            toSTBTLp,
            _param,
            _usdvReceiver,
            _dstEid,
            _extraOptions,
            _msgFee,
            _refundAddress
        );
    }

    function isRegistered(address _addr) external view returns (bool) {
        return minterToColor[_addr] != 0;
    }

    // ------------------ view ------------------
    function getSupportedFromTokens(uint32 _color) external view returns (address[] memory tokens) {
        address minter = _getMinterFromColor(_color);
        return IMinter(minter).getSupportedFromTokens(toSTBTLp);
    }

    function getSwapToUSDVAmountOut(
        address _fromToken,
        uint _fromTokenAmount,
        uint32 _mintColor
    ) external view returns (uint usdvOut) {
        address minter = _getMinterFromColor(_mintColor);
        return IMinter(minter).getSwapToUSDVAmountOut(toSTBTLp, _fromToken, _fromTokenAmount);
    }

    function getSwapToUSDVAmountOutVerbose(
        address _fromToken,
        uint _fromTokenAmount,
        uint32 _mintColor
    ) external view returns (uint usdvOut, uint fee, uint reward) {
        address minter = _getMinterFromColor(_mintColor);
        return IMinter(minter).getSwapToUSDVAmountOutVerbose(toSTBTLp, _fromToken, _fromTokenAmount);
    }

    function getMinterCodeHashes() external view returns (uint[] memory) {
        return minterCodeHashes.values();
    }

    // ------------------ internal ------------------
    function _getMinterFromColor(uint32 _color) internal view returns (address minter) {
        minter = colorToMinter[_color];
        if (minter == address(0)) revert MinterNotRegistered(_color);
        _validateMinterCode(minter);
    }

    // verify that the minter's CodeHash (using extcodehash) was added to whitelist
    function _validateMinterCode(address _addr) internal view {
        uint hash;
        assembly {
            hash := extcodehash(_addr)
        }
        if (!minterCodeHashes.contains(hash)) revert InvalidMinter();
    }
}

File 2 of 20 : IOFT.sol
// SPDX-License-Identifier: BUSL-1.1

pragma solidity ^0.8.0;

import {MessagingFee, MessagingReceipt} from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol";

// @dev unable to inherit ERC20 because the OFTAdapter needs to use this interface as well
interface IOFT {
    struct SendParam {
        bytes32 to;
        uint amountLD;
        uint minAmountLD;
        uint32 dstEid;
    }

    error LDMinusSD();
    error AmountSlippage(uint _amountLDSend, uint256 _minAmountLD);

    event SetInspector(address _inspector);
    event SendOFT(bytes32 indexed _guid, address indexed _fromAddress, uint _amountLD, bytes _composeMsg);
    event ReceiveOFT(bytes32 indexed _guid, address indexed _toAddress, uint _amountLD);

    function token() external view returns (address);

    function quoteSendFee(
        SendParam calldata _send,
        bytes calldata _options,
        bool _useLZToken,
        bytes calldata _composeMsg
    ) external view returns (uint nativeFee, uint lzTokenFee);

    function send(
        SendParam calldata _send,
        bytes calldata _options,
        MessagingFee calldata _msgFee,
        address payable _refundAddress,
        bytes calldata _composeMsg
    ) external payable returns (MessagingReceipt memory);
}

File 3 of 20 : MessagingStructs.sol
// SPDX-License-Identifier: BUSL-1.1

pragma solidity >=0.8.0;

struct PacketForQuote {
    address sender;
    uint32 dstEid;
    bytes message;
}

struct Packet {
    uint64 nonce;
    uint32 srcEid;
    address sender;
    uint32 dstEid;
    bytes32 receiver;
    bytes32 guid;
    bytes message;
}

struct Origin {
    uint32 srcEid;
    bytes32 sender;
    uint64 nonce;
}

File 4 of 20 : ILayerZeroEndpointV2.sol
// SPDX-License-Identifier: BUSL-1.1

pragma solidity >=0.8.0;

import "./IMessageLibManager.sol";
import "./IMessagingComposer.sol";
import "./IMessagingChannel.sol";
import "./IMessagingContext.sol";
import {Origin} from "../MessagingStructs.sol";

struct MessagingParams {
    uint32 dstEid;
    bytes32 receiver;
    bytes message;
    bytes options;
}

struct MessagingReceipt {
    bytes32 guid;
    uint64 nonce;
    MessagingFee fee;
}

struct MessagingFee {
    uint nativeFee;
    uint lzTokenFee;
}

interface ILayerZeroEndpointV2 is IMessageLibManager, IMessagingComposer, IMessagingChannel, IMessagingContext {
    event PacketSent(bytes encodedPayload, bytes options, address sendLibrary);

    event PacketDelivered(Origin origin, address receiver, bytes32 payloadHash);

    event PacketReceived(Origin origin, address receiver);

    event LzReceiveFailed(Origin origin, address receiver, bytes reason);

    event LayerZeroTokenSet(address token);

    function quote(
        address _sender,
        uint32 _dstEid,
        bytes calldata _message,
        bool _payInLzToken,
        bytes calldata _options
    ) external view returns (MessagingFee memory);

    function send(
        MessagingParams calldata _params,
        uint _lzTokenFee,
        address payable _refundAddress
    ) external payable returns (MessagingReceipt memory);

    function sendWithAlt(
        MessagingParams calldata _params,
        uint _lzTokenFee,
        uint _altTokenFee
    ) external returns (MessagingReceipt memory);

    function deliver(Origin calldata _origin, address _receiver, bytes32 _payloadHash) external;

    function deliverable(Origin calldata _origin, address _receiveLib, address _receiver) external view returns (bool);

    function lzReceive(
        Origin calldata _origin,
        address _receiver,
        bytes32 _guid,
        bytes calldata _message,
        bytes calldata _extraData
    ) external payable returns (bool, bytes memory);

    // oapp can burn messages partially by calling this function with its own business logic if messages are delivered in order
    function clear(Origin calldata _origin, bytes32 _guid, bytes calldata _message) external;

    function setLayerZeroToken(address _layerZeroToken) external;

    function layerZeroToken() external view returns (address);

    function altFeeToken() external view returns (address);
}

File 5 of 20 : IMessageLibManager.sol
// SPDX-License-Identifier: BUSL-1.1

pragma solidity >=0.8.0;

struct SetConfigParam {
    uint32 configType;
    bytes config;
}

interface IMessageLibManager {
    struct Timeout {
        address lib;
        uint expiry;
    }

    event LibraryRegistered(address newLib);
    event DefaultSendLibrarySet(uint32 eid, address newLib);
    event DefaultReceiveLibrarySet(uint32 eid, address oldLib, address newLib);
    event DefaultReceiveLibraryTimeoutSet(uint32 eid, address oldLib, uint expiry);
    event SendLibrarySet(address sender, uint32 eid, address newLib);
    event ReceiveLibrarySet(address receiver, uint32 eid, address oldLib, address newLib);
    event ReceiveLibraryTimoutSet(address receiver, uint32 eid, address oldLib, uint timeout);

    function registerLibrary(address _lib) external;

    function isRegisteredLibrary(address _lib) external view returns (bool);

    function getRegisteredLibraries() external view returns (address[] memory);

    function setDefaultSendLibrary(uint32 _eid, address _newLib) external;

    function defaultSendLibrary(uint32 _eid) external view returns (address);

    function setDefaultReceiveLibrary(uint32 _eid, address _newLib, uint _timeout) external;

    function defaultReceiveLibrary(uint32 _eid) external view returns (address);

    function setDefaultReceiveLibraryTimeout(uint32 _eid, address _lib, uint _expiry) external;

    function defaultReceiveLibraryTimeout(uint32 _eid) external view returns (address lib, uint expiry);

    function defaultConfig(address _lib, uint32 _eid, uint32 _configType) external view returns (bytes memory);

    function isSupportedEid(uint32 _eid) external view returns (bool);

    /// ------------------- OApp interfaces -------------------
    function setSendLibrary(uint32 _eid, address _newLib) external;

    function getSendLibrary(address _sender, uint32 _eid) external view returns (address lib);

    function isDefaultSendLibrary(address _sender, uint32 _eid) external view returns (bool);

    function setReceiveLibrary(uint32 _eid, address _newLib, uint _gracePeriod) external;

    function getReceiveLibrary(address _receiver, uint32 _eid) external view returns (address lib, bool isDefault);

    function setReceiveLibraryTimeout(uint32 _eid, address _lib, uint _gracePeriod) external;

    function receiveLibraryTimeout(address _receiver, uint32 _eid) external view returns (address lib, uint expiry);

    function setConfig(address _lib, uint32 _eid, SetConfigParam[] calldata _params) external;

    function getConfig(
        address _oapp,
        address _lib,
        uint32 _eid,
        uint32 _configType
    ) external view returns (bytes memory config, bool isDefault);

    function snapshotConfig(address _lib, uint32[] calldata _eids) external;

    function resetConfig(address _lib, uint32[] calldata _eids) external;
}

File 6 of 20 : IMessagingChannel.sol
// SPDX-License-Identifier: BUSL-1.1

pragma solidity >=0.8.0;

interface IMessagingChannel {
    event InboundNonceSkipped(uint32 srcEid, bytes32 sender, address receiver, uint64 nonce);

    function eid() external view returns (uint32);

    // this is an emergency function if a message can not be delivered for some reasons
    // required to provide _nextNonce to avoid race condition
    function skip(uint32 _srcEid, bytes32 _sender, uint64 _nonce) external;

    function nextGuid(address _sender, uint32 _dstEid, bytes32 _receiver) external view returns (bytes32);

    function inboundNonce(address _receiver, uint32 _srcEid, bytes32 _sender) external view returns (uint64);

    function outboundNonce(address _sender, uint32 _dstEid, bytes32 _receiver) external view returns (uint64);

    function inboundPayloadHash(
        address _receiver,
        uint32 _srcEid,
        bytes32 _sender,
        uint64 _nonce
    ) external view returns (bytes32);

    function hasPayloadHash(
        address _receiver,
        uint32 _srcEid,
        bytes32 _sender,
        uint64 _nonce
    ) external view returns (bool);
}

File 7 of 20 : IMessagingComposer.sol
// SPDX-License-Identifier: BUSL-1.1

pragma solidity >=0.8.0;

interface IMessagingComposer {
    event ComposedMessageDelivered(address receiver, address composer, bytes32 guid, bytes message);
    event ComposedMessageReceived(address receiver, address composer, bytes32 guid);
    event LzComposeFailed(address receiver, address composer, bytes32 guid, bytes reason);

    function deliverComposedMessage(address _composer, bytes32 _guid, bytes calldata _message) external;

    function lzCompose(
        address _receiver,
        address _composer,
        bytes32 _guid,
        bytes calldata _message,
        bytes calldata _extraData
    ) external payable returns (bool, bytes memory);
}

File 8 of 20 : IMessagingContext.sol
// SPDX-License-Identifier: BUSL-1.1

pragma solidity >=0.8.0;

interface IMessagingContext {
    function isSendingMessage() external view returns (bool);

    function getSendContext() external view returns (uint32, address);
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 10 of 20 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 12 of 20 : IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol)

pragma solidity ^0.8.0;

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

File 13 of 20 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../extensions/IERC20Permit.sol";
import "../../../utils/Address.sol";

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

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

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

    /**
     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 oldAllowance = token.allowance(address(this), spender);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    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");
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));
        }
    }

    /**
     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
     * to be set to zero before setting it to a non-zero value, such as USDT.
     */
    function forceApprove(IERC20 token, address spender, uint256 value) internal {
        bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);

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

    /**
     * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.
     * Revert on invalid signature.
     */
    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");
        require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation 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).
     *
     * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        // 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 cannot use {Address-functionCall} here since this should return false
        // and not revert is the subcall reverts.

        (bool success, bytes memory returndata) = address(token).call(data);
        return
            success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));
    }
}

File 14 of 20 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @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
     *
     * Furthermore, `isContract` will also return true if the target contract within
     * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
     * which only has an effect at the end of a transaction.
     * ====
     *
     * [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://consensys.net/diligence/blog/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.8.0/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 functionCallWithValue(target, data, 0, "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");
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, 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) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, 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) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or 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 {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // 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);
        }
    }
}

File 15 of 20 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

File 16 of 20 : EnumerableSet.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/structs/EnumerableSet.sol)
// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.

pragma solidity ^0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```solidity
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 *
 * [WARNING]
 * ====
 * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure
 * unusable.
 * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.
 *
 * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an
 * array of EnumerableSet.
 * ====
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;
        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping(bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) {
            // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            if (lastIndex != toDeleteIndex) {
                bytes32 lastValue = set._values[lastIndex];

                // Move the last value to the index where the value to delete is
                set._values[toDeleteIndex] = lastValue;
                // Update the index for the moved value
                set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex
            }

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        return set._values[index];
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function _values(Set storage set) private view returns (bytes32[] memory) {
        return set._values;
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
        bytes32[] memory store = _values(set._inner);
        bytes32[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(AddressSet storage set) internal view returns (address[] memory) {
        bytes32[] memory store = _values(set._inner);
        address[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(UintSet storage set) internal view returns (uint256[] memory) {
        bytes32[] memory store = _values(set._inner);
        uint256[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }
}

File 17 of 20 : IMinter.sol
// SPDX-License-Identifier: LZBL-1.1
// Copyright 2023 LayerZero Labs Ltd.
// You may obtain a copy of the License at
// https://github.com/LayerZero-Labs/license/blob/main/LICENSE-LZBL-1.1

pragma solidity ^0.8.0;

import {MessagingFee} from "@layerzerolabs/lz-evm-protocol-v2/contracts/interfaces/ILayerZeroEndpointV2.sol";

interface IMinter {
    struct SwapParam {
        address fromToken;
        uint fromTokenAmount;
        uint64 minUSDVOut;
    }

    error OnlyMinterProxy();
    error SlippageTooHigh();
    error ExceedsUInt64();
    error Blacklisted();
    error TokenNotSupported();

    event ApprovedToken(address toSTBTLp, address token);
    event DisapprovedToken(address toSTBTLp, address token);
    event BlacklistedUser(address user, bool blacklisted);
    event SetRewardToUserBps(uint16 bps);
    event WithdrawToken(address token, address to, uint amount);

    function swapToUSDV(
        address _sender,
        address _toSTBTLp,
        SwapParam calldata _param,
        address _usdvReceiver
    ) external returns (uint usdvOut);

    function swapToUSDVAndSend(
        address _sender,
        address _toSTBTLp,
        SwapParam calldata _param,
        bytes32 _usdvReceiver,
        uint32 _dstEid,
        bytes calldata _extraOptions,
        MessagingFee calldata _msgFee,
        address payable _refundAddress
    ) external payable returns (uint usdvOut);

    function getSwapToUSDVAmountOut(
        address _toSTBTLp,
        address _fromToken,
        uint _fromTokenAmount
    ) external view returns (uint usdvOut);

    function getSwapToUSDVAmountOutVerbose(
        address _toSTBTLp,
        address _fromToken,
        uint _fromTokenAmount
    ) external view returns (uint usdvOut, uint fee, uint reward);

    function getSupportedFromTokens(address _lp) external view returns (address[] memory tokens);

    function color() external view returns (uint32);

    function minterProxy() external view returns (address);
}

File 18 of 20 : IMinterProxy.sol
// SPDX-License-Identifier: LZBL-1.1
// Copyright 2023 LayerZero Labs Ltd.
// You may obtain a copy of the License at
// https://github.com/LayerZero-Labs/license/blob/main/LICENSE-LZBL-1.1

pragma solidity ^0.8.0;

interface IMinterProxy {
    error InvalidMinter();
    error MinterAlreadyRegistered();
    error MinterNotRegistered(uint32 color);
    error HashExists();
    error HashNotExists();

    event RegisteredMinter(address minter, uint32 color);
    event UnregisteredMinter(address minter, uint32 color);
    event SetToSTBTLp(address toSTBTLp);
    event AddedMinterCodeHash(uint hash);
    event RemovedMinterCodeHash(uint hash);

    function isRegistered(address _addr) external view returns (bool);

    function toSTBTLp() external view returns (address);

    function usdv() external view returns (address);
}

File 19 of 20 : IToSTBTLp.sol
// SPDX-License-Identifier: LZBL-1.1
// Copyright 2023 LayerZero Labs Ltd.
// You may obtain a copy of the License at
// https://github.com/LayerZero-Labs/license/blob/main/LICENSE-LZBL-1.1

pragma solidity ^0.8.0;

// lp contract for converting other stable coins to STBT
interface IToSTBTLp {
    function getSupportedTokens() external view returns (address[] memory tokens);

    function swapToSTBT(
        address _fromToken,
        uint _fromTokenAmount,
        uint _minStbtOut
    ) external returns (uint requestedOut, uint rewardOut);

    function getSwapToSTBTAmountOut(
        address _fromToken,
        uint _fromTokenAmount
    ) external view returns (uint requestedOut, uint rewardOut);
}

File 20 of 20 : IUSDV.sol
// SPDX-License-Identifier: LZBL-1.1
// Copyright 2023 LayerZero Labs Ltd.
// You may obtain a copy of the License at
// https://github.com/LayerZero-Labs/license/blob/main/LICENSE-LZBL-1.1

pragma solidity ^0.8.0;

import "@layerzerolabs/lz-evm-oapp-v2/contracts/standards/oft/interfaces/IOFT.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol";

struct Delta {
    uint32 color;
    int64 amount;
}

struct State {
    uint32 color;
    uint64 balance;
    // config
    bool blacklisted;
    uint32 defaultColor;
}

enum Role {
    OWNER,
    OPERATOR,
    VAULT,
    MESSAGING,
    FOUNDATION
}

interface IUSDV is IOFT, IERC20Upgradeable {
    error Unauthorized();
    error InvalidUser();
    error InvalidArgument();
    error NotImplemented();
    error InsufficientBalance();
    error Paused();
    error Blacklisted();
    error FeeTooHigh();

    // role assigment
    event SetRole(Role role, address addr);
    event SetColorer(address indexed caller, address indexed user, address colorer);
    event SetDefaultColor(address indexed caller, address indexed user, uint32 defaultColor);
    // governance state
    event SetBlacklist(address indexed user, bool isBlacklisted);
    event SetPause(bool paused);
    // cross-chain events
    event Synced(bytes32 guid, Delta[] deltas);

    function mint(address _receiver, uint64 _amount, uint32 _color) external;

    function burn(address _from, uint64 _amount, uint32[] calldata _delta) external returns (Delta[] memory deltas);

    /// -------- coloring interfaces --------
    function setColorer(address _user, address _colorer) external;

    function setDefaultColor(address _user, uint32 _defaultColor) external;

    /// -------- governance interfaces --------
    function setPause(bool _pause) external;

    function setRole(Role _role, address _addr) external;

    /// -------- cross-chain interfaces (non-OFT) --------
    function sendAck(bytes32 _guid, address _receiver, uint32 _color, uint64 _amount, uint64 _theta) external;

    function syncDelta(
        uint32 _dstEid,
        uint64 _theta,
        uint32[] calldata _deficits,
        uint64 _feeCap,
        bytes calldata _extraOptions,
        MessagingFee calldata _msgFee,
        address payable _refundAddress
    ) external payable returns (MessagingReceipt memory msgReceipt);

    function syncDeltaAck(Delta[] calldata _deltas) external;

    function quoteSyncDeltaFee(
        uint32 _dstEid,
        uint32 _numDeficits,
        bytes calldata _extraOptions,
        bool _useLzToken
    ) external view returns (uint nativeFee, uint lzTokenFee);

    function userStates(
        address _user
    ) external view returns (uint32 color, uint64 balance, bool blacklisted, uint32 defaultColor);
}

Settings
{
  "evmVersion": "paris",
  "libraries": {},
  "metadata": {
    "bytecodeHash": "ipfs",
    "useLiteralContent": true
  },
  "optimizer": {
    "enabled": true,
    "runs": 5000
  },
  "remappings": [],
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_usdv","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"HashExists","type":"error"},{"inputs":[],"name":"HashNotExists","type":"error"},{"inputs":[],"name":"InvalidMinter","type":"error"},{"inputs":[],"name":"MinterAlreadyRegistered","type":"error"},{"inputs":[{"internalType":"uint32","name":"color","type":"uint32"}],"name":"MinterNotRegistered","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"hash","type":"uint256"}],"name":"AddedMinterCodeHash","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":"minter","type":"address"},{"indexed":false,"internalType":"uint32","name":"color","type":"uint32"}],"name":"RegisteredMinter","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"hash","type":"uint256"}],"name":"RemovedMinterCodeHash","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"toSTBTLp","type":"address"}],"name":"SetToSTBTLp","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"minter","type":"address"},{"indexed":false,"internalType":"uint32","name":"color","type":"uint32"}],"name":"UnregisteredMinter","type":"event"},{"inputs":[{"internalType":"uint256","name":"_hash","type":"uint256"}],"name":"addMinterCodeHash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"color","type":"uint32"}],"name":"colorToMinter","outputs":[{"internalType":"address","name":"minter","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMinterCodeHashes","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_color","type":"uint32"}],"name":"getSupportedFromTokens","outputs":[{"internalType":"address[]","name":"tokens","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_fromToken","type":"address"},{"internalType":"uint256","name":"_fromTokenAmount","type":"uint256"},{"internalType":"uint32","name":"_mintColor","type":"uint32"}],"name":"getSwapToUSDVAmountOut","outputs":[{"internalType":"uint256","name":"usdvOut","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_fromToken","type":"address"},{"internalType":"uint256","name":"_fromTokenAmount","type":"uint256"},{"internalType":"uint32","name":"_mintColor","type":"uint32"}],"name":"getSwapToUSDVAmountOutVerbose","outputs":[{"internalType":"uint256","name":"usdvOut","type":"uint256"},{"internalType":"uint256","name":"fee","type":"uint256"},{"internalType":"uint256","name":"reward","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"isRegistered","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"minter","type":"address"}],"name":"minterToColor","outputs":[{"internalType":"uint32","name":"color","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"registerMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_hash","type":"uint256"}],"name":"removeMinterCodeHash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_toSTBTLp","type":"address"}],"name":"setToSTBTLp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"fromToken","type":"address"},{"internalType":"uint256","name":"fromTokenAmount","type":"uint256"},{"internalType":"uint64","name":"minUSDVOut","type":"uint64"}],"internalType":"struct IMinter.SwapParam","name":"_param","type":"tuple"},{"internalType":"address","name":"_usdvReceiver","type":"address"},{"internalType":"uint32","name":"_mintColor","type":"uint32"}],"name":"swapToUSDV","outputs":[{"internalType":"uint256","name":"usdvOut","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"fromToken","type":"address"},{"internalType":"uint256","name":"fromTokenAmount","type":"uint256"},{"internalType":"uint64","name":"minUSDVOut","type":"uint64"}],"internalType":"struct IMinter.SwapParam","name":"_param","type":"tuple"},{"internalType":"bytes32","name":"_usdvReceiver","type":"bytes32"},{"internalType":"uint32","name":"_dstEid","type":"uint32"},{"internalType":"bytes","name":"_extraOptions","type":"bytes"},{"components":[{"internalType":"uint256","name":"nativeFee","type":"uint256"},{"internalType":"uint256","name":"lzTokenFee","type":"uint256"}],"internalType":"struct MessagingFee","name":"_msgFee","type":"tuple"},{"internalType":"address payable","name":"_refundAddress","type":"address"},{"internalType":"uint32","name":"_mintColor","type":"uint32"}],"name":"swapToUSDVAndSend","outputs":[{"internalType":"uint256","name":"usdvOut","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"toSTBTLp","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"unregisterMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"usdv","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

60a060405234801561001057600080fd5b5060405162001b7638038062001b768339810160408190526100319161009b565b61003a3361004b565b6001600160a01b03166080526100cb565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156100ad57600080fd5b81516001600160a01b03811681146100c457600080fd5b9392505050565b608051611a8f620000e760003960006102b10152611a8f6000f3fe6080604052600436106101445760003560e01c8063a488d4d5116100c0578063d4affc0211610074578063f191a4c511610059578063f191a4c5146103e2578063f2fde38b14610402578063fca0bb491461042257600080fd5b8063d4affc02146103af578063e163a85c146103cf57600080fd5b8063c3c5a547116100a5578063c3c5a54714610313578063cfb7f83814610361578063d03b52c91461038157600080fd5b8063a488d4d5146102d3578063c1dc7eaa146102f357600080fd5b80636a7c91bc11610117578063834a20df116100fc578063834a20df146102615780638da5cb5b146102815780639420069c1461029f57600080fd5b80636a7c91bc1461021f578063715018a61461024c57600080fd5b806305d9c274146101495780631410bc771461017457806347230dcb146101af5780635da6adec146101d1575b600080fd5b34801561015557600080fd5b5061015e61046a565b60405161016b919061140b565b60405180910390f35b34801561018057600080fd5b5061019461018f366004611481565b61047b565b6040805193845260208401929092529082015260600161016b565b3480156101bb57600080fd5b506101cf6101ca3660046114c3565b610532565b005b3480156101dd57600080fd5b506102076101ec3660046114e0565b6003602052600090815260409020546001600160a01b031681565b6040516001600160a01b03909116815260200161016b565b34801561022b57600080fd5b5061023f61023a3660046114e0565b610796565b60405161016b91906114fd565b34801561025857600080fd5b506101cf610837565b34801561026d57600080fd5b506101cf61027c3660046114c3565b61084b565b34801561028d57600080fd5b506000546001600160a01b0316610207565b3480156102ab57600080fd5b506102077f000000000000000000000000000000000000000000000000000000000000000081565b3480156102df57600080fd5b50600554610207906001600160a01b031681565b3480156102ff57600080fd5b506101cf61030e3660046114c3565b61096d565b34801561031f57600080fd5b5061035161032e3660046114c3565b6001600160a01b031660009081526004602052604090205463ffffffff16151590565b604051901515815260200161016b565b34801561036d57600080fd5b506101cf61037c36600461153e565b6109e2565b34801561038d57600080fd5b506103a161039c366004611481565b610a68565b60405190815260200161016b565b3480156103bb57600080fd5b506101cf6103ca36600461153e565b610b15565b6103a16103dd36600461158c565b610b9a565b3480156103ee57600080fd5b506103a16103fd366004611662565b610c72565b34801561040e57600080fd5b506101cf61041d3660046114c3565b610d04565b34801561042e57600080fd5b5061045561043d3660046114c3565b60046020526000908152604090205463ffffffff1681565b60405163ffffffff909116815260200161016b565b60606104766001610d94565b905090565b60008060008061048a85610da1565b6005546040517f8097c71e0000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820152898216602482015260448101899052919250821690638097c71e90606401606060405180830381865afa1580156104fe573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061052291906116a1565b9350935093505093509350939050565b61053a610e0d565b61054381610e67565b6000819050306001600160a01b0316816001600160a01b0316631864ad916040518163ffffffff1660e01b8152600401602060405180830381865afa158015610590573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105b491906116da565b6001600160a01b0316146105f4576040517fd8d5894f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000816001600160a01b031663cf08fed56040518163ffffffff1660e01b8152600401602060405180830381865afa158015610634573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061065891906116f7565b6001600160a01b03841660009081526004602052604090205490915063ffffffff161515806106a4575063ffffffff81166000908152600360205260409020546001600160a01b031615155b156106db576040517f61accb9700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038316600081815260046020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff8716908117909155808452600383529281902080547fffffffffffffffffffffffff000000000000000000000000000000000000000016851790558051938452908301919091527f3f8bb08dc85aa0c36a46d4f018a3f307918e942dcefbfa563090550ac90c53f6910160405180910390a1505050565b606060006107a383610da1565b6005546040517fd01d5be80000000000000000000000000000000000000000000000000000000081526001600160a01b03918216600482015291925082169063d01d5be890602401600060405180830381865afa158015610808573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526108309190810190611743565b9392505050565b61083f610e0d565b6108496000610eae565b565b610853610e0d565b6001600160a01b03811660009081526004602052604081205463ffffffff16908190036108b9576040517f970324c800000000000000000000000000000000000000000000000000000000815263ffffffff821660048201526024015b60405180910390fd5b63ffffffff8116600081815260036020908152604080832080547fffffffffffffffffffffffff00000000000000000000000000000000000000001690556001600160a01b038616808452600483529281902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001690558051928352908201929092527fe30055a676de4a06fe7958182efa5e7690132196acf27756d7335f919c808182910160405180910390a15050565b610975610e0d565b600580547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040519081527f8b1e2b3ac1c57f54abdd5c99f0ac0f87f55c117154e27f9b874bc38525f8b6a5906020015b60405180910390a150565b6109ea610e0d565b6109f5600182610f16565b15610a2c576040517f309573ad00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610a37600182610f33565b506040518181527ff6927e49b2a5d01d7a74d35aadd35cec97ba37caa66bacc9350fd197df9d7f1d906020016109d7565b600080610a7483610da1565b6005546040517fd9db18df0000000000000000000000000000000000000000000000000000000081526001600160a01b03918216600482015287821660248201526044810187905291925082169063d9db18df90606401602060405180830381865afa158015610ae8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b0c9190611808565b95945050505050565b610b1d610e0d565b610b28600182610f16565b610b5e576040517f244fba4700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610b69600182610f3f565b506040518181527f326b878141557a8ed89c6c3ae82b0e327d3a68ace25706fbe5fa22097d1b5d06906020016109d7565b600080610ba683610da1565b9050610bcf338260208d01803590610bbe908f6114c3565b6001600160a01b0316929190610f4b565b806001600160a01b0316639272d5d03433600560009054906101000a90046001600160a01b03168e8e8e8e8e8e8e6040518b63ffffffff1660e01b8152600401610c2199989796959493929190611869565b60206040518083038185885af1158015610c3f573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610c649190611808565b9a9950505050505050505050565b600080610c7e83610da1565b9050610c96338260208801803590610bbe908a6114c3565b6005546040517f84a2f8200000000000000000000000000000000000000000000000000000000081526001600160a01b03808416926384a2f82092610ce592339216908a908a906004016118f3565b6020604051808303816000875af1158015610ae8573d6000803e3d6000fd5b610d0c610e0d565b6001600160a01b038116610d885760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016108b0565b610d9181610eae565b50565b6060600061083083610fd9565b63ffffffff81166000908152600360205260409020546001600160a01b031680610dff576040517f970324c800000000000000000000000000000000000000000000000000000000815263ffffffff831660048201526024016108b0565b610e0881610e67565b919050565b6000546001600160a01b031633146108495760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108b0565b803f610e74600182610f16565b610eaa576040517fd8d5894f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600081815260018301602052604081205415155b90505b92915050565b6000610f2a8383611035565b6000610f2a8383611084565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052610fd3908590611177565b50505050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561102957602002820191906000526020600020905b815481526020019060010190808311611015575b50505050509050919050565b600081815260018301602052604081205461107c57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610f2d565b506000610f2d565b6000818152600183016020526040812054801561116d5760006110a860018361192c565b85549091506000906110bc9060019061192c565b90508181146111215760008660000182815481106110dc576110dc611966565b90600052602060002001549050808760000184815481106110ff576110ff611966565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061113257611132611995565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610f2d565b6000915050610f2d565b60006111cc826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166112649092919063ffffffff16565b90508051600014806111ed5750808060200190518101906111ed91906119c4565b61125f5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016108b0565b505050565b6060611273848460008561127b565b949350505050565b6060824710156112f35760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016108b0565b600080866001600160a01b0316858760405161130f9190611a0a565b60006040518083038185875af1925050503d806000811461134c576040519150601f19603f3d011682016040523d82523d6000602084013e611351565b606091505b50915091506113628783838761136d565b979650505050505050565b606083156113dc5782516000036113d5576001600160a01b0385163b6113d55760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016108b0565b5081611273565b61127383838151156113f15781518083602001fd5b8060405162461bcd60e51b81526004016108b09190611a26565b6020808252825182820181905260009190848201906040850190845b8181101561144357835183529284019291840191600101611427565b50909695505050505050565b6001600160a01b0381168114610d9157600080fd5b63ffffffff81168114610d9157600080fd5b8035610e0881611464565b60008060006060848603121561149657600080fd5b83356114a18161144f565b92506020840135915060408401356114b881611464565b809150509250925092565b6000602082840312156114d557600080fd5b81356108308161144f565b6000602082840312156114f257600080fd5b813561083081611464565b6020808252825182820181905260009190848201906040850190845b818110156114435783516001600160a01b031683529284019291840191600101611519565b60006020828403121561155057600080fd5b5035919050565b60006060828403121561156957600080fd5b50919050565b60006040828403121561156957600080fd5b8035610e088161144f565b600080600080600080600080610140898b0312156115a957600080fd5b6115b38a8a611557565b97506060890135965060808901356115ca81611464565b955060a089013567ffffffffffffffff808211156115e757600080fd5b818b0191508b601f8301126115fb57600080fd5b81358181111561160a57600080fd5b8c602082850101111561161c57600080fd5b6020830197508096505050506116358a60c08b0161156f565b92506116446101008a01611581565b91506116536101208a01611476565b90509295985092959890939650565b600080600060a0848603121561167757600080fd5b6116818585611557565b925060608401356116918161144f565b915060808401356114b881611464565b6000806000606084860312156116b657600080fd5b8351925060208401519150604084015190509250925092565b8051610e088161144f565b6000602082840312156116ec57600080fd5b81516108308161144f565b60006020828403121561170957600080fd5b815161083081611464565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000602080838503121561175657600080fd5b825167ffffffffffffffff8082111561176e57600080fd5b818501915085601f83011261178257600080fd5b81518181111561179457611794611714565b8060051b604051601f19603f830116810181811085821117156117b9576117b9611714565b6040529182528482019250838101850191888311156117d757600080fd5b938501935b828510156117fc576117ed856116cf565b845293850193928501926117dc565b98975050505050505050565b60006020828403121561181a57600080fd5b5051919050565b803561182c8161144f565b6001600160a01b0316825260208181013590830152604081013567ffffffffffffffff811680821461185d57600080fd5b80604085015250505050565b6001600160a01b038a8116825289166020820152600061016061188f604084018b611821565b8860a084015263ffffffff881660c08401528060e08401528581840152506101808587828501376000868401820152843561010084015260208501356101208401526001600160a01b038416610140840152601f8601601f19168301019050610c64565b6001600160a01b038581168252848116602083015260c082019061191a6040840186611821565b80841660a08401525095945050505050565b81810381811115610f2d577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6000602082840312156119d657600080fd5b8151801515811461083057600080fd5b60005b83811015611a015781810151838201526020016119e9565b50506000910152565b60008251611a1c8184602087016119e6565b9190910192915050565b6020815260008251806020840152611a458160408501602087016119e6565b601f01601f1916919091016040019291505056fea2646970667358221220022d8778c3a40be6d2feab35139caae571018099c368e57bfdb166e53fd40c3164736f6c634300081300330000000000000000000000000e573ce2736dd9637a0b21058352e1667925c7a8

Deployed Bytecode

0x6080604052600436106101445760003560e01c8063a488d4d5116100c0578063d4affc0211610074578063f191a4c511610059578063f191a4c5146103e2578063f2fde38b14610402578063fca0bb491461042257600080fd5b8063d4affc02146103af578063e163a85c146103cf57600080fd5b8063c3c5a547116100a5578063c3c5a54714610313578063cfb7f83814610361578063d03b52c91461038157600080fd5b8063a488d4d5146102d3578063c1dc7eaa146102f357600080fd5b80636a7c91bc11610117578063834a20df116100fc578063834a20df146102615780638da5cb5b146102815780639420069c1461029f57600080fd5b80636a7c91bc1461021f578063715018a61461024c57600080fd5b806305d9c274146101495780631410bc771461017457806347230dcb146101af5780635da6adec146101d1575b600080fd5b34801561015557600080fd5b5061015e61046a565b60405161016b919061140b565b60405180910390f35b34801561018057600080fd5b5061019461018f366004611481565b61047b565b6040805193845260208401929092529082015260600161016b565b3480156101bb57600080fd5b506101cf6101ca3660046114c3565b610532565b005b3480156101dd57600080fd5b506102076101ec3660046114e0565b6003602052600090815260409020546001600160a01b031681565b6040516001600160a01b03909116815260200161016b565b34801561022b57600080fd5b5061023f61023a3660046114e0565b610796565b60405161016b91906114fd565b34801561025857600080fd5b506101cf610837565b34801561026d57600080fd5b506101cf61027c3660046114c3565b61084b565b34801561028d57600080fd5b506000546001600160a01b0316610207565b3480156102ab57600080fd5b506102077f0000000000000000000000000e573ce2736dd9637a0b21058352e1667925c7a881565b3480156102df57600080fd5b50600554610207906001600160a01b031681565b3480156102ff57600080fd5b506101cf61030e3660046114c3565b61096d565b34801561031f57600080fd5b5061035161032e3660046114c3565b6001600160a01b031660009081526004602052604090205463ffffffff16151590565b604051901515815260200161016b565b34801561036d57600080fd5b506101cf61037c36600461153e565b6109e2565b34801561038d57600080fd5b506103a161039c366004611481565b610a68565b60405190815260200161016b565b3480156103bb57600080fd5b506101cf6103ca36600461153e565b610b15565b6103a16103dd36600461158c565b610b9a565b3480156103ee57600080fd5b506103a16103fd366004611662565b610c72565b34801561040e57600080fd5b506101cf61041d3660046114c3565b610d04565b34801561042e57600080fd5b5061045561043d3660046114c3565b60046020526000908152604090205463ffffffff1681565b60405163ffffffff909116815260200161016b565b60606104766001610d94565b905090565b60008060008061048a85610da1565b6005546040517f8097c71e0000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820152898216602482015260448101899052919250821690638097c71e90606401606060405180830381865afa1580156104fe573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061052291906116a1565b9350935093505093509350939050565b61053a610e0d565b61054381610e67565b6000819050306001600160a01b0316816001600160a01b0316631864ad916040518163ffffffff1660e01b8152600401602060405180830381865afa158015610590573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105b491906116da565b6001600160a01b0316146105f4576040517fd8d5894f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000816001600160a01b031663cf08fed56040518163ffffffff1660e01b8152600401602060405180830381865afa158015610634573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061065891906116f7565b6001600160a01b03841660009081526004602052604090205490915063ffffffff161515806106a4575063ffffffff81166000908152600360205260409020546001600160a01b031615155b156106db576040517f61accb9700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038316600081815260046020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff8716908117909155808452600383529281902080547fffffffffffffffffffffffff000000000000000000000000000000000000000016851790558051938452908301919091527f3f8bb08dc85aa0c36a46d4f018a3f307918e942dcefbfa563090550ac90c53f6910160405180910390a1505050565b606060006107a383610da1565b6005546040517fd01d5be80000000000000000000000000000000000000000000000000000000081526001600160a01b03918216600482015291925082169063d01d5be890602401600060405180830381865afa158015610808573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526108309190810190611743565b9392505050565b61083f610e0d565b6108496000610eae565b565b610853610e0d565b6001600160a01b03811660009081526004602052604081205463ffffffff16908190036108b9576040517f970324c800000000000000000000000000000000000000000000000000000000815263ffffffff821660048201526024015b60405180910390fd5b63ffffffff8116600081815260036020908152604080832080547fffffffffffffffffffffffff00000000000000000000000000000000000000001690556001600160a01b038616808452600483529281902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001690558051928352908201929092527fe30055a676de4a06fe7958182efa5e7690132196acf27756d7335f919c808182910160405180910390a15050565b610975610e0d565b600580547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040519081527f8b1e2b3ac1c57f54abdd5c99f0ac0f87f55c117154e27f9b874bc38525f8b6a5906020015b60405180910390a150565b6109ea610e0d565b6109f5600182610f16565b15610a2c576040517f309573ad00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610a37600182610f33565b506040518181527ff6927e49b2a5d01d7a74d35aadd35cec97ba37caa66bacc9350fd197df9d7f1d906020016109d7565b600080610a7483610da1565b6005546040517fd9db18df0000000000000000000000000000000000000000000000000000000081526001600160a01b03918216600482015287821660248201526044810187905291925082169063d9db18df90606401602060405180830381865afa158015610ae8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b0c9190611808565b95945050505050565b610b1d610e0d565b610b28600182610f16565b610b5e576040517f244fba4700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610b69600182610f3f565b506040518181527f326b878141557a8ed89c6c3ae82b0e327d3a68ace25706fbe5fa22097d1b5d06906020016109d7565b600080610ba683610da1565b9050610bcf338260208d01803590610bbe908f6114c3565b6001600160a01b0316929190610f4b565b806001600160a01b0316639272d5d03433600560009054906101000a90046001600160a01b03168e8e8e8e8e8e8e6040518b63ffffffff1660e01b8152600401610c2199989796959493929190611869565b60206040518083038185885af1158015610c3f573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610c649190611808565b9a9950505050505050505050565b600080610c7e83610da1565b9050610c96338260208801803590610bbe908a6114c3565b6005546040517f84a2f8200000000000000000000000000000000000000000000000000000000081526001600160a01b03808416926384a2f82092610ce592339216908a908a906004016118f3565b6020604051808303816000875af1158015610ae8573d6000803e3d6000fd5b610d0c610e0d565b6001600160a01b038116610d885760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016108b0565b610d9181610eae565b50565b6060600061083083610fd9565b63ffffffff81166000908152600360205260409020546001600160a01b031680610dff576040517f970324c800000000000000000000000000000000000000000000000000000000815263ffffffff831660048201526024016108b0565b610e0881610e67565b919050565b6000546001600160a01b031633146108495760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108b0565b803f610e74600182610f16565b610eaa576040517fd8d5894f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600081815260018301602052604081205415155b90505b92915050565b6000610f2a8383611035565b6000610f2a8383611084565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052610fd3908590611177565b50505050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561102957602002820191906000526020600020905b815481526020019060010190808311611015575b50505050509050919050565b600081815260018301602052604081205461107c57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610f2d565b506000610f2d565b6000818152600183016020526040812054801561116d5760006110a860018361192c565b85549091506000906110bc9060019061192c565b90508181146111215760008660000182815481106110dc576110dc611966565b90600052602060002001549050808760000184815481106110ff576110ff611966565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061113257611132611995565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610f2d565b6000915050610f2d565b60006111cc826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166112649092919063ffffffff16565b90508051600014806111ed5750808060200190518101906111ed91906119c4565b61125f5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016108b0565b505050565b6060611273848460008561127b565b949350505050565b6060824710156112f35760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016108b0565b600080866001600160a01b0316858760405161130f9190611a0a565b60006040518083038185875af1925050503d806000811461134c576040519150601f19603f3d011682016040523d82523d6000602084013e611351565b606091505b50915091506113628783838761136d565b979650505050505050565b606083156113dc5782516000036113d5576001600160a01b0385163b6113d55760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016108b0565b5081611273565b61127383838151156113f15781518083602001fd5b8060405162461bcd60e51b81526004016108b09190611a26565b6020808252825182820181905260009190848201906040850190845b8181101561144357835183529284019291840191600101611427565b50909695505050505050565b6001600160a01b0381168114610d9157600080fd5b63ffffffff81168114610d9157600080fd5b8035610e0881611464565b60008060006060848603121561149657600080fd5b83356114a18161144f565b92506020840135915060408401356114b881611464565b809150509250925092565b6000602082840312156114d557600080fd5b81356108308161144f565b6000602082840312156114f257600080fd5b813561083081611464565b6020808252825182820181905260009190848201906040850190845b818110156114435783516001600160a01b031683529284019291840191600101611519565b60006020828403121561155057600080fd5b5035919050565b60006060828403121561156957600080fd5b50919050565b60006040828403121561156957600080fd5b8035610e088161144f565b600080600080600080600080610140898b0312156115a957600080fd5b6115b38a8a611557565b97506060890135965060808901356115ca81611464565b955060a089013567ffffffffffffffff808211156115e757600080fd5b818b0191508b601f8301126115fb57600080fd5b81358181111561160a57600080fd5b8c602082850101111561161c57600080fd5b6020830197508096505050506116358a60c08b0161156f565b92506116446101008a01611581565b91506116536101208a01611476565b90509295985092959890939650565b600080600060a0848603121561167757600080fd5b6116818585611557565b925060608401356116918161144f565b915060808401356114b881611464565b6000806000606084860312156116b657600080fd5b8351925060208401519150604084015190509250925092565b8051610e088161144f565b6000602082840312156116ec57600080fd5b81516108308161144f565b60006020828403121561170957600080fd5b815161083081611464565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000602080838503121561175657600080fd5b825167ffffffffffffffff8082111561176e57600080fd5b818501915085601f83011261178257600080fd5b81518181111561179457611794611714565b8060051b604051601f19603f830116810181811085821117156117b9576117b9611714565b6040529182528482019250838101850191888311156117d757600080fd5b938501935b828510156117fc576117ed856116cf565b845293850193928501926117dc565b98975050505050505050565b60006020828403121561181a57600080fd5b5051919050565b803561182c8161144f565b6001600160a01b0316825260208181013590830152604081013567ffffffffffffffff811680821461185d57600080fd5b80604085015250505050565b6001600160a01b038a8116825289166020820152600061016061188f604084018b611821565b8860a084015263ffffffff881660c08401528060e08401528581840152506101808587828501376000868401820152843561010084015260208501356101208401526001600160a01b038416610140840152601f8601601f19168301019050610c64565b6001600160a01b038581168252848116602083015260c082019061191a6040840186611821565b80841660a08401525095945050505050565b81810381811115610f2d577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6000602082840312156119d657600080fd5b8151801515811461083057600080fd5b60005b83811015611a015781810151838201526020016119e9565b50506000910152565b60008251611a1c8184602087016119e6565b9190910192915050565b6020815260008251806020840152611a458160408501602087016119e6565b601f01601f1916919091016040019291505056fea2646970667358221220022d8778c3a40be6d2feab35139caae571018099c368e57bfdb166e53fd40c3164736f6c63430008130033

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

0000000000000000000000000e573ce2736dd9637a0b21058352e1667925c7a8

-----Decoded View---------------
Arg [0] : _usdv (address): 0x0E573Ce2736Dd9637A0b21058352e1667925C7a8

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000000e573ce2736dd9637a0b21058352e1667925c7a8


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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