ETH Price: $2,633.88 (+1.87%)

Contract

0x5aCBC71e970f375cb77994638A2E1c99ea3Faa47
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

1 address found via
Transaction Hash
Method
Block
From
To
Process Swap Req...202857642024-07-11 20:50:1141 days ago1720731011IN
0x5aCBC71e...9ea3Faa47
0 ETH0.000508935.56927739
Process Swap Req...200971592024-06-15 12:21:3567 days ago1718454095IN
0x5aCBC71e...9ea3Faa47
0 ETH0.000461626.21546399
Process Swap Req...200970882024-06-15 12:07:1167 days ago1718453231IN
0x5aCBC71e...9ea3Faa47
0 ETH0.00038135.13392139
Process Swap Req...200694882024-06-11 15:29:3571 days ago1718119775IN
0x5aCBC71e...9ea3Faa47
0 ETH0.0028456331.13964472
Process Swap Req...200694612024-06-11 15:24:1171 days ago1718119451IN
0x5aCBC71e...9ea3Faa47
0 ETH0.0029760232.5665576
Process Swap Req...200694162024-06-11 15:15:1171 days ago1718118911IN
0x5aCBC71e...9ea3Faa47
0 ETH0.0027080536.46187528
Process Swap Req...200671042024-06-11 7:30:1172 days ago1718091011IN
0x5aCBC71e...9ea3Faa47
0 ETH0.00048956.58968935
Swap Request200669802024-06-11 7:05:2372 days ago1718089523IN
0x5aCBC71e...9ea3Faa47
0.002 ETH0.000694928.78935876
Process Swap Req...200669242024-06-11 6:54:1172 days ago1718088851IN
0x5aCBC71e...9ea3Faa47
0 ETH0.000629216.88550226
Process Swap Req...200665962024-06-11 5:48:1172 days ago1718084891IN
0x5aCBC71e...9ea3Faa47
0 ETH0.000427674.68069478
Process Swap Req...200665842024-06-11 5:45:4772 days ago1718084747IN
0x5aCBC71e...9ea3Faa47
0 ETH0.000364334.9070839
Process Swap Req...200665832024-06-11 5:45:3572 days ago1718084735IN
0x5aCBC71e...9ea3Faa47
0 ETH0.000451544.94255184
Process Swap Req...200665362024-06-11 5:36:1172 days ago1718084171IN
0x5aCBC71e...9ea3Faa47
0 ETH0.000556856.09367905
Process Swap Req...199897792024-05-31 12:21:2382 days ago1717158083IN
0x5aCBC71e...9ea3Faa47
0 ETH0.001090111.93210521
Process Swap Req...195743012024-04-03 9:17:35140 days ago1712135855IN
0x5aCBC71e...9ea3Faa47
0 ETH0.0021170828.50486054
Process Swap Req...195584502024-04-01 3:54:35143 days ago1711943675IN
0x5aCBC71e...9ea3Faa47
0 ETH0.0015686821.11772078
Swap Request195584452024-04-01 3:53:35143 days ago1711943615IN
0x5aCBC71e...9ea3Faa47
0.002 ETH0.0015230219.2655848
Swap Request195584212024-04-01 3:48:47143 days ago1711943327IN
0x5aCBC71e...9ea3Faa47
0.002 ETH0.0014914118.86345193
Process Swap Req...195583862024-04-01 3:41:35143 days ago1711942895IN
0x5aCBC71e...9ea3Faa47
0 ETH0.0018271219.99676945
Swap Request195432892024-03-30 0:43:59145 days ago1711759439IN
0x5aCBC71e...9ea3Faa47
0.002 ETH0.0013526817.11094063
Process Swap Req...195431572024-03-30 0:17:11145 days ago1711757831IN
0x5aCBC71e...9ea3Faa47
0 ETH0.0024362726.66355063
Process Swap Req...195431352024-03-30 0:12:35145 days ago1711757555IN
0x5aCBC71e...9ea3Faa47
0 ETH0.0019399526.11578616
Process Swap Req...194817062024-03-21 7:59:11154 days ago1711007951IN
0x5aCBC71e...9ea3Faa47
0 ETH0.0022365730.1136799
Swap Request194670672024-03-19 6:39:35156 days ago1710830375IN
0x5aCBC71e...9ea3Faa47
0.002 ETH0.0020519725.95036055
Swap Request194587812024-03-18 2:42:11157 days ago1710729731IN
0x5aCBC71e...9ea3Faa47
0.002 ETH0.0016733421.16715955
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
200669802024-06-11 7:05:2372 days ago1718089523
0x5aCBC71e...9ea3Faa47
0.002 ETH
195584452024-04-01 3:53:35143 days ago1711943615
0x5aCBC71e...9ea3Faa47
0.002 ETH
195584212024-04-01 3:48:47143 days ago1711943327
0x5aCBC71e...9ea3Faa47
0.002 ETH
195432892024-03-30 0:43:59145 days ago1711759439
0x5aCBC71e...9ea3Faa47
0.002 ETH
194670672024-03-19 6:39:35156 days ago1710830375
0x5aCBC71e...9ea3Faa47
0.002 ETH
194587812024-03-18 2:42:11157 days ago1710729731
0x5aCBC71e...9ea3Faa47
0.002 ETH
194579112024-03-17 23:45:23157 days ago1710719123
0x5aCBC71e...9ea3Faa47
0.002 ETH
194554952024-03-17 15:37:23157 days ago1710689843
0x5aCBC71e...9ea3Faa47
0.002 ETH
194553072024-03-17 14:59:11157 days ago1710687551
0x5aCBC71e...9ea3Faa47
0.002 ETH
194542682024-03-17 11:27:47157 days ago1710674867
0x5aCBC71e...9ea3Faa47
0.002 ETH
194531642024-03-17 7:44:59158 days ago1710661499
0x5aCBC71e...9ea3Faa47
0.002 ETH
194531422024-03-17 7:40:35158 days ago1710661235
0x5aCBC71e...9ea3Faa47
0.002 ETH
194496532024-03-16 19:53:59158 days ago1710618839
0x5aCBC71e...9ea3Faa47
0.002 ETH
194494782024-03-16 19:18:23158 days ago1710616703
0x5aCBC71e...9ea3Faa47
0.002 ETH
194484452024-03-16 15:49:23158 days ago1710604163
0x5aCBC71e...9ea3Faa47
0.002 ETH
194483462024-03-16 15:28:47158 days ago1710602927
0x5aCBC71e...9ea3Faa47
0.002 ETH
194482282024-03-16 15:04:47158 days ago1710601487
0x5aCBC71e...9ea3Faa47
0.002 ETH
193446492024-03-02 2:57:35173 days ago1709348255
0x5aCBC71e...9ea3Faa47
0.002 ETH
191496512024-02-03 18:37:11200 days ago1706985431
0x5aCBC71e...9ea3Faa47
0.002 ETH
191487752024-02-03 15:39:35200 days ago1706974775
0x5aCBC71e...9ea3Faa47
0.002 ETH
191485962024-02-03 15:02:59200 days ago1706972579
0x5aCBC71e...9ea3Faa47
0.002 ETH
191481622024-02-03 13:35:35200 days ago1706967335
0x5aCBC71e...9ea3Faa47
0.002 ETH
191376922024-02-02 2:17:11202 days ago1706840231
0x5aCBC71e...9ea3Faa47
0.002 ETH
191376612024-02-02 2:10:47202 days ago1706839847
0x5aCBC71e...9ea3Faa47
0.002 ETH
190917842024-01-26 15:50:47208 days ago1706284247
0x5aCBC71e...9ea3Faa47
0.002 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
SwapRouter

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 10 : SwapRouter.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "./../interfaces/IERC20Mintable.sol";

