ETH Price: $3,460.61 (-4.31%)
Gas: 18 Gwei

Contract

0x1475a20c5D6e57076Bab0396F25588a85d7C86D6
 

Overview

ETH Balance

0.000371716651368712 ETH

Eth Value

$1.29 (@ $3,460.61/ETH)

Token Holdings

Transaction Hash
Method
Block
From
To
Value
Transfer Tokens200783362024-06-12 21:08:5919 hrs ago1718226539IN
0x1475a20c...85d7C86D6
0.0001533 ETH0.0044995223.31938348
Transfer Tokens200556022024-06-09 16:56:353 days ago1717952195IN
0x1475a20c...85d7C86D6
0.00013881 ETH0.0030777215.95073022
Transfer Tokens200549512024-06-09 14:45:594 days ago1717944359IN
0x1475a20c...85d7C86D6
0.00014075 ETH0.0030594815.85619925
Transfer Tokens200412852024-06-07 16:56:475 days ago1717779407IN
0x1475a20c...85d7C86D6
0.00013855 ETH0.0005604418.2478063
Transfer Tokens200412852024-06-07 16:56:475 days ago1717779407IN
0x1475a20c...85d7C86D6
0.00013855 ETH0.0035209518.2478063
Transfer Tokens200370482024-06-07 2:45:356 days ago1717728335IN
0x1475a20c...85d7C86D6
0.00013528 ETH0.001464137.58806909
Transfer Tokens200334292024-06-06 14:37:477 days ago1717684667IN
0x1475a20c...85d7C86D6
0.00013661 ETH0.0052640727.28176797
Transfer Tokens200331552024-06-06 13:42:117 days ago1717681331IN
0x1475a20c...85d7C86D6
0.00013661 ETH0.0039288420.36176928
Transfer Tokens200323472024-06-06 10:59:477 days ago1717671587IN
0x1475a20c...85d7C86D6
0.00013397 ETH0.0034883118.07866457
Accept Ownership200317452024-06-06 8:58:357 days ago1717664315IN
0x1475a20c...85d7C86D6
0 ETH0.0004954917.53455853
Transfer Ownersh...200317192024-06-06 8:53:237 days ago1717664003IN
0x1475a20c...85d7C86D6
0 ETH0.0006298913.20444348
Transfer Tokens200299822024-06-06 3:03:237 days ago1717643003IN
0x1475a20c...85d7C86D6
0.00013704 ETH0.0020169410.45310775
Transfer Tokens200298702024-06-06 2:40:597 days ago1717641659IN
0x1475a20c...85d7C86D6
0.00013213 ETH0.0021040610.90459535
Transfer Tokens200281652024-06-05 20:58:237 days ago1717621103IN
0x1475a20c...85d7C86D6
0.00014289 ETH0.005398527.97846584
Transfer Tokens200281052024-06-05 20:46:117 days ago1717620371IN
0x1475a20c...85d7C86D6
0.00013966 ETH0.0059326930.74701629
Transfer Tokens200259142024-06-05 13:25:478 days ago1717593947IN
0x1475a20c...85d7C86D6
0.0001359 ETH0.0073254537.96514917
Transfer Tokens200255542024-06-05 12:13:238 days ago1717589603IN
0x1475a20c...85d7C86D6
0.0001359 ETH0.0054818928.41067608
Transfer Tokens200223732024-06-05 1:34:598 days ago1717551299IN
0x1475a20c...85d7C86D6
0.0001376 ETH0.001314946.81487124
Transfer Tokens200195652024-06-04 16:11:119 days ago1717517471IN
0x1475a20c...85d7C86D6
0.00013782 ETH0.003858419.99672072
Transfer Tokens200107502024-06-03 10:38:5910 days ago1717411139IN
0x1475a20c...85d7C86D6
0.00013394 ETH0.001730838.9702644
Transfer Tokens200056532024-06-02 17:33:3510 days ago1717349615IN
0x1475a20c...85d7C86D6
0.00013449 ETH0.0032350616.76617911
Transfer Tokens200056382024-06-02 17:30:2310 days ago1717349423IN
0x1475a20c...85d7C86D6
0.00013449 ETH0.0034327617.79075509
Transfer Tokens200055082024-06-02 17:04:2310 days ago1717347863IN
0x1475a20c...85d7C86D6
0.00013449 ETH0.0028270114.65138575
Transfer Tokens200002362024-06-01 23:24:1111 days ago1717284251IN
0x1475a20c...85d7C86D6
0.00013254 ETH0.000976785.06233899
Transfer Tokens199984302024-06-01 17:21:4711 days ago1717262507IN
0x1475a20c...85d7C86D6
0.00013366 ETH0.0031410216.27878113
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To Value
200783362024-06-12 21:08:5919 hrs ago1718226539
0x1475a20c...85d7C86D6
0.0001533 ETH
200556022024-06-09 16:56:353 days ago1717952195
0x1475a20c...85d7C86D6
0.00013881 ETH
200549512024-06-09 14:45:594 days ago1717944359
0x1475a20c...85d7C86D6
0.00014075 ETH
200412852024-06-07 16:56:475 days ago1717779407
0x1475a20c...85d7C86D6
0.00013855 ETH
200370482024-06-07 2:45:356 days ago1717728335
0x1475a20c...85d7C86D6
0.00013528 ETH
200334292024-06-06 14:37:477 days ago1717684667
0x1475a20c...85d7C86D6
0.00013661 ETH
200331552024-06-06 13:42:117 days ago1717681331
0x1475a20c...85d7C86D6
0.00013661 ETH
200323472024-06-06 10:59:477 days ago1717671587
0x1475a20c...85d7C86D6
0.00013397 ETH
200299822024-06-06 3:03:237 days ago1717643003
0x1475a20c...85d7C86D6
0.00013213 ETH
200298702024-06-06 2:40:597 days ago1717641659
0x1475a20c...85d7C86D6
0.00013213 ETH
200281652024-06-05 20:58:237 days ago1717621103
0x1475a20c...85d7C86D6
0.00013966 ETH
200281052024-06-05 20:46:117 days ago1717620371
0x1475a20c...85d7C86D6
0.00013966 ETH
200259142024-06-05 13:25:478 days ago1717593947
0x1475a20c...85d7C86D6
0.0001359 ETH
200255542024-06-05 12:13:238 days ago1717589603
0x1475a20c...85d7C86D6
0.0001359 ETH
200223732024-06-05 1:34:598 days ago1717551299
0x1475a20c...85d7C86D6
0.0001376 ETH
200195652024-06-04 16:11:119 days ago1717517471
0x1475a20c...85d7C86D6
0.00013782 ETH
200107502024-06-03 10:38:5910 days ago1717411139
0x1475a20c...85d7C86D6
0.00013394 ETH
200056532024-06-02 17:33:3510 days ago1717349615
0x1475a20c...85d7C86D6
0.00013449 ETH
200056382024-06-02 17:30:2310 days ago1717349423
0x1475a20c...85d7C86D6
0.00013449 ETH
200055082024-06-02 17:04:2310 days ago1717347863
0x1475a20c...85d7C86D6
0.00013449 ETH
200002362024-06-01 23:24:1111 days ago1717284251
0x1475a20c...85d7C86D6
0.00013254 ETH
199984302024-06-01 17:21:4711 days ago1717262507
0x1475a20c...85d7C86D6
0.00013366 ETH
199842312024-05-30 17:45:3513 days ago1717091135
0x1475a20c...85d7C86D6
0.00014605 ETH
199776742024-05-29 19:44:2314 days ago1717011863
0x1475a20c...85d7C86D6
0.00013577 ETH
199749512024-05-29 10:33:3515 days ago1716978815
0x1475a20c...85d7C86D6
0.00013629 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
SnailEthereumTokenMigration

