ETH Price: $2,447.71 (-0.89%)

Contract

0x0d02e94fB14f19b5E04E4CC91f62c1A80B09a6B6
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Swap ETH2BSC207756002024-09-18 6:09:5925 days ago1726639799IN
0x0d02e94f...80B09a6B6
0.02 ETH0.0005037.62671944
Swap ETH2BSC207703162024-09-17 12:25:2326 days ago1726575923IN
0x0d02e94f...80B09a6B6
0.02 ETH0.000304794.98419687
Swap ETH2BSC207698692024-09-17 10:55:5926 days ago1726570559IN
0x0d02e94f...80B09a6B6
0.02 ETH0.000163612.48078771
Register Swap Pa...207697082024-09-17 10:23:4726 days ago1726568627IN
0x0d02e94f...80B09a6B6
0 ETH0.000062932.60842173
Transfer207695272024-09-17 9:47:1126 days ago1726566431IN
0x0d02e94f...80B09a6B6
0.004 ETH0.000050172.38951798
Swap ETH2BSC207633932024-09-16 13:11:3527 days ago1726492295IN
0x0d02e94f...80B09a6B6
0.02 ETH0.000413786.76768057
Swap ETH2BSC207614722024-09-16 6:43:4727 days ago1726469027IN
0x0d02e94f...80B09a6B6
0.02 ETH0.0013781720.89632317
Swap ETH2BSC207541062024-09-15 6:04:4728 days ago1726380287IN
0x0d02e94f...80B09a6B6
0.02 ETH0.000224433.40295333
Swap ETH2BSC207501722024-09-14 16:54:5929 days ago1726332899IN
0x0d02e94f...80B09a6B6
0.02 ETH0.000303094.59561819
Swap ETH2BSC207422202024-09-13 14:14:2330 days ago1726236863IN
0x0d02e94f...80B09a6B6
0.02 ETH0.000347145.67672888
Swap ETH2BSC207417912024-09-13 12:47:3530 days ago1726231655IN
0x0d02e94f...80B09a6B6
0.02 ETH0.000283224.63138895
Swap ETH2BSC207383802024-09-13 1:23:1130 days ago1726190591IN
0x0d02e94f...80B09a6B6
0.02 ETH0.000253943.85033172
Swap ETH2BSC207365082024-09-12 19:05:5930 days ago1726167959IN
0x0d02e94f...80B09a6B6
0.02 ETH0.000500527.5890479
Swap ETH2BSC207279822024-09-11 14:31:3532 days ago1726065095IN
0x0d02e94f...80B09a6B6
0.02 ETH0.000536428.13343514
Swap ETH2BSC207137132024-09-09 14:40:4734 days ago1725892847IN
0x0d02e94f...80B09a6B6
0.02 ETH0.0006890510.86128832
Swap ETH2BSC207041442024-09-08 6:37:2335 days ago1725777443IN
0x0d02e94f...80B09a6B6
0.02 ETH0.000190552.88932494
Swap ETH2BSC206777532024-09-04 14:15:2339 days ago1725459323IN
0x0d02e94f...80B09a6B6
0.02 ETH0.000568338.61732011
Swap ETH2BSC206356312024-08-29 17:08:3545 days ago1724951315IN
0x0d02e94f...80B09a6B6
0.02 ETH0.000377245.71983285
Swap ETH2BSC206322662024-08-29 5:50:4745 days ago1724910647IN
0x0d02e94f...80B09a6B6
0.02 ETH0.000190772.89253743
Swap ETH2BSC206322462024-08-29 5:46:3545 days ago1724910395IN
0x0d02e94f...80B09a6B6
0.02 ETH0.000168912.56107539
Swap ETH2BSC206322202024-08-29 5:41:2345 days ago1724910083IN
0x0d02e94f...80B09a6B6
0.02 ETH0.000119671.81457647
Swap ETH2BSC205759002024-08-21 8:47:5953 days ago1724230079IN
0x0d02e94f...80B09a6B6
0.02 ETH0.000191672.90618534
Swap ETH2BSC205391112024-08-16 5:30:5958 days ago1723786259IN
0x0d02e94f...80B09a6B6
0.02 ETH0.000191672.90624521
Swap ETH2BSC205278972024-08-14 15:54:4760 days ago1723650887IN
0x0d02e94f...80B09a6B6
0.02 ETH0.000643849.76216427
Swap ETH2BSC203431082024-07-19 20:56:3585 days ago1721422595IN
0x0d02e94f...80B09a6B6
0.02 ETH0.000430696.53039225
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
207756002024-09-18 6:09:5925 days ago1726639799
0x0d02e94f...80B09a6B6
0.02 ETH
207756002024-09-18 6:09:5925 days ago1726639799
0x0d02e94f...80B09a6B6
0 ETH
207703162024-09-17 12:25:2326 days ago1726575923
0x0d02e94f...80B09a6B6
0.02 ETH
207703162024-09-17 12:25:2326 days ago1726575923
0x0d02e94f...80B09a6B6
0 ETH
207698692024-09-17 10:55:5926 days ago1726570559
0x0d02e94f...80B09a6B6
0.02 ETH
207698692024-09-17 10:55:5926 days ago1726570559
0x0d02e94f...80B09a6B6
0 ETH
207633932024-09-16 13:11:3527 days ago1726492295
0x0d02e94f...80B09a6B6
0.02 ETH
207633932024-09-16 13:11:3527 days ago1726492295
0x0d02e94f...80B09a6B6
0 ETH
207614722024-09-16 6:43:4727 days ago1726469027
0x0d02e94f...80B09a6B6
0.02 ETH
207614722024-09-16 6:43:4727 days ago1726469027
0x0d02e94f...80B09a6B6
0 ETH
207541062024-09-15 6:04:4728 days ago1726380287
0x0d02e94f...80B09a6B6
0.02 ETH
207541062024-09-15 6:04:4728 days ago1726380287
0x0d02e94f...80B09a6B6
0 ETH
207501722024-09-14 16:54:5929 days ago1726332899
0x0d02e94f...80B09a6B6
0.02 ETH
207501722024-09-14 16:54:5929 days ago1726332899
0x0d02e94f...80B09a6B6
0 ETH
207422202024-09-13 14:14:2330 days ago1726236863
0x0d02e94f...80B09a6B6
0.02 ETH
207422202024-09-13 14:14:2330 days ago1726236863
0x0d02e94f...80B09a6B6
0 ETH
207417912024-09-13 12:47:3530 days ago1726231655
0x0d02e94f...80B09a6B6
0.02 ETH
207417912024-09-13 12:47:3530 days ago1726231655
0x0d02e94f...80B09a6B6
0 ETH
207383802024-09-13 1:23:1130 days ago1726190591
0x0d02e94f...80B09a6B6
0.02 ETH
207383802024-09-13 1:23:1130 days ago1726190591
0x0d02e94f...80B09a6B6
0 ETH
207365082024-09-12 19:05:5930 days ago1726167959
0x0d02e94f...80B09a6B6
0.02 ETH
207365082024-09-12 19:05:5930 days ago1726167959
0x0d02e94f...80B09a6B6
0 ETH
207279822024-09-11 14:31:3532 days ago1726065095
0x0d02e94f...80B09a6B6
0.02 ETH
207279822024-09-11 14:31:3532 days ago1726065095
0x0d02e94f...80B09a6B6
0 ETH
207137132024-09-09 14:40:4734 days ago1725892847
0x0d02e94f...80B09a6B6
0.02 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ETHSwapAgent