/**
 * @title SwapRouter
 * @dev A contract for performing cross-chain swaps between different networks.
 */
contract SwapRouter is Ownable, Pausable, ReentrancyGuard {
    using SafeERC20 for IERC20;

    struct TargetChainConfig {
        uint256 swapFee;
        bool isActive;
        bool exist;
    }

    event TargetChainConfigUpdate(uint256 chainId, uint256 swapFee, bool isActive);
    event RemoveTargetChainConfig(uint256 chainId, uint256 swapFee, bool isActive);
    event FeeReceiverUpdated(address receiver);
    event SwapRequest(address indexed account, uint256 amount, uint fromChainId, uint toChainId);
    event SwapCompleted(address indexed account, uint256 amount, uint fromChainId, uint toChainId, bytes32 requestTransactionHash);

    modifier notIsSameChain(uint256 chainId) {
        require(chainId != getChainId(), "Is same chain");
        _;
    }

    modifier feeReceiverDefined() {
        require(feeReceiver != address(0), "Fee receiver is not defined");
        _;
    }

    modifier onlyMessageRelayer() {
        require(_msgSender() == messageRelayer, "Only call from message relayer");
        _;
    }

    address payable public feeReceiver;
    address public messageRelayer;
    IERC20 public swapToken;

    mapping(uint256 => TargetChainConfig) public targetChains;

    // From-ChainID > Request Transaction Hash > State
    mapping(uint256 => mapping(bytes32 => bool)) private swapState;

    /**
     * @dev Initializes the SwapRouter contract.
     * @param feeReceiver_ The address that will receive the swap fees.
     * @param token The ERC20 token used for swapping.
     */
    constructor(address payable feeReceiver_, IERC20 token, address relayer) {
        _setToken(token);
        _setFeeReceiver(feeReceiver_);
        _setMessageRelayer(relayer);
    }

    /**
     * @dev Get swap state
     * @param chainId Request chain id
     * @param transactionHash Swap transaction hash from sender chain
     */
    function isSwapCompleted(uint256 chainId, bytes32 transactionHash) public view returns (bool) {
        return swapState[chainId][transactionHash];
    }

    function _setMessageRelayer(address relayer) internal {
        require(relayer != address(0), "Message relayer cant be zero address");
        messageRelayer = relayer;
    }

    /**
     * @dev Sets the address of the message relayer.
     * @param relayer The address of the message relayer.
     */
    function setMessageRelayer(address relayer) external onlyOwner {
        _setMessageRelayer(relayer);
    }

    function _setToken(IERC20 token) internal {
        require(address(token) != address(0), "Token address cant be zero address");
        swapToken = token;
    }

    /**
     * @dev Sets the ERC20 token used for swapping.
     * @param token The ERC20 token used for swapping.
     */
    function setToken(IERC20 token) external onlyOwner {
        _setToken(token);
    }

    function _setFeeReceiver(address payable account) internal {
        require(account != address(0), "Receiver address cant be zero address");
        feeReceiver = account;
        emit FeeReceiverUpdated(account);
    }

    /**
     * @dev Sets the address that will receive the swap fees.
     * @param account The address that will receive the swap fees.
     */
    function setFeeReceiver(address payable account) external onlyOwner {
        _setFeeReceiver(account);
    }

    /**
     * @dev Sets the configuration for a target chain.
     * @param chainId The ID of the target chain.
     * @param swapFee The fee required for performing a swap on the target chain.
     * @param isActive The status of the target chain (active or inactive).
     */
    function setTargetChainConfig(uint256 chainId, uint256 swapFee, bool isActive) external onlyOwner notIsSameChain(chainId) {
        TargetChainConfig memory config = targetChains[chainId];

        config.swapFee = swapFee;
        config.isActive = isActive;
        config.exist = true;
        targetChains[chainId] = config;

        emit TargetChainConfigUpdate(chainId, swapFee, isActive);
    }

    /**
     * @dev Removes a target chain configuration.
     * @param chainId The ID of the target chain to remove.
     */
    function removeTargetChain(uint256 chainId) external onlyOwner notIsSameChain(chainId) {
        TargetChainConfig memory config = targetChains[chainId];
        require(config.exist == true, "Target chain does not exist");
        delete targetChains[chainId];
        emit RemoveTargetChainConfig(chainId, config.swapFee, config.isActive);
    }

    /**
     * @dev Initiates a swap request.
     * @param chainId The ID of the target chain.
     * @param amount The amount of tokens to swap.
     */
    function swapRequest(uint256 chainId, uint256 amount) external payable whenNotPaused feeReceiverDefined nonReentrant {
        TargetChainConfig memory config = targetChains[chainId];
        IERC20Mintable token = IERC20Mintable(address(swapToken));

        if (config.exist == false || config.isActive == false) {
            revert("Target chain is not active");
        }
        if (msg.value < config.swapFee) {
            revert("Swap fee doesnt payed");
        }

        // Transfer token
        SafeERC20.safeTransferFrom(swapToken, _msgSender(), address(this), amount);
        // Burn given amount
        token.burn(amount);

        // Transfer swap fee
        if (config.swapFee > 0) {
            (bool sent,) = feeReceiver.call{value : msg.value}("");
            require(sent, "Fee transfer failed");
        }

        // Emit swap request event
        emit SwapRequest(_msgSender(), amount, getChainId(), chainId);
    }

    /**
     * @dev Processes a swap request from the message relayer.
     * @param fromChainId The ID of the source chain.
     * @param requestTransactionHash The transaction hash of the swap request.
     * @param account The account to receive the swapped tokens.
     * @param amount The amount of tokens to swap.
     */
    function processSwapRequest(uint256 fromChainId, bytes32 requestTransactionHash, address account, uint256 amount) public whenNotPaused onlyMessageRelayer nonReentrant {
        require(swapState[fromChainId][requestTransactionHash] == false, "This swap request already completed");
        swapState[fromChainId][requestTransactionHash] = true;

        IERC20Mintable token = IERC20Mintable(address(swapToken));
        token.mint(account, amount);
        emit SwapCompleted(account, amount, fromChainId, getChainId(), requestTransactionHash);
    }

    /**
     * @dev Returns the ID of the current chain.
     * @return The ID of the current chain.
     */
    function getChainId() public view returns (uint) {
        return block.chainid;
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

File 3 of 10 : Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

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

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        _requireNotPaused();
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        _requirePaused();
        _;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

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

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

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

File 4 of 10 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)

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].
 */
