Sepolia Testnet

Contract

0x70a9b55D1537C0317102AA642aFEf255Ea955D05

Overview

ETH Balance

0 ETH

Multichain Info

N/A
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
67467942024-09-23 19:17:1216 days ago1727119032
0x70a9b55D...5Ea955D05
0.00082337 ETH
67467942024-09-23 19:17:1216 days ago1727119032
0x70a9b55D...5Ea955D05
0.00082337 ETH
67287892024-09-20 18:52:4819 days ago1726858368
0x70a9b55D...5Ea955D05
0.00117311 ETH
67287892024-09-20 18:52:4819 days ago1726858368
0x70a9b55D...5Ea955D05
0.00117311 ETH
64766342024-08-11 1:29:3659 days ago1723339776
0x70a9b55D...5Ea955D05
0.00031443 ETH
64766342024-08-11 1:29:3659 days ago1723339776
0x70a9b55D...5Ea955D05
0.00031443 ETH
64764392024-08-11 0:44:0060 days ago1723337040
0x70a9b55D...5Ea955D05
0.00031443 ETH
64764392024-08-11 0:44:0060 days ago1723337040
0x70a9b55D...5Ea955D05
0.00031443 ETH
64764162024-08-11 0:39:0060 days ago1723336740
0x70a9b55D...5Ea955D05
0.00031443 ETH
64764162024-08-11 0:39:0060 days ago1723336740
0x70a9b55D...5Ea955D05
0.00031443 ETH
64638052024-08-09 0:47:3662 days ago1723164456
0x70a9b55D...5Ea955D05
0.00033187 ETH
64638052024-08-09 0:47:3662 days ago1723164456
0x70a9b55D...5Ea955D05
0.00033187 ETH
64552342024-08-07 16:00:3663 days ago1723046436
0x70a9b55D...5Ea955D05
0.00030511 ETH
64552342024-08-07 16:00:3663 days ago1723046436
0x70a9b55D...5Ea955D05
0.00030511 ETH
63799742024-07-26 15:58:3675 days ago1722009516
0x70a9b55D...5Ea955D05
0.00045734 ETH
63799742024-07-26 15:58:3675 days ago1722009516
0x70a9b55D...5Ea955D05
0.00045734 ETH
63755962024-07-25 21:52:2476 days ago1721944344
0x70a9b55D...5Ea955D05
0.00026972 ETH
63755962024-07-25 21:52:2476 days ago1721944344
0x70a9b55D...5Ea955D05
0.00026972 ETH
63683662024-07-24 15:52:0077 days ago1721836320
0x70a9b55D...5Ea955D05
0.0002702 ETH
63683662024-07-24 15:52:0077 days ago1721836320
0x70a9b55D...5Ea955D05
0.0002702 ETH
63404852024-07-19 18:37:3682 days ago1721414256
0x70a9b55D...5Ea955D05
0.00024025 ETH
63404852024-07-19 18:37:3682 days ago1721414256
0x70a9b55D...5Ea955D05
0.00024025 ETH
63336932024-07-18 14:23:0083 days ago1721312580
0x70a9b55D...5Ea955D05
0.00483963 ETH
63336932024-07-18 14:23:0083 days ago1721312580
0x70a9b55D...5Ea955D05
0.00483963 ETH
63331652024-07-18 12:18:0083 days ago1721305080
0x70a9b55D...5Ea955D05
0.00105113 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
CCIPProvider

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 7 : CCIPProvider.sol
//SPDX-License-Identifier: Unlicense
pragma solidity 0.8.9;

import {IProvider} from "../../interfaces/IProvider.sol";
import {IAny2EVMMessageReceiver} from "@chainlink/contracts-ccip/src/v0.8/ccip/interfaces/IAny2EVMMessageReceiver.sol";
import {Client} from "@chainlink/contracts-ccip/src/v0.8/ccip/libraries/Client.sol";
import {IRouterClient} from "@chainlink/contracts-ccip/src/v0.8/ccip/interfaces/IRouterClient.sol";
import {ITeleport} from "../../interfaces/ITeleport.sol";
import {IERC165} from "../../interfaces/IERC165.sol";