Compiler Version
v0.8.24+commit.e11b9ed9

Optimization Enabled:
Yes with 1000000 runs

Other Settings:
paris EvmVersion
File 1 of 14 : SnailEthereumTokenMigration.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.24;

import "@openzeppelin/contracts/interfaces/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable2Step.sol";

import "@chainlink/contracts-ccip/src/v0.8/ccip/libraries/Client.sol";
import "@chainlink/contracts-ccip/src/v0.8/ccip/interfaces/IRouterClient.sol";
import "@chainlink/contracts-ccip/src/v0.8/shared/interfaces/IOwnable.sol";

import "./interfaces/ISnailEthereumTokenMigration.sol";

contract SnailEthereumTokenMigration is ISnailEthereumTokenMigration, Ownable2Step, ReentrancyGuard {
    using SafeERC20 for IERC20;
    IERC20 public immutable tokenToTransfer;
    
    uint64 public immutable destinationChain;
    address public destinationReceiver;
    
    IRouterClient public immutable crossChainRouter;
    mapping(address => uint256) private amountsTransferred;
    
    receive() external payable {}   //  allow contract accept ETH
    
    constructor(IERC20 _tokenToTransfer, IRouterClient _crossChainRouter, uint64 _destinationChain) Ownable(msg.sender) {
        require(address(_tokenToTransfer) != address(0), "Token address cannot be zero");
        require(address(_crossChainRouter) != address(0), "Cross chain router address cannot be zero");
        
        tokenToTransfer = _tokenToTransfer;
        tokenToTransfer.safeIncreaseAllowance(IOwnable(address(tokenToTransfer)).owner(), tokenToTransfer.totalSupply());
        
        crossChainRouter = _crossChainRouter;
        destinationChain = _destinationChain;
    }
    
    function transferTokens() external payable override nonReentrant {
        require(destinationReceiver != address(0), "Destination receiver not set");
        require(amountsTransferred[msg.sender] == 0, "Tokens for this address have already been migrated");
        
        uint256 amount = tokenToTransfer.balanceOf(msg.sender);
        require(amount > 0, "Transfer amount must be greater than 0");
        
        tokenToTransfer.safeTransferFrom(msg.sender, address(this), amount);
        amountsTransferred[msg.sender] = amount;
        
        Client.EVM2AnyMessage memory message = Client.EVM2AnyMessage({
            receiver: abi.encode(destinationReceiver),
            data: abi.encode(msg.sender, amount),
            tokenAmounts: new Client.EVMTokenAmount[](0) ,
            extraArgs: "",
            feeToken: address(0)
        });
        
        uint256 feeAmount = crossChainRouter.getFee(destinationChain, message);
        require(msg.value >= feeAmount, "Insufficient fee for transaction");
        
        bytes32 messageId = crossChainRouter.ccipSend{value: feeAmount} (destinationChain, message);
        emit TokensTransferred(messageId, amount);
    }
    
    function getTransferTokensFee() external override view returns (uint256) {
        require(destinationReceiver != address(0), "Destination receiver not set");
        
        Client.EVM2AnyMessage memory message = Client.EVM2AnyMessage({
            receiver: abi.encode(destinationReceiver),
            data: abi.encode(msg.sender, tokenToTransfer.balanceOf(msg.sender)),
            tokenAmounts: new Client.EVMTokenAmount[](0) ,
            extraArgs: "",
            feeToken: address(0)
        });
        return crossChainRouter.getFee(destinationChain, message);
    }
    
    function getTransferredTokensAmount(address holder) external view returns (uint256) {
        require(holder != address(0), "Holder address cannot be zero");
        return amountsTransferred[holder];
    }
    
    function setDestinationReceiver(address receiver) external override onlyOwner {
        require(receiver != address(0), "Invalid destination receiver address");
        destinationReceiver = receiver;
    }
}