Compiler Version
v0.7.0+commit.9e61f92b

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, None license

Contract Source Code (Solidity Multiple files format)

File 1 of 8: ETHSwapAgent.sol
pragma solidity >=0.6.4;

import "./IERC20Query.sol";
import "./Context.sol";
import "./SafeERC20.sol";
import "./Initializable.sol";

contract ETHSwapAgent is Context, Initializable {

    using SafeERC20 for IERC20;

    mapping(address => bool) public registeredERC20;
    mapping(bytes32 => bool) public filledBSCTx;
    address payable public owner;
    uint256 public swapFee;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
    event SwapPairRegister(address indexed sponsor,address indexed erc20Addr, string name, string symbol, uint8 decimals);
    event SwapStarted(address indexed erc20Addr, address indexed fromAddr, uint256 amount, uint256 feeAmount);
    event SwapFilled(address indexed erc20Addr, bytes32 indexed bscTxHash, address indexed toAddress, uint256 amount);

    constructor() public {
    }

    function initialize(uint256 fee, address payable ownerAddr) public initializer {
        swapFee = fee;
        owner = ownerAddr;
    }

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

    modifier notContract() {
        require(!isContract(msg.sender), "contract is not allowed to swap");
        require(msg.sender == tx.origin, "no proxy contract is allowed");
       _;
    }

    function isContract(address addr) internal view returns (bool) {
        uint size;
        assembly { size := extcodesize(addr) }
        return size > 0;
    }

    /**
        * @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 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 payable newOwner) public onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(owner, newOwner);
        owner = newOwner;
    }

    /**
     * @dev Returns set minimum swap fee from ERC20 to BEP20
     */
    function setSwapFee(uint256 fee) onlyOwner external {
        swapFee = fee;
    }

    function registerSwapPairToBSC(address erc20Addr) external returns (bool) {
        require(!registeredERC20[erc20Addr], "already registered");

        string memory name = IERC20Query(erc20Addr).name();
        string memory symbol = IERC20Query(erc20Addr).symbol();
        uint8 decimals = IERC20Query(erc20Addr).decimals();

        require(bytes(name).length>0, "empty name");
        require(bytes(symbol).length>0, "empty symbol");

        registeredERC20[erc20Addr] = true;

        emit SwapPairRegister(msg.sender, erc20Addr, name, symbol, decimals);
        return true;
    }

    function fillBSC2ETHSwap(bytes32 bscTxHash, address erc20Addr, address toAddress, uint256 amount) onlyOwner external returns (bool) {
        require(!filledBSCTx[bscTxHash], "bsc tx filled already");
        require(registeredERC20[erc20Addr], "not registered token");

        filledBSCTx[bscTxHash] = true;
        IERC20(erc20Addr).safeTransfer(toAddress, amount);

        emit SwapFilled(erc20Addr, bscTxHash, toAddress, amount);
        return true;
    }

    function swapETH2BSC(address erc20Addr, uint256 amount) payable external notContract returns (bool) {
        require(registeredERC20[erc20Addr], "not registered token");
        require(msg.value == swapFee, "swap fee not equal");

        IERC20(erc20Addr).safeTransferFrom(msg.sender, address(this), amount);
        if (msg.value != 0) {
            owner.transfer(msg.value);
        }

        emit SwapStarted(erc20Addr, msg.sender, amount, msg.value);
        return true;
    }
}

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

