POL Price: $0.598868 (-2.87%)
 

Overview

POL Balance

Polygon PoS Chain LogoPolygon PoS Chain LogoPolygon PoS Chain Logo0 POL

POL Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Create170466502021-07-19 21:22:431246 days ago1626729763IN
0x9503c64F...9567CAaCb
0 POL0.00037648
Withdraw Token170457452021-07-19 20:51:311246 days ago1626727891IN
0x9503c64F...9567CAaCb
0 POL0.000035121
Create170455652021-07-19 20:45:191246 days ago1626727519IN
0x9503c64F...9567CAaCb
0 POL0.000047111
Complete Order170455522021-07-19 20:44:531246 days ago1626727493IN
0x9503c64F...9567CAaCb
0 POL0.0017737617.76
Withdraw170453772021-07-19 20:38:551246 days ago1626727135IN
0x9503c64F...9567CAaCb
0 POL0.000368997
Withdraw170453752021-07-19 20:38:471246 days ago1626727127IN
0x9503c64F...9567CAaCb
0 POL0.000454047
Withdraw170453712021-07-19 20:38:391246 days ago1626727119IN
0x9503c64F...9567CAaCb
0 POL0.000351787
Create170453372021-07-19 20:37:311246 days ago1626727051IN
0x9503c64F...9567CAaCb
0 POL0.000188244
Set Default Max ...170453372021-07-19 20:37:311246 days ago1626727051IN
0x9503c64F...9567CAaCb
0 POL0.000158637
Set Default Max ...170453342021-07-19 20:37:251246 days ago1626727045IN
0x9503c64F...9567CAaCb
0 POL0.000194277
Complete Order170453342021-07-19 20:37:251246 days ago1626727045IN
0x9503c64F...9567CAaCb
0 POL0.0086844688.8
Set Default Max ...170453302021-07-19 20:37:171246 days ago1626727037IN
0x9503c64F...9567CAaCb
0 POL0.000143247
Complete Order170452762021-07-19 20:34:151246 days ago1626726855IN
0x9503c64F...9567CAaCb
0 POL0.0024911417.76
Close Order170452372021-07-19 20:31:551246 days ago1626726715IN
0x9503c64F...9567CAaCb
0 POL0.0003208116
Create170452232021-07-19 20:31:271246 days ago1626726687IN
0x9503c64F...9567CAaCb
0 POL0.0181994460
Create170452122021-07-19 20:31:051246 days ago1626726665IN
0x9503c64F...9567CAaCb
0 POL0.000635412.22
Close Order170452052021-07-19 20:30:511246 days ago1626726651IN
0x9503c64F...9567CAaCb
0 POL0.0007122135.52
Close Order170451992021-07-19 20:30:391246 days ago1626726639IN
0x9503c64F...9567CAaCb
0 POL0.0007122135.52
Complete Order170451992021-07-19 20:30:391246 days ago1626726639IN
0x9503c64F...9567CAaCb
0 POL0.0034737835.52
Complete Order170451922021-07-19 20:30:251246 days ago1626726625IN
0x9503c64F...9567CAaCb
0 POL0.0031287632
Complete Order170451842021-07-19 20:30:091246 days ago1626726609IN
0x9503c64F...9567CAaCb
0 POL0.0030970326.96031936
Create170451642021-07-19 20:29:251246 days ago1626726565IN
0x9503c64F...9567CAaCb
0 POL0.000271261
Create170451302021-07-19 20:28:171246 days ago1626726497IN
0x9503c64F...9567CAaCb
0 POL0.000827763
Complete Order170451052021-07-19 20:27:231246 days ago1626726443IN
0x9503c64F...9567CAaCb
0 POL0.0018381716
Complete Order170450982021-07-19 20:27:091246 days ago1626726429IN
0x9503c64F...9567CAaCb
0 POL0.0025141521.8816
View all transactions

Latest 25 internal transactions (View All)

Parent Transaction Hash Block From To
170457452021-07-19 20:51:311246 days ago1626727891
0x9503c64F...9567CAaCb
7.41 POL
170455522021-07-19 20:44:531246 days ago1626727493
0x9503c64F...9567CAaCb
0.001 POL
170453342021-07-19 20:37:251246 days ago1626727045
0x9503c64F...9567CAaCb
0.001 POL
170452762021-07-19 20:34:151246 days ago1626726855
0x9503c64F...9567CAaCb
0.001 POL
170451992021-07-19 20:30:391246 days ago1626726639
0x9503c64F...9567CAaCb
0.001 POL
170451922021-07-19 20:30:251246 days ago1626726625
0x9503c64F...9567CAaCb
0.001 POL
170451842021-07-19 20:30:091246 days ago1626726609
0x9503c64F...9567CAaCb
0.001 POL
170451052021-07-19 20:27:231246 days ago1626726443
0x9503c64F...9567CAaCb
0.001 POL
170450982021-07-19 20:27:091246 days ago1626726429
0x9503c64F...9567CAaCb
0.001 POL
170450952021-07-19 20:27:031246 days ago1626726423
0x9503c64F...9567CAaCb
0.001 POL
170450552021-07-19 20:25:391246 days ago1626726339
0x9503c64F...9567CAaCb
0.001 POL
170450152021-07-19 20:24:191246 days ago1626726259
0x9503c64F...9567CAaCb
0.001 POL
170449092021-07-19 20:20:391246 days ago1626726039
0x9503c64F...9567CAaCb
0.001 POL
170448392021-07-19 20:18:151246 days ago1626725895
0x9503c64F...9567CAaCb
0.001 POL
170448322021-07-19 20:18:011246 days ago1626725881
0x9503c64F...9567CAaCb
0.001 POL
170447762021-07-19 20:16:051246 days ago1626725765
0x9503c64F...9567CAaCb
0.001 POL
170447132021-07-19 20:13:551246 days ago1626725635
0x9503c64F...9567CAaCb
0.001 POL
170447042021-07-19 20:13:371246 days ago1626725617
0x9503c64F...9567CAaCb
0.001 POL
170446172021-07-19 20:10:391246 days ago1626725439
0x9503c64F...9567CAaCb
0.001 POL
170445162021-07-19 20:07:071246 days ago1626725227
0x9503c64F...9567CAaCb
0.001 POL
170444742021-07-19 20:05:391246 days ago1626725139
0x9503c64F...9567CAaCb
0.001 POL
170444502021-07-19 20:04:511246 days ago1626725091
0x9503c64F...9567CAaCb
0.001 POL
170444482021-07-19 20:04:471246 days ago1626725087
0x9503c64F...9567CAaCb
0.001 POL
170444382021-07-19 20:04:271246 days ago1626725067
0x9503c64F...9567CAaCb
0.001 POL
170443502021-07-19 20:01:211246 days ago1626724881
0x9503c64F...9567CAaCb
0.001 POL
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Bridge

Compiler Version
v0.8.6+commit.11564f7e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 11 : Bridge.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.6;

import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import "@openzeppelin/contracts/utils/math/Math.sol";

import "./IBridgeSwap.sol";
import "./Trustable.sol";

