ETH Price: $2,953.01 (-0.01%)
 

Overview

ETH Balance

Scroll LogoScroll LogoScroll Logo0.243887374435037753 ETH

ETH Value

$720.20 (@ $2,953.01/ETH)

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Send Native Toke...209770342025-09-10 21:42:27136 days ago1757540547IN
0x184891fF...46373CcE0
0 ETH0.000017260.2001201
Deposit Native E...122241312024-12-26 13:59:15394 days ago1735221555IN
0x184891fF...46373CcE0
0.00602554 ETH0.000006170.04012182
Send Native Toke...99984722024-10-09 5:13:13472 days ago1728450793IN
0x184891fF...46373CcE0
0 ETH0.000024970.24079092
Donate Native To...99984702024-10-09 5:13:07472 days ago1728450787IN
0x184891fF...46373CcE0
0.42 ETH0.000005180.0407904
Deposit Native E...94596922024-09-20 15:27:57491 days ago1726846077IN
0x184891fF...46373CcE0
0.0152 ETH0.000006420.08646517
Send Native Toke...92514862024-09-13 10:57:14498 days ago1726225034IN
0x184891fF...46373CcE0
0 ETH0.000021370.24216654
Deposit Native E...89952962024-09-04 16:26:28507 days ago1725467188IN
0x184891fF...46373CcE0
0.00350026 ETH0.000005370.07760224
Send Native Toke...89935212024-09-04 15:04:52507 days ago1725462292IN
0x184891fF...46373CcE0
0 ETH0.000026040.27164399
Send Native Toke...85687912024-08-21 8:29:19521 days ago1724228959IN
0x184891fF...46373CcE0
0 ETH0.000020770.23826391
Send Native Toke...85546552024-08-20 20:56:39522 days ago1724187399IN
0x184891fF...46373CcE0
0 ETH0.000014930.23933512
Deposit Native E...81542312024-08-07 9:39:59535 days ago1723023599IN
0x184891fF...46373CcE0
0.0422 ETH0.000052481.54217179
Send Native Toke...76930932024-07-23 2:41:33550 days ago1721702493IN
0x184891fF...46373CcE0
0 ETH0.000016550.26056267
Send Native Toke...76805952024-07-22 16:15:39551 days ago1721664939IN
0x184891fF...46373CcE0
0 ETH0.000020420.30003173
Send Native Toke...76801122024-07-22 15:51:46551 days ago1721663506IN
0x184891fF...46373CcE0
0 ETH0.000029290.31117198
Send Native Toke...76752332024-07-22 11:59:16551 days ago1721649556IN
0x184891fF...46373CcE0
0 ETH0.000025380.28
Deposit Native E...76422922024-07-21 10:07:54552 days ago1721556474IN
0x184891fF...46373CcE0
0.00441451 ETH0.000002750.06261256
Send Native Toke...75952762024-07-19 19:54:16554 days ago1721418856IN
0x184891fF...46373CcE0
0 ETH0.000026130.28584651
Send Native Toke...74692692024-07-15 18:22:08558 days ago1721067728IN
0x184891fF...46373CcE0
0 ETH0.000024290.33469109
Send Native Toke...74108272024-07-14 6:06:01559 days ago1720937161IN
0x184891fF...46373CcE0
0 ETH0.000019610.31041937
Send Native Toke...73467772024-07-12 0:42:24561 days ago1720744944IN
0x184891fF...46373CcE0
0 ETH0.000019410.30911067
Send Native Toke...73467362024-07-12 0:40:21561 days ago1720744821IN
0x184891fF...46373CcE0
0 ETH0.000027110.3088753
Send Native Toke...73063912024-07-10 14:56:45563 days ago1720623405IN
0x184891fF...46373CcE0
0 ETH0.000030790.45949437
Send Native Toke...71500342024-07-05 4:34:12568 days ago1720154052IN
0x184891fF...46373CcE0
0 ETH0.000086661.27857843
Send Native Toke...71500292024-07-05 4:33:57568 days ago1720154037IN
0x184891fF...46373CcE0
0 ETH0.000086661.27857843
Send Native Toke...68518742024-06-24 20:02:44579 days ago1719259364IN
0x184891fF...46373CcE0
0 ETH0.00002950.43
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
209770342025-09-10 21:42:27136 days ago1757540547
0x184891fF...46373CcE0
0.01002 ETH
99984722024-10-09 5:13:13472 days ago1728450793
0x184891fF...46373CcE0
0.3988 ETH
92514862024-09-13 10:57:14498 days ago1726225034
0x184891fF...46373CcE0
0.01952 ETH
89935212024-09-04 15:04:52507 days ago1725462292
0x184891fF...46373CcE0
0.003596 ETH
85687912024-08-21 8:29:19521 days ago1724228959
0x184891fF...46373CcE0
0.00902 ETH
85546552024-08-20 20:56:39522 days ago1724187399
0x184891fF...46373CcE0
0.06952 ETH
76930932024-07-23 2:41:33550 days ago1721702493
0x184891fF...46373CcE0
0.00452 ETH
76805952024-07-22 16:15:39551 days ago1721664939
0x184891fF...46373CcE0
0.00982 ETH
76801122024-07-22 15:51:46551 days ago1721663506
0x184891fF...46373CcE0
0.01052 ETH
76752332024-07-22 11:59:16551 days ago1721649556
0x184891fF...46373CcE0
0.00662 ETH
75952762024-07-19 19:54:16554 days ago1721418856
0x184891fF...46373CcE0
0.00152 ETH
74692692024-07-15 18:22:08558 days ago1721067728
0x184891fF...46373CcE0
0.00152 ETH
74108272024-07-14 6:06:01559 days ago1720937161
0x184891fF...46373CcE0
0.00362 ETH
73467772024-07-12 0:42:24561 days ago1720744944
0x184891fF...46373CcE0
0.01952 ETH
73467362024-07-12 0:40:21561 days ago1720744821
0x184891fF...46373CcE0
0.04952 ETH
73063912024-07-10 14:56:45563 days ago1720623405
0x184891fF...46373CcE0
0.00152 ETH
71500342024-07-05 4:34:12568 days ago1720154052
0x184891fF...46373CcE0
0.00128 ETH
71500292024-07-05 4:33:57568 days ago1720154037
0x184891fF...46373CcE0
0.00104 ETH
68518742024-06-24 20:02:44579 days ago1719259364
0x184891fF...46373CcE0
0.4985 ETH
68512922024-06-24 19:33:38579 days ago1719257618
0x184891fF...46373CcE0
0.00152 ETH
68170002024-06-23 14:56:37580 days ago1719154597
0x184891fF...46373CcE0
0.02552 ETH
66996172024-06-19 13:00:29584 days ago1718802029
0x184891fF...46373CcE0
0.04858497 ETH
66696102024-06-18 12:00:03585 days ago1718712003
0x184891fF...46373CcE0
0.00252 ETH
66384592024-06-17 10:02:30586 days ago1718618550
0x184891fF...46373CcE0
0.10582 ETH
66038392024-06-16 5:11:27587 days ago1718514687
0x184891fF...46373CcE0
0.00302 ETH
View All Internal Transactions
Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
BridgePortalV4