contract CCIPProvider is IProvider, IAny2EVMMessageReceiver, IERC165 {
    address public immutable TELEPORT_ADDRESS;
    address private _iRouter;
    uint256 private _gasLimit = 200_000;

    /**
     * @dev A mapping that stores the destination chain selectors for the CCIPProvider contract mapped to their corresponding MPCids
     */
    mapping(uint8 => uint64) internal ccipChainSelectors;

    /**
     * @dev A mapping that stores the destination chain CCIPProvider contract that would receive the transmission
     */
    mapping(uint8 => address) internal ccipReceivers;

    /**
     * @dev Mapping of source messaging protocol chain IDs to their corresponding values destination chain CCIP selectors
     */
    mapping(uint64 => uint8) internal mpcIds;

    /**
     * @dev Allows knowing all chains that are supported from offchain
     */
    uint8[] private _supportedChains;

    /**
     * @dev Used to make sure the correct amount has been sent.
     * @param valueSent The amount sent by the sender.
     * @param calculatedFees The amount calculated by the router.
     */
    error ValueNotEqualToFee(uint256 valueSent, uint256 calculatedFees);

    /**
     *
     * @dev Used to make sure the transmissionReceiver is a valid EVM address
     * @param transmissionReceiver The receiver of the transmission teleport.
     */
    error OnlyEVMSupport(bytes transmissionReceiver);

    /**
     * @dev Used to make sure the router address is not the zero address.
     */
    error ZeroAddressRouter();

    /**
     * @dev Used to make sure the teleport address is not the zero address.
     */
    error ZeroAddressTeleport();

    /**
     * @dev Used to make sure the chain MPCId and chain selector arrays have the same length.
     */
    error ArraysLenMismatch();

    /**
     * @dev Used to make sure the destination chain is supported.
     */
    error DstChainUnsupported();

    /**
     * @dev Used to make sure the source chain is supported.
     */
    error SrcChainUnsupported();

    /**
     * @dev Used to indicate that the sender address from the source chain is not recognized.
     */
    error UnrecognizedCCIPSender();

    /**
     * @dev Used to indicate that the teleport receiver address send is not recognized.
     */
    error UnrecognizedTeleportReceiver();

    /**
     * @dev Used to indicate that the manual claim should be perform offchain, by using the sdk.
     */
    error ManualClaimOffchain();

    /**
     *
     * @dev Emitted when the router address is updated.
     * @param router The new router address.
     */
    error InvalidRouter(address router);

    // Duplicate chain selector or MPC ID
    error DuplicateChainSelectorOrMPCId();

    // Receiver cannot be zero address
    error ReceiverCannotBeZeroAddress();

    /// @dev only calls from the set router are accepted.
    modifier onlyRouter() {
        if (msg.sender != address(_iRouter)) revert InvalidRouter(msg.sender);
        _;
    }

    /**
     * @dev Constructor function for CCIPProvider contract.
     * @param _router Address of the router contract.
     * @param _teleport Address of the teleport contract.
     * @param _mpcIds Array of MP chain IDs.
     * @param _ccipChainSelectors Array of CCIP chain selectors.
     */
    constructor(
        address _router,
        address _teleport,
        uint8[] memory _mpcIds,
        uint64[] memory _ccipChainSelectors,
        address[] memory _ccipReceivers
    ) {
        if (_router == address(0)) revert ZeroAddressRouter();
        if (_teleport == address(0)) revert ZeroAddressTeleport();
        _iRouter = _router;
        TELEPORT_ADDRESS = _teleport;

        if (_mpcIds.length != _ccipChainSelectors.length) revert ArraysLenMismatch();
        if (_mpcIds.length != _ccipReceivers.length) revert ArraysLenMismatch();

        for (uint256 i = 0; i < _mpcIds.length; ) {
            ccipChainSelectors[_mpcIds[i]] = _ccipChainSelectors[i];
            mpcIds[_ccipChainSelectors[i]] = _mpcIds[i];
            ccipReceivers[_mpcIds[i]] = _ccipReceivers[i];
            _supportedChains.push(_mpcIds[i]);
            unchecked {
                ++i;
            }
        }
    }

    /**
     * @dev Modifier to restrict access to functions only to the Teleport facet.
     */
    modifier onlyTeleport() {
        if (msg.sender != TELEPORT_ADDRESS) revert OnlyTeleportCalls();
        _;
    }

    /**
     * @dev Prepares a message to be sent to a target chain.
     * @param targetChainId The ID of the target chain.
     * @param transmissionTeleportReceiver The receiver of the transmission teleport.
     * @param dappTranmissionInfo The information about the DApp transmission.
     * @param extraOptionalArgs_ Extra optional arguments.
     * @return A tuple containing the message ID, the EVM2Any message, the router client, the message nonce, the sender address, and the message payload.
     */
    function prepareMessage(
        uint8 targetChainId,
        bytes calldata transmissionTeleportReceiver,
        DappTransmissionInfo calldata dappTranmissionInfo,
        bytes calldata extraOptionalArgs_
    ) private view returns (uint256, Client.EVM2AnyMessage memory, IRouterClient, uint64) {
        if (transmissionTeleportReceiver.length != 20) revert OnlyEVMSupport(transmissionTeleportReceiver);

        address transmissionReceiver = ccipReceivers[targetChainId];

        Client.EVM2AnyMessage memory evm2AnyMessage = _buildCCIPMessage(
            transmissionReceiver,
            _encodeTeleportMessage(dappTranmissionInfo, TELEPORT_ADDRESS, transmissionTeleportReceiver),
            address(0),
            extraOptionalArgs_
        );

        IRouterClient router = IRouterClient(getRouter());

        uint64 _destinationChainSelector = getChainSelector(targetChainId);

        if (_destinationChainSelector == 0) revert DstChainUnsupported();

        uint256 fees = router.getFee(_destinationChainSelector, evm2AnyMessage);

        return (fees, evm2AnyMessage, router, _destinationChainSelector);
    }

    /**
     * @notice Transmits the `payload` to the validators by emitting the `Transmission` event
     * @param targetChainId The chainID where the message should be delivered to
     * @param transmissionTeleportReceiver The address of the contract in the target chain to receive the transmission
     * @param dappTranmissionInfo The Id and data for the dApp that the message belongs to
     */
    function sendMsg(
        uint8 targetChainId,
        bytes calldata transmissionTeleportReceiver,
        DappTransmissionInfo calldata dappTranmissionInfo,
        bytes calldata extraOptionalArgs_
    ) external payable override onlyTeleport {
        (
            uint256 fees,
            Client.EVM2AnyMessage memory evm2AnyMessage,
            IRouterClient router,
            uint64 _destinationChainSelector
        ) = prepareMessage(targetChainId, transmissionTeleportReceiver, dappTranmissionInfo, extraOptionalArgs_);

        if (fees != msg.value) revert ValueNotEqualToFee(msg.value, fees);

        // Send the CCIP message through the router. We ignore the returned message ID as we don't need it.
        router.ccipSend{value: fees}(_destinationChainSelector, evm2AnyMessage);
    }

    /**
     * @dev Returns the chain selector for a given chain ID.
     * @param chainId The ID of the chain to get the selector for.
     * @return The chain selector as a uint64.
     */
    function getChainSelector(uint8 chainId) public view returns (uint64) {
        return ccipChainSelectors[chainId];
    }

    /**
     * @dev Returns the chain selector for a given chain ID.
     * @param chainId The ID of the chain to get the selector for.
     * @return The chain selector as a uint64.
     */
    function getCCIPReceiver(uint8 chainId) public view returns (address) {
        return ccipReceivers[chainId];
    }

    /**
     * @dev Returns the chain ID for a given chain selector.
     * @param chainSelector The chain selector to get the chain ID for.
     * @return The chain ID as a uint8.
     */
    function getChainId(uint64 chainSelector) public view returns (uint8) {
        return mpcIds[chainSelector];
    }

    function manualClaim(bytes calldata) external view onlyTeleport {
        revert ManualClaimOffchain();
    }

    /// @notice Return the current router
    /// @return i_router address
    function getRouter() public view returns (address) {
        return address(_iRouter);
    }

    /// @notice Return the current gas limit
    /// @return _gasLimit gas limit
    function getGasLimit() public view returns (uint256) {
        return _gasLimit;
    }

    /**
     * @dev Returns the fee required for transmitting a message from the source chain to the target chain.
     * @param targetChainId The MPC ID of the target chain.
     * @param transmissionTeleportReceiver The address of the receiver on the target chain.
     * @param dappTranmissionInfo The transmission information.
     * @return The fee required for the transmission.
     */
    function fee(
        uint8 targetChainId,
        bytes calldata transmissionTeleportReceiver,
        DappTransmissionInfo calldata dappTranmissionInfo,
        bytes calldata extraOptionalArgs
    ) external view override returns (uint256) {
        (uint256 fees, , , ) = prepareMessage(
            targetChainId,
            transmissionTeleportReceiver,
            dappTranmissionInfo,
            extraOptionalArgs
        );
        return fees;
    }

    /**
     * @dev Configures the CCIPProvider contract with the provided configuration data.
     * @param configData The configuration data to be decoded and used to set the CCIPProvider parameters.
     * @notice Only callable by the Teleport contract.
     * @notice The `params.mpcIds` and `params.ccipChainSelectors` arrays must have the same length.
     * @notice For each `MPCId` in `params.mpcIds`, sets the corresponding `ccipChainSelector` in the `ccipChainSelectors` mapping.
     * @notice For each `ccipChainSelector` in `params.ccipChainSelectors`, sets the corresponding `MPCId` in the `mpcIds` mapping.
     * @notice If `params.routerAddress` is not the zero address, sets the `i_router` address to `params.routerAddress`.
     */
    function config(bytes calldata configData) external override onlyTeleport {
        ConfigCallParamsV1 memory params = _decodeConfigMessage(configData);

        if (params.mpcIds.length != params.ccipChainSelectors.length) revert ArraysLenMismatch();

        if (params.mpcIds.length != params.ccipReceivers.length) revert ArraysLenMismatch();

        // Set the router address only if a value is provided. Otherwise, keep the current address.
        if (params.routerAddress != address(0)) {
            _iRouter = params.routerAddress;
        }

        // Set the chain mappings only if some values are provided. Otherwise, keep the current mappings.
        if (params.mpcIds.length > 0) {
            uint256 len = _supportedChains.length; // We cache the length to avoid multiple reads
            // Reset mappings
            for (uint256 i = 0; i < len; ) {
                delete mpcIds[ccipChainSelectors[_supportedChains[i]]];
                delete ccipChainSelectors[_supportedChains[i]];
                delete ccipReceivers[_supportedChains[i]];

                unchecked {
                    ++i;
                }
            }

            // Reset _supportedChains
            delete _supportedChains;
            for (uint256 i = 0; i < params.mpcIds.length; ) {
                if (ccipChainSelectors[params.mpcIds[i]] != 0 || mpcIds[params.ccipChainSelectors[i]] != 0) {
                    revert DuplicateChainSelectorOrMPCId();
                }

                if (params.ccipReceivers[i] == address(0)) {
                    revert ReceiverCannotBeZeroAddress();
                }

                ccipChainSelectors[params.mpcIds[i]] = params.ccipChainSelectors[i];
                ccipReceivers[params.mpcIds[i]] = params.ccipReceivers[i];
                mpcIds[params.ccipChainSelectors[i]] = params.mpcIds[i];
                _supportedChains.push(params.mpcIds[i]);
                unchecked {
                    ++i;
                }
            }
        }

        // Set the gas limit only if a value is provided. Otherwise, keep the current value.
        if (params.gasLimit != 0) {
            _gasLimit = params.gasLimit;
        }
    }

    /**
     * @dev Internal function to handle receiving messages from the CCIP protocol.
     * @param message The message received from the CCIP protocol.
     */
    function ccipReceive(Client.Any2EVMMessage calldata message) external override onlyRouter {
        // Decode the payload to get the target chain ID, receiver address, dApp ID and payload from message.data

        MessageData memory decodedData = _decodeTeleportMessage(message.data);

        if (TELEPORT_ADDRESS != address(uint160(bytes20(decodedData.receiverTeleportAddress))))
            revert UnrecognizedTeleportReceiver();

        IProvider.DappTransmissionInfo memory info = decodedData.info;

        if (info.dappTransmissionReceiver.length != 20) revert OnlyEVMSupport(info.dappTransmissionReceiver);

        address transmissionReceiverAddress = address(uint160(bytes20(info.dappTransmissionReceiver)));

        uint8 sourceChainId = getChainId(message.sourceChainSelector);

        if (sourceChainId == 0) revert SrcChainUnsupported();

        address ccipSenderAddress = abi.decode(message.sender, (address));

        if (ccipSenderAddress != ccipReceivers[sourceChainId]) revert UnrecognizedCCIPSender();

        ITeleport(TELEPORT_ADDRESS).onProviderReceive(
            ITeleport.DappTransmissionReceive({
                teleportSender: decodedData.senderTeleportAddress,
                sourceChainId: sourceChainId,
                dappTransmissionSender: info.dappTransmissionSender,
                dappTransmissionReceiver: transmissionReceiverAddress,
                dAppId: info.dAppId,
                payload: info.dappPayload
            })
        );
    }

    /**
     * @dev Encodes a teleport message for the CCIP protocol.
     * @param info The transmission information for the message.
     * @return The encoded message as bytes.
     */
    function _encodeTeleportMessage(
        IProvider.DappTransmissionInfo memory info,
        address senderTeleportAddress,
        bytes calldata receiverTeleportAddress
    ) internal pure returns (bytes memory) {
        // Create an struct in memory with necessary information for sending a cross-chain message
        return abi.encode(MessageData(info, abi.encodePacked(senderTeleportAddress), receiverTeleportAddress));
    }

    struct MessageData {
        IProvider.DappTransmissionInfo info;
        bytes senderTeleportAddress;
        bytes receiverTeleportAddress;
    }

    /**
     * @dev Decodes a teleport message payload into a DappTransmissionInfo struct.
     * @param _payload The payload of the teleport message.
     * @return A DappTransmissionInfo struct containing the decoded information.
     */
    function _decodeTeleportMessage(bytes calldata _payload) internal pure returns (MessageData memory) {
        // Decode the payload from message.data and return the decoded values
        return abi.decode(_payload, (MessageData));
    }

    /// @notice Construct a CCIP message.
    /// @dev This function will create an EVM2AnyMessage struct with all the necessary information for sending a text.
    /// @param _receiver The address of the receiver.
    /// @param _payload The data to be sent.
    /// @param _feeTokenAddress The address of the token used for fees. Set address(0) for native gas.
    /// @return Client.EVM2AnyMessage Returns an EVM2AnyMessage struct which contains information for sending a CCIP message.
    function _buildCCIPMessage(
        address _receiver,
        bytes memory _payload,
        address _feeTokenAddress,
        bytes calldata extraOptionalArgs_
    ) internal view returns (Client.EVM2AnyMessage memory) {
        Client.EVMExtraArgsV1 memory extraArgs;
        // If extraOptionalArgs_ is not empty, decode the EVMExtraArgsV1 struct from it
        if (extraOptionalArgs_.length != 0) {
            extraArgs = abi.decode(extraOptionalArgs_, (Client.EVMExtraArgsV1));
        } else {
            // If extraOptionalArgs_ is empty, create an empty EVMExtraArgsV1 struct
            extraArgs = Client.EVMExtraArgsV1({gasLimit: 0});
        }

        // If the gasLimit is not set, set it to 200_000
        if (extraArgs.gasLimit == 0) {
            extraArgs.gasLimit = _gasLimit;
        }

        // Create an EVM2AnyMessage struct in memory with necessary information for sending a cross-chain message
        return
            Client.EVM2AnyMessage({
                receiver: abi.encode(_receiver), // ABI-encoded receiver address
                data: _payload, // ABI-encoded string
                tokenAmounts: new Client.EVMTokenAmount[](0), // Empty array as no tokens are transferred
                extraArgs: Client._argsToBytes(extraArgs), // Additional arguments, setting gas limit and non-strict sequencing mode
                feeToken: _feeTokenAddress // Set the feeToken to a feeTokenAddress, indicating specific asset will be used for fees
            });
    }

    /**
     * @dev Internal function to decode a configuration message received from the teleport.
     * @param _data The config data received from the CCIP.
     * @return The decoded configuration params.
     */
    function _decodeConfigMessage(bytes memory _data) internal pure returns (ConfigCallParamsV1 memory) {
        return abi.decode(_data, (ConfigCallParamsV1));
    }

    // TODO: Wouldn't it be better to have another struct to handle possible future versions of the config struct?
    struct ConfigCallParamsV1 {
        uint8[] mpcIds;
        uint64[] ccipChainSelectors;
        address[] ccipReceivers;
        address routerAddress;
        uint256 gasLimit;
    }

    /// @notice IERC165 supports an interfaceId
    /// @param interfaceId The interfaceId to check
    /// @return true if the interfaceId is supported
    function supportsInterface(bytes4 interfaceId) public pure override returns (bool) {
        return
            interfaceId == type(IAny2EVMMessageReceiver).interfaceId ||
            interfaceId == type(IERC165).interfaceId ||
            interfaceId == type(IProvider).interfaceId;
    }

    /**
     * @dev Allows knowing all chains that are supported from offchain
     */
    function supportedChains(uint256 index) external view override returns (uint8) {
        return _supportedChains[index];
    }

    /**
     * @dev Amount of supported chains
     */
    function supportedChainsCount() external view override returns (uint256) {
        return _supportedChains.length;
    }
}

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

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