contract Bridge is Trustable {
    using EnumerableSet for EnumerableSet.UintSet;
    using SafeERC20 for ERC20;

    struct Order {
        uint id;
        uint8 tokenId;
        address sender;
        bytes32 target;
        uint amount;
        uint feeAmount;
        uint8 decimals;
        uint8 destination;
        address tokenIn;
        bytes32 tokenOut;
    }

    struct Token {
        ERC20 token;
        address feeTarget;
        uint16 defaultFee;
        uint defaultFeeBase;
        uint defaultMinAmount;
        uint defaultMaxAmount;
        uint bonus;
    }

    struct Config {
        uint16 fee;
        uint feeBase;
        uint minAmount;
        uint maxAmount;
        bool directTransferAllowed;
    }

    struct CompleteParams {
        uint orderId;
        uint8 dstFrom;
        uint8 tokenId;
        address payable to;
        uint amount;
        uint decimals;
        ERC20 tokenOut;
        address[] swapPath;
    }

    event OrderCreated(uint indexed id, Order order);
    event OrderCompleted(uint indexed id, uint8 indexed dstFrom);

    uint nextOrderId = 0;
    uint8 tokensLength = 0;
    uint8 nativeTokenId = 255;

    // swap settings
    IBridgeSwap public swapper;
    bool public swapsAllowed = false;
    uint8 public swapDefaultTokenId = 0;

    mapping (uint8 => Token) public tokens;
    mapping (address => uint8) public addresses;
    mapping (uint8 => mapping (uint8 => Config)) public configs;
    mapping (uint => Order) public orders;
    EnumerableSet.UintSet private orderIds;
    mapping (bytes32 => bool) public completed;

    function setToken(
        uint8 tokenId,
        ERC20 token,
        address feeTarget,
        uint16 defaultFee,
        uint defaultFeeBase,
        uint defaultMinAmount,
        uint defaultMaxAmount,
        uint8 inputDecimals,
        uint bonus
    ) external onlyOwner {
        require(defaultFee <= 10000, "invalid fee");
        tokens[tokenId] = Token(
            token,
            feeTarget,
            defaultFee,
            convertAmount(token, defaultFeeBase, inputDecimals),
            convertAmount(token, defaultMinAmount, inputDecimals),
            convertAmount(token, defaultMaxAmount, inputDecimals),
            bonus
        );
        addresses[address(token)] = tokenId;

        if (tokenId + 1 > tokensLength) {
            tokensLength = tokenId + 1;
        }
    }

    function setFeeTarget(uint8 tokenId, address feeTarget) external onlyOwner {
        tokens[tokenId].feeTarget = feeTarget;
    }

    function setDefaultFee(uint8 tokenId, uint16 defaultFee) external onlyOwner {
        require(defaultFee <= 10000, "invalid fee");
        tokens[tokenId].defaultFee = defaultFee;
    }

    function setDefaultFeeBase(uint8 tokenId, uint defaultFeeBase, uint8 inputDecimals) external onlyOwner {
        tokens[tokenId].defaultFeeBase = convertAmount(tokens[tokenId].token, defaultFeeBase, inputDecimals);
    }

    function setDefaultMinAmount(uint8 tokenId, uint defaultMinAmount, uint8 inputDecimals) external onlyOwner {
        tokens[tokenId].defaultMinAmount = convertAmount(tokens[tokenId].token, defaultMinAmount, inputDecimals);
    }

    function setDefaultMaxAmount(uint8 tokenId, uint defaultMaxAmount, uint8 inputDecimals) external onlyOwner {
        tokens[tokenId].defaultMaxAmount = convertAmount(tokens[tokenId].token, defaultMaxAmount, inputDecimals);
    }

    function setBonus(uint8 tokenId, uint bonus) external onlyOwner {
        tokens[tokenId].bonus = bonus;
    }

    function setFee(uint8 tokenId, uint8 destination, uint16 fee) external onlyOwner {
        require(fee <= 10000, "invalid fee");
        configs[tokenId][destination].fee = fee;
    }

    function setFeeBase(uint8 tokenId, uint8 destination, uint feeBase, uint8 inputDecimals) external onlyOwner {
        configs[tokenId][destination].feeBase = convertAmount(tokens[tokenId].token, feeBase, inputDecimals);
    }

    function setMinAmount(uint8 tokenId, uint8 destination, uint minAmount, uint8 inputDecimals) external onlyOwner {
        configs[tokenId][destination].minAmount = convertAmount(tokens[tokenId].token, minAmount, inputDecimals);
    }

    function setMaxAmount(uint8 tokenId, uint8 destination, uint maxAmount, uint8 inputDecimals) external onlyOwner {
        configs[tokenId][destination].maxAmount = convertAmount(tokens[tokenId].token, maxAmount, inputDecimals);
    }

    function setDirectTransferAllowed(uint8 tokenId, uint8 destination, bool directTransferAllowed) external onlyOwner {
        configs[tokenId][destination].directTransferAllowed = directTransferAllowed;
    }

    function setConfig(uint8 tokenId, uint8 destination, Config calldata config) external onlyOwner {
        configs[tokenId][destination] = config;
    }

    function setSwapper(IBridgeSwap newSwapper) external onlyOwner {
        swapper = newSwapper;
    }

    function setSwapSettings(bool allowed, uint8 tokenId) external onlyOwner {
        swapsAllowed = allowed;
        swapDefaultTokenId = tokenId;
    }

    function createWithSwap(
        ERC20 tokenIn,
        uint amount,
        uint8 destination,
        bytes32 target,
        bytes32 tokenOut,
        address[] calldata swapPath
    ) external payable {
        require(swapsAllowed && address(swapper) != address(0), "swaps currently disabled");

        // collect user tokens
        if (address(tokenIn) == address(1)) {
            require (amount == msg.value, "native token amount must be equal amount parameter");
        } else {
            tokenIn.safeTransferFrom(msg.sender, address(this), amount);
        }

        // default transfer token
        uint8 tokenId = swapDefaultTokenId;

        // checking for direct transfer allowed
        uint8 tokenInId = addresses[address(tokenIn)];
        if (tokens[tokenInId].token == tokenIn && configs[tokenInId][destination].directTransferAllowed) {
            tokenId = tokenInId;
        }

        // transfer token
        Token memory tok = tokens[tokenId];

        // swap user tokens if need
        if (tok.token != tokenIn) {
            if (address(tok.token) == address(1)) {
                amount = swapper.swapFromNative{ value: amount }(tokens[tokenId].token, address(this), swapPath);
            } else {
                tokenIn.approve(address(swapper), amount);
                amount = swapper.swap(tokenIn, amount, tokens[tokenId].token, address(this), swapPath);
            }
        }

        require(checkAmount(tokenId, destination, amount), "amount must be in allowed range");

        uint feeAmount = transferFee(tokenId, destination, amount);

        orders[nextOrderId] = Order(
            nextOrderId,
            tokenId,
            msg.sender,
            target,
            amount - feeAmount,
            feeAmount,
            tokenDecimals(tokens[tokenId].token),
            destination,
            address(tokenIn),
            tokenOut
        );
        orderIds.add(nextOrderId);

        emit OrderCreated(nextOrderId, orders[nextOrderId]);
        nextOrderId++;
    }

    function create(uint8 tokenId, uint amount, uint8 destination, bytes32 target) public payable {
        Token storage tok = tokens[tokenId];
        require(address(tok.token) != address(0), "unknown token");

        require(checkAmount(tokenId, destination, amount), "amount must be in allowed range");

        if (address(tok.token) == address(1)) {
            require (amount == msg.value, "native token amount must be equal amount parameter");
        } else {
            tok.token.safeTransferFrom(msg.sender, address(this), amount);
        }

        uint feeAmount = transferFee(tokenId, destination, amount);

        orders[nextOrderId] = Order(
            nextOrderId,
            tokenId,
            msg.sender,
            target,
            amount - feeAmount,
            feeAmount,
            tokenDecimals(tok.token),
            destination,
            address(0),
            bytes32(0)
        );
        orderIds.add(nextOrderId);

        emit OrderCreated(nextOrderId, orders[nextOrderId]);
        nextOrderId++;
    }

    function closeOrder(uint orderId) external onlyTrusted {
        orderIds.remove(orderId);
    }

    function closeManyOrders(uint[] calldata _orderIds) external onlyTrusted {
        for (uint i = 0; i < _orderIds.length; i++) {
            orderIds.remove(_orderIds[i]);
        }
    }

    function completeOrder(
        uint orderId,
        uint8 dstFrom,
        uint8 tokenId,
        address payable to,
        uint amount,
        uint decimals,
        ERC20 tokenOut,
        address[] calldata swapPath
    ) public onlyTrusted {
        bytes32 orderHash = keccak256(abi.encodePacked(orderId, dstFrom));
        require (completed[orderHash] == false, "already transfered");
        require (!Address.isContract(to), "contract targets not supported");

        Token storage tok = tokens[tokenId];
        require(address(tok.token) != address(0), "unknown token");

        amount = convertAmount(tok.token, amount, decimals);

        if (address(tokenOut) != address(0) && tok.token != tokenOut) {
            if (address(tokenOut) == address(1)) {
                swapper.swapToNative(tok.token, amount, to, swapPath);
            } else {
                tok.token.approve(address(swapper), amount);
                swapper.swap(tok.token, amount, tokenOut, to, swapPath);
            }
        } else if (address(tok.token) == address(1)) {
            to.transfer(amount);
        } else {
            tok.token.safeTransfer(to, amount);
        }

        completed[orderHash] = true;

        uint bonus = Math.min(tok.bonus, address(this).balance);
        if (bonus > 0) {
            to.transfer(bonus);
        }

        emit OrderCompleted(orderId, dstFrom);
    }

    function completeManyOrders(CompleteParams[] calldata params) external onlyTrusted {
        for (uint i = 0; i < params.length; i++) {
            completeOrder(
                params[i].orderId,
                params[i].dstFrom,
                params[i].tokenId,
                params[i].to,
                params[i].amount,
                params[i].decimals,
                params[i].tokenOut,
                params[i].swapPath
            );
        }
    }

    function withdraw(uint8 tokenId, address payable to, uint amount, uint8 inputDecimals) external onlyTrusted {
        Token storage tok = tokens[tokenId];

        if (address(tok.token) == address(1)) {
            to.transfer(convertAmount(tok.token, amount, inputDecimals));
        } else {
            tok.token.safeTransfer(to, convertAmount(tok.token, amount, inputDecimals));
        }
    }

    function withdrawToken(ERC20 token, address payable to, uint amount, uint8 inputDecimals) external onlyTrusted {
        if (address(token) == address(1)) {
            to.transfer(convertAmount(token, amount, inputDecimals));
        } else {
            token.safeTransfer(to, convertAmount(token, amount, inputDecimals));
        }
    }

    function isCompleted(uint orderId, uint8 dstFrom) external view returns (bool) {
        return completed[keccak256(abi.encodePacked(orderId, dstFrom))];
    }

    function listOrders() external view returns (Order[] memory) {
        Order[] memory list = new Order[](orderIds.length());
        for (uint i = 0; i < orderIds.length(); i++) {
            list[i] = orders[orderIds.at(i)];
        }

        return list;
    }

    function listTokensNames() external view returns (string[] memory) {
        string[] memory list = new string[](tokensLength);
        for (uint8 i = 0; i < tokensLength; i++) {
            if (address(tokens[i].token) != address(0)) {
                list[i] = tokens[i].token.symbol();
            }
        }

        return list;
    }

    receive() external payable {}

    function convertAmount(ERC20 token, uint amount, uint fromDecimals) view private returns (uint) {
        return amount * (10 ** tokenDecimals(token)) / (10 ** fromDecimals);
    }

    function tokenDecimals(ERC20 token) private view returns (uint8) {
        if (address(token) == address(1)) {
            return 18;
        } else {
            return token.decimals();
        }
    }

    function checkAmount(uint8 tokenId, uint8 destination, uint amount) private view returns (bool) {
        Token memory tok = tokens[tokenId];
        Config memory config = configs[tokenId][destination];

        uint min = tok.defaultMinAmount;
        uint max = tok.defaultMaxAmount;

        if (config.minAmount > 0) {
            min = config.minAmount;
        }
        if (config.maxAmount > 0) {
            max = config.maxAmount;
        }

        return amount >= min && amount <= max;
    }

    function transferFee(uint8 tokenId, uint8 destination, uint amount) private returns (uint feeAmount) {
        Token memory tok = tokens[tokenId];
        Config memory config = configs[tokenId][destination];

        uint fee = tok.defaultFee;
        uint feeBase = tok.defaultFeeBase;

        if (config.fee > 0) {
            fee = config.fee;
        }
        if (config.feeBase > 0) {
            feeBase = config.feeBase;
        }

        feeAmount = feeBase + amount * fee / 10000;
        if (feeAmount > 0 && tok.feeTarget != address(this)) {
            tok.token.safeTransfer(tok.feeTarget, feeAmount);
        }
    }
}

File 2 of 11 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @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
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }

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

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{ value: amount }("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

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

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

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

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

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: value }(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

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

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

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

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

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

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 3 of 11 : ERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin guidelines: functions revert instead
 * of returning `false` on failure. This behavior is nonetheless conventional
 * and does not conflict with the expectations of ERC20 applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20 {
    mapping (address => uint256) private _balances;

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

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The defaut value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All three of these values are immutable: they can only be set once during
     * construction.
     */
    constructor (string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

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

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

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

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

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

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

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

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * Requirements:
     *
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);

        uint256 currentAllowance = _allowances[sender][_msgSender()];
        require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
        _approve(sender, _msgSender(), currentAllowance - amount);

        return true;
    }

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

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

        return true;
    }

    /**
     * @dev Moves tokens `amount` from `sender` to `recipient`.
     *
     * This is internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(address sender, address recipient, uint256 amount) internal virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        uint256 senderBalance = _balances[sender];
        require(senderBalance >= amount, "ERC20: transfer amount exceeds balance");
        _balances[sender] = senderBalance - amount;
        _balances[recipient] += amount;

        emit Transfer(sender, recipient, amount);
    }

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

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

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

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

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

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

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

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(address owner, address spender, uint256 amount) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

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

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

File 4 of 11 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC20.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;

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

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

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

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

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

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

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

File 5 of 11 : EnumerableSet.sol
// SPDX-License-Identifier: MIT

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.
 *
 * ```
 * 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.
 */
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;

            // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs
            // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.

            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] = toDeleteIndex + 1; // All indexes are 1-based

            // 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) {
        require(set._values.length > index, "EnumerableSet: index out of bounds");
        return set._values[index];
    }

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

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


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

File 6 of 11 : Math.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow, so we distribute
        return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);
    }
}

File 7 of 11 : IBridgeSwap.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.6;

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

interface IBridgeSwap {

    function swap(
        IERC20 tokenIn,
        uint amount,
        IERC20 tokenOut,
        address to,
        address[] calldata swapPath
    ) external returns (uint out);

    function swapToNative(
        IERC20 tokenIn,
        uint amount,
        address payable to,
        address[] calldata swapPath
    ) external returns (uint out);

    function swapFromNative(
        IERC20 tokenOut,
        address to,
        address[] calldata swapPath
    ) external payable returns (uint out);

}

File 8 of 11 : Trustable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/access/Ownable.sol";

abstract contract Trustable is Ownable {
    mapping(address=>bool) public trusted;

    modifier onlyTrusted {
        require(trusted[msg.sender] || msg.sender == owner(), "not trusted");
        _;
    }

    function setTrusted(address user, bool isTrusted) public onlyOwner {
        trusted[user] = isTrusted;
    }
}