Compiler Version
v0.8.16+commit.07a7930e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
// SPDX-License-Identifier: BUSL-1.1

pragma solidity ^0.8.0;

import "../libraries/chain/Chain.sol";
import "../libraries/utils/ReentrancyGuard.sol";
import "../libraries/token/IERC20.sol";
import "../libraries/token/SafeERC20.sol";
import "../libraries/utils/Address.sol";
import "../access/Governable.sol";

contract BridgePortalV4 is ReentrancyGuard, Governable {
    using SafeERC20 for IERC20;
    using Address for address payable;

    //TOKEN_TYPE: ETH = 1, WETH = 2, MNT = 3, BNB = 4;

    /**
     * @notice Determines if cross domain messaging is paused. When set to true,
     *         withdrawals are paused. This may be removed in the future.
     */
    bool public paused;
    bool public isNativeETHChain;
    address public wethAddr;
    mapping (uint256 => mapping (uint256 => bool)) public chainIdTokenTypeToFlag;

    uint256 public minDepositValue = 100000000000000;
    mapping (uint256 => bool) public depositIdToStatus;
    mapping (address => bool) public isOrderKeeper;

    event TransactionDeposited(
        address indexed from,
        address indexed to,
        uint256 amount, //input must ETH/WETH
        uint256 targetTokenType,  //can be ETH/WETH/MNT/BNB etc
        uint256 targetChainId
    );

    event Paused(address account);
    event Unpaused(address account);

    event SetChainIdTokenTypeToFlag(uint256 indexed targetChainId, uint256 indexed targetTokenType, bool isActive);
    event SetOrderKeeper(address indexed account, bool isActive);
    event SendTokenEvent(address indexed receiver, uint256 amount, uint256 depositId, bool isNativeToken);

    modifier whenNotPaused() {
        require(paused == false, "paused");
        _;
    }

    modifier onlyOrderKeeper() {
        require(isOrderKeeper[msg.sender], "OKOK: forbidden1");
        _;
    }

    constructor(bool _isNativeETHChain, address _wethAddr) {
        isNativeETHChain = _isNativeETHChain;
        wethAddr = _wethAddr;
    }

    function setWETHAddr(address _wethAddr) external onlyGov {
        require(_wethAddr != address(0x0), "OKOK: _wethAddr cannot be 0x0");
        wethAddr = _wethAddr;
    }

    function setChainIdTokenTypeToFlag(uint256 _targetChainId, uint256 _targetTokenType, bool _isActive) external onlyGov {
        chainIdTokenTypeToFlag[_targetChainId][_targetTokenType] = _isActive;
        emit SetChainIdTokenTypeToFlag(_targetChainId, _targetTokenType, _isActive);
    }

    function setOrderKeeper(address _account, bool _isActive) external onlyGov {
        isOrderKeeper[_account] = _isActive;
        emit SetOrderKeeper(_account, _isActive);
    }

    function pause() external onlyGov {
        paused = true;
        emit Paused(msg.sender);
    }

    /**
     * @notice Unpause deposits and withdrawals.
     */
    function unpause() external onlyGov {
        paused = false;
        emit Unpaused(msg.sender);
    }

    function setMinDepositValue(uint256 _minDepositValue) external onlyGov {
        minDepositValue = _minDepositValue;
    }

    receive() external payable {
        revert("not support!");
    }

    function donateNativeToken() external payable nonReentrant {
        // Intentionally empty.
    }

    function depositNativeETH(address _to, uint256 _targetTokenType, uint256 _targetChainId) external payable nonReentrant whenNotPaused {
        require(_to != address(0x0), "OKOK: _to cannot be 0x0");
        require(isNativeETHChain == true, "OKOK: native ETH not support!");
        require(_targetTokenType != 0, "OKOK: _targetTokenType cannot be 0");
        require(_targetChainId != 0, "OKOK: _targetChainId cannot be 0");
        require(chainIdTokenTypeToFlag[_targetChainId][_targetTokenType], "OKOK: _targetTokenType not support in _targetChainId");
        require(msg.value >= minDepositValue, "OKOK: invalid _value");

        emit TransactionDeposited(msg.sender, _to, msg.value, _targetTokenType, _targetChainId);
    }

    function depositWETH(address _to, uint256 _amount, uint256 _targetTokenType, uint256 _targetChainId) external nonReentrant whenNotPaused {
        require(_to != address(0x0), "OKOK: _to cannot be 0x0");
        require(isNativeETHChain == false, "OKOK: you should deposit native ETH!");
        require(wethAddr != address(0x0), "OKOK: wethAddr cannot be 0x0");
        require(_targetTokenType != 0, "OKOK: _targetTokenType cannot be 0");
        require(_targetChainId != 0, "OKOK: _targetChainId cannot be 0");
        require(chainIdTokenTypeToFlag[_targetChainId][_targetTokenType], "OKOK: _targetTokenType not support in _targetChainId");
        require(_amount >= minDepositValue, "OKOK: invalid _value");

        uint256 beforeAmount = IERC20(wethAddr).balanceOf(address(this));
        _safeTransferFrom(wethAddr, msg.sender, address(this), _amount);
        uint256 afterAmount = IERC20(wethAddr).balanceOf(address(this));

        uint256 delta = afterAmount - beforeAmount;
        require(delta >= _amount, "OKOK: not receive enough weth token amount!");

        emit TransactionDeposited(msg.sender, _to, _amount, _targetTokenType, _targetChainId);
    }

    // to help users who accidentally send their tokens to this contract
    function withdrawToken(address _token, address _account, uint256 _amount) external onlyGov nonReentrant {
        require(_token != wethAddr, "invalid _token");
        IERC20(_token).safeTransfer(_account, _amount);
    }

    //use by relayer to send NativeToken to target wallet
    function sendNativeToken(address payable _receiver, uint256 _outAmount, uint256 _depositId) external onlyOrderKeeper nonReentrant {
        require(depositIdToStatus[_depositId] == false, "depositId already processed");
        require(_outAmount > 0, "invalid _outAmount");
        require(_receiver != address(0), "invalid _receiver");
        require(_outAmount <= address(this).balance, "_outAmount large than contract balance");
        require(_receiver != address(this), "can not send eth to myself");

        depositIdToStatus[_depositId] = true;
        _receiver.sendValue(_outAmount);

        emit SendTokenEvent(_receiver, _outAmount, _depositId, true);
    }

    function sendWETH(address payable _receiver, uint256 _outAmount, uint256 _depositId) external onlyOrderKeeper nonReentrant {
        require(depositIdToStatus[_depositId] == false, "depositId already processed");
        require(_outAmount > 0, "invalid _outAmount");
        require(_receiver != address(0), "invalid _receiver");
        require(_outAmount <= IERC20(wethAddr).balanceOf(address(this)), "_outAmount large than contract balance");
        require(_receiver != address(this), "can not send eth to myself");

        depositIdToStatus[_depositId] = true;
        IERC20(wethAddr).safeTransfer(_receiver, _outAmount);

        emit SendTokenEvent(_receiver, _outAmount, _depositId, false);
    }

    function balanceOfNativeToken() external view returns (uint256) {
        return address(this).balance;
    }

    function balanceOfWETH() external view returns (uint256) {
        return IERC20(wethAddr).balanceOf(address(this));
    }
  
    // INTERNAL
    function _safeTransferFrom(
        address token,
        address from,
        address to,
        uint256 value
    ) private {
        // bytes4(keccak256(bytes('transferFrom(address,address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), "OKOK: TRANSFER_FROM_FAILED");
    }
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

contract Governable {
    address public gov;

    constructor() {
        gov = msg.sender;
    }

    modifier onlyGov() {
        require(msg.sender == gov, "Governable: forbidden");
        _;
    }

    function setGov(address _gov) external onlyGov {
        gov = _gov;
    }
}

// SPDX-License-Identifier: BUSL-1.1

pragma solidity ^0.8.0;

// @title ArbSys
// @dev Globally available variables for Arbitrum may have both an L1 and an L2
// value, the ArbSys interface is used to retrieve the L2 value
interface ArbSys {
    function arbBlockNumber() external view returns (uint256);
    function arbBlockHash(uint256 blockNumber) external view returns (bytes32);
}

// SPDX-License-Identifier: BUSL-1.1

pragma solidity ^0.8.0;

import "./ArbSys.sol";

// @title Chain
// @dev Wrap the calls to retrieve chain variables to handle differences
// between chain implementations
library Chain {
    uint256 constant public ARBITRUM_CHAIN_ID = 42161;
    uint256 constant public ARBITRUM_GOERLI_CHAIN_ID = 421613;

    ArbSys constant public arbSys = ArbSys(address(100));

    // @dev return the current block's timestamp
    // @return the current block's timestamp
    function currentTimestamp() internal view returns (uint256) {
        return block.timestamp;
    }

    // @dev return the current block's number
    // @return the current block's number
    function currentBlockNumber() internal view returns (uint256) {
        if (block.chainid == ARBITRUM_CHAIN_ID || block.chainid == ARBITRUM_GOERLI_CHAIN_ID) {
            return arbSys.arbBlockNumber();
        }

        return block.number;
    }

    // @dev return the current block's hash
    // @return the current block's hash
    function getBlockHash(uint256 blockNumber) internal view returns (bytes32) {
        if (block.chainid == ARBITRUM_CHAIN_ID || block.chainid == ARBITRUM_GOERLI_CHAIN_ID) {
            return arbSys.arbBlockHash(blockNumber);
        }

        return blockhash(blockNumber);
    }
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return mod(a, b, "SafeMath: modulo by zero");
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }
}

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

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC20.sol";
import "../math/SafeMath.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 SafeMath for uint256;
    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).add(value);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero");
        _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");
        }
    }
}