/// @notice Application contracts that intend to receive messages from
/// the router should implement this interface.
interface IAny2EVMMessageReceiver {
  /// @notice Called by the Router to deliver a message.
  /// If this reverts, any token transfers also revert. The message
  /// will move to a FAILED state and become available for manual execution.
  /// @param message CCIP Message
  /// @dev Note ensure you check the msg.sender is the OffRampRouter
  function ccipReceive(Client.Any2EVMMessage calldata message) external;
}

File 3 of 7 : 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 4 of 7 : 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 5 of 7 : IERC165.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;

interface IERC165 {
    /// @notice Query if a contract implements an interface
    /// @param interfaceId The interface identifier, as specified in ERC-165
    /// @dev Interface identification is specified in ERC-165. This function
    ///  uses less than 30,000 gas.
    /// @return `true` if the contract implements `interfaceID` and
    ///  `interfaceID` is not 0xffffffff, `false` otherwise
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 6 of 7 : IProvider.sol
//SPDX-License-Identifier: Unlicense
pragma solidity 0.8.9;

interface IProvider {
    /**
     * @dev Used to make sure the function is only called by the teleport contract.
     */
    error OnlyTeleportCalls();

    /// @notice emitted when transmitting a payload
    event Transmission(
        bytes transmissionSender,
        uint8 targetChainId,
        bytes transmissionReceiver,
        bytes32 dAppId,
        bytes payload
    );
    /// @notice emitted when delivering a payload
    event Delivery(bytes32 transmissionId);

    struct DappTransmissionInfo {
        bytes dappTransmissionSender;
        bytes dappTransmissionReceiver;
        bytes32 dAppId;
        bytes dappPayload;
    }

    function supportedChains(uint256 index) external view returns (uint8);

    function supportedChainsCount() external view returns (uint256);

    /// @return The currently set service fee
    function fee(
        uint8 targetChainId,
        bytes calldata transmissionTeleportReceiver,
        DappTransmissionInfo calldata dappTranmissionInfo,
        bytes calldata extraOptionalArgs
    ) external view returns (uint256);

    function sendMsg(
        uint8 targetChainId,
        bytes calldata transmissionTeleportReceiver,
        DappTransmissionInfo calldata dappTranmissionInfo,
        bytes calldata extraOptionalArgs
    ) external payable;

    function manualClaim(bytes calldata args) external;