File 9 of 11 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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 `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, 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 `sender` to `recipient` 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 sender, address recipient, uint256 amount) external returns (bool);

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

File 10 of 11 : Context.sol
// SPDX-License-Identifier: MIT

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) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

File 11 of 11 : Ownable.sol
// SPDX-License-Identifier: MIT

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 () {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = 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");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

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

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":true,"internalType":"uint8","name":"dstFrom","type":"uint8"}],"name":"OrderCompleted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint8","name":"tokenId","type":"uint8"},{"internalType":"address","name":"sender","type":"address"},{"internalType":"bytes32","name":"target","type":"bytes32"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"feeAmount","type":"uint256"},{"internalType":"uint8","name":"decimals","type":"uint8"},{"internalType":"uint8","name":"destination","type":"uint8"},{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"bytes32","name":"tokenOut","type":"bytes32"}],"indexed":false,"internalType":"struct Bridge.Order","name":"order","type":"tuple"}],"name":"OrderCreated","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"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"addresses","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_orderIds","type":"uint256[]"}],"name":"closeManyOrders","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"orderId","type":"uint256"}],"name":"closeOrder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"orderId","type":"uint256"},{"internalType":"uint8","name":"dstFrom","type":"uint8"},{"internalType":"uint8","name":"tokenId","type":"uint8"},{"internalType":"address payable","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"decimals","type":"uint256"},{"internalType":"contract ERC20","name":"tokenOut","type":"address"},{"internalType":"address[]","name":"swapPath","type":"address[]"}],"internalType":"struct Bridge.CompleteParams[]","name":"params","type":"tuple[]"}],"name":"completeManyOrders","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"orderId","type":"uint256"},{"internalType":"uint8","name":"dstFrom","type":"uint8"},{"internalType":"uint8","name":"tokenId","type":"uint8"},{"internalType":"address payable","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"decimals","type":"uint256"},{"internalType":"contract ERC20","name":"tokenOut","type":"address"},{"internalType":"address[]","name":"swapPath","type":"address[]"}],"name":"completeOrder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"completed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"","type":"uint8"},{"internalType":"uint8","name":"","type":"uint8"}],"name":"configs","outputs":[{"internalType":"uint16","name":"fee","type":"uint16"},{"internalType":"uint256","name":"feeBase","type":"uint256"},{"internalType":"uint256","name":"minAmount","type":"uint256"},{"internalType":"uint256","name":"maxAmount","type":"uint256"},{"internalType":"bool","name":"directTransferAllowed","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"tokenId","type":"uint8"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint8","name":"destination","type":"uint8"},{"internalType":"bytes32","name":"target","type":"bytes32"}],"name":"create","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"contract ERC20","name":"tokenIn","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint8","name":"destination","type":"uint8"},{"internalType":"bytes32","name":"target","type":"bytes32"},{"internalType":"bytes32","name":"tokenOut","type":"bytes32"},{"internalType":"address[]","name":"swapPath","type":"address[]"}],"name":"createWithSwap","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"orderId","type":"uint256"},{"internalType":"uint8","name":"dstFrom","type":"uint8"}],"name":"isCompleted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"listOrders","outputs":[{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint8","name":"tokenId","type":"uint8"},{"internalType":"address","name":"sender","type":"address"},{"internalType":"bytes32","name":"target","type":"bytes32"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"feeAmount","type":"uint256"},{"internalType":"uint8","name":"decimals","type":"uint8"},{"internalType":"uint8","name":"destination","type":"uint8"},{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"bytes32","name":"tokenOut","type":"bytes32"}],"internalType":"struct Bridge.Order[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"listTokensNames","outputs":[{"internalType":"string[]","name":"","type":"string[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"orders","outputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint8","name":"tokenId","type":"uint8"},{"internalType":"address","name":"sender","type":"address"},{"internalType":"bytes32","name":"target","type":"bytes32"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"feeAmount","type":"uint256"},{"internalType":"uint8","name":"decimals","type":"uint8"},{"internalType":"uint8","name":"destination","type":"uint8"},{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"bytes32","name":"tokenOut","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"tokenId","type":"uint8"},{"internalType":"uint256","name":"bonus","type":"uint256"}],"name":"setBonus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"tokenId","type":"uint8"},{"internalType":"uint8","name":"destination","type":"uint8"},{"components":[{"internalType":"uint16","name":"fee","type":"uint16"},{"internalType":"uint256","name":"feeBase","type":"uint256"},{"internalType":"uint256","name":"minAmount","type":"uint256"},{"internalType":"uint256","name":"maxAmount","type":"uint256"},{"internalType":"bool","name":"directTransferAllowed","type":"bool"}],"internalType":"struct Bridge.Config","name":"config","type":"tuple"}],"name":"setConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"tokenId","type":"uint8"},{"internalType":"uint16","name":"defaultFee","type":"uint16"}],"name":"setDefaultFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"tokenId","type":"uint8"},{"internalType":"uint256","name":"defaultFeeBase","type":"uint256"},{"internalType":"uint8","name":"inputDecimals","type":"uint8"}],"name":"setDefaultFeeBase","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"tokenId","type":"uint8"},{"internalType":"uint256","name":"defaultMaxAmount","type":"uint256"},{"internalType":"uint8","name":"inputDecimals","type":"uint8"}],"name":"setDefaultMaxAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"tokenId","type":"uint8"},{"internalType":"uint256","name":"defaultMinAmount","type":"uint256"},{"internalType":"uint8","name":"inputDecimals","type":"uint8"}],"name":"setDefaultMinAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"tokenId","type":"uint8"},{"internalType":"uint8","name":"destination","type":"uint8"},{"internalType":"bool","name":"directTransferAllowed","type":"bool"}],"name":"setDirectTransferAllowed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"tokenId","type":"uint8"},{"internalType":"uint8","name":"destination","type":"uint8"},{"internalType":"uint16","name":"fee","type":"uint16"}],"name":"setFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"tokenId","type":"uint8"},{"internalType":"uint8","name":"destination","type":"uint8"},{"internalType":"uint256","name":"feeBase","type":"uint256"},{"internalType":"uint8","name":"inputDecimals","type":"uint8"}],"name":"setFeeBase","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"tokenId","type":"uint8"},{"internalType":"address","name":"feeTarget","type":"address"}],"name":"setFeeTarget","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"tokenId","type":"uint8"},{"internalType":"uint8","name":"destination","type":"uint8"},{"internalType":"uint256","name":"maxAmount","type":"uint256"},{"internalType":"uint8","name":"inputDecimals","type":"uint8"}],"name":"setMaxAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"tokenId","type":"uint8"},{"internalType":"uint8","name":"destination","type":"uint8"},{"internalType":"uint256","name":"minAmount","type":"uint256"},{"internalType":"uint8","name":"inputDecimals","type":"uint8"}],"name":"setMinAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"allowed","type":"bool"},{"internalType":"uint8","name":"tokenId","type":"uint8"}],"name":"setSwapSettings","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IBridgeSwap","name":"newSwapper","type":"address"}],"name":"setSwapper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"tokenId","type":"uint8"},{"internalType":"contract ERC20","name":"token","type":"address"},{"internalType":"address","name":"feeTarget","type":"address"},{"internalType":"uint16","name":"defaultFee","type":"uint16"},{"internalType":"uint256","name":"defaultFeeBase","type":"uint256"},{"internalType":"uint256","name":"defaultMinAmount","type":"uint256"},{"internalType":"uint256","name":"defaultMaxAmount","type":"uint256"},{"internalType":"uint8","name":"inputDecimals","type":"uint8"},{"internalType":"uint256","name":"bonus","type":"uint256"}],"name":"setToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"bool","name":"isTrusted","type":"bool"}],"name":"setTrusted","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"swapDefaultTokenId","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"swapper","outputs":[{"internalType":"contract IBridgeSwap","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"swapsAllowed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"","type":"uint8"}],"name":"tokens","outputs":[{"internalType":"contract ERC20","name":"token","type":"address"},{"internalType":"address","name":"feeTarget","type":"address"},{"internalType":"uint16","name":"defaultFee","type":"uint16"},{"internalType":"uint256","name":"defaultFeeBase","type":"uint256"},{"internalType":"uint256","name":"defaultMinAmount","type":"uint256"},{"internalType":"uint256","name":"defaultMaxAmount","type":"uint256"},{"internalType":"uint256","name":"bonus","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"trusted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"tokenId","type":"uint8"},{"internalType":"address payable","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint8","name":"inputDecimals","type":"uint8"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ERC20","name":"token","type":"address"},{"internalType":"address payable","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint8","name":"inputDecimals","type":"uint8"}],"name":"withdrawToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

608060405260006002556003805461ffff61ffff60b01b01191661ff0017905534801561002b57600080fd5b50600080546001600160a01b031916339081178255604051909182917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350613f948061007c6000396000f3fe6080604052600436106102345760003560e01c80636e9821c21161012e5780639b7e76c1116100ab578063ecf34cbf1161006f578063ecf34cbf14610881578063f2fde38b146108a1578063f32a12ac146108c1578063f6419d96146108e1578063fe3387161461091157600080fd5b80639b7e76c1146106bd5780639c82f2a4146106dd578063a85c38ef146106fd578063bbaed29d146107d5578063ecbbd497146107f557600080fd5b806382d38954116100f257806382d38954146105895780638856c0d6146105b95780638a91497b1461066c5780638da5cb5b1461067f57806398f554261461069d57600080fd5b80636e9821c2146104d15780636f1815de14610501578063715018a61461052157806373d2498014610536578063766a1c661461056957600080fd5b806327e021e8116101bc578063594cd10511610180578063594cd1051461043d5780635cd951081461045d57806362cf39ab1461047057806363abf1d2146104915780636db35e8d146104b157600080fd5b806327e021e81461036f5780632b3297f91461039f5780633afbb588146103dd57806348e97896146103fd578063583301081461041d57600080fd5b8063176091f411610203578063176091f4146102c257806320b53cc6146102ed57806323bda3061461030d57806323c689191461032d578063277b08b41461034d57600080fd5b8063069d6d1c146102405780630c67766d146102625780630e926e6d1461028257806312394191146102a257600080fd5b3661023b57005b600080fd5b34801561024c57600080fd5b5061026061025b366004613291565b610931565b005b34801561026e57600080fd5b5061026061027d366004613204565b61098d565b34801561028e57600080fd5b5061026061029d366004613263565b610b71565b3480156102ae57600080fd5b506102606102bd366004613204565b610bd2565b3480156102ce57600080fd5b506102d7610c60565b6040516102e4919061392b565b60405180910390f35b3480156102f957600080fd5b50610260610308366004613807565b610dff565b34801561031957600080fd5b506102606103283660046132aa565b610e85565b34801561033957600080fd5b5061026061034836600461368c565b610f4d565b34801561035957600080fd5b50610362610fc2565b6040516102e491906138c9565b34801561037b57600080fd5b5061038f61038a36600461343e565b611111565b60405190151581526020016102e4565b3480156103ab57600080fd5b506003546103c5906201000090046001600160a01b031681565b6040516001600160a01b0390911681526020016102e4565b3480156103e957600080fd5b506102606103f8366004613660565b611172565b34801561040957600080fd5b5061026061041836600461368c565b6111b5565b34801561042957600080fd5b50610260610438366004613579565b61122a565b34801561044957600080fd5b50610260610458366004613632565b61131a565b61026061046b3660046136ce565b6113a0565b34801561047c57600080fd5b5060035461038f90600160b01b900460ff1681565b34801561049d57600080fd5b506102606104ac36600461354b565b611664565b3480156104bd57600080fd5b506102606104cc366004613807565b6116c4565b3480156104dd57600080fd5b5061038f6104ec3660046131ae565b60016020526000908152604090205460ff1681565b34801561050d57600080fd5b5061026061051c3660046137c7565b61174a565b34801561052d57600080fd5b506102606117d2565b34801561054257600080fd5b5060035461055790600160b81b900460ff1681565b60405160ff90911681526020016102e4565b34801561057557600080fd5b50610260610584366004613774565b611846565b34801561059557600080fd5b506105576105a43660046131ae565b60056020526000908152604090205460ff1681565b3480156105c557600080fd5b506106236105d4366004613511565b60046020819052600091825260409091208054600182015460028301546003840154948401546005909401546001600160a01b039384169593831694600160a01b90930461ffff169391929087565b604080516001600160a01b03988916815297909616602088015261ffff909416948601949094526060850191909152608084015260a083019190915260c082015260e0016102e4565b61026061067a3660046132fd565b61189b565b34801561068b57600080fd5b506000546001600160a01b03166103c5565b3480156106a957600080fd5b506102606106b8366004613734565b611ef3565b3480156106c957600080fd5b506102606106d836600461359a565b611f54565b3480156106e957600080fd5b506102606106f83660046131ae565b612167565b34801561070957600080fd5b50610777610718366004613291565b6007602052600090815260409020805460018201546002830154600384015460048501546005860154600690960154949560ff808616966001600160a01b0361010097889004811697848416949081049093169262010000900416908a565b604080519a8b5260ff998a1660208c01526001600160a01b03988916908b015260608a0196909652608089019490945260a0880192909252851660c087015290931660e08501529116610100830152610120820152610140016102e4565b3480156107e157600080fd5b506102606107f0366004613463565b6121bb565b34801561080157600080fd5b50610852610810366004613716565b60066020908152600092835260408084209091529082529020805460018201546002830154600384015460049094015461ffff90931693919290919060ff1685565b6040805161ffff909616865260208601949094529284019190915260608301521515608082015260a0016102e4565b34801561088d57600080fd5b5061026061089c366004613807565b612602565b3480156108ad57600080fd5b506102606108bc3660046131ae565b612688565b3480156108cd57600080fd5b506102606108dc3660046131cb565b612772565b3480156108ed57600080fd5b5061038f6108fc366004613291565b600a6020526000908152604090205460ff1681565b34801561091d57600080fd5b5061026061092c36600461368c565b6127c7565b3360009081526001602052604090205460ff168061095957506000546001600160a01b031633145b61097e5760405162461bcd60e51b815260040161097590613aa3565b60405180910390fd5b61098960088261283d565b5050565b3360009081526001602052604090205460ff16806109b557506000546001600160a01b031633145b6109d15760405162461bcd60e51b815260040161097590613aa3565b60005b81811015610b6c57610b5a8383838181106109f1576109f1613e8c565b9050602002810190610a039190613c53565b35848484818110610a1657610a16613e8c565b9050602002810190610a289190613c53565b610a39906040810190602001613511565b858585818110610a4b57610a4b613e8c565b9050602002810190610a5d9190613c53565b610a6e906060810190604001613511565b868686818110610a8057610a80613e8c565b9050602002810190610a929190613c53565b610aa39060808101906060016131ae565b878787818110610ab557610ab5613e8c565b9050602002810190610ac79190613c53565b60800135888888818110610add57610add613e8c565b9050602002810190610aef9190613c53565b60a00135898989818110610b0557610b05613e8c565b9050602002810190610b179190613c53565b610b289060e081019060c0016131ae565b8a8a8a818110610b3a57610b3a613e8c565b9050602002810190610b4c9190613c53565b6107f09060e0810190613c09565b80610b6481613e25565b9150506109d4565b505050565b6000546001600160a01b03163314610b9b5760405162461bcd60e51b815260040161097590613aed565b6003805461ffff60b01b1916600160b01b9315159390930260ff60b81b191692909217600160b81b60ff9290921691909102179055565b3360009081526001602052604090205460ff1680610bfa57506000546001600160a01b031633145b610c165760405162461bcd60e51b815260040161097590613aa3565b60005b81811015610b6c57610c4d838383818110610c3657610c36613e8c565b90506020020135600861283d90919063ffffffff16565b5080610c5881613e25565b915050610c19565b60606000610c6e6008612850565b67ffffffffffffffff811115610c8657610c86613ea2565b604051908082528060200260200182016040528015610d0557816020015b604080516101408101825260008082526020808301829052928201819052606082018190526080820181905260a0820181905260c0820181905260e0820181905261010082018190526101208201528252600019909201910181610ca45790505b50905060005b610d156008612850565b811015610df95760076000610d2b60088461285a565b8152602080820192909252604090810160002081516101408101835281548152600182015460ff808216958301959095526001600160a01b03610100918290048116948301949094526002830154606083015260038301546080830152600483015460a0830152600583015480861660c084015281810490951660e083015262010000909404909216928201929092526006909101546101208201528251839083908110610ddb57610ddb613e8c565b60200260200101819052508080610df190613e25565b915050610d0b565b50919050565b6000546001600160a01b03163314610e295760405162461bcd60e51b815260040161097590613aed565b60ff808516600090815260046020526040902054610e56916001600160a01b039091169084908416612866565b60ff94851660009081526006602090815260408083209690971682529490945293909220600301929092555050565b3360009081526001602052604090205460ff1680610ead57506000546001600160a01b031633145b610ec95760405162461bcd60e51b815260040161097590613aa3565b6001600160a01b03841660011415610f2457826001600160a01b03166108fc610ef686858560ff16612866565b6040518115909202916000818181858888f19350505050158015610f1e573d6000803e3d6000fd5b50610f47565b610f4783610f3686858560ff16612866565b6001600160a01b03871691906128a3565b50505050565b6000546001600160a01b03163314610f775760405162461bcd60e51b815260040161097590613aed565b60ff808416600090815260046020526040902054610fa4916001600160a01b039091169084908416612866565b60ff9093166000908152600460205260409020600301929092555050565b60035460609060009060ff1667ffffffffffffffff811115610fe657610fe6613ea2565b60405190808252806020026020018201604052801561101957816020015b60608152602001906001900390816110045790505b50905060005b60035460ff9081169082161015610df95760ff81166000908152600460205260409020546001600160a01b0316156110ff5760ff811660009081526004602081905260408083205481516395d89b4160e01b815291516001600160a01b03909116936395d89b419383810193919291829003018186803b1580156110a257600080fd5b505afa1580156110b6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526110de9190810190613383565b828260ff16815181106110f3576110f3613e8c565b60200260200101819052505b8061110981613e40565b91505061101f565b6000600a6000848460405160200161114092919091825260f81b6001600160f81b031916602082015260210190565b60408051601f198184030181529181528151602092830120835290820192909252016000205460ff1690505b92915050565b6000546001600160a01b0316331461119c5760405162461bcd60e51b815260040161097590613aed565b60ff909116600090815260046020526040902060050155565b6000546001600160a01b031633146111df5760405162461bcd60e51b815260040161097590613aed565b60ff80841660009081526004602052604090205461120c916001600160a01b039091169084908416612866565b60ff9093166000908152600460205260409020600201929092555050565b3360009081526001602052604090205460ff168061125257506000546001600160a01b031633145b61126e5760405162461bcd60e51b815260040161097590613aa3565b60ff8416600090815260046020526040902080546001600160a01b0316600114156112e25780546001600160a01b03808616916108fc916112b491168660ff8716612866565b6040518115909202916000818181858888f193505050501580156112dc573d6000803e3d6000fd5b50611313565b8054611313908590611301906001600160a01b03168660ff8716612866565b83546001600160a01b031691906128a3565b5050505050565b6000546001600160a01b031633146113445760405162461bcd60e51b815260040161097590613aed565b6127108161ffff16111561136a5760405162461bcd60e51b815260040161097590613ac8565b60ff9091166000908152600460205260409020600101805461ffff909216600160a01b0261ffff60a01b19909216919091179055565b60ff8416600090815260046020526040902080546001600160a01b03166113f95760405162461bcd60e51b815260206004820152600d60248201526c3ab735b737bbb7103a37b5b2b760991b6044820152606401610975565b611404858486612906565b6114505760405162461bcd60e51b815260206004820152601f60248201527f616d6f756e74206d75737420626520696e20616c6c6f7765642072616e6765006044820152606401610975565b80546001600160a01b031660011415611487573484146114825760405162461bcd60e51b815260040161097590613b22565b61149e565b805461149e906001600160a01b0316333087612ac1565b60006114ab868587612af9565b905060405180610140016040528060025481526020018760ff168152602001336001600160a01b0316815260200184815260200182876114eb9190613de2565b815260208101839052835460409091019061150e906001600160a01b0316612d0e565b60ff908116825286811660208084019190915260006040808501829052606094850182905260028054835260078452918190208651815592860151600184018054928801516001600160a01b039081166101009081026001600160a81b03199095169388169390931793909317905594860151838301556080860151600384015560a0860151600484015560c086015160058401805460e0890151888a0151909416620100000262010000600160b01b031994881690980261ffff19909116929096169190911794909417169390931790915561012090920151600690920191909155546115fe90600890612d9b565b506002546000818152600760205260409081902090517f222cd2efea00866c545bed597165587aac41b8666a50ac9b1880e7513900e0889161163f91613b74565b60405180910390a26002805490600061165783613e25565b9190505550505050505050565b6000546001600160a01b0316331461168e5760405162461bcd60e51b815260040161097590613aed565b60ff91909116600090815260046020526040902060010180546001600160a01b0319166001600160a01b03909216919091179055565b6000546001600160a01b031633146116ee5760405162461bcd60e51b815260040161097590613aed565b60ff80851660009081526004602052604090205461171b916001600160a01b039091169084908416612866565b60ff94851660009081526006602090815260408083209690971682529490945293909220600201929092555050565b6000546001600160a01b031633146117745760405162461bcd60e51b815260040161097590613aed565b6127108161ffff16111561179a5760405162461bcd60e51b815260040161097590613ac8565b60ff928316600090815260066020908152604080832094909516825292909252919020805461ffff191661ffff909216919091179055565b6000546001600160a01b031633146117fc5760405162461bcd60e51b815260040161097590613aed565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146118705760405162461bcd60e51b815260040161097590613aed565b60ff808416600090815260066020908152604080832093861683529290522081906113138282613eb8565b600354600160b01b900460ff1680156118c457506003546201000090046001600160a01b031615155b6119105760405162461bcd60e51b815260206004820152601860248201527f73776170732063757272656e746c792064697361626c656400000000000000006044820152606401610975565b6001600160a01b03871660011415611946573486146119415760405162461bcd60e51b815260040161097590613b22565b61195b565b61195b6001600160a01b038816333089612ac1565b6003546001600160a01b0388811660008181526005602090815260408083205460ff9081168085526004909352922054600160b81b909504909116939092161480156119c8575060ff80821660009081526006602090815260408083208b85168452909152902060040154165b156119d1578091505b60ff8216600090815260046020818152604092839020835160e08101855281546001600160a01b03908116808352600184015480831695840195909552600160a01b90940461ffff169582019590955260028201546060820152600382015460808201529281015460a08401526005015460c083015290918b1614611c6d5780516001600160a01b031660011415611b115760035460ff841660009081526004602081905260409182902054915163aeb3baab60e01b81526001600160a01b036201000090940484169363aeb3baab938e93611ab893919092169130918c918c91016139e9565b6020604051808303818588803b158015611ad157600080fd5b505af1158015611ae5573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190611b0a9190613425565b9850611c6d565b60035460405163095ea7b360e01b8152620100009091046001600160a01b039081166004830152602482018b90528b169063095ea7b390604401602060405180830381600087803b158015611b6557600080fd5b505af1158015611b79573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b9d9190613246565b50600360029054906101000a90046001600160a01b03166001600160a01b031663eecad2198b8b600460008860ff1660ff16815260200190815260200160002060000160009054906101000a90046001600160a01b0316308a8a6040518763ffffffff1660e01b8152600401611c1896959493929190613a54565b602060405180830381600087803b158015611c3257600080fd5b505af1158015611c46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c6a9190613425565b98505b611c7883898b612906565b611cc45760405162461bcd60e51b815260206004820152601f60248201527f616d6f756e74206d75737420626520696e20616c6c6f7765642072616e6765006044820152606401610975565b6000611cd1848a8c612af9565b905060405180610140016040528060025481526020018560ff168152602001336001600160a01b03168152602001898152602001828c611d119190613de2565b8152602080820184905260ff87166000908152600490915260409081902054910190611d45906001600160a01b0316612d0e565b60ff1681526020018a60ff1681526020018c6001600160a01b03168152602001888152506007600060025481526020019081526020016000206000820151816000015560208201518160010160006101000a81548160ff021916908360ff16021790555060408201518160010160016101000a8154816001600160a01b0302191690836001600160a01b03160217905550606082015181600201556080820151816003015560a0820151816004015560c08201518160050160006101000a81548160ff021916908360ff16021790555060e08201518160050160016101000a81548160ff021916908360ff1602179055506101008201518160050160026101000a8154816001600160a01b0302191690836001600160a01b031602179055506101208201518160060155905050611e886002546008612d9b90919063ffffffff16565b506002546000818152600760205260409081902090517f222cd2efea00866c545bed597165587aac41b8666a50ac9b1880e7513900e08891611ec991613b74565b60405180910390a260028054906000611ee183613e25565b91905055505050505050505050505050565b6000546001600160a01b03163314611f1d5760405162461bcd60e51b815260040161097590613aed565b60ff928316600090815260066020908152604080832094909516825292909252919020600401805460ff1916911515919091179055565b6000546001600160a01b03163314611f7e5760405162461bcd60e51b815260040161097590613aed565b6127108661ffff161115611fa45760405162461bcd60e51b815260040161097590613ac8565b6040518060e00160405280896001600160a01b03168152602001886001600160a01b031681526020018761ffff168152602001611fe58a888660ff16612866565b8152602001611ff88a878660ff16612866565b815260200161200b8a868660ff16612866565b815260200182815250600460008b60ff1660ff16815260200190815260200160002060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060208201518160010160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160010160146101000a81548161ffff021916908361ffff160217905550606082015181600201556080820151816003015560a0820151816004015560c0820151816005015590505088600560008a6001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff021916908360ff160217905550600360009054906101000a900460ff1660ff168960016121339190613c81565b60ff16111561215c57612147896001613c81565b6003805460ff191660ff929092169190911790555b505050505050505050565b6000546001600160a01b031633146121915760405162461bcd60e51b815260040161097590613aed565b600380546001600160a01b03909216620100000262010000600160b01b0319909216919091179055565b3360009081526001602052604090205460ff16806121e357506000546001600160a01b031633145b6121ff5760405162461bcd60e51b815260040161097590613aa3565b6000898960405160200161222a92919091825260f81b6001600160f81b031916602082015260210190565b60408051601f1981840301815291815281516020928301206000818152600a90935291205490915060ff16156122975760405162461bcd60e51b8152602060048201526012602482015271185b1c9958591e481d1c985b9cd9995c995960721b6044820152606401610975565b863b156122e65760405162461bcd60e51b815260206004820152601e60248201527f636f6e74726163742074617267657473206e6f7420737570706f7274656400006044820152606401610975565b60ff8816600090815260046020526040902080546001600160a01b031661233f5760405162461bcd60e51b815260206004820152600d60248201526c3ab735b737bbb7103a37b5b2b760991b6044820152606401610975565b8054612355906001600160a01b03168888612866565b96506001600160a01b0385161580159061237c575080546001600160a01b03868116911614155b156124fd576001600160a01b0385166001141561242c5760035481546040516370071feb60e11b81526001600160a01b036201000090930483169263e00e3fd6926123d4929116908b908d908a908a90600401613a20565b602060405180830381600087803b1580156123ee57600080fd5b505af1158015612402573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124269190613425565b5061255c565b805460035460405163095ea7b360e01b81526001600160a01b036201000090920482166004820152602481018a905291169063095ea7b390604401602060405180830381600087803b15801561248157600080fd5b505af1158015612495573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124b99190613246565b50600354815460405163eecad21960e01b81526001600160a01b036201000090930483169263eecad219926123d4929116908b908a908e908b908b90600401613a54565b80546001600160a01b031660011415612546576040516001600160a01b0389169088156108fc029089906000818181858888f19350505050158015612426573d6000803e3d6000fd5b805461255c906001600160a01b031689896128a3565b6000828152600a60205260408120805460ff1916600117905560058201546125849047612da7565b905080156125c4576040516001600160a01b038a169082156108fc029083906000818181858888f193505050501580156125c2573d6000803e3d6000fd5b505b60405160ff8c16908d907f2bd2d9c5f8a1215c53d8d1e6eeed2a5edde1be47f27f9d43e053043628ecb31f90600090a3505050505050505050505050565b6000546001600160a01b0316331461262c5760405162461bcd60e51b815260040161097590613aed565b60ff808516600090815260046020526040902054612659916001600160a01b039091169084908416612866565b60ff94851660009081526006602090815260408083209690971682529490945293909220600101929092555050565b6000546001600160a01b031633146126b25760405162461bcd60e51b815260040161097590613aed565b6001600160a01b0381166127175760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610975565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461279c5760405162461bcd60e51b815260040161097590613aed565b6001600160a01b03919091166000908152600160205260409020805460ff1916911515919091179055565b6000546001600160a01b031633146127f15760405162461bcd60e51b815260040161097590613aed565b60ff80841660009081526004602052604090205461281e916001600160a01b039091169084908416612866565b60ff909316600090815260046020819052604090912001929092555050565b60006128498383612dbd565b9392505050565b600061116c825490565b60006128498383612eb0565b600061287382600a613d0b565b61287c85612d0e565b61288790600a613d17565b6128919085613dc3565b61289b9190613ca6565b949350505050565b6040516001600160a01b038316602482015260448101829052610b6c90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612f36565b600080600460008660ff1660ff1681526020019081526020016000206040518060e00160405290816000820160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020016001820160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020016001820160149054906101000a900461ffff1661ffff1661ffff16815260200160028201548152602001600382015481526020016004820154815260200160058201548152505090506000600660008760ff1660ff16815260200190815260200160002060008660ff1660ff1681526020019081526020016000206040518060a00160405290816000820160009054906101000a900461ffff1661ffff1661ffff1681526020016001820154815260200160028201548152602001600382015481526020016004820160009054906101000a900460ff161515151581525050905060008260800151905060008360a001519050600083604001511115612a9457826040015191505b606083015115612aa5575060608201515b818610158015612ab55750808611155b98975050505050505050565b6040516001600160a01b0380851660248301528316604482015260648101829052610f479085906323b872dd60e01b906084016128cf565b600080600460008660ff1660ff1681526020019081526020016000206040518060e00160405290816000820160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020016001820160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020016001820160149054906101000a900461ffff1661ffff1661ffff16815260200160028201548152602001600382015481526020016004820154815260200160058201548152505090506000600660008760ff1660ff16815260200190815260200160002060008660ff1660ff1681526020019081526020016000206040518060a00160405290816000820160009054906101000a900461ffff1661ffff1661ffff1681526020016001820154815260200160028201548152602001600382015481526020016004820160009054906101000a900460ff16151515158152505090506000826040015161ffff1690506000836060015190506000836000015161ffff161115612c9057825161ffff1691505b602083015115612ca1575060208201515b612710612cae8388613dc3565b612cb89190613ca6565b612cc29082613c69565b9450600085118015612ce1575060208401516001600160a01b03163014155b15612d035760208401518451612d03916001600160a01b0390911690876128a3565b505050509392505050565b60006001600160a01b03821660011415612d2a57506012919050565b816001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b158015612d6357600080fd5b505afa158015612d77573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061116c919061352e565b60006128498383613008565b6000818310612db65781612849565b5090919050565b60008181526001830160205260408120548015612ea6576000612de1600183613de2565b8554909150600090612df590600190613de2565b90506000866000018281548110612e0e57612e0e613e8c565b9060005260206000200154905080876000018481548110612e3157612e31613e8c565b600091825260209091200155612e48836001613c69565b60008281526001890160205260409020558654879080612e6a57612e6a613e76565b6001900381819060005260206000200160009055905586600101600087815260200190815260200160002060009055600194505050505061116c565b600091505061116c565b81546000908210612f0e5760405162461bcd60e51b815260206004820152602260248201527f456e756d657261626c655365743a20696e646578206f7574206f6620626f756e604482015261647360f01b6064820152608401610975565b826000018281548110612f2357612f23613e8c565b9060005260206000200154905092915050565b6000612f8b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166130579092919063ffffffff16565b805190915015610b6c5780806020019051810190612fa99190613246565b610b6c5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610975565b600081815260018301602052604081205461304f5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561116c565b50600061116c565b606061289b848460008585843b6130b05760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610975565b600080866001600160a01b031685876040516130cc91906138ad565b60006040518083038185875af1925050503d8060008114613109576040519150601f19603f3d011682016040523d82523d6000602084013e61310e565b606091505b509150915061311e828286613129565b979650505050505050565b60608315613138575081612849565b8251156131485782518084602001fd5b8160405162461bcd60e51b81526004016109759190613a90565b60008083601f84011261317457600080fd5b50813567ffffffffffffffff81111561318c57600080fd5b6020830191508360208260051b85010111156131a757600080fd5b9250929050565b6000602082840312156131c057600080fd5b813561284981613f19565b600080604083850312156131de57600080fd5b82356131e981613f19565b915060208301356131f981613f31565b809150509250929050565b6000806020838503121561321757600080fd5b823567ffffffffffffffff81111561322e57600080fd5b61323a85828601613162565b90969095509350505050565b60006020828403121561325857600080fd5b815161284981613f31565b6000806040838503121561327657600080fd5b823561328181613f31565b915060208301356131f981613f4f565b6000602082840312156132a357600080fd5b5035919050565b600080600080608085870312156132c057600080fd5b84356132cb81613f19565b935060208501356132db81613f19565b92506040850135915060608501356132f281613f4f565b939692955090935050565b600080600080600080600060c0888a03121561331857600080fd5b873561332381613f19565b965060208801359550604088013561333a81613f4f565b9450606088013593506080880135925060a088013567ffffffffffffffff81111561336457600080fd5b6133708a828b01613162565b989b979a50959850939692959293505050565b60006020828403121561339557600080fd5b815167ffffffffffffffff808211156133ad57600080fd5b818401915084601f8301126133c157600080fd5b8151818111156133d3576133d3613ea2565b604051601f8201601f19908116603f011681019083821181831017156133fb576133fb613ea2565b8160405282815287602084870101111561341457600080fd5b61311e836020830160208801613df9565b60006020828403121561343757600080fd5b5051919050565b6000806040838503121561345157600080fd5b8235915060208301356131f981613f4f565b60008060008060008060008060006101008a8c03121561348257600080fd5b8935985060208a013561349481613f4f565b975060408a01356134a481613f4f565b965060608a01356134b481613f19565b955060808a0135945060a08a0135935060c08a01356134d281613f19565b925060e08a013567ffffffffffffffff8111156134ee57600080fd5b6134fa8c828d01613162565b915080935050809150509295985092959850929598565b60006020828403121561352357600080fd5b813561284981613f4f565b60006020828403121561354057600080fd5b815161284981613f4f565b6000806040838503121561355e57600080fd5b823561356981613f4f565b915060208301356131f981613f19565b6000806000806080858703121561358f57600080fd5b84356132cb81613f4f565b60008060008060008060008060006101208a8c0312156135b957600080fd5b89356135c481613f4f565b985060208a01356135d481613f19565b975060408a01356135e481613f19565b965060608a01356135f481613f3f565b955060808a0135945060a08a0135935060c08a0135925060e08a013561361981613f4f565b809250506101008a013590509295985092959850929598565b6000806040838503121561364557600080fd5b823561365081613f4f565b915060208301356131f981613f3f565b6000806040838503121561367357600080fd5b823561367e81613f4f565b946020939093013593505050565b6000806000606084860312156136a157600080fd5b83356136ac81613f4f565b92506020840135915060408401356136c381613f4f565b809150509250925092565b600080600080608085870312156136e457600080fd5b84356136ef81613f4f565b935060208501359250604085013561370681613f4f565b9396929550929360600135925050565b6000806040838503121561372957600080fd5b823561328181613f4f565b60008060006060848603121561374957600080fd5b833561375481613f4f565b9250602084013561376481613f4f565b915060408401356136c381613f31565b600080600083850360e081121561378a57600080fd5b843561379581613f4f565b935060208501356137a581613f4f565b925060a0603f19820112156137b957600080fd5b506040840190509250925092565b6000806000606084860312156137dc57600080fd5b83356137e781613f4f565b925060208401356137f781613f4f565b915060408401356136c381613f3f565b6000806000806080858703121561381d57600080fd5b843561382881613f4f565b935060208501356132db81613f4f565b8183526000602080850194508260005b8581101561387657813561385b81613f19565b6001600160a01b031687529582019590820190600101613848565b509495945050505050565b60008151808452613899816020860160208601613df9565b601f01601f19169290920160200192915050565b600082516138bf818460208701613df9565b9190910192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561391e57603f1988860301845261390c858351613881565b945092850192908501906001016138f0565b5092979650505050505050565b602080825282518282018190526000919060409081850190868401855b828110156139dc578151805185528681015160ff90811688870152868201516001600160a01b0390811688880152606080840151908801526080808401519088015260a0808401519088015260c08084015183169088015260e08084015190921691870191909152610100808301519091169086015261012090810151908501526101409093019290850190600101613948565b5091979650505050505050565b6001600160a01b03858116825284166020820152606060408201819052600090613a169083018486613838565b9695505050505050565b6001600160a01b038681168252602082018690528416604082015260806060820181905260009061311e9083018486613838565b6001600160a01b0387811682526020820187905285811660408301528416606082015260a060808201819052600090612ab59083018486613838565b6020815260006128496020830184613881565b6020808252600b908201526a1b9bdd081d1c9d5cdd195960aa1b604082015260600190565b6020808252600b908201526a696e76616c69642066656560a81b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526032908201527f6e617469766520746f6b656e20616d6f756e74206d7573742062652065717561604082015271361030b6b7bab73a103830b930b6b2ba32b960711b606082015260800190565b81548152600182015460ff811660208301526101408201906001600160a01b03600882901c811660408501526002850154606085015260038501546080850152600485015460a0850152600585015460ff811660c08601529150600882901c60ff1660e0850152613bf66101008501828460101c166001600160a01b03169052565b5050600683015461012083015292915050565b6000808335601e19843603018112613c2057600080fd5b83018035915067ffffffffffffffff821115613c3b57600080fd5b6020019150600581901b36038213156131a757600080fd5b6000823560fe198336030181126138bf57600080fd5b60008219821115613c7c57613c7c613e60565b500190565b600060ff821660ff84168060ff03821115613c9e57613c9e613e60565b019392505050565b600082613cc357634e487b7160e01b600052601260045260246000fd5b500490565b600181815b80851115613d03578160001904821115613ce957613ce9613e60565b80851615613cf657918102915b93841c9390800290613ccd565b509250929050565b60006128498383613d22565b600061284960ff8416835b600082613d315750600161116c565b81613d3e5750600061116c565b8160018114613d545760028114613d5e57613d7a565b600191505061116c565b60ff841115613d6f57613d6f613e60565b50506001821b61116c565b5060208310610133831016604e8410600b8410161715613d9d575081810a61116c565b613da78383613cc8565b8060001904821115613dbb57613dbb613e60565b029392505050565b6000816000190483118215151615613ddd57613ddd613e60565b500290565b600082821015613df457613df4613e60565b500390565b60005b83811015613e14578181015183820152602001613dfc565b83811115610f475750506000910152565b6000600019821415613e3957613e39613e60565b5060010190565b600060ff821660ff811415613e5757613e57613e60565b60010192915050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b8135613ec381613f3f565b61ffff811661ffff1983541617825550602082013560018201556040820135600282015560608201356003820155600481016080830135613f0381613f31565b815490151560ff1660ff19919091161790555050565b6001600160a01b0381168114613f2e57600080fd5b50565b8015158114613f2e57600080fd5b61ffff81168114613f2e57600080fd5b60ff81168114613f2e57600080fdfea264697066735822122013755b8ea4e522224604d91fc0f8e9bfffb6c162a0394fa33e76f60874fd2e4564736f6c63430008060033

Deployed Bytecode

0x6080604052600436106102345760003560e01c80636e9821c21161012e5780639b7e76c1116100ab578063ecf34cbf1161006f578063ecf34cbf14610881578063f2fde38b146108a1578063f32a12ac146108c1578063f6419d96146108e1578063fe3387161461091157600080fd5b80639b7e76c1146106bd5780639c82f2a4146106dd578063a85c38ef146106fd578063bbaed29d146107d5578063ecbbd497146107f557600080fd5b806382d38954116100f257806382d38954146105895780638856c0d6146105b95780638a91497b1461066c5780638da5cb5b1461067f57806398f554261461069d57600080fd5b80636e9821c2146104d15780636f1815de14610501578063715018a61461052157806373d2498014610536578063766a1c661461056957600080fd5b806327e021e8116101bc578063594cd10511610180578063594cd1051461043d5780635cd951081461045d57806362cf39ab1461047057806363abf1d2146104915780636db35e8d146104b157600080fd5b806327e021e81461036f5780632b3297f91461039f5780633afbb588146103dd57806348e97896146103fd578063583301081461041d57600080fd5b8063176091f411610203578063176091f4146102c257806320b53cc6146102ed57806323bda3061461030d57806323c689191461032d578063277b08b41461034d57600080fd5b8063069d6d1c146102405780630c67766d146102625780630e926e6d1461028257806312394191146102a257600080fd5b3661023b57005b600080fd5b34801561024c57600080fd5b5061026061025b366004613291565b610931565b005b34801561026e57600080fd5b5061026061027d366004613204565b61098d565b34801561028e57600080fd5b5061026061029d366004613263565b610b71565b3480156102ae57600080fd5b506102606102bd366004613204565b610bd2565b3480156102ce57600080fd5b506102d7610c60565b6040516102e4919061392b565b60405180910390f35b3480156102f957600080fd5b50610260610308366004613807565b610dff565b34801561031957600080fd5b506102606103283660046132aa565b610e85565b34801561033957600080fd5b5061026061034836600461368c565b610f4d565b34801561035957600080fd5b50610362610fc2565b6040516102e491906138c9565b34801561037b57600080fd5b5061038f61038a36600461343e565b611111565b60405190151581526020016102e4565b3480156103ab57600080fd5b506003546103c5906201000090046001600160a01b031681565b6040516001600160a01b0390911681526020016102e4565b3480156103e957600080fd5b506102606103f8366004613660565b611172565b34801561040957600080fd5b5061026061041836600461368c565b6111b5565b34801561042957600080fd5b50610260610438366004613579565b61122a565b34801561044957600080fd5b50610260610458366004613632565b61131a565b61026061046b3660046136ce565b6113a0565b34801561047c57600080fd5b5060035461038f90600160b01b900460ff1681565b34801561049d57600080fd5b506102606104ac36600461354b565b611664565b3480156104bd57600080fd5b506102606104cc366004613807565b6116c4565b3480156104dd57600080fd5b5061038f6104ec3660046131ae565b60016020526000908152604090205460ff1681565b34801561050d57600080fd5b5061026061051c3660046137c7565b61174a565b34801561052d57600080fd5b506102606117d2565b34801561054257600080fd5b5060035461055790600160b81b900460ff1681565b60405160ff90911681526020016102e4565b34801561057557600080fd5b50610260610584366004613774565b611846565b34801561059557600080fd5b506105576105a43660046131ae565b60056020526000908152604090205460ff1681565b3480156105c557600080fd5b506106236105d4366004613511565b60046020819052600091825260409091208054600182015460028301546003840154948401546005909401546001600160a01b039384169593831694600160a01b90930461ffff169391929087565b604080516001600160a01b03988916815297909616602088015261ffff909416948601949094526060850191909152608084015260a083019190915260c082015260e0016102e4565b61026061067a3660046132fd565b61189b565b34801561068b57600080fd5b506000546001600160a01b03166103c5565b3480156106a957600080fd5b506102606106b8366004613734565b611ef3565b3480156106c957600080fd5b506102606106d836600461359a565b611f54565b3480156106e957600080fd5b506102606106f83660046131ae565b612167565b34801561070957600080fd5b50610777610718366004613291565b6007602052600090815260409020805460018201546002830154600384015460048501546005860154600690960154949560ff808616966001600160a01b0361010097889004811697848416949081049093169262010000900416908a565b604080519a8b5260ff998a1660208c01526001600160a01b03988916908b015260608a0196909652608089019490945260a0880192909252851660c087015290931660e08501529116610100830152610120820152610140016102e4565b3480156107e157600080fd5b506102606107f0366004613463565b6121bb565b34801561080157600080fd5b50610852610810366004613716565b60066020908152600092835260408084209091529082529020805460018201546002830154600384015460049094015461ffff90931693919290919060ff1685565b6040805161ffff909616865260208601949094529284019190915260608301521515608082015260a0016102e4565b34801561088d57600080fd5b5061026061089c366004613807565b612602565b3480156108ad57600080fd5b506102606108bc3660046131ae565b612688565b3480156108cd57600080fd5b506102606108dc3660046131cb565b612772565b3480156108ed57600080fd5b5061038f6108fc366004613291565b600a6020526000908152604090205460ff1681565b34801561091d57600080fd5b5061026061092c36600461368c565b6127c7565b3360009081526001602052604090205460ff168061095957506000546001600160a01b031633145b61097e5760405162461bcd60e51b815260040161097590613aa3565b60405180910390fd5b61098960088261283d565b5050565b3360009081526001602052604090205460ff16806109b557506000546001600160a01b031633145b6109d15760405162461bcd60e51b815260040161097590613aa3565b60005b81811015610b6c57610b5a8383838181106109f1576109f1613e8c565b9050602002810190610a039190613c53565b35848484818110610a1657610a16613e8c565b9050602002810190610a289190613c53565b610a39906040810190602001613511565b858585818110610a4b57610a4b613e8c565b9050602002810190610a5d9190613c53565b610a6e906060810190604001613511565b868686818110610a8057610a80613e8c565b9050602002810190610a929190613c53565b610aa39060808101906060016131ae565b878787818110610ab557610ab5613e8c565b9050602002810190610ac79190613c53565b60800135888888818110610add57610add613e8c565b9050602002810190610aef9190613c53565b60a00135898989818110610b0557610b05613e8c565b9050602002810190610b179190613c53565b610b289060e081019060c0016131ae565b8a8a8a818110610b3a57610b3a613e8c565b9050602002810190610b4c9190613c53565b6107f09060e0810190613c09565b80610b6481613e25565b9150506109d4565b505050565b6000546001600160a01b03163314610b9b5760405162461bcd60e51b815260040161097590613aed565b6003805461ffff60b01b1916600160b01b9315159390930260ff60b81b191692909217600160b81b60ff9290921691909102179055565b3360009081526001602052604090205460ff1680610bfa57506000546001600160a01b031633145b610c165760405162461bcd60e51b815260040161097590613aa3565b60005b81811015610b6c57610c4d838383818110610c3657610c36613e8c565b90506020020135600861283d90919063ffffffff16565b5080610c5881613e25565b915050610c19565b60606000610c6e6008612850565b67ffffffffffffffff811115610c8657610c86613ea2565b604051908082528060200260200182016040528015610d0557816020015b604080516101408101825260008082526020808301829052928201819052606082018190526080820181905260a0820181905260c0820181905260e0820181905261010082018190526101208201528252600019909201910181610ca45790505b50905060005b610d156008612850565b811015610df95760076000610d2b60088461285a565b8152602080820192909252604090810160002081516101408101835281548152600182015460ff808216958301959095526001600160a01b03610100918290048116948301949094526002830154606083015260038301546080830152600483015460a0830152600583015480861660c084015281810490951660e083015262010000909404909216928201929092526006909101546101208201528251839083908110610ddb57610ddb613e8c565b60200260200101819052508080610df190613e25565b915050610d0b565b50919050565b6000546001600160a01b03163314610e295760405162461bcd60e51b815260040161097590613aed565b60ff808516600090815260046020526040902054610e56916001600160a01b039091169084908416612866565b60ff94851660009081526006602090815260408083209690971682529490945293909220600301929092555050565b3360009081526001602052604090205460ff1680610ead57506000546001600160a01b031633145b610ec95760405162461bcd60e51b815260040161097590613aa3565b6001600160a01b03841660011415610f2457826001600160a01b03166108fc610ef686858560ff16612866565b6040518115909202916000818181858888f19350505050158015610f1e573d6000803e3d6000fd5b50610f47565b610f4783610f3686858560ff16612866565b6001600160a01b03871691906128a3565b50505050565b6000546001600160a01b03163314610f775760405162461bcd60e51b815260040161097590613aed565b60ff808416600090815260046020526040902054610fa4916001600160a01b039091169084908416612866565b60ff9093166000908152600460205260409020600301929092555050565b60035460609060009060ff1667ffffffffffffffff811115610fe657610fe6613ea2565b60405190808252806020026020018201604052801561101957816020015b60608152602001906001900390816110045790505b50905060005b60035460ff9081169082161015610df95760ff81166000908152600460205260409020546001600160a01b0316156110ff5760ff811660009081526004602081905260408083205481516395d89b4160e01b815291516001600160a01b03909116936395d89b419383810193919291829003018186803b1580156110a257600080fd5b505afa1580156110b6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526110de9190810190613383565b828260ff16815181106110f3576110f3613e8c565b60200260200101819052505b8061110981613e40565b91505061101f565b6000600a6000848460405160200161114092919091825260f81b6001600160f81b031916602082015260210190565b60408051601f198184030181529181528151602092830120835290820192909252016000205460ff1690505b92915050565b6000546001600160a01b0316331461119c5760405162461bcd60e51b815260040161097590613aed565b60ff909116600090815260046020526040902060050155565b6000546001600160a01b031633146111df5760405162461bcd60e51b815260040161097590613aed565b60ff80841660009081526004602052604090205461120c916001600160a01b039091169084908416612866565b60ff9093166000908152600460205260409020600201929092555050565b3360009081526001602052604090205460ff168061125257506000546001600160a01b031633145b61126e5760405162461bcd60e51b815260040161097590613aa3565b60ff8416600090815260046020526040902080546001600160a01b0316600114156112e25780546001600160a01b03808616916108fc916112b491168660ff8716612866565b6040518115909202916000818181858888f193505050501580156112dc573d6000803e3d6000fd5b50611313565b8054611313908590611301906001600160a01b03168660ff8716612866565b83546001600160a01b031691906128a3565b5050505050565b6000546001600160a01b031633146113445760405162461bcd60e51b815260040161097590613aed565b6127108161ffff16111561136a5760405162461bcd60e51b815260040161097590613ac8565b60ff9091166000908152600460205260409020600101805461ffff909216600160a01b0261ffff60a01b19909216919091179055565b60ff8416600090815260046020526040902080546001600160a01b03166113f95760405162461bcd60e51b815260206004820152600d60248201526c3ab735b737bbb7103a37b5b2b760991b6044820152606401610975565b611404858486612906565b6114505760405162461bcd60e51b815260206004820152601f60248201527f616d6f756e74206d75737420626520696e20616c6c6f7765642072616e6765006044820152606401610975565b80546001600160a01b031660011415611487573484146114825760405162461bcd60e51b815260040161097590613b22565b61149e565b805461149e906001600160a01b0316333087612ac1565b60006114ab868587612af9565b905060405180610140016040528060025481526020018760ff168152602001336001600160a01b0316815260200184815260200182876114eb9190613de2565b815260208101839052835460409091019061150e906001600160a01b0316612d0e565b60ff908116825286811660208084019190915260006040808501829052606094850182905260028054835260078452918190208651815592860151600184018054928801516001600160a01b039081166101009081026001600160a81b03199095169388169390931793909317905594860151838301556080860151600384015560a0860151600484015560c086015160058401805460e0890151888a0151909416620100000262010000600160b01b031994881690980261ffff19909116929096169190911794909417169390931790915561012090920151600690920191909155546115fe90600890612d9b565b506002546000818152600760205260409081902090517f222cd2efea00866c545bed597165587aac41b8666a50ac9b1880e7513900e0889161163f91613b74565b60405180910390a26002805490600061165783613e25565b9190505550505050505050565b6000546001600160a01b0316331461168e5760405162461bcd60e51b815260040161097590613aed565b60ff91909116600090815260046020526040902060010180546001600160a01b0319166001600160a01b03909216919091179055565b6000546001600160a01b031633146116ee5760405162461bcd60e51b815260040161097590613aed565b60ff80851660009081526004602052604090205461171b916001600160a01b039091169084908416612866565b60ff94851660009081526006602090815260408083209690971682529490945293909220600201929092555050565b6000546001600160a01b031633146117745760405162461bcd60e51b815260040161097590613aed565b6127108161ffff16111561179a5760405162461bcd60e51b815260040161097590613ac8565b60ff928316600090815260066020908152604080832094909516825292909252919020805461ffff191661ffff909216919091179055565b6000546001600160a01b031633146117fc5760405162461bcd60e51b815260040161097590613aed565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146118705760405162461bcd60e51b815260040161097590613aed565b60ff808416600090815260066020908152604080832093861683529290522081906113138282613eb8565b600354600160b01b900460ff1680156118c457506003546201000090046001600160a01b031615155b6119105760405162461bcd60e51b815260206004820152601860248201527f73776170732063757272656e746c792064697361626c656400000000000000006044820152606401610975565b6001600160a01b03871660011415611946573486146119415760405162461bcd60e51b815260040161097590613b22565b61195b565b61195b6001600160a01b038816333089612ac1565b6003546001600160a01b0388811660008181526005602090815260408083205460ff9081168085526004909352922054600160b81b909504909116939092161480156119c8575060ff80821660009081526006602090815260408083208b85168452909152902060040154165b156119d1578091505b60ff8216600090815260046020818152604092839020835160e08101855281546001600160a01b03908116808352600184015480831695840195909552600160a01b90940461ffff169582019590955260028201546060820152600382015460808201529281015460a08401526005015460c083015290918b1614611c6d5780516001600160a01b031660011415611b115760035460ff841660009081526004602081905260409182902054915163aeb3baab60e01b81526001600160a01b036201000090940484169363aeb3baab938e93611ab893919092169130918c918c91016139e9565b6020604051808303818588803b158015611ad157600080fd5b505af1158015611ae5573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190611b0a9190613425565b9850611c6d565b60035460405163095ea7b360e01b8152620100009091046001600160a01b039081166004830152602482018b90528b169063095ea7b390604401602060405180830381600087803b158015611b6557600080fd5b505af1158015611b79573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b9d9190613246565b50600360029054906101000a90046001600160a01b03166001600160a01b031663eecad2198b8b600460008860ff1660ff16815260200190815260200160002060000160009054906101000a90046001600160a01b0316308a8a6040518763ffffffff1660e01b8152600401611c1896959493929190613a54565b602060405180830381600087803b158015611c3257600080fd5b505af1158015611c46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c6a9190613425565b98505b611c7883898b612906565b611cc45760405162461bcd60e51b815260206004820152601f60248201527f616d6f756e74206d75737420626520696e20616c6c6f7765642072616e6765006044820152606401610975565b6000611cd1848a8c612af9565b905060405180610140016040528060025481526020018560ff168152602001336001600160a01b03168152602001898152602001828c611d119190613de2565b8152602080820184905260ff87166000908152600490915260409081902054910190611d45906001600160a01b0316612d0e565b60ff1681526020018a60ff1681526020018c6001600160a01b03168152602001888152506007600060025481526020019081526020016000206000820151816000015560208201518160010160006101000a81548160ff021916908360ff16021790555060408201518160010160016101000a8154816001600160a01b0302191690836001600160a01b03160217905550606082015181600201556080820151816003015560a0820151816004015560c08201518160050160006101000a81548160ff021916908360ff16021790555060e08201518160050160016101000a81548160ff021916908360ff1602179055506101008201518160050160026101000a8154816001600160a01b0302191690836001600160a01b031602179055506101208201518160060155905050611e886002546008612d9b90919063ffffffff16565b506002546000818152600760205260409081902090517f222cd2efea00866c545bed597165587aac41b8666a50ac9b1880e7513900e08891611ec991613b74565b60405180910390a260028054906000611ee183613e25565b91905055505050505050505050505050565b6000546001600160a01b03163314611f1d5760405162461bcd60e51b815260040161097590613aed565b60ff928316600090815260066020908152604080832094909516825292909252919020600401805460ff1916911515919091179055565b6000546001600160a01b03163314611f7e5760405162461bcd60e51b815260040161097590613aed565b6127108661ffff161115611fa45760405162461bcd60e51b815260040161097590613ac8565b6040518060e00160405280896001600160a01b03168152602001886001600160a01b031681526020018761ffff168152602001611fe58a888660ff16612866565b8152602001611ff88a878660ff16612866565b815260200161200b8a868660ff16612866565b815260200182815250600460008b60ff1660ff16815260200190815260200160002060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060208201518160010160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160010160146101000a81548161ffff021916908361ffff160217905550606082015181600201556080820151816003015560a0820151816004015560c0820151816005015590505088600560008a6001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff021916908360ff160217905550600360009054906101000a900460ff1660ff168960016121339190613c81565b60ff16111561215c57612147896001613c81565b6003805460ff191660ff929092169190911790555b505050505050505050565b6000546001600160a01b031633146121915760405162461bcd60e51b815260040161097590613aed565b600380546001600160a01b03909216620100000262010000600160b01b0319909216919091179055565b3360009081526001602052604090205460ff16806121e357506000546001600160a01b031633145b6121ff5760405162461bcd60e51b815260040161097590613aa3565b6000898960405160200161222a92919091825260f81b6001600160f81b031916602082015260210190565b60408051601f1981840301815291815281516020928301206000818152600a90935291205490915060ff16156122975760405162461bcd60e51b8152602060048201526012602482015271185b1c9958591e481d1c985b9cd9995c995960721b6044820152606401610975565b863b156122e65760405162461bcd60e51b815260206004820152601e60248201527f636f6e74726163742074617267657473206e6f7420737570706f7274656400006044820152606401610975565b60ff8816600090815260046020526040902080546001600160a01b031661233f5760405162461bcd60e51b815260206004820152600d60248201526c3ab735b737bbb7103a37b5b2b760991b6044820152606401610975565b8054612355906001600160a01b03168888612866565b96506001600160a01b0385161580159061237c575080546001600160a01b03868116911614155b156124fd576001600160a01b0385166001141561242c5760035481546040516370071feb60e11b81526001600160a01b036201000090930483169263e00e3fd6926123d4929116908b908d908a908a90600401613a20565b602060405180830381600087803b1580156123ee57600080fd5b505af1158015612402573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124269190613425565b5061255c565b805460035460405163095ea7b360e01b81526001600160a01b036201000090920482166004820152602481018a905291169063095ea7b390604401602060405180830381600087803b15801561248157600080fd5b505af1158015612495573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124b99190613246565b50600354815460405163eecad21960e01b81526001600160a01b036201000090930483169263eecad219926123d4929116908b908a908e908b908b90600401613a54565b80546001600160a01b031660011415612546576040516001600160a01b0389169088156108fc029089906000818181858888f19350505050158015612426573d6000803e3d6000fd5b805461255c906001600160a01b031689896128a3565b6000828152600a60205260408120805460ff1916600117905560058201546125849047612da7565b905080156125c4576040516001600160a01b038a169082156108fc029083906000818181858888f193505050501580156125c2573d6000803e3d6000fd5b505b60405160ff8c16908d907f2bd2d9c5f8a1215c53d8d1e6eeed2a5edde1be47f27f9d43e053043628ecb31f90600090a3505050505050505050505050565b6000546001600160a01b0316331461262c5760405162461bcd60e51b815260040161097590613aed565b60ff808516600090815260046020526040902054612659916001600160a01b039091169084908416612866565b60ff94851660009081526006602090815260408083209690971682529490945293909220600101929092555050565b6000546001600160a01b031633146126b25760405162461bcd60e51b815260040161097590613aed565b6001600160a01b0381166127175760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610975565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461279c5760405162461bcd60e51b815260040161097590613aed565b6001600160a01b03919091166000908152600160205260409020805460ff1916911515919091179055565b6000546001600160a01b031633146127f15760405162461bcd60e51b815260040161097590613aed565b60ff80841660009081526004602052604090205461281e916001600160a01b039091169084908416612866565b60ff909316600090815260046020819052604090912001929092555050565b60006128498383612dbd565b9392505050565b600061116c825490565b60006128498383612eb0565b600061287382600a613d0b565b61287c85612d0e565b61288790600a613d17565b6128919085613dc3565b61289b9190613ca6565b949350505050565b6040516001600160a01b038316602482015260448101829052610b6c90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612f36565b600080600460008660ff1660ff1681526020019081526020016000206040518060e00160405290816000820160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020016001820160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020016001820160149054906101000a900461ffff1661ffff1661ffff16815260200160028201548152602001600382015481526020016004820154815260200160058201548152505090506000600660008760ff1660ff16815260200190815260200160002060008660ff1660ff1681526020019081526020016000206040518060a00160405290816000820160009054906101000a900461ffff1661ffff1661ffff1681526020016001820154815260200160028201548152602001600382015481526020016004820160009054906101000a900460ff161515151581525050905060008260800151905060008360a001519050600083604001511115612a9457826040015191505b606083015115612aa5575060608201515b818610158015612ab55750808611155b98975050505050505050565b6040516001600160a01b0380851660248301528316604482015260648101829052610f479085906323b872dd60e01b906084016128cf565b600080600460008660ff1660ff1681526020019081526020016000206040518060e00160405290816000820160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020016001820160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020016001820160149054906101000a900461ffff1661ffff1661ffff16815260200160028201548152602001600382015481526020016004820154815260200160058201548152505090506000600660008760ff1660ff16815260200190815260200160002060008660ff1660ff1681526020019081526020016000206040518060a00160405290816000820160009054906101000a900461ffff1661ffff1661ffff1681526020016001820154815260200160028201548152602001600382015481526020016004820160009054906101000a900460ff16151515158152505090506000826040015161ffff1690506000836060015190506000836000015161ffff161115612c9057825161ffff1691505b602083015115612ca1575060208201515b612710612cae8388613dc3565b612cb89190613ca6565b612cc29082613c69565b9450600085118015612ce1575060208401516001600160a01b03163014155b15612d035760208401518451612d03916001600160a01b0390911690876128a3565b505050509392505050565b60006001600160a01b03821660011415612d2a57506012919050565b816001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b158015612d6357600080fd5b505afa158015612d77573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061116c919061352e565b60006128498383613008565b6000818310612db65781612849565b5090919050565b60008181526001830160205260408120548015612ea6576000612de1600183613de2565b8554909150600090612df590600190613de2565b90506000866000018281548110612e0e57612e0e613e8c565b9060005260206000200154905080876000018481548110612e3157612e31613e8c565b600091825260209091200155612e48836001613c69565b60008281526001890160205260409020558654879080612e6a57612e6a613e76565b6001900381819060005260206000200160009055905586600101600087815260200190815260200160002060009055600194505050505061116c565b600091505061116c565b81546000908210612f0e5760405162461bcd60e51b815260206004820152602260248201527f456e756d657261626c655365743a20696e646578206f7574206f6620626f756e604482015261647360f01b6064820152608401610975565b826000018281548110612f2357612f23613e8c565b9060005260206000200154905092915050565b6000612f8b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166130579092919063ffffffff16565b805190915015610b6c5780806020019051810190612fa99190613246565b610b6c5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610975565b600081815260018301602052604081205461304f5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561116c565b50600061116c565b606061289b848460008585843b6130b05760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610975565b600080866001600160a01b031685876040516130cc91906138ad565b60006040518083038185875af1925050503d8060008114613109576040519150601f19603f3d011682016040523d82523d6000602084013e61310e565b606091505b509150915061311e828286613129565b979650505050505050565b60608315613138575081612849565b8251156131485782518084602001fd5b8160405162461bcd60e51b81526004016109759190613a90565b60008083601f84011261317457600080fd5b50813567ffffffffffffffff81111561318c57600080fd5b6020830191508360208260051b85010111156131a757600080fd5b9250929050565b6000602082840312156131c057600080fd5b813561284981613f19565b600080604083850312156131de57600080fd5b82356131e981613f19565b915060208301356131f981613f31565b809150509250929050565b6000806020838503121561321757600080fd5b823567ffffffffffffffff81111561322e57600080fd5b61323a85828601613162565b90969095509350505050565b60006020828403121561325857600080fd5b815161284981613f31565b6000806040838503121561327657600080fd5b823561328181613f31565b915060208301356131f981613f4f565b6000602082840312156132a357600080fd5b5035919050565b600080600080608085870312156132c057600080fd5b84356132cb81613f19565b935060208501356132db81613f19565b92506040850135915060608501356132f281613f4f565b939692955090935050565b600080600080600080600060c0888a03121561331857600080fd5b873561332381613f19565b965060208801359550604088013561333a81613f4f565b9450606088013593506080880135925060a088013567ffffffffffffffff81111561336457600080fd5b6133708a828b01613162565b989b979a50959850939692959293505050565b60006020828403121561339557600080fd5b815167ffffffffffffffff808211156133ad57600080fd5b818401915084601f8301126133c157600080fd5b8151818111156133d3576133d3613ea2565b604051601f8201601f19908116603f011681019083821181831017156133fb576133fb613ea2565b8160405282815287602084870101111561341457600080fd5b61311e836020830160208801613df9565b60006020828403121561343757600080fd5b5051919050565b6000806040838503121561345157600080fd5b8235915060208301356131f981613f4f565b60008060008060008060008060006101008a8c03121561348257600080fd5b8935985060208a013561349481613f4f565b975060408a01356134a481613f4f565b965060608a01356134b481613f19565b955060808a0135945060a08a0135935060c08a01356134d281613f19565b925060e08a013567ffffffffffffffff8111156134ee57600080fd5b6134fa8c828d01613162565b915080935050809150509295985092959850929598565b60006020828403121561352357600080fd5b813561284981613f4f565b60006020828403121561354057600080fd5b815161284981613f4f565b6000806040838503121561355e57600080fd5b823561356981613f4f565b915060208301356131f981613f19565b6000806000806080858703121561358f57600080fd5b84356132cb81613f4f565b60008060008060008060008060006101208a8c0312156135b957600080fd5b89356135c481613f4f565b985060208a01356135d481613f19565b975060408a01356135e481613f19565b965060608a01356135f481613f3f565b955060808a0135945060a08a0135935060c08a0135925060e08a013561361981613f4f565b809250506101008a013590509295985092959850929598565b6000806040838503121561364557600080fd5b823561365081613f4f565b915060208301356131f981613f3f565b6000806040838503121561367357600080fd5b823561367e81613f4f565b946020939093013593505050565b6000806000606084860312156136a157600080fd5b83356136ac81613f4f565b92506020840135915060408401356136c381613f4f565b809150509250925092565b600080600080608085870312156136e457600080fd5b84356136ef81613f4f565b935060208501359250604085013561370681613f4f565b9396929550929360600135925050565b6000806040838503121561372957600080fd5b823561328181613f4f565b60008060006060848603121561374957600080fd5b833561375481613f4f565b9250602084013561376481613f4f565b915060408401356136c381613f31565b600080600083850360e081121561378a57600080fd5b843561379581613f4f565b935060208501356137a581613f4f565b925060a0603f19820112156137b957600080fd5b506040840190509250925092565b6000806000606084860312156137dc57600080fd5b83356137e781613f4f565b925060208401356137f781613f4f565b915060408401356136c381613f3f565b6000806000806080858703121561381d57600080fd5b843561382881613f4f565b935060208501356132db81613f4f565b8183526000602080850194508260005b8581101561387657813561385b81613f19565b6001600160a01b031687529582019590820190600101613848565b509495945050505050565b60008151808452613899816020860160208601613df9565b601f01601f19169290920160200192915050565b600082516138bf818460208701613df9565b9190910192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b8281101561391e57603f1988860301845261390c858351613881565b945092850192908501906001016138f0565b5092979650505050505050565b602080825282518282018190526000919060409081850190868401855b828110156139dc578151805185528681015160ff90811688870152868201516001600160a01b0390811688880152606080840151908801526080808401519088015260a0808401519088015260c08084015183169088015260e08084015190921691870191909152610100808301519091169086015261012090810151908501526101409093019290850190600101613948565b5091979650505050505050565b6001600160a01b03858116825284166020820152606060408201819052600090613a169083018486613838565b9695505050505050565b6001600160a01b038681168252602082018690528416604082015260806060820181905260009061311e9083018486613838565b6001600160a01b0387811682526020820187905285811660408301528416606082015260a060808201819052600090612ab59083018486613838565b6020815260006128496020830184613881565b6020808252600b908201526a1b9bdd081d1c9d5cdd195960aa1b604082015260600190565b6020808252600b908201526a696e76616c69642066656560a81b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526032908201527f6e617469766520746f6b656e20616d6f756e74206d7573742062652065717561604082015271361030b6b7bab73a103830b930b6b2ba32b960711b606082015260800190565b81548152600182015460ff811660208301526101408201906001600160a01b03600882901c811660408501526002850154606085015260038501546080850152600485015460a0850152600585015460ff811660c08601529150600882901c60ff1660e0850152613bf66101008501828460101c166001600160a01b03169052565b5050600683015461012083015292915050565b6000808335601e19843603018112613c2057600080fd5b83018035915067ffffffffffffffff821115613c3b57600080fd5b6020019150600581901b36038213156131a757600080fd5b6000823560fe198336030181126138bf57600080fd5b60008219821115613c7c57613c7c613e60565b500190565b600060ff821660ff84168060ff03821115613c9e57613c9e613e60565b019392505050565b600082613cc357634e487b7160e01b600052601260045260246000fd5b500490565b600181815b80851115613d03578160001904821115613ce957613ce9613e60565b80851615613cf657918102915b93841c9390800290613ccd565b509250929050565b60006128498383613d22565b600061284960ff8416835b600082613d315750600161116c565b81613d3e5750600061116c565b8160018114613d545760028114613d5e57613d7a565b600191505061116c565b60ff841115613d6f57613d6f613e60565b50506001821b61116c565b5060208310610133831016604e8410600b8410161715613d9d575081810a61116c565b613da78383613cc8565b8060001904821115613dbb57613dbb613e60565b029392505050565b6000816000190483118215151615613ddd57613ddd613e60565b500290565b600082821015613df457613df4613e60565b500390565b60005b83811015613e14578181015183820152602001613dfc565b83811115610f475750506000910152565b6000600019821415613e3957613e39613e60565b5060010190565b600060ff821660ff811415613e5757613e57613e60565b60010192915050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b8135613ec381613f3f565b61ffff811661ffff1983541617825550602082013560018201556040820135600282015560608201356003820155600481016080830135613f0381613f31565b815490151560ff1660ff19919091161790555050565b6001600160a01b0381168114613f2e57600080fd5b50565b8015158114613f2e57600080fd5b61ffff81168114613f2e57600080fd5b60ff81168114613f2e57600080fdfea264697066735822122013755b8ea4e522224604d91fc0f8e9bfffb6c162a0394fa33e76f60874fd2e4564736f6c63430008060033

Block Transaction 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
[ 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.