File 2 of 14 : IRouterClient.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {Client} from "../libraries/Client.sol";

interface IRouterClient {
  error UnsupportedDestinationChain(uint64 destChainSelector);
  error InsufficientFeeTokenAmount();
  error InvalidMsgValue();

  /// @notice Checks if the given chain ID is supported for sending/receiving.
  /// @param chainSelector The chain to check.
  /// @return supported is true if it is supported, false if not.
  function isChainSupported(uint64 chainSelector) external view returns (bool supported);

  /// @notice Gets a list of all supported tokens which can be sent or received
  /// to/from a given chain id.
  /// @param chainSelector The chainSelector.
  /// @return tokens The addresses of all tokens that are supported.
  function getSupportedTokens(uint64 chainSelector) external view returns (address[] memory tokens);

  /// @param destinationChainSelector The destination chainSelector
  /// @param message The cross-chain CCIP message including data and/or tokens
  /// @return fee returns execution fee for the message
  /// delivery to destination chain, denominated in the feeToken specified in the message.
  /// @dev Reverts with appropriate reason upon invalid message.
  function getFee(
    uint64 destinationChainSelector,
    Client.EVM2AnyMessage memory message
  ) external view returns (uint256 fee);

  /// @notice Request a message to be sent to the destination chain
  /// @param destinationChainSelector The destination chain ID
  /// @param message The cross-chain CCIP message including data and/or tokens
  /// @return messageId The message ID
  /// @dev Note if msg.value is larger than the required fee (from getFee) we accept
  /// the overpayment with no refund.
  /// @dev Reverts with appropriate reason upon invalid message.
  function ccipSend(
    uint64 destinationChainSelector,
    Client.EVM2AnyMessage calldata message
  ) external payable returns (bytes32);
}

File 3 of 14 : Client.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

// End consumer library.
library Client {
  /// @dev RMN depends on this struct, if changing, please notify the RMN maintainers.
  struct EVMTokenAmount {
    address token; // token address on the local chain.
    uint256 amount; // Amount of tokens.
  }

  struct Any2EVMMessage {
    bytes32 messageId; // MessageId corresponding to ccipSend on source.
    uint64 sourceChainSelector; // Source chain selector.
    bytes sender; // abi.decode(sender) if coming from an EVM chain.
    bytes data; // payload sent in original message.
    EVMTokenAmount[] destTokenAmounts; // Tokens and their amounts in their destination chain representation.
  }

  // If extraArgs is empty bytes, the default is 200k gas limit.
  struct EVM2AnyMessage {
    bytes receiver; // abi.encode(receiver address) for dest EVM chains
    bytes data; // Data payload
    EVMTokenAmount[] tokenAmounts; // Token transfers
    address feeToken; // Address of feeToken. address(0) means you will send msg.value.
    bytes extraArgs; // Populate this with _argsToBytes(EVMExtraArgsV1)
  }

  // bytes4(keccak256("CCIP EVMExtraArgsV1"));
  bytes4 public constant EVM_EXTRA_ARGS_V1_TAG = 0x97a657c9;
  struct EVMExtraArgsV1 {
    uint256 gasLimit;
  }

  function _argsToBytes(EVMExtraArgsV1 memory extraArgs) internal pure returns (bytes memory bts) {
    return abi.encodeWithSelector(EVM_EXTRA_ARGS_V1_TAG, extraArgs);
  }
}

File 4 of 14 : IOwnable.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IOwnable {
  function owner() external returns (address);

  function transferOwnership(address recipient) external;

  function acceptOwnership() external;
}

File 5 of 14 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.20;