// 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.3._
     */
    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.3._
     */
    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 9 of 9 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor () {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

        _;

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

Settings
{
  "viaIR": true,
  "optimizer": {
    "enabled": true,
    "runs": 200,
    "details": {
      "constantOptimizer": true
    }
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "metadata": {
    "useLiteralContent": true
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"bool","name":"_isNativeETHChain","type":"bool"},{"internalType":"address","name":"_wethAddr","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"depositId","type":"uint256"},{"indexed":false,"internalType":"bool","name":"isNativeToken","type":"bool"}],"name":"SendTokenEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"targetChainId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"targetTokenType","type":"uint256"},{"indexed":false,"internalType":"bool","name":"isActive","type":"bool"}],"name":"SetChainIdTokenTypeToFlag","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"bool","name":"isActive","type":"bool"}],"name":"SetOrderKeeper","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"targetTokenType","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"targetChainId","type":"uint256"}],"name":"TransactionDeposited","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"balanceOfNativeToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"balanceOfWETH","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"chainIdTokenTypeToFlag","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"depositIdToStatus","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_targetTokenType","type":"uint256"},{"internalType":"uint256","name":"_targetChainId","type":"uint256"}],"name":"depositNativeETH","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_targetTokenType","type":"uint256"},{"internalType":"uint256","name":"_targetChainId","type":"uint256"}],"name":"depositWETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"donateNativeToken","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"gov","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isNativeETHChain","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isOrderKeeper","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minDepositValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"_receiver","type":"address"},{"internalType":"uint256","name":"_outAmount","type":"uint256"},{"internalType":"uint256","name":"_depositId","type":"uint256"}],"name":"sendNativeToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_receiver","type":"address"},{"internalType":"uint256","name":"_outAmount","type":"uint256"},{"internalType":"uint256","name":"_depositId","type":"uint256"}],"name":"sendWETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_targetChainId","type":"uint256"},{"internalType":"uint256","name":"_targetTokenType","type":"uint256"},{"internalType":"bool","name":"_isActive","type":"bool"}],"name":"setChainIdTokenTypeToFlag","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_gov","type":"address"}],"name":"setGov","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minDepositValue","type":"uint256"}],"name":"setMinDepositValue","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"bool","name":"_isActive","type":"bool"}],"name":"setOrderKeeper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_wethAddr","type":"address"}],"name":"setWETHAddr","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"wethAddr","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_account","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