pragma solidity >=0.6.2 <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 8: Context.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <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 GSN 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 payable) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

File 4 of 8: IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <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 5 of 8: IERC20Query.sol
pragma solidity >=0.6.4;

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

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

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

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

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

File 6 of 8: Initializable.sol
// SPDX-License-Identifier: MIT

// solhint-disable-next-line compiler-version
pragma solidity >=0.4.24 <0.8.0;

import "./Address.sol";

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {UpgradeableProxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 */
abstract contract Initializable {

    /**
     * @dev Indicates that the contract has been initialized.
     */
    bool private _initialized;

    /**
     * @dev Indicates that the contract is in the process of being initialized.
     */
    bool private _initializing;

    /**
     * @dev Modifier to protect an initializer function from being invoked twice.
     */
    modifier initializer() {
        require(_initializing || _isConstructor() || !_initialized, "Initializable: contract is already initialized");

        bool isTopLevelCall = !_initializing;
        if (isTopLevelCall) {
            _initializing = true;
            _initialized = true;
        }

        _;

        if (isTopLevelCall) {
            _initializing = false;
        }
    }

    /// @dev Returns true if and only if the function is running in the constructor
    function _isConstructor() private view returns (bool) {
        return !Address.isContract(address(this));
    }
}

File 7 of 8: SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "./IERC20.sol";
import "./SafeMath.sol";
import "./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");
        }
    }
}

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