import {Context} from "../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.
 *
 * The initial owner is set to the address provided by the deployer. 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;

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

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

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    constructor(address initialOwner) {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

    /**
     * @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 {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _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 6 of 14 : Ownable2Step.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable2Step.sol)

pragma solidity ^0.8.20;

import {Ownable} from "./Ownable.sol";

/**
 * @dev Contract module which provides access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * The initial owner is specified at deployment time in the constructor for `Ownable`. This
 * can later be changed with {transferOwnership} and {acceptOwnership}.
 *
 * This module is used through inheritance. It will make available all functions
 * from parent (Ownable).
 */
abstract contract Ownable2Step is Ownable {
    address private _pendingOwner;

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

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

    /**
     * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one.
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual override onlyOwner {
        _pendingOwner = newOwner;
        emit OwnershipTransferStarted(owner(), newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner.
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual override {
        delete _pendingOwner;
        super._transferOwnership(newOwner);
    }

    /**
     * @dev The new owner accepts the ownership transfer.
     */
    function acceptOwnership() public virtual {
        address sender = _msgSender();
        if (pendingOwner() != sender) {
            revert OwnableUnauthorizedAccount(sender);
        }
        _transferOwnership(sender);
    }
}

File 7 of 14 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../token/ERC20/IERC20.sol";

File 8 of 14 : IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol)

pragma solidity ^0.8.20;

/**
 * @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.
 *
 * ==== Security Considerations
 *
 * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature
 * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be
 * considered as an intention to spend the allowance in any specific way. The second is that because permits have
 * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should
 * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be
 * generally recommended is:
 *
 * ```solidity
 * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {
 *     try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}
 *     doThing(..., value);
 * }
 *
 * function doThing(..., uint256 value) public {
 *     token.safeTransferFrom(msg.sender, address(this), value);
 *     ...
 * }
 * ```
 *
 * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of
 * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also
 * {SafeERC20-safeTransferFrom}).
 *
 * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so
 * contracts should have entry points that don't rely on permit.
 */
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].
     *
     * CAUTION: See Security Considerations above.
     */
    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 9 of 14 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

/**
 * @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 value of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

    /**
     * @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens 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 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the
     * allowance mechanism. `value` 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 value) external returns (bool);
}

File 10 of 14 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../IERC20.sol";
import {IERC20Permit} from "../extensions/IERC20Permit.sol";
import {Address} from "../../../utils/Address.sol";

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

    /**
     * @dev An operation with an ERC20 token failed.
     */
    error SafeERC20FailedOperation(address token);

    /**
     * @dev Indicates a failed `decreaseAllowance` request.
     */
    error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);

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

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

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

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no
     * value, non-reverting calls are assumed to be successful.
     */
    function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {
        unchecked {
            uint256 currentAllowance = token.allowance(address(this), spender);
            if (currentAllowance < requestedDecrease) {
                revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);
            }
            forceApprove(token, spender, currentAllowance - requestedDecrease);
        }
    }

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

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

    /**
     * @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);
        if (returndata.length != 0 && !abi.decode(returndata, (bool))) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     *
     * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false
        // and not revert is the subcall reverts.

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

File 11 of 14 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol)

pragma solidity ^0.8.20;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev The ETH balance of the account is not enough to perform the operation.
     */
    error AddressInsufficientBalance(address account);

    /**
     * @dev There's no code at `target` (it is not a contract).
     */
    error AddressEmptyCode(address target);

    /**
     * @dev A call to an address target failed. The target may have reverted.
     */
    error FailedInnerCall();

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

        (bool success, ) = recipient.call{value: amount}("");
        if (!success) {
            revert FailedInnerCall();
        }
    }

    /**
     * @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 or custom error, it is bubbled
     * up by this function (like regular Solidity function calls). However, if
     * the call reverted with no returned reason, this function reverts with a
     * {FailedInnerCall} error.
     *
     * 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.
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0);
    }

    /**
     * @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`.
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        if (address(this).balance < value) {
            revert AddressInsufficientBalance(address(this));
        }
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

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

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

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
     * was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an
     * unsuccessful call.
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata
    ) internal view returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            // only check if target is a contract if the call was successful and the return data is empty
            // otherwise we already know that it was a contract
            if (returndata.length == 0 && target.code.length == 0) {
                revert AddressEmptyCode(target);
            }
            return returndata;
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
     * revert reason or with a default {FailedInnerCall} error.
     */
    function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            return returndata;
        }
    }

    /**
     * @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}.
     */
    function _revert(bytes memory returndata) 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 FailedInnerCall();
        }
    }
}

File 12 of 14 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;

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

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

File 13 of 14 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol)

pragma solidity ^0.8.20;

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

    /**
     * @dev Unauthorized reentrant call.
     */
    error ReentrancyGuardReentrantCall();

    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
        if (_status == ENTERED) {
            revert ReentrancyGuardReentrantCall();
        }

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

    /**
     * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
     * `nonReentrant` function in the call stack.
     */
    function _reentrancyGuardEntered() internal view returns (bool) {
        return _status == ENTERED;
    }
}

File 14 of 14 : ISnailEthereumTokenMigration.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.24;