6080346100bd57601f61197938819003918201601f19168301916001600160401b038311848410176100c25780849260409485528339810103126100bd578051908115158092036100bd57602001516001600160a01b03811691908290036100bd57600160008190558054655af3107a4000600455600161ff0160a01b0319163360ff60a81b19161760a89290921b60ff60a81b16919091179055600280546001600160a01b0319169190911790556040516118a090816100d98239f35b600080fd5b634e487b7160e01b600052604160045260246000fdfe60806040526004361015610026575b361561001957600080fd5b610021610e4c565b600080fd5b60003560e01c806301e33667146101f2578063070c82a8146101e957806312d43a51146101e05780631e261538146101d757806324815018146101ce5780632eec6bcb146101c55780633833f5f5146101bc5780633e87273c146101b35780633f4ba83a146101aa5780633ff2fcef146101a1578063478c3d87146101985780635c3c8e1b1461018f5780635c975abb146101865780637b59ee9a1461017d5780637d5aa5f4146101745780638456cb591461016b5780638855626f1461016257806390d0216d14610159578063b0b57b5f14610150578063cd38698314610147578063cfad57a21461013e578063ecd1861c146101355763fa55847a0361000e57610130610d14565b61000e565b50610130610cd4565b50610130610c88565b50610130610c60565b50610130610c43565b50610130610c1c565b50610130610bea565b50610130610b83565b50610130610b59565b50610130610ac5565b50610130610a9e565b506101306108fb565b5061013061083e565b50610130610627565b506101306105c6565b506101306104af565b5061013061046c565b5061013061043d565b506101306103ab565b50610130610314565b506101306102e0565b506101306102c1565b5061013061020c565b6001600160a01b0381160361002157565b50346100215760603660031901126100215760043561022a816101fb565b60243590610237826101fb565b6001546001600160a01b03906102509082163314610e08565b61025f60026000541415610e81565b60026000558060025416911690811461028b5761027f91604435916112c5565b6102896001600055565b005b60405162461bcd60e51b815260206004820152600e60248201526d34b73b30b634b2102fba37b5b2b760911b6044820152606490fd5b5034610021576000366003190112610021576020600454604051908152f35b5034610021576000366003190112610021576001546040516001600160a01b039091168152602090f35b8015150361002157565b503461002157604036600319011261002157600435610332816101fb565b7f1d5bc0255b943d6a5b5279e8a55d74d620baccbceecb25e87a3558f14c4c118e6020602435926103628461030a565b6001546001600160a01b03919061037c9083163314610e08565b169283600052600682526103a08160406000209060ff801983541691151516179055565b6040519015158152a2005b5034610021576000366003190112610021576002546040516370a0823160e01b81523060048201526020918290829060249082906001600160a01b03165afa908115610430575b600091610403575b50604051908152f35b6104239150823d8111610429575b61041b8183611204565b810190611226565b386103fa565b503d610411565b610438611235565b6103f2565b50346100215760203660031901126100215761046460018060a01b03600154163314610e08565b600480359055005b50346100215760203660031901126100215760043561048a816101fb565b60018060a01b03166000526006602052602060ff604060002054166040519015158152f35b506060366003190112610021576004356104c8816101fb565b6024357f88839b4cc21bfc7f4dbcfc1bdf6894105b7251ac6830255f1e3460498dd1e71e6105b960443561050160026000541415610e81565b600260005561053e600160ff81549761051f828a60a01c1615610ecd565b828060a01b031697610532891515610f02565b60a81c16151514610f4e565b610549841515610f9a565b610554811515610ff1565b61058d61058861058186610572856000526003602052604060002090565b90600052602052604060002090565b5460ff1690565b61103c565b61059b6004543410156110a5565b60408051348152602081019590955284015233929081906060820190565b0390a36102896001600055565b5034610021576000366003190112610021576001546105ef336001600160a01b03831614610e08565b60ff60a01b19166001556040513381527f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa90602090a1005b503461002157608036600319011261002157600435610645816101fb565b6024357f88839b4cc21bfc7f4dbcfc1bdf6894105b7251ac6830255f1e3460498dd1e71e6044356064359061067f60026000541415610e81565b60026000556107c4846107bd81600154986106a060ff8b60a01c1615610ecd565b6001600160a01b03908116996106c89060ff906106be8d1515610f02565b60a81c16156110e8565b6002546001600160a01b03169081166106e2811515611140565b6106ed871515610f9a565b6106f8881515610ff1565b610716610588610581896105728c6000526003602052604060002090565b6107246004548410156110a5565b6040516370a0823160e01b808252306004830152909360209391929091908490869060249082905afa948515610831575b60009561080c575b509061076c9130903390611799565b600254829061079190610785906001600160a01b031681565b6001600160a01b031690565b604051928352306004840152829060249082905afa9182156107ff575b6000926107e2575b5050611242565b1015611265565b604080519485526020850191909152830152339180606081016105b9565b6107f89250803d106104295761041b8183611204565b38806107b6565b610807611235565b6107ae565b61076c9291955061082990853d87116104295761041b8183611204565b94909161075d565b610839611235565b610755565b50346100215760203660031901126100215760043561085c816101fb565b6001546001600160a01b0391906108769083163314610e08565b16801561089357600280546001600160a01b031916919091179055005b60405162461bcd60e51b815260206004820152601d60248201527f4f4b4f4b3a205f77657468416464722063616e6e6f74206265203078300000006044820152606490fd5b6060906003190112610021576004356108f0816101fb565b906024359060443590565b5034610021577f50ada8888a99525eec0a00b308a8c4852daeb13b53104653ba8d26863b8df85061092b366108d8565b6000939192338552600660205261094860ff604087205416611508565b610956600286541415610e81565b6002855561097a610974610581846000526005602052604060002090565b15611547565b610985841515611593565b6001600160a01b03169261099a8415156115d4565b6002546109ed906109b590610785906001600160a01b031681565b6040516370a0823160e01b815230600482015290602090829060249082905afa908115610a91575b8791610a73575b50821115611614565b6109f93085141561166f565b610a1d610a10836000526005602052604060002090565b805460ff19166001179055565b600254610a3f9082908690610a3a906001600160a01b0316610785565b6112c5565b610a616040519283928360409060009294936060820195825260208201520152565b0390a2610a6e6001600055565b604051f35b610a8b915060203d81116104295761041b8183611204565b386109e4565b610a99611235565b6109dd565b503461002157600036600319011261002157602060ff60015460a01c166040519015158152f35b5034610021576060366003190112610021576024356004357f32f38d30f509e49778b4bdc33dd31f6a64a84fef1495435c8f55a291560a01ec6020604435610b0c8161030a565b610b2160018060a01b03600154163314610e08565b83600052600382526040600020856000528252610b4e8160406000209060ff801983541691151516179055565b6040519015158152a3005b5034610021576000366003190112610021576002546040516001600160a01b039091168152602090f35b503461002157600036600319011261002157600154610bac336001600160a01b03831614610e08565b60ff60a01b1916600160a01b176001556040513381527f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25890602090a1005b5034610021576020366003190112610021576004356000526005602052602060ff604060002054166040519015158152f35b503461002157600036600319011261002157602060ff60015460a81c166040519015158152f35b503461002157600036600319011261002157602047604051908152f35b50600080600319360112610c8557610c7c600282541415610e81565b60018155604051f35b80fd5b503461002157602036600319011261002157600435610ca6816101fb565b600154906001600160a01b0390610cc03383851614610e08565b6001600160a01b0319909216911617600155005b50346100215760403660031901126100215760043560005260036020526040600020602435600052602052602060ff604060002054166040519015158152f35b5034610021577f50ada8888a99525eec0a00b308a8c4852daeb13b53104653ba8d26863b8df850610d44366108d8565b600093913385526006602052610d6060ff604087205416611508565b610d6e600286541415610e81565b600285558185526005602052610d8b60ff60408720541615611547565b610d96811515611593565b6001600160a01b03841693610de6908290610db28715156115d4565b610dbe47831115611614565b610dca3088141561166f565b610de1610a10866000526005602052604060002090565b6116bb565b610a616040519283928360409060019294936060820195825260208201520152565b15610e0f57565b60405162461bcd60e51b815260206004820152601560248201527423b7bb32b93730b136329d103337b93134b23232b760591b6044820152606490fd5b5060405162461bcd60e51b815260206004820152600c60248201526b6e6f7420737570706f72742160a01b6044820152606490fd5b15610e8857565b60405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606490fd5b15610ed457565b60405162461bcd60e51b81526020600482015260066024820152651c185d5cd95960d21b6044820152606490fd5b15610f0957565b60405162461bcd60e51b815260206004820152601760248201527f4f4b4f4b3a205f746f2063616e6e6f74206265203078300000000000000000006044820152606490fd5b15610f5557565b60405162461bcd60e51b815260206004820152601d60248201527f4f4b4f4b3a206e617469766520455448206e6f7420737570706f7274210000006044820152606490fd5b15610fa157565b60405162461bcd60e51b815260206004820152602260248201527f4f4b4f4b3a205f746172676574546f6b656e547970652063616e6e6f74206265604482015261020360f41b6064820152608490fd5b15610ff857565b606460405162461bcd60e51b815260206004820152602060248201527f4f4b4f4b3a205f746172676574436861696e49642063616e6e6f7420626520306044820152fd5b1561104357565b60405162461bcd60e51b815260206004820152603460248201527f4f4b4f4b3a205f746172676574546f6b656e54797065206e6f7420737570706f6044820152731c9d081a5b8817dd185c99d95d10da185a5b925960621b6064820152608490fd5b156110ac57565b60405162461bcd60e51b81526020600482015260146024820152734f4b4f4b3a20696e76616c6964205f76616c756560601b6044820152606490fd5b156110ef57565b60405162461bcd60e51b8152602060048201526024808201527f4f4b4f4b3a20796f752073686f756c64206465706f736974206e6174697665206044820152634554482160e01b6064820152608490fd5b1561114757565b60405162461bcd60e51b815260206004820152601c60248201527f4f4b4f4b3a2077657468416464722063616e6e6f7420626520307830000000006044820152606490fd5b50634e487b7160e01b600052604160045260246000fd5b6080810190811067ffffffffffffffff8211176111bf57604052565b6111c761118c565b604052565b6040810190811067ffffffffffffffff8211176111bf57604052565b60a0810190811067ffffffffffffffff8211176111bf57604052565b90601f8019910116810190811067ffffffffffffffff8211176111bf57604052565b90816020910312610021575190565b506040513d6000823e3d90fd5b9190820391821161124f57565b634e487b7160e01b600052601160045260246000fd5b1561126c57565b60405162461bcd60e51b815260206004820152602b60248201527f4f4b4f4b3a206e6f74207265636569766520656e6f756768207765746820746f60448201526a6b656e20616d6f756e742160a81b6064820152608490fd5b60405163a9059cbb60e01b60208083019182526001600160a01b03948516602484015260448084019690965294825290929091611301846111a3565b169060405192611310846111cc565b8484527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656485850152823b156113835761135c939260009283809351925af161135661143f565b9061148d565b8051908161136957505050565b826113819361137c9383010191016113c8565b6113e0565b565b60405162461bcd60e51b815260048101869052601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b9081602091031261002157516113dd8161030a565b90565b156113e757565b60405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608490fd5b3d15611488573d9067ffffffffffffffff821161147b575b6040519161146f601f8201601f191660200184611204565b82523d6000602084013e565b61148361118c565b611457565b606090565b90919015611499575090565b8151156114a95750805190602001fd5b6040519062461bcd60e51b82528160208060048301528251908160248401526000935b8285106114ef575050604492506000838284010152601f80199101168101030190fd5b84810182015186860160440152938101938593506114cc565b1561150f57565b60405162461bcd60e51b815260206004820152601060248201526f4f4b4f4b3a20666f7262696464656e3160801b6044820152606490fd5b1561154e57565b60405162461bcd60e51b815260206004820152601b60248201527f6465706f736974496420616c72656164792070726f63657373656400000000006044820152606490fd5b1561159a57565b60405162461bcd60e51b81526020600482015260126024820152711a5b9d985b1a590817dbdd5d105b5bdd5b9d60721b6044820152606490fd5b156115db57565b60405162461bcd60e51b815260206004820152601160248201527034b73b30b634b2102fb932b1b2b4bb32b960791b6044820152606490fd5b1561161b57565b60405162461bcd60e51b815260206004820152602660248201527f5f6f7574416d6f756e74206c61726765207468616e20636f6e74726163742062604482015265616c616e636560d01b6064820152608490fd5b1561167657565b60405162461bcd60e51b815260206004820152601a60248201527f63616e206e6f742073656e642065746820746f206d7973656c660000000000006044820152606490fd5b814710611754576040516000928392839291906001600160a01b03165af16116e161143f565b50156116e957565b60405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608490fd5b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606490fd5b9091600080949381946040519160208301946323b872dd60e01b865260018060a01b0380921660248501521660448301526064820152606481526117dc816111e8565b51925af16117e861143f565b8161183b575b50156117f657565b60405162461bcd60e51b815260206004820152601a60248201527f4f4b4f4b3a205452414e534645525f46524f4d5f4641494c45440000000000006044820152606490fd5b8051801592508215611850575b5050386117ee565b61186392506020809183010191016113c8565b388061184856fea26469706673582212204324f635afa1240e6cfc5a4f52f22cdbd7a3589e37ded5b087956c3393eac61664736f6c6343000810003300000000000000000000000000000000000000000000000000000000000000010000000000000000000000005300000000000000000000000000000000000004