    function config(bytes calldata configData) external;
}

File 7 of 7 : ITeleport.sol
//SPDX-License-Identifier: Unlicense
pragma solidity 0.8.9;

/**
 * @title ITeleport
 * @dev Interface for the Teleport contract, which allows for cross-chain communication and messages transfer using different providers.
 */
interface ITeleport {
    /**
     * @notice Emitted when collecting fees
     * @param serviceFee The amount of service fee collected
     */
    event TransmissionFees(uint256 serviceFee);

    /**
     * @dev Transmits a message to the specified target chain ID. The message will be delivered using the most suitable provider.
     * @param targetChainId The ID of the target chain
     * @param transmissionReceiver The address of the receiver on the target chain
     * @param dAppId The ID of the dApp on the target chain
     * @param payload The message payload
     */
    function transmit(
        uint8 targetChainId,
        bytes calldata transmissionReceiver,
        bytes32 dAppId,
        bytes calldata payload
    ) external payable;

    /**
     * @notice Selects a provider to bridge the message to the target chain
     * @param targetChainId_ The chainID where the message should be delivered to
     * @param transmissionReceiver_ The address of the contract in the target chain to receive the transmission
     * @param dAppId_ ID for the dApp that the message belongs to
     * @param payload_ The dApp-specific message data
     * @param extraOptionalArgs_ Extra optional arguments to be passed to the provider. This allow for specific provider configurations. Send bytes('') if not needed
     */
    function transmitWithArgs(
        uint8 targetChainId_,
        bytes calldata transmissionReceiver_,
        bytes32 dAppId_,
        bytes calldata payload_,
        bytes calldata extraOptionalArgs_
    ) external payable;

    /**
     * @dev Transmits a message to the specified target chain ID. The message will be delivered using the specified provider.
     * @param targetChainId The ID of the target chain
     * @param transmissionReceiver The address of the receiver on the target chain
     * @param dAppId The ID of the dApp on the target chain
     * @param payload The message payload
     * @param providerAddress The address of the provider to use
     */
    function transmitWithProvider(
        uint8 targetChainId,
        bytes calldata transmissionReceiver,
        bytes32 dAppId,
        bytes calldata payload,
        address providerAddress,
        bytes memory extraOptionalArgs_
    ) external payable;

    /**
     * @dev Delivers a message to this chain.
     * @param args The message arguments, which depend on the provider. See the provider's documentation for more information.
     */
    function deliver(address providerAddress, bytes calldata args) external;

    /**
     * @dev Returns the currently set teleport fee.
     * @return The teleport fee amount
     */
    function teleportFee() external view returns (uint256);

    /**
     * @dev Returns the fee for the automatic selected provider.
     * @return The provider fee amount
     */
    function providerFee(
        uint8 targetChainId_,
        bytes calldata transmissionReceiver_,
        bytes32 dAppId_,
        bytes calldata payload_,
        bytes calldata extraOptionalArgs_
    ) external view returns (uint256);

    /**
     * @dev Returns the fee for the stated provider.
     * @return The provider fee amount
     */
    function providerFee(
        address providerAddress_,
        uint8 targetChainId_,
        bytes calldata transmissionReceiver_,
        bytes32 dAppId_,
        bytes calldata payload_,
        bytes calldata extraOptionalArgs_
    ) external view returns (uint256);

    /**
     * @dev Returns the currently set service fee.
     * @return The service fee amount
     */
    function serviceFee(
        uint8 targetChainId_,
        bytes calldata transmissionReceiver_,
        bytes32 dAppId_,
        bytes calldata payload_,
        bytes calldata extraOptionalArgs_
    ) external view returns (uint256);

    /**
     * @dev Returns the currently set service fee.
     * @return The service fee amount
     */
    function serviceFee(
        address providerAddress_,
        uint8 targetChainId_,
        bytes calldata transmissionReceiver_,
        bytes32 dAppId_,
        bytes calldata payload_,
        bytes calldata extraOptionalArgs_
    ) external view returns (uint256);

    struct DappTransmissionReceive {
        bytes teleportSender;
        uint8 sourceChainId;
        bytes dappTransmissionSender;
        address dappTransmissionReceiver;
        bytes32 dAppId;
        bytes payload;
    }

    /**
     * @dev Notifies the teleport that the provider has received a new message. Teleport should invoke the related dapps.
     * @param args The arguments of the message.
     */
    function onProviderReceive(DappTransmissionReceive calldata args) external;

    function configProviderSelector(bytes calldata configData, bytes[] calldata signatures_) external;

    function configProvider(bytes calldata configData, address providerAddress, bytes[] calldata signatures_) external;
}

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

Contract ABI

[{"inputs":[{"internalType":"address","name":"_router","type":"address"},{"internalType":"address","name":"_teleport","type":"address"},{"internalType":"uint8[]","name":"_mpcIds","type":"uint8[]"},{"internalType":"uint64[]","name":"_ccipChainSelectors","type":"uint64[]"},{"internalType":"address[]","name":"_ccipReceivers","type":"address[]"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ArraysLenMismatch","type":"error"},{"inputs":[],"name":"DstChainUnsupported","type":"error"},{"inputs":[],"name":"DuplicateChainSelectorOrMPCId","type":"error"},{"inputs":[{"internalType":"address","name":"router","type":"address"}],"name":"InvalidRouter","type":"error"},{"inputs":[],"name":"ManualClaimOffchain","type":"error"},{"inputs":[{"internalType":"bytes","name":"transmissionReceiver","type":"bytes"}],"name":"OnlyEVMSupport","type":"error"},{"inputs":[],"name":"OnlyTeleportCalls","type":"error"},{"inputs":[],"name":"ReceiverCannotBeZeroAddress","type":"error"},{"inputs":[],"name":"SrcChainUnsupported","type":"error"},{"inputs":[],"name":"UnrecognizedCCIPSender","type":"error"},{"inputs":[],"name":"UnrecognizedTeleportReceiver","type":"error"},{"inputs":[{"internalType":"uint256","name":"valueSent","type":"uint256"},{"internalType":"uint256","name":"calculatedFees","type":"uint256"}],"name":"ValueNotEqualToFee","type":"error"},{"inputs":[],"name":"ZeroAddressRouter","type":"error"},{"inputs":[],"name":"ZeroAddressTeleport","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"transmissionId","type":"bytes32"}],"name":"Delivery","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes","name":"transmissionSender","type":"bytes"},{"indexed":false,"internalType":"uint8","name":"targetChainId","type":"uint8"},{"indexed":false,"internalType":"bytes","name":"transmissionReceiver","type":"bytes"},{"indexed":false,"internalType":"bytes32","name":"dAppId","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"payload","type":"bytes"}],"name":"Transmission","type":"event"},{"inputs":[],"name":"TELEPORT_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"bytes32","name":"messageId","type":"bytes32"},{"internalType":"uint64","name":"sourceChainSelector","type":"uint64"},{"internalType":"bytes","name":"sender","type":"bytes"},{"internalType":"bytes","name":"data","type":"bytes"},{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct Client.EVMTokenAmount[]","name":"destTokenAmounts","type":"tuple[]"}],"internalType":"struct Client.Any2EVMMessage","name":"message","type":"tuple"}],"name":"ccipReceive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"configData","type":"bytes"}],"name":"config","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"targetChainId","type":"uint8"},{"internalType":"bytes","name":"transmissionTeleportReceiver","type":"bytes"},{"components":[{"internalType":"bytes","name":"dappTransmissionSender","type":"bytes"},{"internalType":"bytes","name":"dappTransmissionReceiver","type":"bytes"},{"internalType":"bytes32","name":"dAppId","type":"bytes32"},{"internalType":"bytes","name":"dappPayload","type":"bytes"}],"internalType":"struct IProvider.DappTransmissionInfo","name":"dappTranmissionInfo","type":"tuple"},{"internalType":"bytes","name":"extraOptionalArgs","type":"bytes"}],"name":"fee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"chainId","type":"uint8"}],"name":"getCCIPReceiver","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"chainSelector","type":"uint64"}],"name":"getChainId","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"chainId","type":"uint8"}],"name":"getChainSelector","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getGasLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRouter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"","type":"bytes"}],"name":"manualClaim","outputs":[],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"targetChainId","type":"uint8"},{"internalType":"bytes","name":"transmissionTeleportReceiver","type":"bytes"},{"components":[{"internalType":"bytes","name":"dappTransmissionSender","type":"bytes"},{"internalType":"bytes","name":"dappTransmissionReceiver","type":"bytes"},{"internalType":"bytes32","name":"dAppId","type":"bytes32"},{"internalType":"bytes","name":"dappPayload","type":"bytes"}],"internalType":"struct IProvider.DappTransmissionInfo","name":"dappTranmissionInfo","type":"tuple"},{"internalType":"bytes","name":"extraOptionalArgs_","type":"bytes"}],"name":"sendMsg","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"supportedChains","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"supportedChainsCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"}]