pragma solidity >=0.6.0 <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, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        uint256 c = a + b;
        if (c < a) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b > a) return (false, 0);
        return (true, 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) {
        // 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);
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a / b);
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a % b);
    }

    /**
     * @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) {
        require(b <= a, "SafeMath: subtraction overflow");
        return a - b;
    }

    /**
     * @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) {
        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, reverting 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) {
        require(b > 0, "SafeMath: division by zero");
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting 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) {
        require(b > 0, "SafeMath: modulo by zero");
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * 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);
        return a - b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryDiv}.
     *
     * 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);
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * 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;
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"erc20Addr","type":"address"},{"indexed":true,"internalType":"bytes32","name":"bscTxHash","type":"bytes32"},{"indexed":true,"internalType":"address","name":"toAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"SwapFilled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sponsor","type":"address"},{"indexed":true,"internalType":"address","name":"erc20Addr","type":"address"},{"indexed":false,"internalType":"string","name":"name","type":"string"},{"indexed":false,"internalType":"string","name":"symbol","type":"string"},{"indexed":false,"internalType":"uint8","name":"decimals","type":"uint8"}],"name":"SwapPairRegister","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"erc20Addr","type":"address"},{"indexed":true,"internalType":"address","name":"fromAddr","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"feeAmount","type":"uint256"}],"name":"SwapStarted","type":"event"},{"inputs":[{"internalType":"bytes32","name":"bscTxHash","type":"bytes32"},{"internalType":"address","name":"erc20Addr","type":"address"},{"internalType":"address","name":"toAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"fillBSC2ETHSwap","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"filledBSCTx","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"fee","type":"uint256"},{"internalType":"address payable","name":"ownerAddr","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"erc20Addr","type":"address"}],"name":"registerSwapPairToBSC","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"registeredERC20","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"fee","type":"uint256"}],"name":"setSwapFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"erc20Addr","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"swapETH2BSC","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"swapFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b506112d6806100206000396000f3fe60806040526004361061009c5760003560e01c806389b156041161006457806389b156041461017a5780638da5cb5b146101ad5780639867df11146101de578063b9927a9c14610227578063da35a26f14610253578063f2fde38b1461028c5761009c565b806334e19907146100a157806350877c77146100cd57806354cf2aeb1461010b5780635c13c15114610132578063715018a614610165575b600080fd5b3480156100ad57600080fd5b506100cb600480360360208110156100c457600080fd5b50356102bf565b005b3480156100d957600080fd5b506100f7600480360360208110156100f057600080fd5b503561031c565b604080519115158252519081900360200190f35b34801561011757600080fd5b50610120610331565b60408051918252519081900360200190f35b34801561013e57600080fd5b506100f76004803603602081101561015557600080fd5b50356001600160a01b0316610337565b34801561017157600080fd5b506100cb61081e565b34801561018657600080fd5b506100f76004803603602081101561019d57600080fd5b50356001600160a01b03166108c0565b3480156101b957600080fd5b506101c26108d5565b604080516001600160a01b039092168252519081900360200190f35b3480156101ea57600080fd5b506100f76004803603608081101561020157600080fd5b508035906001600160a01b036020820135811691604081013590911690606001356108e4565b6100f76004803603604081101561023d57600080fd5b506001600160a01b038135169060200135610a82565b34801561025f57600080fd5b506100cb6004803603604081101561027657600080fd5b50803590602001356001600160a01b0316610c88565b34801561029857600080fd5b506100cb600480360360208110156102af57600080fd5b50356001600160a01b0316610d4c565b6102c7610e45565b6003546001600160a01b03908116911614610317576040805162461bcd60e51b81526020600482018190526024820152600080516020611257833981519152604482015290519081900360640190fd5b600455565b60026020526000908152604090205460ff1681565b60045481565b6001600160a01b03811660009081526001602052604081205460ff161561039a576040805162461bcd60e51b8152602060048201526012602482015271185b1c9958591e481c9959da5cdd195c995960721b604482015290519081900360640190fd5b6060826001600160a01b03166306fdde036040518163ffffffff1660e01b815260040160006040518083038186803b1580156103d557600080fd5b505afa1580156103e9573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561041257600080fd5b810190808051604051939291908464010000000082111561043257600080fd5b90830190602082018581111561044757600080fd5b825164010000000081118282018810171561046157600080fd5b82525081516020918201929091019080838360005b8381101561048e578181015183820152602001610476565b50505050905090810190601f1680156104bb5780820380516001836020036101000a031916815260200191505b5060405250505090506060836001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b1580156104ff57600080fd5b505afa158015610513573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561053c57600080fd5b810190808051604051939291908464010000000082111561055c57600080fd5b90830190602082018581111561057157600080fd5b825164010000000081118282018810171561058b57600080fd5b82525081516020918201929091019080838360005b838110156105b85781810151838201526020016105a0565b50505050905090810190601f1680156105e55780820380516001836020036101000a031916815260200191505b5060405250505090506000846001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561062957600080fd5b505afa15801561063d573d6000803e3d6000fd5b505050506040513d602081101561065357600080fd5b50518351909150610698576040805162461bcd60e51b815260206004820152600a602482015269656d707479206e616d6560b01b604482015290519081900360640190fd5b60008251116106dd576040805162461bcd60e51b815260206004820152600c60248201526b195b5c1d1e481cde5b589bdb60a21b604482015290519081900360640190fd5b6001600160a01b0385166000818152600160208181526040808420805460ff1916909317909255815160ff8616928101929092526060808352875190830152865133937ffe3bd005e346323fa452df8cafc28c55b99e3766ba8750571d139c6cf5bc08a0938993899389938392838101926080850192918901918190849084905b8381101561077657818101518382015260200161075e565b50505050905090810190601f1680156107a35780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b838110156107d65781810151838201526020016107be565b50505050905090810190601f1680156108035780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a3506001949350505050565b610826610e45565b6003546001600160a01b03908116911614610876576040805162461bcd60e51b81526020600482018190526024820152600080516020611257833981519152604482015290519081900360640190fd5b6003546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600380546001600160a01b0319169055565b60016020526000908152604090205460ff1681565b6003546001600160a01b031681565b60006108ee610e45565b6003546001600160a01b0390811691161461093e576040805162461bcd60e51b81526020600482018190526024820152600080516020611257833981519152604482015290519081900360640190fd5b60008581526002602052604090205460ff161561099a576040805162461bcd60e51b81526020600482015260156024820152746273632074782066696c6c656420616c726561647960581b604482015290519081900360640190fd5b6001600160a01b03841660009081526001602052604090205460ff166109fe576040805162461bcd60e51b81526020600482015260146024820152733737ba103932b3b4b9ba32b932b2103a37b5b2b760611b604482015290519081900360640190fd5b6000858152600260205260409020805460ff19166001179055610a2b6001600160a01b0385168484610e49565b826001600160a01b031685856001600160a01b03167f3bebd9a738291e69898b5dbfadb6329b4b09fc648bdef68762928e521463abd9856040518082815260200191505060405180910390a4506001949350505050565b6000610a8d33610e9b565b15610adf576040805162461bcd60e51b815260206004820152601f60248201527f636f6e7472616374206973206e6f7420616c6c6f77656420746f207377617000604482015290519081900360640190fd5b333214610b33576040805162461bcd60e51b815260206004820152601c60248201527f6e6f2070726f787920636f6e747261637420697320616c6c6f77656400000000604482015290519081900360640190fd5b6001600160a01b03831660009081526001602052604090205460ff16610b97576040805162461bcd60e51b81526020600482015260146024820152733737ba103932b3b4b9ba32b932b2103a37b5b2b760611b604482015290519081900360640190fd5b6004543414610be2576040805162461bcd60e51b81526020600482015260126024820152711cddd85c08199959481b9bdd08195c5d585b60721b604482015290519081900360640190fd5b610bf76001600160a01b038416333085610ea1565b3415610c38576003546040516001600160a01b03909116903480156108fc02916000818181858888f19350505050158015610c36573d6000803e3d6000fd5b505b60408051838152346020820152815133926001600160a01b038716927ff60309f865a6aa297da5fac6188136a02e5acfdf6e8f6d35257a9f4e9653170f929081900390910190a350600192915050565b600054610100900460ff1680610ca15750610ca1610f01565b80610caf575060005460ff16155b610cea5760405162461bcd60e51b815260040180806020018281038252602e815260200180611229602e913960400191505060405180910390fd5b600054610100900460ff16158015610d15576000805460ff1961ff0019909116610100171660011790555b6004839055600380546001600160a01b0319166001600160a01b0384161790558015610d47576000805461ff00191690555b505050565b610d54610e45565b6003546001600160a01b03908116911614610da4576040805162461bcd60e51b81526020600482018190526024820152600080516020611257833981519152604482015290519081900360640190fd5b6001600160a01b038116610de95760405162461bcd60e51b81526004018080602001828103825260268152602001806111dd6026913960400191505060405180910390fd5b6003546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600380546001600160a01b0319166001600160a01b0392909216919091179055565b3390565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610d47908490610f12565b3b151590565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052610efb908590610f12565b50505050565b6000610f0c30610e9b565b15905090565b6060610f67826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610fc39092919063ffffffff16565b805190915015610d4757808060200190516020811015610f8657600080fd5b5051610d475760405162461bcd60e51b815260040180806020018281038252602a815260200180611277602a913960400191505060405180910390fd5b6060610fd28484600085610fdc565b90505b9392505050565b60608247101561101d5760405162461bcd60e51b81526004018080602001828103825260268152602001806112036026913960400191505060405180910390fd5b61102685610e9b565b611077576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106110b65780518252601f199092019160209182019101611097565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611118576040519150601f19603f3d011682016040523d82523d6000602084013e61111d565b606091505b509150915061112d828286611138565b979650505050505050565b60608315611147575081610fd5565b8251156111575782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156111a1578181015183820152602001611189565b50505050905090810190601f1680156111ce5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a65644f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220e1eb0014b3a5e9521ecad72071a3d6ed24105598e423446308940a4cddfa3ae764736f6c63430007000033

Deployed Bytecode

0x60806040526004361061009c5760003560e01c806389b156041161006457806389b156041461017a5780638da5cb5b146101ad5780639867df11146101de578063b9927a9c14610227578063da35a26f14610253578063f2fde38b1461028c5761009c565b806334e19907146100a157806350877c77146100cd57806354cf2aeb1461010b5780635c13c15114610132578063715018a614610165575b600080fd5b3480156100ad57600080fd5b506100cb600480360360208110156100c457600080fd5b50356102bf565b005b3480156100d957600080fd5b506100f7600480360360208110156100f057600080fd5b503561031c565b604080519115158252519081900360200190f35b34801561011757600080fd5b50610120610331565b60408051918252519081900360200190f35b34801561013e57600080fd5b506100f76004803603602081101561015557600080fd5b50356001600160a01b0316610337565b34801561017157600080fd5b506100cb61081e565b34801561018657600080fd5b506100f76004803603602081101561019d57600080fd5b50356001600160a01b03166108c0565b3480156101b957600080fd5b506101c26108d5565b604080516001600160a01b039092168252519081900360200190f35b3480156101ea57600080fd5b506100f76004803603608081101561020157600080fd5b508035906001600160a01b036020820135811691604081013590911690606001356108e4565b6100f76004803603604081101561023d57600080fd5b506001600160a01b038135169060200135610a82565b34801561025f57600080fd5b506100cb6004803603604081101561027657600080fd5b50803590602001356001600160a01b0316610c88565b34801561029857600080fd5b506100cb600480360360208110156102af57600080fd5b50356001600160a01b0316610d4c565b6102c7610e45565b6003546001600160a01b03908116911614610317576040805162461bcd60e51b81526020600482018190526024820152600080516020611257833981519152604482015290519081900360640190fd5b600455565b60026020526000908152604090205460ff1681565b60045481565b6001600160a01b03811660009081526001602052604081205460ff161561039a576040805162461bcd60e51b8152602060048201526012602482015271185b1c9958591e481c9959da5cdd195c995960721b604482015290519081900360640190fd5b6060826001600160a01b03166306fdde036040518163ffffffff1660e01b815260040160006040518083038186803b1580156103d557600080fd5b505afa1580156103e9573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561041257600080fd5b810190808051604051939291908464010000000082111561043257600080fd5b90830190602082018581111561044757600080fd5b825164010000000081118282018810171561046157600080fd5b82525081516020918201929091019080838360005b8381101561048e578181015183820152602001610476565b50505050905090810190601f1680156104bb5780820380516001836020036101000a031916815260200191505b5060405250505090506060836001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b1580156104ff57600080fd5b505afa158015610513573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561053c57600080fd5b810190808051604051939291908464010000000082111561055c57600080fd5b90830190602082018581111561057157600080fd5b825164010000000081118282018810171561058b57600080fd5b82525081516020918201929091019080838360005b838110156105b85781810151838201526020016105a0565b50505050905090810190601f1680156105e55780820380516001836020036101000a031916815260200191505b5060405250505090506000846001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561062957600080fd5b505afa15801561063d573d6000803e3d6000fd5b505050506040513d602081101561065357600080fd5b50518351909150610698576040805162461bcd60e51b815260206004820152600a602482015269656d707479206e616d6560b01b604482015290519081900360640190fd5b60008251116106dd576040805162461bcd60e51b815260206004820152600c60248201526b195b5c1d1e481cde5b589bdb60a21b604482015290519081900360640190fd5b6001600160a01b0385166000818152600160208181526040808420805460ff1916909317909255815160ff8616928101929092526060808352875190830152865133937ffe3bd005e346323fa452df8cafc28c55b99e3766ba8750571d139c6cf5bc08a0938993899389938392838101926080850192918901918190849084905b8381101561077657818101518382015260200161075e565b50505050905090810190601f1680156107a35780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b838110156107d65781810151838201526020016107be565b50505050905090810190601f1680156108035780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a3506001949350505050565b610826610e45565b6003546001600160a01b03908116911614610876576040805162461bcd60e51b81526020600482018190526024820152600080516020611257833981519152604482015290519081900360640190fd5b6003546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600380546001600160a01b0319169055565b60016020526000908152604090205460ff1681565b6003546001600160a01b031681565b60006108ee610e45565b6003546001600160a01b0390811691161461093e576040805162461bcd60e51b81526020600482018190526024820152600080516020611257833981519152604482015290519081900360640190fd5b60008581526002602052604090205460ff161561099a576040805162461bcd60e51b81526020600482015260156024820152746273632074782066696c6c656420616c726561647960581b604482015290519081900360640190fd5b6001600160a01b03841660009081526001602052604090205460ff166109fe576040805162461bcd60e51b81526020600482015260146024820152733737ba103932b3b4b9ba32b932b2103a37b5b2b760611b604482015290519081900360640190fd5b6000858152600260205260409020805460ff19166001179055610a2b6001600160a01b0385168484610e49565b826001600160a01b031685856001600160a01b03167f3bebd9a738291e69898b5dbfadb6329b4b09fc648bdef68762928e521463abd9856040518082815260200191505060405180910390a4506001949350505050565b6000610a8d33610e9b565b15610adf576040805162461bcd60e51b815260206004820152601f60248201527f636f6e7472616374206973206e6f7420616c6c6f77656420746f207377617000604482015290519081900360640190fd5b333214610b33576040805162461bcd60e51b815260206004820152601c60248201527f6e6f2070726f787920636f6e747261637420697320616c6c6f77656400000000604482015290519081900360640190fd5b6001600160a01b03831660009081526001602052604090205460ff16610b97576040805162461bcd60e51b81526020600482015260146024820152733737ba103932b3b4b9ba32b932b2103a37b5b2b760611b604482015290519081900360640190fd5b6004543414610be2576040805162461bcd60e51b81526020600482015260126024820152711cddd85c08199959481b9bdd08195c5d585b60721b604482015290519081900360640190fd5b610bf76001600160a01b038416333085610ea1565b3415610c38576003546040516001600160a01b03909116903480156108fc02916000818181858888f19350505050158015610c36573d6000803e3d6000fd5b505b60408051838152346020820152815133926001600160a01b038716927ff60309f865a6aa297da5fac6188136a02e5acfdf6e8f6d35257a9f4e9653170f929081900390910190a350600192915050565b600054610100900460ff1680610ca15750610ca1610f01565b80610caf575060005460ff16155b610cea5760405162461bcd60e51b815260040180806020018281038252602e815260200180611229602e913960400191505060405180910390fd5b600054610100900460ff16158015610d15576000805460ff1961ff0019909116610100171660011790555b6004839055600380546001600160a01b0319166001600160a01b0384161790558015610d47576000805461ff00191690555b505050565b610d54610e45565b6003546001600160a01b03908116911614610da4576040805162461bcd60e51b81526020600482018190526024820152600080516020611257833981519152604482015290519081900360640190fd5b6001600160a01b038116610de95760405162461bcd60e51b81526004018080602001828103825260268152602001806111dd6026913960400191505060405180910390fd5b6003546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600380546001600160a01b0319166001600160a01b0392909216919091179055565b3390565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610d47908490610f12565b3b151590565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052610efb908590610f12565b50505050565b6000610f0c30610e9b565b15905090565b6060610f67826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610fc39092919063ffffffff16565b805190915015610d4757808060200190516020811015610f8657600080fd5b5051610d475760405162461bcd60e51b815260040180806020018281038252602a815260200180611277602a913960400191505060405180910390fd5b6060610fd28484600085610fdc565b90505b9392505050565b60608247101561101d5760405162461bcd60e51b81526004018080602001828103825260268152602001806112036026913960400191505060405180910390fd5b61102685610e9b565b611077576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106110b65780518252601f199092019160209182019101611097565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611118576040519150601f19603f3d011682016040523d82523d6000602084013e61111d565b606091505b509150915061112d828286611138565b979650505050505050565b60608315611147575081610fd5565b8251156111575782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156111a1578181015183820152602001611189565b50505050905090810190601f1680156111ce5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a65644f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220e1eb0014b3a5e9521ecad72071a3d6ed24105598e423446308940a4cddfa3ae764736f6c63430007000033

Deployed Bytecode Sourcemap

135:4037:2:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2533:82;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2533:82:2;;:::i;:::-;;276:43;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;276:43:2;;:::i;:::-;;;;;;;;;;;;;;;;;;359:22;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;2621:589;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2621:589:2;-1:-1:-1;;;;;2621:589:2;;:::i;1928:135::-;;;;;;;;;;;;;:::i;223:47::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;223:47:2;-1:-1:-1;;;;;223:47:2;;:::i;325:28::-;;;;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;325:28:2;;;;;;;;;;;;;;3216:462;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3216:462:2;;;-1:-1:-1;;;;;3216:462:2;;;;;;;;;;;;;;;;;;;:::i;3684:486::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;3684:486:2;;;;;;;;:::i;865:136::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;865:136:2;;;;;;-1:-1:-1;;;;;865:136:2;;:::i;2212:238::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2212:238:2;-1:-1:-1;;;;;2212:238:2;;:::i;2533:82::-;1137:12;:10;:12::i;:::-;1128:5;;-1:-1:-1;;;;;1128:5:2;;;:21;;;1120:66;;;;;-1:-1:-1;;;1120:66:2;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1120:66:2;;;;;;;;;;;;;;;2595:7:::1;:13:::0;2533:82::o;276:43::-;;;;;;;;;;;;;;;:::o;359:22::-;;;;:::o;2621:589::-;-1:-1:-1;;;;;2714:26:2;;2689:4;2714:26;;;:15;:26;;;;;;;;2713:27;2705:58;;;;;-1:-1:-1;;;2705:58:2;;;;;;;;;;;;-1:-1:-1;;;2705:58:2;;;;;;;;;;;;;;;2774:18;2807:9;-1:-1:-1;;;;;2795:27:2;;:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;2795:29:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2795:29:2;;;;;;;;;;-1:-1:-1;2795:29:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2774:50;;2834:20;2869:9;-1:-1:-1;;;;;2857:29:2;;:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;2857:31:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2857:31:2;;;;;;;;;;-1:-1:-1;2857:31:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2834:54;;2898:14;2927:9;-1:-1:-1;;;;;2915:31:2;;:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2915:33:2;2967:18;;2915:33;;-1:-1:-1;2959:43:2;;;;;-1:-1:-1;;;2959:43:2;;;;;;;;;;;;-1:-1:-1;;;2959:43:2;;;;;;;;;;;;;;;3041:1;3026:6;3020:20;:22;3012:47;;;;;-1:-1:-1;;;3012:47:2;;;;;;;;;;;;-1:-1:-1;;;3012:47:2;;;;;;;;;;;;;;;-1:-1:-1;;;;;3070:26:2;;;;;;3099:4;3070:26;;;;;;;;:33;;-1:-1:-1;;3070:33:2;;;;;;;3119:63;;3070:33;3119:63;;;;;;;;;;;;;;;;;;;;;3136:10;;3119:63;;3159:4;;3165:6;;3173:8;;3119:63;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3119:63:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3199:4:2;;2621:589;-1:-1:-1;;;;2621:589:2:o;1928:135::-;1137:12;:10;:12::i;:::-;1128:5;;-1:-1:-1;;;;;1128:5:2;;;:21;;;1120:66;;;;;-1:-1:-1;;;1120:66:2;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1120:66:2;;;;;;;;;;;;;;;2010:5:::1;::::0;1989:39:::1;::::0;2025:1:::1;::::0;-1:-1:-1;;;;;2010:5:2::1;::::0;1989:39:::1;::::0;2025:1;;1989:39:::1;2038:5;:18:::0;;-1:-1:-1;;;;;;2038:18:2::1;::::0;;1928:135::o;223:47::-;;;;;;;;;;;;;;;:::o;325:28::-;;;-1:-1:-1;;;;;325:28:2;;:::o;3216:462::-;3342:4;1137:12;:10;:12::i;:::-;1128:5;;-1:-1:-1;;;;;1128:5:2;;;:21;;;1120:66;;;;;-1:-1:-1;;;1120:66:2;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1120:66:2;;;;;;;;;;;;;;;3367:22:::1;::::0;;;:11:::1;:22;::::0;;;;;::::1;;3366:23;3358:57;;;::::0;;-1:-1:-1;;;3358:57:2;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;3358:57:2;;;;;;;;;;;;;::::1;;-1:-1:-1::0;;;;;3433:26:2;::::1;;::::0;;;:15:::1;:26;::::0;;;;;::::1;;3425:59;;;::::0;;-1:-1:-1;;;3425:59:2;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;3425:59:2;;;;;;;;;;;;;::::1;;3495:22;::::0;;;:11:::1;:22;::::0;;;;:29;;-1:-1:-1;;3495:29:2::1;3520:4;3495:29;::::0;;3534:49:::1;-1:-1:-1::0;;;;;3534:30:2;::::1;3565:9:::0;3576:6;3534:30:::1;:49::i;:::-;3632:9;-1:-1:-1::0;;;;;3599:51:2::1;3621:9;3610;-1:-1:-1::0;;;;;3599:51:2::1;;3643:6;3599:51;;;;;;;;;;;;;;;;;;-1:-1:-1::0;3667:4:2::1;3216:462:::0;;;;;;:::o;3684:486::-;3778:4;1252:22;1263:10;1252;:22::i;:::-;1251:23;1243:67;;;;;-1:-1:-1;;;1243:67:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;1328:10;1342:9;1328:23;1320:64;;;;;-1:-1:-1;;;1320:64:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3802:26:2;::::1;;::::0;;;:15:::1;:26;::::0;;;;;::::1;;3794:59;;;::::0;;-1:-1:-1;;;3794:59:2;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;3794:59:2;;;;;;;;;;;;;::::1;;3884:7;;3871:9;:20;3863:51;;;::::0;;-1:-1:-1;;;3863:51:2;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;3863:51:2;;;;;;;;;;;;;::::1;;3925:69;-1:-1:-1::0;;;;;3925:34:2;::::1;3960:10;3980:4;3987:6:::0;3925:34:::1;:69::i;:::-;4008:9;:14:::0;4004:70:::1;;4038:5;::::0;:25:::1;::::0;-1:-1:-1;;;;;4038:5:2;;::::1;::::0;4053:9:::1;4038:25:::0;::::1;;;::::0;:5:::1;:25:::0;:5;:25;4053:9;4038:5;:25;::::1;;;;;;;;;;;;;::::0;::::1;;;;;;4004:70;4089:53;::::0;;;;;4132:9:::1;4089:53;::::0;::::1;::::0;;;4112:10:::1;::::0;-1:-1:-1;;;;;4089:53:2;::::1;::::0;::::1;::::0;;;;;;;;;::::1;-1:-1:-1::0;4159:4:2::1;3684:486:::0;;;;:::o;865:136::-;1494:13:5;;;;;;;;:33;;;1511:16;:14;:16::i;:::-;1494:50;;;-1:-1:-1;1532:12:5;;;;1531:13;1494:50;1486:109;;;;-1:-1:-1;;;1486:109:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1606:19;1629:13;;;;;;1628:14;1652:98;;;;1686:13;:20;;-1:-1:-1;;;;1686:20:5;;;;;1720:19;1702:4;1720:19;;;1652:98;954:7:2::1;:13:::0;;;977:5:::1;:17:::0;;-1:-1:-1;;;;;;977:17:2::1;-1:-1:-1::0;;;;;977:17:2;::::1;;::::0;;1772:66:5;;;;1822:5;1806:21;;-1:-1:-1;;1806:21:5;;;1772:66;865:136:2;;;:::o;2212:238::-;1137:12;:10;:12::i;:::-;1128:5;;-1:-1:-1;;;;;1128:5:2;;;:21;;;1120:66;;;;;-1:-1:-1;;;1120:66:2;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1120:66:2;;;;;;;;;;;;;;;-1:-1:-1;;;;;2300:22:2;::::1;2292:73;;;;-1:-1:-1::0;;;2292:73:2::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2401:5;::::0;2380:37:::1;::::0;-1:-1:-1;;;;;2380:37:2;;::::1;::::0;2401:5:::1;::::0;2380:37:::1;::::0;2401:5:::1;::::0;2380:37:::1;2427:5;:16:::0;;-1:-1:-1;;;;;;2427:16:2::1;-1:-1:-1::0;;;;;2427:16:2;;;::::1;::::0;;;::::1;::::0;;2212:238::o;598:104:1:-;685:10;598:104;:::o;685:175:6:-;794:58;;;-1:-1:-1;;;;;794:58:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;794:58:6;-1:-1:-1;;;794:58:6;;;767:86;;787:5;;767:19;:86::i;1407:161:2:-;1518:17;1553:8;;;1407:161::o;866:203:6:-;993:68;;;-1:-1:-1;;;;;993:68:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;993:68:6;-1:-1:-1;;;993:68:6;;;966:96;;986:5;;966:19;:96::i;:::-;866:203;;;;:::o;1934:112:5:-;1982:4;2006:33;2033:4;2006:18;:33::i;:::-;2005:34;1998:41;;1934:112;:::o;2948:751:6:-;3367:23;3393:69;3421:4;3393:69;;;;;;;;;;;;;;;;;3401:5;-1:-1:-1;;;;;3393:27:6;;;:69;;;;;:::i;:::-;3476:17;;3367:95;;-1:-1:-1;3476:21:6;3472:221;;3616:10;3605:30;;;;;;;;;;;;;;;-1:-1:-1;3605:30:6;3597:85;;;;-1:-1:-1;;;3597:85:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3581:193:0;3684:12;3715:52;3737:6;3745:4;3751:1;3754:12;3715:21;:52::i;:::-;3708:59;;3581:193;;;;;;:::o;4608:523::-;4735:12;4792:5;4767:21;:30;;4759:81;;;;-1:-1:-1;;;4759:81:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4858:18;4869:6;4858:10;:18::i;:::-;4850:60;;;;;-1:-1:-1;;;4850:60:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;4981:12;4995:23;5022:6;-1:-1:-1;;;;;5022:11:0;5042:5;5050:4;5022:33;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;5022:33:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4980:75;;;;5072:52;5090:7;5099:10;5111:12;5072:17;:52::i;:::-;5065:59;4608:523;-1:-1:-1;;;;;;;4608:523:0:o;7091:725::-;7206:12;7234:7;7230:580;;;-1:-1:-1;7264:10:0;7257:17;;7230:580;7375:17;;:21;7371:429;;7633:10;7627:17;7693:15;7680:10;7676:2;7672:19;7665:44;7582:145;7772:12;7765:20;;-1:-1:-1;;;7765:20:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Swarm Source

ipfs://e1eb0014b3a5e9521ecad72071a3d6ed24105598e423446308940a4cddfa3ae7

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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.