interface ISnailEthereumTokenMigration {
    event TokensTransferred(bytes32 indexed messageId, uint256 amount);
    function transferTokens() external payable;
    function getTransferTokensFee() external view returns (uint256);
    function getTransferredTokensAmount(address holder) external view returns (uint256);
    function setDestinationReceiver(address receiver) external;
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IERC20","name":"_tokenToTransfer","type":"address"},{"internalType":"contract IRouterClient","name":"_crossChainRouter","type":"address"},{"internalType":"uint64","name":"_destinationChain","type":"uint64"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AddressInsufficientBalance","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferStarted","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":true,"internalType":"bytes32","name":"messageId","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokensTransferred","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"crossChainRouter","outputs":[{"internalType":"contract IRouterClient","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"destinationChain","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"destinationReceiver","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTransferTokensFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"holder","type":"address"}],"name":"getTransferredTokensAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"setDestinationReceiver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"tokenToTransfer","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"transferTokens","outputs":[],"stateMutability":"payable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60e06040523480156200001157600080fd5b5060405162001d4038038062001d40833981016040819052620000349162000691565b33806200005c57604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b620000678162000243565b5060016002556001600160a01b038316620000c55760405162461bcd60e51b815260206004820152601c60248201527f546f6b656e20616464726573732063616e6e6f74206265207a65726f00000000604482015260640162000053565b6001600160a01b0382166200012f5760405162461bcd60e51b815260206004820152602960248201527f43726f737320636861696e20726f7574657220616464726573732063616e6e6f60448201526874206265207a65726f60b81b606482015260840162000053565b6001600160a01b038316608081905260408051638da5cb5b60e01b81529051620002229291638da5cb5b91600480830192602092919082900301816000875af115801562000181573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001a79190620006f0565b6080516001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015620001e8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200020e919062000710565b6080516001600160a01b0316919062000261565b6001600160a01b0390911660c0526001600160401b031660a05250620007a1565b600180546001600160a01b03191690556200025e81620002f8565b50565b604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301526000919085169063dd62ed3e90604401602060405180830381865afa158015620002b2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002d8919062000710565b9050620002f28484620002ec85856200072a565b62000348565b50505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b0390811663095ea7b360e01b17909152620003a290859083906200040e16565b620002f257604080516001600160a01b038516602482015260006044808301919091528251808303909101815260649091019091526020810180516001600160e01b0390811663095ea7b360e01b1790915262000402918691620004c116565b620002f28482620004c1565b6000806000846001600160a01b0316846040516200042d91906200074c565b6000604051808303816000865af19150503d80600081146200046c576040519150601f19603f3d011682016040523d82523d6000602084013e62000471565b606091505b50915091508180156200049f5750805115806200049f5750808060200190518101906200049f91906200077d565b8015620004b657506000856001600160a01b03163b115b925050505b92915050565b6000620004d86001600160a01b0384168362000530565b9050805160001415801562000500575080806020019051810190620004fe91906200077d565b155b156200052b57604051635274afe760e01b81526001600160a01b038416600482015260240162000053565b505050565b6060620005408383600062000547565b9392505050565b6060814710156200056e5760405163cd78605960e01b815230600482015260240162000053565b600080856001600160a01b031684866040516200058c91906200074c565b60006040518083038185875af1925050503d8060008114620005cb576040519150601f19603f3d011682016040523d82523d6000602084013e620005d0565b606091505b509092509050620005e3868383620005ed565b9695505050505050565b6060826200060657620006008262000651565b62000540565b81511580156200061e57506001600160a01b0384163b155b156200064957604051639996b31560e01b81526001600160a01b038516600482015260240162000053565b508062000540565b805115620006625780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b6001600160a01b03811681146200025e57600080fd5b600080600060608486031215620006a757600080fd5b8351620006b4816200067b565b6020850151909350620006c7816200067b565b60408501519092506001600160401b0381168114620006e557600080fd5b809150509250925092565b6000602082840312156200070357600080fd5b815162000540816200067b565b6000602082840312156200072357600080fd5b5051919050565b80820180821115620004bb57634e487b7160e01b600052601160045260246000fd5b6000825160005b818110156200076f576020818601810151858301520162000753565b506000920191825250919050565b6000602082840312156200079057600080fd5b815180151581146200054057600080fd5b60805160a05160c051611530620008106000396000818161017f01528181610574015281816109d90152610af60152600081816102c0015281816105b001528181610a1b0152610b33015260008181610126015281816104190152818161078901526108b501526115306000f3fe6080604052600436106100d65760003560e01c80638da5cb5b1161007f578063e30c397811610059578063e30c397814610236578063e4fb4abe14610261578063f2fde38b1461028e578063fd1337a6146102ae57600080fd5b80638da5cb5b146101cb578063ad6e67e3146101f6578063d4ee640b1461021657600080fd5b806348db3509116100b057806348db35091461016d578063715018a6146101a157806379ba5097146101b657600080fd5b80630a7957b4146100e25780631792b0bc1461010a57806347c31c941461011457600080fd5b366100dd57005b600080fd5b3480156100ee57600080fd5b506100f76102fb565b6040519081526020015b60405180910390f35b610112610634565b005b34801561012057600080fd5b506101487f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610101565b34801561017957600080fd5b506101487f000000000000000000000000000000000000000000000000000000000000000081565b3480156101ad57600080fd5b50610112610bff565b3480156101c257600080fd5b50610112610c11565b3480156101d757600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff16610148565b34801561020257600080fd5b506101126102113660046112ea565b610c88565b34801561022257600080fd5b506100f76102313660046112ea565b610d79565b34801561024257600080fd5b5060015473ffffffffffffffffffffffffffffffffffffffff16610148565b34801561026d57600080fd5b506003546101489073ffffffffffffffffffffffffffffffffffffffff1681565b34801561029a57600080fd5b506101126102a93660046112ea565b610e21565b3480156102ba57600080fd5b506102e27f000000000000000000000000000000000000000000000000000000000000000081565b60405167ffffffffffffffff9091168152602001610101565b60035460009073ffffffffffffffffffffffffffffffffffffffff16610382576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f44657374696e6174696f6e207265636569766572206e6f74207365740000000060448201526064015b60405180910390fd5b6040805160a0810190915260035473ffffffffffffffffffffffffffffffffffffffff1660c08201526000908060e08101604080518083037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0018152918152908252517f70a082310000000000000000000000000000000000000000000000000000000081523360048201819052602090920191907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa158015610475573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104999190611320565b6040805173ffffffffffffffffffffffffffffffffffffffff9093166020840152820152606001604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190528152602001600060405190808252806020026020018201604052801561053a57816020015b60408051808201909152600080825260208201528152602001906001900390816105135790505b508152602001600073ffffffffffffffffffffffffffffffffffffffff1681526020016040518060200160405280600081525081525090507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166320487ded7f0000000000000000000000000000000000000000000000000000000000000000836040518363ffffffff1660e01b81526004016105ed9291906113a7565b602060405180830381865afa15801561060a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061062e9190611320565b91505090565b61063c610ed1565b60035473ffffffffffffffffffffffffffffffffffffffff166106bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f44657374696e6174696f6e207265636569766572206e6f7420736574000000006044820152606401610379565b3360009081526004602052604090205415610758576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f546f6b656e7320666f7220746869732061646472657373206861766520616c7260448201527f65616479206265656e206d6967726174656400000000000000000000000000006064820152608401610379565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523360048201526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa1580156107e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108099190611320565b90506000811161089b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f5472616e7366657220616d6f756e74206d75737420626520677265617465722060448201527f7468616e203000000000000000000000000000000000000000000000000000006064820152608401610379565b6108dd73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016333084610f12565b336000818152600460209081526040808320859055805160a08101825260035473ffffffffffffffffffffffffffffffffffffffff1660c0808301919091528251808303909101815260e082018352815281518084019590955284820186905281518086038301815260609095018252808301949094528051838152918201815291929182019083610991565b604080518082019091526000808252602082015281526020019060019003908161096a5790505b508152600060208083018290526040805191820181528282529283015290517f20487ded000000000000000000000000000000000000000000000000000000008152919250907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906320487ded90610a45907f00000000000000000000000000000000000000000000000000000000000000009086906004016113a7565b602060405180830381865afa158015610a62573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a869190611320565b905080341015610af2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f496e73756666696369656e742066656520666f72207472616e73616374696f6e6044820152606401610379565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166396f4e9f9837f0000000000000000000000000000000000000000000000000000000000000000866040518463ffffffff1660e01b8152600401610b709291906113a7565b60206040518083038185885af1158015610b8e573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610bb39190611320565b9050807f7e402b74ced70e371d9747937afd2546db578e1cb5bcc53fa01be155eadde40685604051610be791815260200190565b60405180910390a250505050610bfd6001600255565b565b610c07610fad565b610bfd6000611000565b600154339073ffffffffffffffffffffffffffffffffffffffff168114610c7c576040517f118cdaa700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602401610379565b610c8581611000565b50565b610c90610fad565b73ffffffffffffffffffffffffffffffffffffffff8116610d32576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f496e76616c69642064657374696e6174696f6e2072656365697665722061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610379565b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600073ffffffffffffffffffffffffffffffffffffffff8216610df8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f486f6c64657220616464726573732063616e6e6f74206265207a65726f0000006044820152606401610379565b5073ffffffffffffffffffffffffffffffffffffffff1660009081526004602052604090205490565b610e29610fad565b6001805473ffffffffffffffffffffffffffffffffffffffff83167fffffffffffffffffffffffff00000000000000000000000000000000000000009091168117909155610e8c60005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6002805403610f0c576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60028055565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052610fa7908590611031565b50505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610bfd576040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152602401610379565b600180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055610c85816110cc565b600061105373ffffffffffffffffffffffffffffffffffffffff841683611141565b9050805160001415801561107857508080602001905181019061107691906114bc565b155b156110c7576040517f5274afe700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84166004820152602401610379565b505050565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b606061114f83836000611156565b9392505050565b606081471015611194576040517fcd786059000000000000000000000000000000000000000000000000000000008152306004820152602401610379565b6000808573ffffffffffffffffffffffffffffffffffffffff1684866040516111bd91906114de565b60006040518083038185875af1925050503d80600081146111fa576040519150601f19603f3d011682016040523d82523d6000602084013e6111ff565b606091505b509150915061120f868383611219565b9695505050505050565b60608261122e57611229826112a8565b61114f565b8151158015611252575073ffffffffffffffffffffffffffffffffffffffff84163b155b156112a1576040517f9996b31500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401610379565b508061114f565b8051156112b85780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000602082840312156112fc57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461114f57600080fd5b60006020828403121561133257600080fd5b5051919050565b60005b8381101561135457818101518382015260200161133c565b50506000910152565b60008151808452611375816020860160208601611339565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6000604067ffffffffffffffff851683526020604081850152845160a060408601526113d660e086018261135d565b9050818601517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc080878403016060880152611411838361135d565b6040890151888203830160808a01528051808352908601945060009350908501905b80841015611472578451805173ffffffffffffffffffffffffffffffffffffffff16835286015186830152938501936001939093019290860190611433565b50606089015173ffffffffffffffffffffffffffffffffffffffff1660a08901526080890151888203830160c08a015295506114ae818761135d565b9a9950505050505050505050565b6000602082840312156114ce57600080fd5b8151801515811461114f57600080fd5b600082516114f0818460208701611339565b919091019291505056fea26469706673582212205e390816bce8b31ea024267700a108555ac2677cbcfc84cb02c2bacaee852aa864736f6c634300081800330000000000000000000000006bc40d4099f9057b23af309c08d935b890d7adc000000000000000000000000080226fc0ee2b096224eeac085bb9a8cba1146f7d000000000000000000000000000000000000000000000000dda641cfe44aff82