60a060405262030d406001553480156200001857600080fd5b50604051620021f6380380620021f68339810160408190526200003b9162000452565b6001600160a01b03851662000063576040516329cc36bb60e21b815260040160405180910390fd5b6001600160a01b0384166200008b5760405163f81fa98f60e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b038781169190911790915584166080528151835114620000d3576040516304cc911160e41b815260040160405180910390fd5b8051835114620000f6576040516304cc911160e41b815260040160405180910390fd5b60005b8351811015620002c55782818151811062000118576200011862000578565b60200260200101516002600086848151811062000139576200013962000578565b602002602001015160ff1660ff16815260200190815260200160002060006101000a8154816001600160401b0302191690836001600160401b031602179055508381815181106200018e576200018e62000578565b602002602001015160046000858481518110620001af57620001af62000578565b60200260200101516001600160401b03166001600160401b0316815260200190815260200160002060006101000a81548160ff021916908360ff16021790555081818151811062000204576200020462000578565b60200260200101516003600086848151811062000225576200022562000578565b602002602001015160ff1660ff16815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060058482815181106200027c576200027c62000578565b602090810291909101810151825460018181018555600094855293839020928104909201805460ff928316601f9094166101000a938402929093021990921617905501620000f9565b5050505050506200058e565b80516001600160a01b0381168114620002e957600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156200032f576200032f620002ee565b604052919050565b60006001600160401b03821115620003535762000353620002ee565b5060051b60200190565b600082601f8301126200036f57600080fd5b8151602062000388620003828362000337565b62000304565b82815260059290921b84018101918181019086841115620003a857600080fd5b8286015b84811015620003dc5780516001600160401b0381168114620003ce5760008081fd5b8352918301918301620003ac565b509695505050505050565b600082601f830112620003f957600080fd5b815160206200040c620003828362000337565b82815260059290921b840181019181810190868411156200042c57600080fd5b8286015b84811015620003dc576200044481620002d1565b835291830191830162000430565b600080600080600060a086880312156200046b57600080fd5b6200047686620002d1565b9450602062000487818801620002d1565b60408801519095506001600160401b0380821115620004a557600080fd5b818901915089601f830112620004ba57600080fd5b8151620004cb620003828262000337565b81815260059190911b8301840190848101908c831115620004eb57600080fd5b938501935b828510156200051c57845160ff811681146200050c5760008081fd5b82529385019390850190620004f0565b60608c015190985094505050808311156200053657600080fd5b620005448a848b016200035d565b945060808901519250808311156200055b57600080fd5b50506200056b88828901620003e7565b9150509295509295909350565b634e487b7160e01b600052603260045260246000fd5b608051611c22620005d46000396000818161028e0152818161039c01528181610572015281816106920152818161076901528181610ca00152610d580152611c226000f3fe6080604052600436106100dd5760003560e01c806388bbe1e01161007f57806391448cdf1161005957806391448cdf1461027c578063b0f479a1146102c8578063bbd8ab03146102e6578063dbbc27951461030657600080fd5b806388bbe1e0146101d25780638a1903cd146102235780638b6cecf81461024357600080fd5b8063548d496f116100bb578063548d496f1461014b57806374d83db11461017d57806378c3e52f1461019d57806385572ffb146101b257600080fd5b806301ffc9a7146100e257806311653322146101175780631a93d1c31461012c575b600080fd5b3480156100ee57600080fd5b506101026100fd366004611163565b61033f565b60405190151581526020015b60405180910390f35b61012a6101253660046111e4565b610391565b005b34801561013857600080fd5b506001545b60405190815260200161010e565b34801561015757600080fd5b5061016b610166366004611292565b6104b3565b60405160ff909116815260200161010e565b34801561018957600080fd5b5061013d6101983660046111e4565b6104ef565b3480156101a957600080fd5b5060055461013d565b3480156101be57600080fd5b5061012a6101cd3660046112ab565b610510565b3480156101de57600080fd5b5061020b6101ed3660046112e5565b60ff166000908152600260205260409020546001600160401b031690565b6040516001600160401b03909116815260200161010e565b34801561022f57600080fd5b5061012a61023e366004611302565b61075e565b34801561024f57600080fd5b5061016b61025e366004611358565b6001600160401b031660009081526004602052604090205460ff1690565b34801561028857600080fd5b506102b07f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161010e565b3480156102d457600080fd5b506000546001600160a01b03166102b0565b3480156102f257600080fd5b5061012a610301366004611302565b610c95565b34801561031257600080fd5b506102b06103213660046112e5565b60ff166000908152600360205260409020546001600160a01b031690565b60006001600160e01b031982166385572ffb60e01b148061037057506001600160e01b031982166301ffc9a760e01b145b8061038b57506001600160e01b031982166378320a1d60e01b145b92915050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146103da57604051633fab642360e11b815260040160405180910390fd5b6000806000806103ee8a8a8a8a8a8a610cf7565b9350935093509350348414610424576040516335bdf3f160e21b8152346004820152602481018590526044015b60405180910390fd5b6040516396f4e9f960e01b81526001600160a01b038316906396f4e9f990869061045490859088906004016113c2565b6020604051808303818588803b15801561046d57600080fd5b505af1158015610481573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906104a6919061149b565b5050505050505050505050565b6000600582815481106104c8576104c86114b4565b90600052602060002090602091828204019190069054906101000a900460ff169050919050565b600080610500888888888888610cf7565b50919a9950505050505050505050565b6000546001600160a01b0316331461053d576040516335fdcccd60e21b815233600482015260240161041b565b600061055461054f60608401846114ca565b610e83565b9050806040015161056490611510565b60601c6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146105b857604051632c59162f60e11b815260040160405180910390fd5b80516020810151516014146105e65780602001516040516385d81b8d60e01b815260040161041b919061154c565b600081602001516105f690611510565b60601c9050600061061061025e6040870160208801611358565b905060ff811661063357604051634d57940960e11b815260040160405180910390fd5b600061064260408701876114ca565b81019061064f9190611574565b60ff83166000908152600360205260409020549091506001600160a01b03808316911614610690576040516301ca35bd60e61b815260040160405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166303cf614b6040518060c00160405280886020015181526020018560ff16815260200187600001518152602001866001600160a01b031681526020018760400151815260200187606001518152506040518263ffffffff1660e01b81526004016107249190611591565b600060405180830381600087803b15801561073e57600080fd5b505af1158015610752573d6000803e3d6000fd5b50505050505050505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146107a757604051633fab642360e11b815260040160405180910390fd5b60006107e883838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610ecd92505050565b60208101515181515191925014610812576040516304cc911160e41b815260040160405180910390fd5b60408101515181515114610839576040516304cc911160e41b815260040160405180910390fd5b60608101516001600160a01b031615610871576060810151600080546001600160a01b0319166001600160a01b039092169190911790555b80515115610c7d5760055460005b8181101561099c576004600060026000600585815481106108a2576108a26114b4565b600091825260208083208183040154601f9092166101000a90910460ff1683528281019390935260409182018120546001600160401b031684529183019390935291018120805460ff1916905560058054600292919084908110610908576109086114b4565b600091825260208083208183040154601f9092166101000a90910460ff1683528201929092526040018120805467ffffffffffffffff191690556005805460039291908490811061095b5761095b6114b4565b600091825260208083208183040154601f9092166101000a90910460ff168352820192909252604001902080546001600160a01b031916905560010161087f565b506109a9600560006110ea565b60005b825151811015610c7a5760026000846000015183815181106109d0576109d06114b4565b60209081029190910181015160ff168252810191909152604001600020546001600160401b0316151580610a4357506004600084602001518381518110610a1957610a196114b4565b6020908102919091018101516001600160401b031682528101919091526040016000205460ff1615155b15610a6157604051635639d90160e11b815260040160405180910390fd5b60006001600160a01b031683604001518281518110610a8257610a826114b4565b60200260200101516001600160a01b03161415610ab2576040516312ff357360e01b815260040160405180910390fd5b82602001518181518110610ac857610ac86114b4565b60200260200101516002600085600001518481518110610aea57610aea6114b4565b602002602001015160ff1660ff16815260200190815260200160002060006101000a8154816001600160401b0302191690836001600160401b0316021790555082604001518181518110610b4057610b406114b4565b60200260200101516003600085600001518481518110610b6257610b626114b4565b602002602001015160ff1660ff16815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b0316021790555082600001518181518110610bb857610bb86114b4565b60200260200101516004600085602001518481518110610bda57610bda6114b4565b60200260200101516001600160401b03166001600160401b0316815260200190815260200160002060006101000a81548160ff021916908360ff160217905550600583600001518281518110610c3257610c326114b4565b602090810291909101810151825460018181018555600094855293839020928104909201805460ff928316601f9094166101000a9384029290930219909216179055016109ac565b50505b608081015115610c905760808101516001555b505050565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610cde57604051633fab642360e11b815260040160405180910390fd5b6040516373052dd760e01b815260040160405180910390fd5b6000610d01611112565b60008060148814610d295788886040516385d81b8d60e01b815260040161041b92919061161b565b60ff8a166000908152600360205260408120546001600160a01b031690610d8782610d7e610d568c611801565b7f00000000000000000000000000000000000000000000000000000000000000008f8f610f1c565b60008b8b610fc2565b90506000610d9d6000546001600160a01b031690565b90506000610dc38e60ff166000908152600260205260409020546001600160401b031690565b90506001600160401b038116610dec57604051634663cb4f60e01b815260040160405180910390fd5b6040516320487ded60e01b81526000906001600160a01b038416906320487ded90610e1d90859088906004016113c2565b60206040518083038186803b158015610e3557600080fd5b505afa158015610e49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6d919061149b565b9f939e50919c509a509098505050505050505050565b6040805160e081018252606080820181815260808301829052600060a084015260c0830182905282526020820181905291810191909152610ec68284018461180d565b9392505050565b610f086040518060a0016040528060608152602001606081526020016060815260200160006001600160a01b03168152602001600081525090565b8180602001905181019061038b9190611a30565b604080516060818101835286825291516bffffffffffffffffffffffff1986841b16602082810191909152820190603401604051602081830303815290604052815260200184848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050915250604051610fa99190602001611b02565b6040516020818303038152906040529050949350505050565b610fca611112565b6040805160208101909152600081528215610ff257610feb83850185611bab565b9050611003565b506040805160208101909152600081525b805161100f5760015481525b6040805160a081019091526001600160a01b03881660c08201528060e0810160408051808303601f1901815291815290825260208083018a9052815160008082529181018352929091019190611087565b60408051808201909152600080825260208201528152602001906001900390816110605790505b508152602001866001600160a01b031681526020016110dd8360408051915160248084019190915281518084039091018152604490920190526020810180516001600160e01b03166397a657c960e01b17905290565b9052979650505050505050565b50805460008255601f01602090049060005260206000209081019061110f919061114a565b50565b6040518060a0016040528060608152602001606081526020016060815260200160006001600160a01b03168152602001606081525090565b5b8082111561115f576000815560010161114b565b5090565b60006020828403121561117557600080fd5b81356001600160e01b031981168114610ec657600080fd5b60ff8116811461110f57600080fd5b60008083601f8401126111ae57600080fd5b5081356001600160401b038111156111c557600080fd5b6020830191508360208285010111156111dd57600080fd5b9250929050565b600080600080600080608087890312156111fd57600080fd5b86356112088161118d565b955060208701356001600160401b038082111561122457600080fd5b6112308a838b0161119c565b9097509550604089013591508082111561124957600080fd5b908801906080828b03121561125d57600080fd5b9093506060880135908082111561127357600080fd5b5061128089828a0161119c565b979a9699509497509295939492505050565b6000602082840312156112a457600080fd5b5035919050565b6000602082840312156112bd57600080fd5b81356001600160401b038111156112d357600080fd5b820160a08185031215610ec657600080fd5b6000602082840312156112f757600080fd5b8135610ec68161118d565b6000806020838503121561131557600080fd5b82356001600160401b0381111561132b57600080fd5b6113378582860161119c565b90969095509350505050565b6001600160401b038116811461110f57600080fd5b60006020828403121561136a57600080fd5b8135610ec681611343565b6000815180845260005b8181101561139b5760208185018101518683018201520161137f565b818111156113ad576000602083870101525b50601f01601f19169290920160200192915050565b600060406001600160401b038516835260208181850152845160a0838601526113ee60e0860182611375565b905081860151603f198087840301606088015261140b8383611375565b88860151888203830160808a01528051808352908601945060009350908501905b8084101561145e57845180516001600160a01b031683528601518683015293850193600193909301929086019061142c565b5060608901516001600160a01b031660a08901526080890151888203830160c08a0152955061148d8187611375565b9a9950505050505050505050565b6000602082840312156114ad57600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b6000808335601e198436030181126114e157600080fd5b8301803591506001600160401b038211156114fb57600080fd5b6020019150368190038213156111dd57600080fd5b805160208201516bffffffffffffffffffffffff1980821692919060148310156115445780818460140360031b1b83161693505b505050919050565b602081526000610ec66020830184611375565b6001600160a01b038116811461110f57600080fd5b60006020828403121561158657600080fd5b8135610ec68161155f565b602081526000825160c060208401526115ad60e0840182611375565b905060ff60208501511660408401526040840151601f19808584030160608601526115d88383611375565b925060018060a01b036060870151166080860152608086015160a086015260a08601519150808584030160c0860152506116128282611375565b95945050505050565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b03811182821017156116825761168261164a565b60405290565b60405160a081016001600160401b03811182821017156116825761168261164a565b604051601f8201601f191681016001600160401b03811182821017156116d2576116d261164a565b604052919050565b600082601f8301126116eb57600080fd5b81356001600160401b038111156117045761170461164a565b611717601f8201601f19166020016116aa565b81815284602083860101111561172c57600080fd5b816020850160208301376000918101602001919091529392505050565b60006080828403121561175b57600080fd5b604051608081016001600160401b03828210818311171561177e5761177e61164a565b81604052829350843591508082111561179657600080fd5b6117a2868387016116da565b835260208501359150808211156117b857600080fd5b6117c4868387016116da565b60208401526040850135604084015260608501359150808211156117e757600080fd5b506117f4858286016116da565b6060830152505092915050565b600061038b3683611749565b60006020828403121561181f57600080fd5b81356001600160401b038082111561183657600080fd5b908301906060828603121561184a57600080fd5b611852611660565b82358281111561186157600080fd5b61186d87828601611749565b82525060208301358281111561188257600080fd5b61188e878286016116da565b6020830152506040830135828111156118a657600080fd5b6118b2878286016116da565b60408301525095945050505050565b60006001600160401b038211156118da576118da61164a565b5060051b60200190565b600082601f8301126118f557600080fd5b8151602061190a611905836118c1565b6116aa565b82815260059290921b8401810191818101908684111561192957600080fd5b8286015b8481101561194d5780516119408161118d565b835291830191830161192d565b509695505050505050565b600082601f83011261196957600080fd5b81516020611979611905836118c1565b82815260059290921b8401810191818101908684111561199857600080fd5b8286015b8481101561194d5780516119af81611343565b835291830191830161199c565b80516119c78161155f565b919050565b600082601f8301126119dd57600080fd5b815160206119ed611905836118c1565b82815260059290921b84018101918181019086841115611a0c57600080fd5b8286015b8481101561194d578051611a238161155f565b8352918301918301611a10565b600060208284031215611a4257600080fd5b81516001600160401b0380821115611a5957600080fd5b9083019060a08286031215611a6d57600080fd5b611a75611688565b825182811115611a8457600080fd5b611a90878286016118e4565b825250602083015182811115611aa557600080fd5b611ab187828601611958565b602083015250604083015182811115611ac957600080fd5b611ad5878286016119cc565b604083015250611ae7606084016119bc565b60608201526080830151608082015280935050505092915050565b6020815260008251606060208401528051608080850152611b27610100850182611375565b90506020820151607f19808684030160a0870152611b458383611375565b9250604084015160c087015260608401519350808684030160e08701525050611b6e8183611375565b9150506020840151601f1980858403016040860152611b8d8383611375565b92506040860151915080858403016060860152506116128282611375565b600060208284031215611bbd57600080fd5b604051602081018181106001600160401b0382111715611bdf57611bdf61164a565b604052913582525091905056fea2646970667358221220fc079061acaed73767990d84b0dba3fb00632a86d13587d804cd8967e18a8cb564736f6c634300080900330000000000000000000000000bf3de8c5d3e8a2b34d2beeb17abfcebaf363a59000000000000000000000000f843ead8263952008a56765fe126d9466175a0e400000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x6080604052600436106100dd5760003560e01c806388bbe1e01161007f57806391448cdf1161005957806391448cdf1461027c578063b0f479a1146102c8578063bbd8ab03146102e6578063dbbc27951461030657600080fd5b806388bbe1e0146101d25780638a1903cd146102235780638b6cecf81461024357600080fd5b8063548d496f116100bb578063548d496f1461014b57806374d83db11461017d57806378c3e52f1461019d57806385572ffb146101b257600080fd5b806301ffc9a7146100e257806311653322146101175780631a93d1c31461012c575b600080fd5b3480156100ee57600080fd5b506101026100fd366004611163565b61033f565b60405190151581526020015b60405180910390f35b61012a6101253660046111e4565b610391565b005b34801561013857600080fd5b506001545b60405190815260200161010e565b34801561015757600080fd5b5061016b610166366004611292565b6104b3565b60405160ff909116815260200161010e565b34801561018957600080fd5b5061013d6101983660046111e4565b6104ef565b3480156101a957600080fd5b5060055461013d565b3480156101be57600080fd5b5061012a6101cd3660046112ab565b610510565b3480156101de57600080fd5b5061020b6101ed3660046112e5565b60ff166000908152600260205260409020546001600160401b031690565b6040516001600160401b03909116815260200161010e565b34801561022f57600080fd5b5061012a61023e366004611302565b61075e565b34801561024f57600080fd5b5061016b61025e366004611358565b6001600160401b031660009081526004602052604090205460ff1690565b34801561028857600080fd5b506102b07f000000000000000000000000f843ead8263952008a56765fe126d9466175a0e481565b6040516001600160a01b03909116815260200161010e565b3480156102d457600080fd5b506000546001600160a01b03166102b0565b3480156102f257600080fd5b5061012a610301366004611302565b610c95565b34801561031257600080fd5b506102b06103213660046112e5565b60ff166000908152600360205260409020546001600160a01b031690565b60006001600160e01b031982166385572ffb60e01b148061037057506001600160e01b031982166301ffc9a760e01b145b8061038b57506001600160e01b031982166378320a1d60e01b145b92915050565b336001600160a01b037f000000000000000000000000f843ead8263952008a56765fe126d9466175a0e416146103da57604051633fab642360e11b815260040160405180910390fd5b6000806000806103ee8a8a8a8a8a8a610cf7565b9350935093509350348414610424576040516335bdf3f160e21b8152346004820152602481018590526044015b60405180910390fd5b6040516396f4e9f960e01b81526001600160a01b038316906396f4e9f990869061045490859088906004016113c2565b6020604051808303818588803b15801561046d57600080fd5b505af1158015610481573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906104a6919061149b565b5050505050505050505050565b6000600582815481106104c8576104c86114b4565b90600052602060002090602091828204019190069054906101000a900460ff169050919050565b600080610500888888888888610cf7565b50919a9950505050505050505050565b6000546001600160a01b0316331461053d576040516335fdcccd60e21b815233600482015260240161041b565b600061055461054f60608401846114ca565b610e83565b9050806040015161056490611510565b60601c6001600160a01b03167f000000000000000000000000f843ead8263952008a56765fe126d9466175a0e46001600160a01b0316146105b857604051632c59162f60e11b815260040160405180910390fd5b80516020810151516014146105e65780602001516040516385d81b8d60e01b815260040161041b919061154c565b600081602001516105f690611510565b60601c9050600061061061025e6040870160208801611358565b905060ff811661063357604051634d57940960e11b815260040160405180910390fd5b600061064260408701876114ca565b81019061064f9190611574565b60ff83166000908152600360205260409020549091506001600160a01b03808316911614610690576040516301ca35bd60e61b815260040160405180910390fd5b7f000000000000000000000000f843ead8263952008a56765fe126d9466175a0e46001600160a01b03166303cf614b6040518060c00160405280886020015181526020018560ff16815260200187600001518152602001866001600160a01b031681526020018760400151815260200187606001518152506040518263ffffffff1660e01b81526004016107249190611591565b600060405180830381600087803b15801561073e57600080fd5b505af1158015610752573d6000803e3d6000fd5b50505050505050505050565b336001600160a01b037f000000000000000000000000f843ead8263952008a56765fe126d9466175a0e416146107a757604051633fab642360e11b815260040160405180910390fd5b60006107e883838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610ecd92505050565b60208101515181515191925014610812576040516304cc911160e41b815260040160405180910390fd5b60408101515181515114610839576040516304cc911160e41b815260040160405180910390fd5b60608101516001600160a01b031615610871576060810151600080546001600160a01b0319166001600160a01b039092169190911790555b80515115610c7d5760055460005b8181101561099c576004600060026000600585815481106108a2576108a26114b4565b600091825260208083208183040154601f9092166101000a90910460ff1683528281019390935260409182018120546001600160401b031684529183019390935291018120805460ff1916905560058054600292919084908110610908576109086114b4565b600091825260208083208183040154601f9092166101000a90910460ff1683528201929092526040018120805467ffffffffffffffff191690556005805460039291908490811061095b5761095b6114b4565b600091825260208083208183040154601f9092166101000a90910460ff168352820192909252604001902080546001600160a01b031916905560010161087f565b506109a9600560006110ea565b60005b825151811015610c7a5760026000846000015183815181106109d0576109d06114b4565b60209081029190910181015160ff168252810191909152604001600020546001600160401b0316151580610a4357506004600084602001518381518110610a1957610a196114b4565b6020908102919091018101516001600160401b031682528101919091526040016000205460ff1615155b15610a6157604051635639d90160e11b815260040160405180910390fd5b60006001600160a01b031683604001518281518110610a8257610a826114b4565b60200260200101516001600160a01b03161415610ab2576040516312ff357360e01b815260040160405180910390fd5b82602001518181518110610ac857610ac86114b4565b60200260200101516002600085600001518481518110610aea57610aea6114b4565b602002602001015160ff1660ff16815260200190815260200160002060006101000a8154816001600160401b0302191690836001600160401b0316021790555082604001518181518110610b4057610b406114b4565b60200260200101516003600085600001518481518110610b6257610b626114b4565b602002602001015160ff1660ff16815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b0316021790555082600001518181518110610bb857610bb86114b4565b60200260200101516004600085602001518481518110610bda57610bda6114b4565b60200260200101516001600160401b03166001600160401b0316815260200190815260200160002060006101000a81548160ff021916908360ff160217905550600583600001518281518110610c3257610c326114b4565b602090810291909101810151825460018181018555600094855293839020928104909201805460ff928316601f9094166101000a9384029290930219909216179055016109ac565b50505b608081015115610c905760808101516001555b505050565b336001600160a01b037f000000000000000000000000f843ead8263952008a56765fe126d9466175a0e41614610cde57604051633fab642360e11b815260040160405180910390fd5b6040516373052dd760e01b815260040160405180910390fd5b6000610d01611112565b60008060148814610d295788886040516385d81b8d60e01b815260040161041b92919061161b565b60ff8a166000908152600360205260408120546001600160a01b031690610d8782610d7e610d568c611801565b7f000000000000000000000000f843ead8263952008a56765fe126d9466175a0e48f8f610f1c565b60008b8b610fc2565b90506000610d9d6000546001600160a01b031690565b90506000610dc38e60ff166000908152600260205260409020546001600160401b031690565b90506001600160401b038116610dec57604051634663cb4f60e01b815260040160405180910390fd5b6040516320487ded60e01b81526000906001600160a01b038416906320487ded90610e1d90859088906004016113c2565b60206040518083038186803b158015610e3557600080fd5b505afa158015610e49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6d919061149b565b9f939e50919c509a509098505050505050505050565b6040805160e081018252606080820181815260808301829052600060a084015260c0830182905282526020820181905291810191909152610ec68284018461180d565b9392505050565b610f086040518060a0016040528060608152602001606081526020016060815260200160006001600160a01b03168152602001600081525090565b8180602001905181019061038b9190611a30565b604080516060818101835286825291516bffffffffffffffffffffffff1986841b16602082810191909152820190603401604051602081830303815290604052815260200184848080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050915250604051610fa99190602001611b02565b6040516020818303038152906040529050949350505050565b610fca611112565b6040805160208101909152600081528215610ff257610feb83850185611bab565b9050611003565b506040805160208101909152600081525b805161100f5760015481525b6040805160a081019091526001600160a01b03881660c08201528060e0810160408051808303601f1901815291815290825260208083018a9052815160008082529181018352929091019190611087565b60408051808201909152600080825260208201528152602001906001900390816110605790505b508152602001866001600160a01b031681526020016110dd8360408051915160248084019190915281518084039091018152604490920190526020810180516001600160e01b03166397a657c960e01b17905290565b9052979650505050505050565b50805460008255601f01602090049060005260206000209081019061110f919061114a565b50565b6040518060a0016040528060608152602001606081526020016060815260200160006001600160a01b03168152602001606081525090565b5b8082111561115f576000815560010161114b565b5090565b60006020828403121561117557600080fd5b81356001600160e01b031981168114610ec657600080fd5b60ff8116811461110f57600080fd5b60008083601f8401126111ae57600080fd5b5081356001600160401b038111156111c557600080fd5b6020830191508360208285010111156111dd57600080fd5b9250929050565b600080600080600080608087890312156111fd57600080fd5b86356112088161118d565b955060208701356001600160401b038082111561122457600080fd5b6112308a838b0161119c565b9097509550604089013591508082111561124957600080fd5b908801906080828b03121561125d57600080fd5b9093506060880135908082111561127357600080fd5b5061128089828a0161119c565b979a9699509497509295939492505050565b6000602082840312156112a457600080fd5b5035919050565b6000602082840312156112bd57600080fd5b81356001600160401b038111156112d357600080fd5b820160a08185031215610ec657600080fd5b6000602082840312156112f757600080fd5b8135610ec68161118d565b6000806020838503121561131557600080fd5b82356001600160401b0381111561132b57600080fd5b6113378582860161119c565b90969095509350505050565b6001600160401b038116811461110f57600080fd5b60006020828403121561136a57600080fd5b8135610ec681611343565b6000815180845260005b8181101561139b5760208185018101518683018201520161137f565b818111156113ad576000602083870101525b50601f01601f19169290920160200192915050565b600060406001600160401b038516835260208181850152845160a0838601526113ee60e0860182611375565b905081860151603f198087840301606088015261140b8383611375565b88860151888203830160808a01528051808352908601945060009350908501905b8084101561145e57845180516001600160a01b031683528601518683015293850193600193909301929086019061142c565b5060608901516001600160a01b031660a08901526080890151888203830160c08a0152955061148d8187611375565b9a9950505050505050505050565b6000602082840312156114ad57600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b6000808335601e198436030181126114e157600080fd5b8301803591506001600160401b038211156114fb57600080fd5b6020019150368190038213156111dd57600080fd5b805160208201516bffffffffffffffffffffffff1980821692919060148310156115445780818460140360031b1b83161693505b505050919050565b602081526000610ec66020830184611375565b6001600160a01b038116811461110f57600080fd5b60006020828403121561158657600080fd5b8135610ec68161155f565b602081526000825160c060208401526115ad60e0840182611375565b905060ff60208501511660408401526040840151601f19808584030160608601526115d88383611375565b925060018060a01b036060870151166080860152608086015160a086015260a08601519150808584030160c0860152506116128282611375565b95945050505050565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b03811182821017156116825761168261164a565b60405290565b60405160a081016001600160401b03811182821017156116825761168261164a565b604051601f8201601f191681016001600160401b03811182821017156116d2576116d261164a565b604052919050565b600082601f8301126116eb57600080fd5b81356001600160401b038111156117045761170461164a565b611717601f8201601f19166020016116aa565b81815284602083860101111561172c57600080fd5b816020850160208301376000918101602001919091529392505050565b60006080828403121561175b57600080fd5b604051608081016001600160401b03828210818311171561177e5761177e61164a565b81604052829350843591508082111561179657600080fd5b6117a2868387016116da565b835260208501359150808211156117b857600080fd5b6117c4868387016116da565b60208401526040850135604084015260608501359150808211156117e757600080fd5b506117f4858286016116da565b6060830152505092915050565b600061038b3683611749565b60006020828403121561181f57600080fd5b81356001600160401b038082111561183657600080fd5b908301906060828603121561184a57600080fd5b611852611660565b82358281111561186157600080fd5b61186d87828601611749565b82525060208301358281111561188257600080fd5b61188e878286016116da565b6020830152506040830135828111156118a657600080fd5b6118b2878286016116da565b60408301525095945050505050565b60006001600160401b038211156118da576118da61164a565b5060051b60200190565b600082601f8301126118f557600080fd5b8151602061190a611905836118c1565b6116aa565b82815260059290921b8401810191818101908684111561192957600080fd5b8286015b8481101561194d5780516119408161118d565b835291830191830161192d565b509695505050505050565b600082601f83011261196957600080fd5b81516020611979611905836118c1565b82815260059290921b8401810191818101908684111561199857600080fd5b8286015b8481101561194d5780516119af81611343565b835291830191830161199c565b80516119c78161155f565b919050565b600082601f8301126119dd57600080fd5b815160206119ed611905836118c1565b82815260059290921b84018101918181019086841115611a0c57600080fd5b8286015b8481101561194d578051611a238161155f565b8352918301918301611a10565b600060208284031215611a4257600080fd5b81516001600160401b0380821115611a5957600080fd5b9083019060a08286031215611a6d57600080fd5b611a75611688565b825182811115611a8457600080fd5b611a90878286016118e4565b825250602083015182811115611aa557600080fd5b611ab187828601611958565b602083015250604083015182811115611ac957600080fd5b611ad5878286016119cc565b604083015250611ae7606084016119bc565b60608201526080830151608082015280935050505092915050565b6020815260008251606060208401528051608080850152611b27610100850182611375565b90506020820151607f19808684030160a0870152611b458383611375565b9250604084015160c087015260608401519350808684030160e08701525050611b6e8183611375565b9150506020840151601f1980858403016040860152611b8d8383611375565b92506040860151915080858403016060860152506116128282611375565b600060208284031215611bbd57600080fd5b604051602081018181106001600160401b0382111715611bdf57611bdf61164a565b604052913582525091905056fea2646970667358221220fc079061acaed73767990d84b0dba3fb00632a86d13587d804cd8967e18a8cb564736f6c63430008090033

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

0000000000000000000000000bf3de8c5d3e8a2b34d2beeb17abfcebaf363a59000000000000000000000000f843ead8263952008a56765fe126d9466175a0e400000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _router (address): 0x0BF3dE8c5D3e8A2B34D2BEeB17ABfCeBaf363A59
Arg [1] : _teleport (address): 0xf843EAd8263952008a56765fe126d9466175a0e4

-----Encoded View---------------
8 Constructor Arguments found :
Arg [0] : 0000000000000000000000000bf3de8c5d3e8a2b34d2beeb17abfcebaf363a59
Arg [1] : 000000000000000000000000f843ead8263952008a56765fe126d9466175a0e4
Arg [2] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [3] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [4] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000000


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ 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.