Deployed Bytecode

0x60806040526004361015610026575b361561001957600080fd5b610021610e4c565b600080fd5b60003560e01c806301e33667146101f2578063070c82a8146101e957806312d43a51146101e05780631e261538146101d757806324815018146101ce5780632eec6bcb146101c55780633833f5f5146101bc5780633e87273c146101b35780633f4ba83a146101aa5780633ff2fcef146101a1578063478c3d87146101985780635c3c8e1b1461018f5780635c975abb146101865780637b59ee9a1461017d5780637d5aa5f4146101745780638456cb591461016b5780638855626f1461016257806390d0216d14610159578063b0b57b5f14610150578063cd38698314610147578063cfad57a21461013e578063ecd1861c146101355763fa55847a0361000e57610130610d14565b61000e565b50610130610cd4565b50610130610c88565b50610130610c60565b50610130610c43565b50610130610c1c565b50610130610bea565b50610130610b83565b50610130610b59565b50610130610ac5565b50610130610a9e565b506101306108fb565b5061013061083e565b50610130610627565b506101306105c6565b506101306104af565b5061013061046c565b5061013061043d565b506101306103ab565b50610130610314565b506101306102e0565b506101306102c1565b5061013061020c565b6001600160a01b0381160361002157565b50346100215760603660031901126100215760043561022a816101fb565b60243590610237826101fb565b6001546001600160a01b03906102509082163314610e08565b61025f60026000541415610e81565b60026000558060025416911690811461028b5761027f91604435916112c5565b6102896001600055565b005b60405162461bcd60e51b815260206004820152600e60248201526d34b73b30b634b2102fba37b5b2b760911b6044820152606490fd5b5034610021576000366003190112610021576020600454604051908152f35b5034610021576000366003190112610021576001546040516001600160a01b039091168152602090f35b8015150361002157565b503461002157604036600319011261002157600435610332816101fb565b7f1d5bc0255b943d6a5b5279e8a55d74d620baccbceecb25e87a3558f14c4c118e6020602435926103628461030a565b6001546001600160a01b03919061037c9083163314610e08565b169283600052600682526103a08160406000209060ff801983541691151516179055565b6040519015158152a2005b5034610021576000366003190112610021576002546040516370a0823160e01b81523060048201526020918290829060249082906001600160a01b03165afa908115610430575b600091610403575b50604051908152f35b6104239150823d8111610429575b61041b8183611204565b810190611226565b386103fa565b503d610411565b610438611235565b6103f2565b50346100215760203660031901126100215761046460018060a01b03600154163314610e08565b600480359055005b50346100215760203660031901126100215760043561048a816101fb565b60018060a01b03166000526006602052602060ff604060002054166040519015158152f35b506060366003190112610021576004356104c8816101fb565b6024357f88839b4cc21bfc7f4dbcfc1bdf6894105b7251ac6830255f1e3460498dd1e71e6105b960443561050160026000541415610e81565b600260005561053e600160ff81549761051f828a60a01c1615610ecd565b828060a01b031697610532891515610f02565b60a81c16151514610f4e565b610549841515610f9a565b610554811515610ff1565b61058d61058861058186610572856000526003602052604060002090565b90600052602052604060002090565b5460ff1690565b61103c565b61059b6004543410156110a5565b60408051348152602081019590955284015233929081906060820190565b0390a36102896001600055565b5034610021576000366003190112610021576001546105ef336001600160a01b03831614610e08565b60ff60a01b19166001556040513381527f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa90602090a1005b503461002157608036600319011261002157600435610645816101fb565b6024357f88839b4cc21bfc7f4dbcfc1bdf6894105b7251ac6830255f1e3460498dd1e71e6044356064359061067f60026000541415610e81565b60026000556107c4846107bd81600154986106a060ff8b60a01c1615610ecd565b6001600160a01b03908116996106c89060ff906106be8d1515610f02565b60a81c16156110e8565b6002546001600160a01b03169081166106e2811515611140565b6106ed871515610f9a565b6106f8881515610ff1565b610716610588610581896105728c6000526003602052604060002090565b6107246004548410156110a5565b6040516370a0823160e01b808252306004830152909360209391929091908490869060249082905afa948515610831575b60009561080c575b509061076c9130903390611799565b600254829061079190610785906001600160a01b031681565b6001600160a01b031690565b604051928352306004840152829060249082905afa9182156107ff575b6000926107e2575b5050611242565b1015611265565b604080519485526020850191909152830152339180606081016105b9565b6107f89250803d106104295761041b8183611204565b38806107b6565b610807611235565b6107ae565b61076c9291955061082990853d87116104295761041b8183611204565b94909161075d565b610839611235565b610755565b50346100215760203660031901126100215760043561085c816101fb565b6001546001600160a01b0391906108769083163314610e08565b16801561089357600280546001600160a01b031916919091179055005b60405162461bcd60e51b815260206004820152601d60248201527f4f4b4f4b3a205f77657468416464722063616e6e6f74206265203078300000006044820152606490fd5b6060906003190112610021576004356108f0816101fb565b906024359060443590565b5034610021577f50ada8888a99525eec0a00b308a8c4852daeb13b53104653ba8d26863b8df85061092b366108d8565b6000939192338552600660205261094860ff604087205416611508565b610956600286541415610e81565b6002855561097a610974610581846000526005602052604060002090565b15611547565b610985841515611593565b6001600160a01b03169261099a8415156115d4565b6002546109ed906109b590610785906001600160a01b031681565b6040516370a0823160e01b815230600482015290602090829060249082905afa908115610a91575b8791610a73575b50821115611614565b6109f93085141561166f565b610a1d610a10836000526005602052604060002090565b805460ff19166001179055565b600254610a3f9082908690610a3a906001600160a01b0316610785565b6112c5565b610a616040519283928360409060009294936060820195825260208201520152565b0390a2610a6e6001600055565b604051f35b610a8b915060203d81116104295761041b8183611204565b386109e4565b610a99611235565b6109dd565b503461002157600036600319011261002157602060ff60015460a01c166040519015158152f35b5034610021576060366003190112610021576024356004357f32f38d30f509e49778b4bdc33dd31f6a64a84fef1495435c8f55a291560a01ec6020604435610b0c8161030a565b610b2160018060a01b03600154163314610e08565b83600052600382526040600020856000528252610b4e8160406000209060ff801983541691151516179055565b6040519015158152a3005b5034610021576000366003190112610021576002546040516001600160a01b039091168152602090f35b503461002157600036600319011261002157600154610bac336001600160a01b03831614610e08565b60ff60a01b1916600160a01b176001556040513381527f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25890602090a1005b5034610021576020366003190112610021576004356000526005602052602060ff604060002054166040519015158152f35b503461002157600036600319011261002157602060ff60015460a81c166040519015158152f35b503461002157600036600319011261002157602047604051908152f35b50600080600319360112610c8557610c7c600282541415610e81565b60018155604051f35b80fd5b503461002157602036600319011261002157600435610ca6816101fb565b600154906001600160a01b0390610cc03383851614610e08565b6001600160a01b0319909216911617600155005b50346100215760403660031901126100215760043560005260036020526040600020602435600052602052602060ff604060002054166040519015158152f35b5034610021577f50ada8888a99525eec0a00b308a8c4852daeb13b53104653ba8d26863b8df850610d44366108d8565b600093913385526006602052610d6060ff604087205416611508565b610d6e600286541415610e81565b600285558185526005602052610d8b60ff60408720541615611547565b610d96811515611593565b6001600160a01b03841693610de6908290610db28715156115d4565b610dbe47831115611614565b610dca3088141561166f565b610de1610a10866000526005602052604060002090565b6116bb565b610a616040519283928360409060019294936060820195825260208201520152565b15610e0f57565b60405162461bcd60e51b815260206004820152601560248201527423b7bb32b93730b136329d103337b93134b23232b760591b6044820152606490fd5b5060405162461bcd60e51b815260206004820152600c60248201526b6e6f7420737570706f72742160a01b6044820152606490fd5b15610e8857565b60405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606490fd5b15610ed457565b60405162461bcd60e51b81526020600482015260066024820152651c185d5cd95960d21b6044820152606490fd5b15610f0957565b60405162461bcd60e51b815260206004820152601760248201527f4f4b4f4b3a205f746f2063616e6e6f74206265203078300000000000000000006044820152606490fd5b15610f5557565b60405162461bcd60e51b815260206004820152601d60248201527f4f4b4f4b3a206e617469766520455448206e6f7420737570706f7274210000006044820152606490fd5b15610fa157565b60405162461bcd60e51b815260206004820152602260248201527f4f4b4f4b3a205f746172676574546f6b656e547970652063616e6e6f74206265604482015261020360f41b6064820152608490fd5b15610ff857565b606460405162461bcd60e51b815260206004820152602060248201527f4f4b4f4b3a205f746172676574436861696e49642063616e6e6f7420626520306044820152fd5b1561104357565b60405162461bcd60e51b815260206004820152603460248201527f4f4b4f4b3a205f746172676574546f6b656e54797065206e6f7420737570706f6044820152731c9d081a5b8817dd185c99d95d10da185a5b925960621b6064820152608490fd5b156110ac57565b60405162461bcd60e51b81526020600482015260146024820152734f4b4f4b3a20696e76616c6964205f76616c756560601b6044820152606490fd5b156110ef57565b60405162461bcd60e51b8152602060048201526024808201527f4f4b4f4b3a20796f752073686f756c64206465706f736974206e6174697665206044820152634554482160e01b6064820152608490fd5b1561114757565b60405162461bcd60e51b815260206004820152601c60248201527f4f4b4f4b3a2077657468416464722063616e6e6f7420626520307830000000006044820152606490fd5b50634e487b7160e01b600052604160045260246000fd5b6080810190811067ffffffffffffffff8211176111bf57604052565b6111c761118c565b604052565b6040810190811067ffffffffffffffff8211176111bf57604052565b60a0810190811067ffffffffffffffff8211176111bf57604052565b90601f8019910116810190811067ffffffffffffffff8211176111bf57604052565b90816020910312610021575190565b506040513d6000823e3d90fd5b9190820391821161124f57565b634e487b7160e01b600052601160045260246000fd5b1561126c57565b60405162461bcd60e51b815260206004820152602b60248201527f4f4b4f4b3a206e6f74207265636569766520656e6f756768207765746820746f60448201526a6b656e20616d6f756e742160a81b6064820152608490fd5b60405163a9059cbb60e01b60208083019182526001600160a01b03948516602484015260448084019690965294825290929091611301846111a3565b169060405192611310846111cc565b8484527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656485850152823b156113835761135c939260009283809351925af161135661143f565b9061148d565b8051908161136957505050565b826113819361137c9383010191016113c8565b6113e0565b565b60405162461bcd60e51b815260048101869052601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b9081602091031261002157516113dd8161030a565b90565b156113e757565b60405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608490fd5b3d15611488573d9067ffffffffffffffff821161147b575b6040519161146f601f8201601f191660200184611204565b82523d6000602084013e565b61148361118c565b611457565b606090565b90919015611499575090565b8151156114a95750805190602001fd5b6040519062461bcd60e51b82528160208060048301528251908160248401526000935b8285106114ef575050604492506000838284010152601f80199101168101030190fd5b84810182015186860160440152938101938593506114cc565b1561150f57565b60405162461bcd60e51b815260206004820152601060248201526f4f4b4f4b3a20666f7262696464656e3160801b6044820152606490fd5b1561154e57565b60405162461bcd60e51b815260206004820152601b60248201527f6465706f736974496420616c72656164792070726f63657373656400000000006044820152606490fd5b1561159a57565b60405162461bcd60e51b81526020600482015260126024820152711a5b9d985b1a590817dbdd5d105b5bdd5b9d60721b6044820152606490fd5b156115db57565b60405162461bcd60e51b815260206004820152601160248201527034b73b30b634b2102fb932b1b2b4bb32b960791b6044820152606490fd5b1561161b57565b60405162461bcd60e51b815260206004820152602660248201527f5f6f7574416d6f756e74206c61726765207468616e20636f6e74726163742062604482015265616c616e636560d01b6064820152608490fd5b1561167657565b60405162461bcd60e51b815260206004820152601a60248201527f63616e206e6f742073656e642065746820746f206d7973656c660000000000006044820152606490fd5b814710611754576040516000928392839291906001600160a01b03165af16116e161143f565b50156116e957565b60405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608490fd5b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606490fd5b9091600080949381946040519160208301946323b872dd60e01b865260018060a01b0380921660248501521660448301526064820152606481526117dc816111e8565b51925af16117e861143f565b8161183b575b50156117f657565b60405162461bcd60e51b815260206004820152601a60248201527f4f4b4f4b3a205452414e534645525f46524f4d5f4641494c45440000000000006044820152606490fd5b8051801592508215611850575b5050386117ee565b61186392506020809183010191016113c8565b388061184856fea26469706673582212204324f635afa1240e6cfc5a4f52f22cdbd7a3589e37ded5b087956c3393eac61664736f6c63430008100033

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

00000000000000000000000000000000000000000000000000000000000000010000000000000000000000005300000000000000000000000000000000000004

-----Decoded View---------------
Arg [0] : _isNativeETHChain (bool): True
Arg [1] : _wethAddr (address): 0x5300000000000000000000000000000000000004

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [1] : 0000000000000000000000005300000000000000000000000000000000000004


Block Transaction Gas Used Reward
view all blocks sequenced

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

Validator Index Block Amount
View All Withdrawals

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

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