Deployed Bytecode

0x6080604052600436106100d65760003560e01c80638da5cb5b1161007f578063e30c397811610059578063e30c397814610236578063e4fb4abe14610261578063f2fde38b1461028e578063fd1337a6146102ae57600080fd5b80638da5cb5b146101cb578063ad6e67e3146101f6578063d4ee640b1461021657600080fd5b806348db3509116100b057806348db35091461016d578063715018a6146101a157806379ba5097146101b657600080fd5b80630a7957b4146100e25780631792b0bc1461010a57806347c31c941461011457600080fd5b366100dd57005b600080fd5b3480156100ee57600080fd5b506100f76102fb565b6040519081526020015b60405180910390f35b610112610634565b005b34801561012057600080fd5b506101487f0000000000000000000000006bc40d4099f9057b23af309c08d935b890d7adc081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610101565b34801561017957600080fd5b506101487f00000000000000000000000080226fc0ee2b096224eeac085bb9a8cba1146f7d81565b3480156101ad57600080fd5b50610112610bff565b3480156101c257600080fd5b50610112610c11565b3480156101d757600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff16610148565b34801561020257600080fd5b506101126102113660046112ea565b610c88565b34801561022257600080fd5b506100f76102313660046112ea565b610d79565b34801561024257600080fd5b5060015473ffffffffffffffffffffffffffffffffffffffff16610148565b34801561026d57600080fd5b506003546101489073ffffffffffffffffffffffffffffffffffffffff1681565b34801561029a57600080fd5b506101126102a93660046112ea565b610e21565b3480156102ba57600080fd5b506102e27f000000000000000000000000000000000000000000000000dda641cfe44aff8281565b60405167ffffffffffffffff9091168152602001610101565b60035460009073ffffffffffffffffffffffffffffffffffffffff16610382576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f44657374696e6174696f6e207265636569766572206e6f74207365740000000060448201526064015b60405180910390fd5b6040805160a0810190915260035473ffffffffffffffffffffffffffffffffffffffff1660c08201526000908060e08101604080518083037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0018152918152908252517f70a082310000000000000000000000000000000000000000000000000000000081523360048201819052602090920191907f0000000000000000000000006bc40d4099f9057b23af309c08d935b890d7adc073ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa158015610475573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104999190611320565b6040805173ffffffffffffffffffffffffffffffffffffffff9093166020840152820152606001604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190528152602001600060405190808252806020026020018201604052801561053a57816020015b60408051808201909152600080825260208201528152602001906001900390816105135790505b508152602001600073ffffffffffffffffffffffffffffffffffffffff1681526020016040518060200160405280600081525081525090507f00000000000000000000000080226fc0ee2b096224eeac085bb9a8cba1146f7d73ffffffffffffffffffffffffffffffffffffffff166320487ded7f000000000000000000000000000000000000000000000000dda641cfe44aff82836040518363ffffffff1660e01b81526004016105ed9291906113a7565b602060405180830381865afa15801561060a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061062e9190611320565b91505090565b61063c610ed1565b60035473ffffffffffffffffffffffffffffffffffffffff166106bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f44657374696e6174696f6e207265636569766572206e6f7420736574000000006044820152606401610379565b3360009081526004602052604090205415610758576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f546f6b656e7320666f7220746869732061646472657373206861766520616c7260448201527f65616479206265656e206d6967726174656400000000000000000000000000006064820152608401610379565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523360048201526000907f0000000000000000000000006bc40d4099f9057b23af309c08d935b890d7adc073ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa1580156107e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108099190611320565b90506000811161089b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f5472616e7366657220616d6f756e74206d75737420626520677265617465722060448201527f7468616e203000000000000000000000000000000000000000000000000000006064820152608401610379565b6108dd73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000006bc40d4099f9057b23af309c08d935b890d7adc016333084610f12565b336000818152600460209081526040808320859055805160a08101825260035473ffffffffffffffffffffffffffffffffffffffff1660c0808301919091528251808303909101815260e082018352815281518084019590955284820186905281518086038301815260609095018252808301949094528051838152918201815291929182019083610991565b604080518082019091526000808252602082015281526020019060019003908161096a5790505b508152600060208083018290526040805191820181528282529283015290517f20487ded000000000000000000000000000000000000000000000000000000008152919250907f00000000000000000000000080226fc0ee2b096224eeac085bb9a8cba1146f7d73ffffffffffffffffffffffffffffffffffffffff16906320487ded90610a45907f000000000000000000000000000000000000000000000000dda641cfe44aff829086906004016113a7565b602060405180830381865afa158015610a62573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a869190611320565b905080341015610af2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f496e73756666696369656e742066656520666f72207472616e73616374696f6e6044820152606401610379565b60007f00000000000000000000000080226fc0ee2b096224eeac085bb9a8cba1146f7d73ffffffffffffffffffffffffffffffffffffffff166396f4e9f9837f000000000000000000000000000000000000000000000000dda641cfe44aff82866040518463ffffffff1660e01b8152600401610b709291906113a7565b60206040518083038185885af1158015610b8e573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610bb39190611320565b9050807f7e402b74ced70e371d9747937afd2546db578e1cb5bcc53fa01be155eadde40685604051610be791815260200190565b60405180910390a250505050610bfd6001600255565b565b610c07610fad565b610bfd6000611000565b600154339073ffffffffffffffffffffffffffffffffffffffff168114610c7c576040517f118cdaa700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602401610379565b610c8581611000565b50565b610c90610fad565b73ffffffffffffffffffffffffffffffffffffffff8116610d32576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f496e76616c69642064657374696e6174696f6e2072656365697665722061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610379565b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600073ffffffffffffffffffffffffffffffffffffffff8216610df8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f486f6c64657220616464726573732063616e6e6f74206265207a65726f0000006044820152606401610379565b5073ffffffffffffffffffffffffffffffffffffffff1660009081526004602052604090205490565b610e29610fad565b6001805473ffffffffffffffffffffffffffffffffffffffff83167fffffffffffffffffffffffff00000000000000000000000000000000000000009091168117909155610e8c60005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6002805403610f0c576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60028055565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd00000000000000000000000000000000000000000000000000000000179052610fa7908590611031565b50505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610bfd576040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152602401610379565b600180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055610c85816110cc565b600061105373ffffffffffffffffffffffffffffffffffffffff841683611141565b9050805160001415801561107857508080602001905181019061107691906114bc565b155b156110c7576040517f5274afe700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84166004820152602401610379565b505050565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b606061114f83836000611156565b9392505050565b606081471015611194576040517fcd786059000000000000000000000000000000000000000000000000000000008152306004820152602401610379565b6000808573ffffffffffffffffffffffffffffffffffffffff1684866040516111bd91906114de565b60006040518083038185875af1925050503d80600081146111fa576040519150601f19603f3d011682016040523d82523d6000602084013e6111ff565b606091505b509150915061120f868383611219565b9695505050505050565b60608261122e57611229826112a8565b61114f565b8151158015611252575073ffffffffffffffffffffffffffffffffffffffff84163b155b156112a1576040517f9996b31500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401610379565b508061114f565b8051156112b85780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000602082840312156112fc57600080fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461114f57600080fd5b60006020828403121561133257600080fd5b5051919050565b60005b8381101561135457818101518382015260200161133c565b50506000910152565b60008151808452611375816020860160208601611339565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6000604067ffffffffffffffff851683526020604081850152845160a060408601526113d660e086018261135d565b9050818601517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc080878403016060880152611411838361135d565b6040890151888203830160808a01528051808352908601945060009350908501905b80841015611472578451805173ffffffffffffffffffffffffffffffffffffffff16835286015186830152938501936001939093019290860190611433565b50606089015173ffffffffffffffffffffffffffffffffffffffff1660a08901526080890151888203830160c08a015295506114ae818761135d565b9a9950505050505050505050565b6000602082840312156114ce57600080fd5b8151801515811461114f57600080fd5b600082516114f0818460208701611339565b919091019291505056fea26469706673582212205e390816bce8b31ea024267700a108555ac2677cbcfc84cb02c2bacaee852aa864736f6c63430008180033

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

0000000000000000000000006bc40d4099f9057b23af309c08d935b890d7adc000000000000000000000000080226fc0ee2b096224eeac085bb9a8cba1146f7d000000000000000000000000000000000000000000000000dda641cfe44aff82

-----Decoded View---------------
Arg [0] : _tokenToTransfer (address): 0x6Bc40d4099f9057b23aF309C08d935b890d7Adc0
Arg [1] : _crossChainRouter (address): 0x80226fc0Ee2b096224EeAc085Bb9a8cba1146f7D
Arg [2] : _destinationChain (uint64): 15971525489660198786

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000006bc40d4099f9057b23af309c08d935b890d7adc0
Arg [1] : 00000000000000000000000080226fc0ee2b096224eeac085bb9a8cba1146f7d
Arg [2] : 000000000000000000000000000000000000000000000000dda641cfe44aff82


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.