abstract 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 making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

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

File 5 of 10 : draft-IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)

pragma solidity ^0.8.0;

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

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

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

File 6 of 10 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 7 of 10 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

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

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

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

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

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

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

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

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

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

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

File 8 of 10 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

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

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

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

pragma solidity ^0.8.0;

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

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

File 10 of 10 : IERC20Mintable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

    function mint(address account, uint256 amount) external;
    function burn(uint256 amount) external;
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address payable","name":"feeReceiver_","type":"address"},{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"relayer","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"receiver","type":"address"}],"name":"FeeReceiverUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"chainId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"swapFee","type":"uint256"},{"indexed":false,"internalType":"bool","name":"isActive","type":"bool"}],"name":"RemoveTargetChainConfig","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"fromChainId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toChainId","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"requestTransactionHash","type":"bytes32"}],"name":"SwapCompleted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"fromChainId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toChainId","type":"uint256"}],"name":"SwapRequest","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"chainId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"swapFee","type":"uint256"},{"indexed":false,"internalType":"bool","name":"isActive","type":"bool"}],"name":"TargetChainConfigUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"feeReceiver","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getChainId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"bytes32","name":"transactionHash","type":"bytes32"}],"name":"isSwapCompleted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"messageRelayer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"fromChainId","type":"uint256"},{"internalType":"bytes32","name":"requestTransactionHash","type":"bytes32"},{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"processSwapRequest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"}],"name":"removeTargetChain","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"account","type":"address"}],"name":"setFeeReceiver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"relayer","type":"address"}],"name":"setMessageRelayer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"uint256","name":"swapFee","type":"uint256"},{"internalType":"bool","name":"isActive","type":"bool"}],"name":"setTargetChainConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"setToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"swapRequest","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"swapToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"targetChains","outputs":[{"internalType":"uint256","name":"swapFee","type":"uint256"},{"internalType":"bool","name":"isActive","type":"bool"},{"internalType":"bool","name":"exist","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b50604051620015cb380380620015cb8339810160408190526200003491620002ac565b6200003f336200007a565b6000805460ff60a01b19169055600180556200005b82620000ca565b620000668362000153565b62000071816200020d565b50505062000300565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038116620001315760405162461bcd60e51b815260206004820152602260248201527f546f6b656e20616464726573732063616e74206265207a65726f206164647265604482015261737360f01b60648201526084015b60405180910390fd5b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038116620001b95760405162461bcd60e51b815260206004820152602560248201527f526563656976657220616464726573732063616e74206265207a65726f206164604482015264647265737360d81b606482015260840162000128565b600280546001600160a01b0319166001600160a01b0383169081179091556040519081527f27aae5db36d94179909d019ae0b1ac7c16d96d953148f63c0f6a0a9c8ead79ee9060200160405180910390a150565b6001600160a01b038116620002715760405162461bcd60e51b8152602060048201526024808201527f4d6573736167652072656c617965722063616e74206265207a65726f206164646044820152637265737360e01b606482015260840162000128565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0381168114620002a957600080fd5b50565b600080600060608486031215620002c257600080fd5b8351620002cf8162000293565b6020850151909350620002e28162000293565b6040850151909250620002f58162000293565b809150509250925092565b6112bb80620003106000396000f3fe6080604052600436106100fe5760003560e01c80636cfd26e911610095578063a00b804b11610064578063a00b804b146102f7578063b3f006741461030a578063dc73e49c1461032a578063efdcd9741461034a578063f2fde38b1461036a57600080fd5b80636cfd26e914610284578063715018a6146102a45780637a681df2146102b95780638da5cb5b146102d957600080fd5b806339016762116100d157806339016762146101b057806345e1adc0146101d05780634f3b457e1461022d5780635c975abb1461026557600080fd5b8063144fa6d71461010357806329b29b0d14610125578063306db231146101455780633408e47014610195575b600080fd5b34801561010f57600080fd5b5061012361011e366004611110565b61038a565b005b34801561013157600080fd5b50610123610140366004611142565b61039e565b34801561015157600080fd5b5061018061016036600461117b565b600091825260066020908152604080842092845291905290205460ff1690565b60405190151581526020015b60405180910390f35b3480156101a157600080fd5b5060405146815260200161018c565b3480156101bc57600080fd5b506101236101cb36600461119d565b610493565b3480156101dc57600080fd5b506102106101eb3660046111dc565b6005602052600090815260409020805460019091015460ff8082169161010090041683565b60408051938452911515602084015215159082015260600161018c565b34801561023957600080fd5b5060035461024d906001600160a01b031681565b6040516001600160a01b03909116815260200161018c565b34801561027157600080fd5b50600054600160a01b900460ff16610180565b34801561029057600080fd5b5061012361029f366004611110565b610674565b3480156102b057600080fd5b50610123610685565b3480156102c557600080fd5b506101236102d43660046111dc565b610699565b3480156102e557600080fd5b506000546001600160a01b031661024d565b61012361030536600461117b565b6107dd565b34801561031657600080fd5b5060025461024d906001600160a01b031681565b34801561033657600080fd5b5060045461024d906001600160a01b031681565b34801561035657600080fd5b50610123610365366004611110565b610aa4565b34801561037657600080fd5b50610123610385366004611110565b610ab5565b610392610b2b565b61039b81610b85565b50565b6103a6610b2b565b824681036103eb5760405162461bcd60e51b815260206004820152600d60248201526c24b99039b0b6b29031b430b4b760991b60448201526064015b60405180910390fd5b6000848152600560208181526040808420815160608082018452600180840180548c85528b15158589018181528689019485529a8f905298885284519095559751905161ffff1990941690151561ff0019161761010093151593909302929092179095558151898152928301889052908201929092527f478dd41061ee5e513dbcc0ff2b73e1f24c64f7d7f12fe59e3c839f4223820200910160405180910390a15050505050565b61049b610c08565b6003546001600160a01b0316336001600160a01b0316146104fe5760405162461bcd60e51b815260206004820152601e60248201527f4f6e6c792063616c6c2066726f6d206d6573736167652072656c61796572000060448201526064016103e2565b610506610c55565b600084815260066020908152604080832086845290915290205460ff161561057c5760405162461bcd60e51b815260206004820152602360248201527f546869732073776170207265717565737420616c726561647920636f6d706c656044820152621d195960ea1b60648201526084016103e2565b600084815260066020908152604080832086845290915290819020805460ff191660011790556004805491516340c10f1960e01b81526001600160a01b03858116928201929092526024810184905291169081906340c10f1990604401600060405180830381600087803b1580156105f357600080fd5b505af1158015610607573d6000803e3d6000fd5b50505050826001600160a01b03167ffaada5e2bf1280a33429be771be90ded670733aa2ecca91252b1ebdb81ea217a838761063f4690565b604080519384526020840192909252908201526060810187905260800160405180910390a25061066e60018055565b50505050565b61067c610b2b565b61039b81610cae565b61068d610b2b565b6106976000610d32565b565b6106a1610b2b565b804681036106e15760405162461bcd60e51b815260206004820152600d60248201526c24b99039b0b6b29031b430b4b760991b60448201526064016103e2565b60008281526005602090815260409182902082516060810184528154815260019182015460ff808216151594830194909452610100900490921615159282018390529091146107725760405162461bcd60e51b815260206004820152601b60248201527f54617267657420636861696e20646f6573206e6f74206578697374000000000060448201526064016103e2565b60008381526005602090815260408083209283556001909201805461ffff1916905582518382015183518781529283019190915215158183015290517f47d5894f8301001af385bc40894a4f5999ef78c7c09dfbc3d2fc82710e97d6359181900360600190a1505050565b6107e5610c08565b6002546001600160a01b031661083d5760405162461bcd60e51b815260206004820152601b60248201527f466565207265636569766572206973206e6f7420646566696e6564000000000060448201526064016103e2565b610845610c55565b60008281526005602090815260409182902082516060810184528154815260019091015460ff80821615159383019390935261010090049091161580159282019290925260045490916001600160a01b0390911690806108a757506020820151155b156108f45760405162461bcd60e51b815260206004820152601a60248201527f54617267657420636861696e206973206e6f742061637469766500000000000060448201526064016103e2565b815134101561093d5760405162461bcd60e51b815260206004820152601560248201527414ddd85c0819995948191bd95cdb9d081c185e5959605a1b60448201526064016103e2565b600454610955906001600160a01b0316333086610d82565b604051630852cd8d60e31b8152600481018490526001600160a01b038216906342966c6890602401600060405180830381600087803b15801561099757600080fd5b505af11580156109ab573d6000803e3d6000fd5b50508351159150610a539050576002546040516000916001600160a01b03169034908381818185875af1925050503d8060008114610a05576040519150601f19603f3d011682016040523d82523d6000602084013e610a0a565b606091505b5050905080610a515760405162461bcd60e51b8152602060048201526013602482015272119959481d1c985b9cd9995c8819985a5b1959606a1b60448201526064016103e2565b505b60408051848152466020820152808201869052905133917f5304d76028f8ff5ac5ed555bed4c0f4412dd20070c103e125dbf0d5e27a914e8919081900360600190a25050610aa060018055565b5050565b610aac610b2b565b61039b81610ddc565b610abd610b2b565b6001600160a01b038116610b225760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103e2565b61039b81610d32565b6000546001600160a01b031633146106975760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103e2565b6001600160a01b038116610be65760405162461bcd60e51b815260206004820152602260248201527f546f6b656e20616464726573732063616e74206265207a65726f206164647265604482015261737360f01b60648201526084016103e2565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b600054600160a01b900460ff16156106975760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016103e2565b600260015403610ca75760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016103e2565b6002600155565b6001600160a01b038116610d105760405162461bcd60e51b8152602060048201526024808201527f4d6573736167652072656c617965722063616e74206265207a65726f206164646044820152637265737360e01b60648201526084016103e2565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905261066e908590610e94565b6001600160a01b038116610e405760405162461bcd60e51b815260206004820152602560248201527f526563656976657220616464726573732063616e74206265207a65726f206164604482015264647265737360d81b60648201526084016103e2565b600280546001600160a01b0319166001600160a01b0383169081179091556040519081527f27aae5db36d94179909d019ae0b1ac7c16d96d953148f63c0f6a0a9c8ead79ee9060200160405180910390a150565b6000610ee9826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610f6b9092919063ffffffff16565b805190915015610f665780806020019051810190610f0791906111f5565b610f665760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016103e2565b505050565b6060610f7a8484600085610f82565b949350505050565b606082471015610fe35760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016103e2565b600080866001600160a01b03168587604051610fff9190611236565b60006040518083038185875af1925050503d806000811461103c576040519150601f19603f3d011682016040523d82523d6000602084013e611041565b606091505b50915091506110528783838761105d565b979650505050505050565b606083156110cc5782516000036110c5576001600160a01b0385163b6110c55760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016103e2565b5081610f7a565b610f7a83838151156110e15781518083602001fd5b8060405162461bcd60e51b81526004016103e29190611252565b6001600160a01b038116811461039b57600080fd5b60006020828403121561112257600080fd5b813561112d816110fb565b9392505050565b801515811461039b57600080fd5b60008060006060848603121561115757600080fd5b8335925060208401359150604084013561117081611134565b809150509250925092565b6000806040838503121561118e57600080fd5b50508035926020909101359150565b600080600080608085870312156111b357600080fd5b843593506020850135925060408501356111cc816110fb565b9396929550929360600135925050565b6000602082840312156111ee57600080fd5b5035919050565b60006020828403121561120757600080fd5b815161112d81611134565b60005b8381101561122d578181015183820152602001611215565b50506000910152565b60008251611248818460208701611212565b9190910192915050565b6020815260008251806020840152611271816040850160208701611212565b601f01601f1916919091016040019291505056fea2646970667358221220fd5bbf67116e3a5c058e6f4fbc95a912ddfac5b8715575decbb75006b613907264736f6c63430008110033000000000000000000000000a03a9566479130a2efc918c6a726d030dd17627f000000000000000000000000a922a70569a7555518bf4ded5094661a965e23ca000000000000000000000000a03a9566479130a2efc918c6a726d030dd17627f

Deployed Bytecode

0x6080604052600436106100fe5760003560e01c80636cfd26e911610095578063a00b804b11610064578063a00b804b146102f7578063b3f006741461030a578063dc73e49c1461032a578063efdcd9741461034a578063f2fde38b1461036a57600080fd5b80636cfd26e914610284578063715018a6146102a45780637a681df2146102b95780638da5cb5b146102d957600080fd5b806339016762116100d157806339016762146101b057806345e1adc0146101d05780634f3b457e1461022d5780635c975abb1461026557600080fd5b8063144fa6d71461010357806329b29b0d14610125578063306db231146101455780633408e47014610195575b600080fd5b34801561010f57600080fd5b5061012361011e366004611110565b61038a565b005b34801561013157600080fd5b50610123610140366004611142565b61039e565b34801561015157600080fd5b5061018061016036600461117b565b600091825260066020908152604080842092845291905290205460ff1690565b60405190151581526020015b60405180910390f35b3480156101a157600080fd5b5060405146815260200161018c565b3480156101bc57600080fd5b506101236101cb36600461119d565b610493565b3480156101dc57600080fd5b506102106101eb3660046111dc565b6005602052600090815260409020805460019091015460ff8082169161010090041683565b60408051938452911515602084015215159082015260600161018c565b34801561023957600080fd5b5060035461024d906001600160a01b031681565b6040516001600160a01b03909116815260200161018c565b34801561027157600080fd5b50600054600160a01b900460ff16610180565b34801561029057600080fd5b5061012361029f366004611110565b610674565b3480156102b057600080fd5b50610123610685565b3480156102c557600080fd5b506101236102d43660046111dc565b610699565b3480156102e557600080fd5b506000546001600160a01b031661024d565b61012361030536600461117b565b6107dd565b34801561031657600080fd5b5060025461024d906001600160a01b031681565b34801561033657600080fd5b5060045461024d906001600160a01b031681565b34801561035657600080fd5b50610123610365366004611110565b610aa4565b34801561037657600080fd5b50610123610385366004611110565b610ab5565b610392610b2b565b61039b81610b85565b50565b6103a6610b2b565b824681036103eb5760405162461bcd60e51b815260206004820152600d60248201526c24b99039b0b6b29031b430b4b760991b60448201526064015b60405180910390fd5b6000848152600560208181526040808420815160608082018452600180840180548c85528b15158589018181528689019485529a8f905298885284519095559751905161ffff1990941690151561ff0019161761010093151593909302929092179095558151898152928301889052908201929092527f478dd41061ee5e513dbcc0ff2b73e1f24c64f7d7f12fe59e3c839f4223820200910160405180910390a15050505050565b61049b610c08565b6003546001600160a01b0316336001600160a01b0316146104fe5760405162461bcd60e51b815260206004820152601e60248201527f4f6e6c792063616c6c2066726f6d206d6573736167652072656c61796572000060448201526064016103e2565b610506610c55565b600084815260066020908152604080832086845290915290205460ff161561057c5760405162461bcd60e51b815260206004820152602360248201527f546869732073776170207265717565737420616c726561647920636f6d706c656044820152621d195960ea1b60648201526084016103e2565b600084815260066020908152604080832086845290915290819020805460ff191660011790556004805491516340c10f1960e01b81526001600160a01b03858116928201929092526024810184905291169081906340c10f1990604401600060405180830381600087803b1580156105f357600080fd5b505af1158015610607573d6000803e3d6000fd5b50505050826001600160a01b03167ffaada5e2bf1280a33429be771be90ded670733aa2ecca91252b1ebdb81ea217a838761063f4690565b604080519384526020840192909252908201526060810187905260800160405180910390a25061066e60018055565b50505050565b61067c610b2b565b61039b81610cae565b61068d610b2b565b6106976000610d32565b565b6106a1610b2b565b804681036106e15760405162461bcd60e51b815260206004820152600d60248201526c24b99039b0b6b29031b430b4b760991b60448201526064016103e2565b60008281526005602090815260409182902082516060810184528154815260019182015460ff808216151594830194909452610100900490921615159282018390529091146107725760405162461bcd60e51b815260206004820152601b60248201527f54617267657420636861696e20646f6573206e6f74206578697374000000000060448201526064016103e2565b60008381526005602090815260408083209283556001909201805461ffff1916905582518382015183518781529283019190915215158183015290517f47d5894f8301001af385bc40894a4f5999ef78c7c09dfbc3d2fc82710e97d6359181900360600190a1505050565b6107e5610c08565b6002546001600160a01b031661083d5760405162461bcd60e51b815260206004820152601b60248201527f466565207265636569766572206973206e6f7420646566696e6564000000000060448201526064016103e2565b610845610c55565b60008281526005602090815260409182902082516060810184528154815260019091015460ff80821615159383019390935261010090049091161580159282019290925260045490916001600160a01b0390911690806108a757506020820151155b156108f45760405162461bcd60e51b815260206004820152601a60248201527f54617267657420636861696e206973206e6f742061637469766500000000000060448201526064016103e2565b815134101561093d5760405162461bcd60e51b815260206004820152601560248201527414ddd85c0819995948191bd95cdb9d081c185e5959605a1b60448201526064016103e2565b600454610955906001600160a01b0316333086610d82565b604051630852cd8d60e31b8152600481018490526001600160a01b038216906342966c6890602401600060405180830381600087803b15801561099757600080fd5b505af11580156109ab573d6000803e3d6000fd5b50508351159150610a539050576002546040516000916001600160a01b03169034908381818185875af1925050503d8060008114610a05576040519150601f19603f3d011682016040523d82523d6000602084013e610a0a565b606091505b5050905080610a515760405162461bcd60e51b8152602060048201526013602482015272119959481d1c985b9cd9995c8819985a5b1959606a1b60448201526064016103e2565b505b60408051848152466020820152808201869052905133917f5304d76028f8ff5ac5ed555bed4c0f4412dd20070c103e125dbf0d5e27a914e8919081900360600190a25050610aa060018055565b5050565b610aac610b2b565b61039b81610ddc565b610abd610b2b565b6001600160a01b038116610b225760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103e2565b61039b81610d32565b6000546001600160a01b031633146106975760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103e2565b6001600160a01b038116610be65760405162461bcd60e51b815260206004820152602260248201527f546f6b656e20616464726573732063616e74206265207a65726f206164647265604482015261737360f01b60648201526084016103e2565b600480546001600160a01b0319166001600160a01b0392909216919091179055565b600054600160a01b900460ff16156106975760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016103e2565b600260015403610ca75760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016103e2565b6002600155565b6001600160a01b038116610d105760405162461bcd60e51b8152602060048201526024808201527f4d6573736167652072656c617965722063616e74206265207a65726f206164646044820152637265737360e01b60648201526084016103e2565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905261066e908590610e94565b6001600160a01b038116610e405760405162461bcd60e51b815260206004820152602560248201527f526563656976657220616464726573732063616e74206265207a65726f206164604482015264647265737360d81b60648201526084016103e2565b600280546001600160a01b0319166001600160a01b0383169081179091556040519081527f27aae5db36d94179909d019ae0b1ac7c16d96d953148f63c0f6a0a9c8ead79ee9060200160405180910390a150565b6000610ee9826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610f6b9092919063ffffffff16565b805190915015610f665780806020019051810190610f0791906111f5565b610f665760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016103e2565b505050565b6060610f7a8484600085610f82565b949350505050565b606082471015610fe35760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016103e2565b600080866001600160a01b03168587604051610fff9190611236565b60006040518083038185875af1925050503d806000811461103c576040519150601f19603f3d011682016040523d82523d6000602084013e611041565b606091505b50915091506110528783838761105d565b979650505050505050565b606083156110cc5782516000036110c5576001600160a01b0385163b6110c55760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016103e2565b5081610f7a565b610f7a83838151156110e15781518083602001fd5b8060405162461bcd60e51b81526004016103e29190611252565b6001600160a01b038116811461039b57600080fd5b60006020828403121561112257600080fd5b813561112d816110fb565b9392505050565b801515811461039b57600080fd5b60008060006060848603121561115757600080fd5b8335925060208401359150604084013561117081611134565b809150509250925092565b6000806040838503121561118e57600080fd5b50508035926020909101359150565b600080600080608085870312156111b357600080fd5b843593506020850135925060408501356111cc816110fb565b9396929550929360600135925050565b6000602082840312156111ee57600080fd5b5035919050565b60006020828403121561120757600080fd5b815161112d81611134565b60005b8381101561122d578181015183820152602001611215565b50506000910152565b60008251611248818460208701611212565b9190910192915050565b6020815260008251806020840152611271816040850160208701611212565b601f01601f1916919091016040019291505056fea2646970667358221220fd5bbf67116e3a5c058e6f4fbc95a912ddfac5b8715575decbb75006b613907264736f6c63430008110033

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

000000000000000000000000a03a9566479130a2efc918c6a726d030dd17627f000000000000000000000000a922a70569a7555518bf4ded5094661a965e23ca000000000000000000000000a03a9566479130a2efc918c6a726d030dd17627f

-----Decoded View---------------
Arg [0] : feeReceiver_ (address): 0xa03A9566479130a2EFC918C6A726D030Dd17627F
Arg [1] : token (address): 0xa922a70569a7555518bF4DED5094661a965E23cA
Arg [2] : relayer (address): 0xa03A9566479130a2EFC918C6A726D030Dd17627F

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000a03a9566479130a2efc918c6a726d030dd17627f
Arg [1] : 000000000000000000000000a922a70569a7555518bf4ded5094661a965e23ca
Arg [2] : 000000000000000000000000a03a9566479130a2efc918c6a726d030dd17627f


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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