ETH Price: $3,202.62 (-3.58%)

Contract

0x08D17392a30a5A3bEb4cB191f5b18005bf494659
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Bridge216211152025-01-14 7:05:355 days ago1736838335IN
0x08D17392...5bf494659
0.00017899 ETH0.000773583.16228758
Bridge215743062025-01-07 18:12:3511 days ago1736273555IN
0x08D17392...5bf494659
0.00022965 ETH0.003691213.32363253
Bridge211237332024-11-05 20:07:4774 days ago1730837267IN
0x08D17392...5bf494659
0.00039253 ETH0.0036198414.42001867
Bridge211237132024-11-05 20:03:4774 days ago1730837027IN
0x08D17392...5bf494659
0.00028647 ETH0.0034520513.75161065
Bridge211180422024-11-05 1:02:5975 days ago1730768579IN
0x08D17392...5bf494659
0.00022054 ETH0.001085164.32288247
Bridge210955242024-11-01 21:36:1178 days ago1730496971IN
0x08D17392...5bf494659
0.00021524 ETH0.00276711.02265451
Bridge210556192024-10-27 7:58:1184 days ago1730015891IN
0x08D17392...5bf494659
0.00021542 ETH0.001106524.57863176
Bridge209644632024-10-14 14:41:2396 days ago1728916883IN
0x08D17392...5bf494659
0.00029184 ETH0.012147650.26754248
Bridge209531912024-10-13 0:47:1198 days ago1728780431IN
0x08D17392...5bf494659
0.00021821 ETH0.002010518.31921562
Bridge207025052024-09-08 1:07:23133 days ago1725757643IN
0x08D17392...5bf494659
0.00023359 ETH0.000378431.50752939
Bridge205897772024-08-23 7:21:47149 days ago1724397707IN
0x08D17392...5bf494659
0.00023069 ETH0.000250321.05680897
Bridge201933562024-06-28 23:05:47204 days ago1719615947IN
0x08D17392...5bf494659
0.00015879 ETH0.000458931.93749376
Bridge200685052024-06-11 12:12:35222 days ago1718107955IN
0x08D17392...5bf494659
0.00016065 ETH0.0025949510.95521461
Bridge200160122024-06-04 4:16:35229 days ago1717474595IN
0x08D17392...5bf494659
0.0001476 ETH0.001468916.20202297
Bridge197691612024-04-30 15:56:47263 days ago1714492607IN
0x08D17392...5bf494659
0.00018358 ETH0.0039730416.44165578
Bridge196855502024-04-18 23:14:11275 days ago1713482051IN
0x08D17392...5bf494659
0.00017756 ETH0.001867017.88205652
Bridge196838462024-04-18 17:31:47275 days ago1713461507IN
0x08D17392...5bf494659
0.00018098 ETH0.0035119813.99044869
Bridge196670702024-04-16 9:11:47278 days ago1713258707IN
0x08D17392...5bf494659
0.00017746 ETH0.00281039.96864585
Bridge196063682024-04-07 21:03:59286 days ago1712523839IN
0x08D17392...5bf494659
0.00016452 ETH0.0038366415.87640275
Bridge195931222024-04-06 0:30:35288 days ago1712363435IN
0x08D17392...5bf494659
0.00016711 ETH0.0033037212.36115847
Bridge195718672024-04-03 1:07:35291 days ago1712106455IN
0x08D17392...5bf494659
0.0002602 ETH0.0077632830.92608
Bridge195084892024-03-25 2:16:59300 days ago1711333019IN
0x08D17392...5bf494659
0.00016244 ETH0.0045135516.88779991
Bridge194798962024-03-21 1:52:11304 days ago1710985931IN
0x08D17392...5bf494659
0.00016603 ETH0.0075014329.88297234
Bridge194677932024-03-19 9:06:35306 days ago1710839195IN
0x08D17392...5bf494659
0.00027556 ETH0.02822857109.44658223
Bridge194598472024-03-18 6:17:35307 days ago1710742655IN
0x08D17392...5bf494659
0.00031446 ETH0.0052298620.83386806
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block
From
To
216211152025-01-14 7:05:355 days ago1736838335
0x08D17392...5bf494659
0.00017899 ETH
215743062025-01-07 18:12:3511 days ago1736273555
0x08D17392...5bf494659
0.00022965 ETH
211237332024-11-05 20:07:4774 days ago1730837267
0x08D17392...5bf494659
0.00039253 ETH
211237132024-11-05 20:03:4774 days ago1730837027
0x08D17392...5bf494659
0.00028647 ETH
211180422024-11-05 1:02:5975 days ago1730768579
0x08D17392...5bf494659
0.00022054 ETH
210955242024-11-01 21:36:1178 days ago1730496971
0x08D17392...5bf494659
0.00021524 ETH
210556192024-10-27 7:58:1184 days ago1730015891
0x08D17392...5bf494659
0.00021542 ETH
209644632024-10-14 14:41:2396 days ago1728916883
0x08D17392...5bf494659
0.00029184 ETH
209531912024-10-13 0:47:1198 days ago1728780431
0x08D17392...5bf494659
0.00021821 ETH
207025052024-09-08 1:07:23133 days ago1725757643
0x08D17392...5bf494659
0.00023359 ETH
205897772024-08-23 7:21:47149 days ago1724397707
0x08D17392...5bf494659
0.00023069 ETH
201933562024-06-28 23:05:47204 days ago1719615947
0x08D17392...5bf494659
0.00015879 ETH
200685052024-06-11 12:12:35222 days ago1718107955
0x08D17392...5bf494659
0.00016065 ETH
200160122024-06-04 4:16:35229 days ago1717474595
0x08D17392...5bf494659
0.0001476 ETH
197691612024-04-30 15:56:47263 days ago1714492607
0x08D17392...5bf494659
0.00018358 ETH
196855502024-04-18 23:14:11275 days ago1713482051
0x08D17392...5bf494659
0.00017756 ETH
196838462024-04-18 17:31:47275 days ago1713461507
0x08D17392...5bf494659
0.00018098 ETH
196670702024-04-16 9:11:47278 days ago1713258707
0x08D17392...5bf494659
0.00017738 ETH
196670702024-04-16 9:11:47278 days ago1713258707
0x08D17392...5bf494659
0.00000007 ETH
196063682024-04-07 21:03:59286 days ago1712523839
0x08D17392...5bf494659
0.00016452 ETH
195931222024-04-06 0:30:35288 days ago1712363435
0x08D17392...5bf494659
0.00016711 ETH
195718672024-04-03 1:07:35291 days ago1712106455
0x08D17392...5bf494659
0.0002602 ETH
195084892024-03-25 2:16:59300 days ago1711333019
0x08D17392...5bf494659
0.00016244 ETH
194798962024-03-21 1:52:11304 days ago1710985931
0x08D17392...5bf494659
0.00016603 ETH
194677932024-03-19 9:06:35306 days ago1710839195
0x08D17392...5bf494659
0.00027556 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
CCIPBridge

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 14 : CCIPBridge.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';
import '@openzeppelin/contracts/utils/Context.sol';
import { CCIPReceiver } from '@chainlink/contracts-ccip/src/v0.8/ccip/applications/CCIPReceiver.sol';
import { IRouterClient } from '@chainlink/contracts-ccip/src/v0.8/ccip/interfaces/IRouterClient.sol';
import { Client } from '@chainlink/contracts-ccip/src/v0.8/ccip/libraries/Client.sol';
import './interfaces/IERC20Mintable.sol';
import './interfaces/ICCIPConfigurations.sol';

contract CCIPBridge is CCIPReceiver, Context {
  using SafeERC20 for IERC20Mintable;

  struct BridgeTransfer {
    address user;
    address sourceToken;
    address targetToken;
    uint256 amount;
  }

  IRouterClient public bridgeRouter;
  ICCIPConfigurations public bridgeConfigs;

  event TokensSent(
    bytes32 indexed messageId,
    uint64 indexed chainSelector,
    address receiver,
    address token,
    uint256 amount,
    uint256 fees
  );
  event TokensReceived(
    bytes32 indexed messageId,
    uint64 indexed chainSelector,
    address receiver,
    address token,
    uint256 amount
  );

  constructor(
    IRouterClient _bridgeRouter,
    ICCIPConfigurations _bridgeConfigs
  ) CCIPReceiver(address(_bridgeRouter)) {
    bridgeRouter = _bridgeRouter;
    bridgeConfigs = _bridgeConfigs;
  }

  function bridge(
    uint64 _chain,
    address _user,
    address _token,
    uint256 _amount
  ) external payable returns (bytes32 _messageId) {
    require(bridgeConfigs.enabled(), 'DISABLED');
    ICCIPConfigurations.TokenConfig memory _config = bridgeConfigs.get(
      _token,
      _chain
    );
    require(_config.enabled, 'BRDISABLED');
    _processInbound(_token, _msgSender(), _amount, _config.isMintBurn);
    (Client.EVM2AnyMessage memory _evm2AnyMessage, uint256 _fees) = _getMsgFee(
      _config,
      _user,
      _amount
    );
    require(msg.value >= _fees, 'FEES');

    uint256 _refund = msg.value - _fees;
    if (_refund > 0) {
      (bool _wasRef, ) = payable(_msgSender()).call{ value: _refund }('');
      require(_wasRef, 'REFUND');
    }
    _messageId = bridgeRouter.ccipSend{ value: _fees }(_chain, _evm2AnyMessage);
    emit TokensSent(_messageId, _chain, _user, _token, _amount, _fees);
    return _messageId;
  }

  function getMsgFee(
    ICCIPConfigurations.TokenConfig memory _config,
    address _user,
    uint256 _amount
  ) external view returns (uint256) {
    (, uint256 _fee) = _getMsgFee(_config, _user, _amount);
    return _fee;
  }

  function _getMsgFee(
    ICCIPConfigurations.TokenConfig memory _config,
    address _user,
    uint256 _amount
  ) internal view returns (Client.EVM2AnyMessage memory, uint256) {
    Client.EVM2AnyMessage memory _evm2AnyMessage = _buildMsg(
      _config,
      _user,
      _amount
    );
    return (
      _evm2AnyMessage,
      bridgeRouter.getFee(_config.chain, _evm2AnyMessage)
    );
  }

  function _buildMsg(
    ICCIPConfigurations.TokenConfig memory _config,
    address _user,
    uint256 _amount
  ) internal view returns (Client.EVM2AnyMessage memory) {
    Client.EVM2AnyMessage memory evm2AnyMessage = Client.EVM2AnyMessage({
      receiver: abi.encode(_config.targetBridge),
      data: abi.encode(
        BridgeTransfer({
          user: _user,
          sourceToken: _config.sourceToken,
          targetToken: _config.targetToken,
          amount: _amount
        })
      ),
      tokenAmounts: new Client.EVMTokenAmount[](0),
      extraArgs: Client._argsToBytes(
        Client.EVMExtraArgsV1({ gasLimit: bridgeConfigs.gasLimit() })
      ),
      feeToken: address(0) // native
    });
    return evm2AnyMessage;
  }

  function _ccipReceive(
    Client.Any2EVMMessage memory _message
  ) internal override {
    BridgeTransfer memory _tfrInfo = abi.decode(
      _message.data,
      (BridgeTransfer)
    );
    ICCIPConfigurations.TokenConfig memory _config = bridgeConfigs.get(
      _tfrInfo.targetToken,
      _message.sourceChainSelector
    );
    require(
      abi.decode(_message.sender, (address)) == _config.targetBridge,
      'AUTH'
    );
    address _user = _tfrInfo.user;
    address _token = _tfrInfo.targetToken;
    uint256 _amount = _tfrInfo.amount;
    _processOutbound(_token, _user, _amount, _config.isMintBurn);
    emit TokensReceived(
      _message.messageId,
      _message.sourceChainSelector,
      _user,
      _token,
      _amount
    );
  }

  function _processInbound(
    address _token,
    address _user,
    uint256 _amount,
    bool _mintBurn
  ) internal {
    IERC20Mintable(_token).safeTransferFrom(_user, address(this), _amount);
    if (_mintBurn) {
      IERC20Mintable(_token).burn(_amount);
    }
  }

  function _processOutbound(
    address _token,
    address _user,
    uint256 _amount,
    bool _mintBurn
  ) internal {
    if (_mintBurn) {
      IERC20Mintable(_token).mint(_user, _amount);
    } else {
      IERC20Mintable(_token).safeTransfer(_user, _amount);
    }
  }
}

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

import {IAny2EVMMessageReceiver} from "../interfaces/IAny2EVMMessageReceiver.sol";

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

import {IERC165} from "../../vendor/openzeppelin-solidity/v4.8.0/contracts/utils/introspection/IERC165.sol";

/// @title CCIPReceiver - Base contract for CCIP applications that can receive messages.
abstract contract CCIPReceiver is IAny2EVMMessageReceiver, IERC165 {
  address internal immutable i_router;

  constructor(address router) {
    if (router == address(0)) revert InvalidRouter(address(0));
    i_router = router;
  }

  /// @notice IERC165 supports an interfaceId
  /// @param interfaceId The interfaceId to check
  /// @return true if the interfaceId is supported
  /// @dev Should indicate whether the contract implements IAny2EVMMessageReceiver
  /// e.g. return interfaceId == type(IAny2EVMMessageReceiver).interfaceId || interfaceId == type(IERC165).interfaceId
  /// This allows CCIP to check if ccipReceive is available before calling it.
  /// If this returns false or reverts, only tokens are transferred to the receiver.
  /// If this returns true, tokens are transferred and ccipReceive is called atomically.
  /// Additionally, if the receiver address does not have code associated with
  /// it at the time of execution (EXTCODESIZE returns 0), only tokens will be transferred.
  function supportsInterface(bytes4 interfaceId) public pure virtual override returns (bool) {
    return interfaceId == type(IAny2EVMMessageReceiver).interfaceId || interfaceId == type(IERC165).interfaceId;
  }

  /// @inheritdoc IAny2EVMMessageReceiver
  function ccipReceive(Client.Any2EVMMessage calldata message) external virtual override onlyRouter {
    _ccipReceive(message);
  }

  /// @notice Override this function in your implementation.
  /// @param message Any2EVMMessage
  function _ccipReceive(Client.Any2EVMMessage memory message) internal virtual;

  /////////////////////////////////////////////////////////////////////
  // Plumbing
  /////////////////////////////////////////////////////////////////////

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

  error InvalidRouter(address router);

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

File 3 of 14 : 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 4 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 5 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 6 of 14 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 7 of 14 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol)

pragma solidity ^0.8.0;

import "../token/ERC20/IERC20.sol";

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

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 *
 * ==== 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 v4.9.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

    /**
     * @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.encodeWithSelector(token.transfer.selector, 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.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

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

    /**
     * @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);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));
        }
    }

    /**
     * @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.encodeWithSelector(token.approve.selector, spender, value);

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

    /**
     * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.
     * Revert on invalid signature.
     */
    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

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

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

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     *
     * 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.isContract(address(token));
    }
}

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

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://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.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

File 13 of 14 : ICCIPConfigurations.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

interface ICCIPConfigurations {
  struct TokenConfig {
    bool enabled;
    address targetBridge;
    address sourceToken;
    bool isMintBurn;
    uint64 chain;
    address targetToken;
  }

  function enabled() external view returns (bool);

  function gasLimit() external view returns (uint256);

  function get(
    address sourceToken,
    uint64 chainSelector
  ) external returns (TokenConfig memory);
}

File 14 of 14 : IERC20Mintable.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

import '@openzeppelin/contracts/interfaces/IERC20.sol';

interface IERC20Mintable is IERC20 {
  function burn(uint256 amount) external;

  function mint(address wallet, uint256 amount) external;
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IRouterClient","name":"_bridgeRouter","type":"address"},{"internalType":"contract ICCIPConfigurations","name":"_bridgeConfigs","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"router","type":"address"}],"name":"InvalidRouter","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"messageId","type":"bytes32"},{"indexed":true,"internalType":"uint64","name":"chainSelector","type":"uint64"},{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokensReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"messageId","type":"bytes32"},{"indexed":true,"internalType":"uint64","name":"chainSelector","type":"uint64"},{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"fees","type":"uint256"}],"name":"TokensSent","type":"event"},{"inputs":[{"internalType":"uint64","name":"_chain","type":"uint64"},{"internalType":"address","name":"_user","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"bridge","outputs":[{"internalType":"bytes32","name":"_messageId","type":"bytes32"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"bridgeConfigs","outputs":[{"internalType":"contract ICCIPConfigurations","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bridgeRouter","outputs":[{"internalType":"contract IRouterClient","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":[{"components":[{"internalType":"bool","name":"enabled","type":"bool"},{"internalType":"address","name":"targetBridge","type":"address"},{"internalType":"address","name":"sourceToken","type":"address"},{"internalType":"bool","name":"isMintBurn","type":"bool"},{"internalType":"uint64","name":"chain","type":"uint64"},{"internalType":"address","name":"targetToken","type":"address"}],"internalType":"struct ICCIPConfigurations.TokenConfig","name":"_config","type":"tuple"},{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"getMsgFee","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":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"}]

60a060405234801561001057600080fd5b50604051620015c7380380620015c7833981016040819052610031916100b0565b816001600160a01b038116610060576040516335fdcccd60e21b81526000600482015260240160405180910390fd5b6001600160a01b03908116608052600080549382166001600160a01b03199485161790556001805492909116919092161790556100ea565b6001600160a01b03811681146100ad57600080fd5b50565b600080604083850312156100c357600080fd5b82516100ce81610098565b60208401519092506100df81610098565b809150509250929050565b6080516114ba6200010d6000396000818161014101526101f201526114ba6000f3fe6080604052600436106100705760003560e01c806385572ffb1161004e57806385572ffb14610110578063b0f479a114610132578063b9ff1c6a14610165578063e5f4d0b31461018557600080fd5b806301ffc9a71461007557806341af5b52146100aa57806381d708d6146100e2575b600080fd5b34801561008157600080fd5b50610095610090366004610d97565b610198565b60405190151581526020015b60405180910390f35b3480156100b657600080fd5b506000546100ca906001600160a01b031681565b6040516001600160a01b0390911681526020016100a1565b3480156100ee57600080fd5b506101026100fd366004610ecd565b6101cf565b6040519081526020016100a1565b34801561011c57600080fd5b5061013061012b366004610f85565b6101e7565b005b34801561013e57600080fd5b507f00000000000000000000000000000000000000000000000000000000000000006100ca565b34801561017157600080fd5b506001546100ca906001600160a01b031681565b610102610193366004610fbf565b61024b565b60006001600160e01b031982166385572ffb60e01b14806101c957506001600160e01b031982166301ffc9a760e01b145b92915050565b6000806101dd858585610586565b9695505050505050565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610237576040516335fdcccd60e21b81523360048201526024015b60405180910390fd5b6102486102438261112b565b610624565b50565b6001546040805163011c6d7f60e51b815290516000926001600160a01b03169163238dafe09160048083019260209291908290030181865afa158015610295573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102b991906111d7565b6102f05760405162461bcd60e51b8152602060048201526008602482015267111254d05093115160c21b604482015260640161022e565b600154604051632de98f8f60e01b81526001600160a01b0385811660048301526001600160401b03881660248301526000921690632de98f8f9060440160c0604051808303816000875af115801561034c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061037091906111f4565b80519091506103ae5760405162461bcd60e51b815260206004820152600a6024820152691094911254d05093115160b21b604482015260640161022e565b6103be84338584606001516107bd565b6000806103cc838887610586565b91509150803410156104095760405162461bcd60e51b815260040161022e906020808252600490820152634645455360e01b604082015260600190565b60006104158234611281565b905080156104a057604051600090339083908381818185875af1925050503d806000811461045f576040519150601f19603f3d011682016040523d82523d6000602084013e610464565b606091505b505090508061049e5760405162461bcd60e51b815260206004820152600660248201526514915195539160d21b604482015260640161022e565b505b6000546040516396f4e9f960e01b81526001600160a01b03909116906396f4e9f99084906104d4908d9088906004016112f2565b60206040518083038185885af11580156104f2573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061051791906113cb565b604080516001600160a01b03808c1682528a166020820152908101889052606081018490529095506001600160401b038a169086907fb462a55eb375b80efdc6ea7d078356a72b746aef3ae5c97670b631f63cd8ff7d9060800160405180910390a3505050505b949350505050565b61058e610d5f565b60008061059c868686610839565b60005460808801516040516320487ded60e01b815292935083926001600160a01b03909216916320487ded916105d69185906004016112f2565b602060405180830381865afa1580156105f3573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061061791906113cb565b9250925050935093915050565b6000816060015180602001905181019061063e91906113e4565b60015460408281015160208601519151632de98f8f60e01b81526001600160a01b0391821660048201526001600160401b03909216602483015292935060009290911690632de98f8f9060440160c0604051808303816000875af11580156106aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ce91906111f4565b905080602001516001600160a01b031683604001518060200190518101906106f69190611461565b6001600160a01b0316146107355760405162461bcd60e51b815260040161022e90602080825260049082015263082aaa8960e31b604082015260600190565b815160408301516060808501519084015161075590839085908490610a46565b6020808701518751604080516001600160a01b03808916825287169481019490945283018490526001600160401b03909116917f1eb7d864650f669fdc7cb97942971fadf1983930d028aaa76b73c62547adcf589060600160405180910390a3505050505050565b6107d26001600160a01b038516843085610ac7565b801561083357604051630852cd8d60e31b8152600481018390526001600160a01b038516906342966c6890602401600060405180830381600087803b15801561081a57600080fd5b505af115801561082e573d6000803e3d6000fd5b505050505b50505050565b610841610d5f565b6040805160a0810190915260208501516001600160a01b031660c08201526000908060e0810160405160208183030381529060405281526020016040518060800160405280876001600160a01b0316815260200188604001516001600160a01b031681526020018860a001516001600160a01b0316815260200186815250604051602001610905919081516001600160a01b039081168252602080840151821690830152604080840151909116908201526060918201519181019190915260800190565b60408051601f198184030181529190528152602001600060405190808252806020026020018201604052801561096157816020015b604080518082019091526000808252602082015281526020019060019003908161093a5790505b50815260200160006001600160a01b03168152602001610a3b6040518060200160405280600160009054906101000a90046001600160a01b03166001600160a01b031663f68016b76040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109fc91906113cb565b905260408051915160248084019190915281518084039091018152604490920190526020810180516001600160e01b03166397a657c960e01b17905290565b905295945050505050565b8015610ab3576040516340c10f1960e01b81526001600160a01b038481166004830152602482018490528516906340c10f1990604401600060405180830381600087803b158015610a9657600080fd5b505af1158015610aaa573d6000803e3d6000fd5b50505050610833565b6108336001600160a01b0385168484610b32565b6040516001600160a01b03808516602483015283166044820152606481018290526108339085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610b67565b6040516001600160a01b038316602482015260448101829052610b6290849063a9059cbb60e01b90606401610afb565b505050565b6000610bbc826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610c3c9092919063ffffffff16565b9050805160001480610bdd575080806020019051810190610bdd91906111d7565b610b625760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161022e565b606061057e848460008585600080866001600160a01b03168587604051610c63919061147e565b60006040518083038185875af1925050503d8060008114610ca0576040519150601f19603f3d011682016040523d82523d6000602084013e610ca5565b606091505b5091509150610cb687838387610cc1565b979650505050505050565b60608315610d30578251600003610d29576001600160a01b0385163b610d295760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161022e565b508161057e565b61057e8383815115610d455781518083602001fd5b8060405162461bcd60e51b815260040161022e919061149a565b6040518060a0016040528060608152602001606081526020016060815260200160006001600160a01b03168152602001606081525090565b600060208284031215610da957600080fd5b81356001600160e01b031981168114610dc157600080fd5b9392505050565b634e487b7160e01b600052604160045260246000fd5b60405160c081016001600160401b0381118282101715610e0057610e00610dc8565b60405290565b604080519081016001600160401b0381118282101715610e0057610e00610dc8565b60405160a081016001600160401b0381118282101715610e0057610e00610dc8565b604051601f8201601f191681016001600160401b0381118282101715610e7257610e72610dc8565b604052919050565b801515811461024857600080fd5b6001600160a01b038116811461024857600080fd5b8035610ea881610e88565b919050565b6001600160401b038116811461024857600080fd5b8035610ea881610ead565b6000806000838503610100811215610ee457600080fd5b60c0811215610ef257600080fd5b50610efb610dde565b8435610f0681610e7a565b81526020850135610f1681610e88565b60208201526040850135610f2981610e88565b60408201526060850135610f3c81610e7a565b60608201526080850135610f4f81610ead565b608082015260a0850135610f6281610e88565b60a08201529250610f7560c08501610e9d565b915060e084013590509250925092565b600060208284031215610f9757600080fd5b81356001600160401b03811115610fad57600080fd5b820160a08185031215610dc157600080fd5b60008060008060808587031215610fd557600080fd5b8435610fe081610ead565b93506020850135610ff081610e88565b9250604085013561100081610e88565b9396929550929360600135925050565b600082601f83011261102157600080fd5b81356001600160401b0381111561103a5761103a610dc8565b61104d601f8201601f1916602001610e4a565b81815284602083860101111561106257600080fd5b816020850160208301376000918101602001919091529392505050565b600082601f83011261109057600080fd5b813560206001600160401b038211156110ab576110ab610dc8565b6110b9818360051b01610e4a565b82815260069290921b840181019181810190868411156110d857600080fd5b8286015b8481101561112057604081890312156110f55760008081fd5b6110fd610e06565b813561110881610e88565b815281850135858201528352918301916040016110dc565b509695505050505050565b600060a0823603121561113d57600080fd5b611145610e28565b8235815261115560208401610ec2565b602082015260408301356001600160401b038082111561117457600080fd5b61118036838701611010565b6040840152606085013591508082111561119957600080fd5b6111a536838701611010565b606084015260808501359150808211156111be57600080fd5b506111cb3682860161107f565b60808301525092915050565b6000602082840312156111e957600080fd5b8151610dc181610e7a565b600060c0828403121561120657600080fd5b61120e610dde565b825161121981610e7a565b8152602083015161122981610e88565b6020820152604083015161123c81610e88565b6040820152606083015161124f81610e7a565b6060820152608083015161126281610ead565b608082015260a083015161127581610e88565b60a08201529392505050565b818103818111156101c957634e487b7160e01b600052601160045260246000fd5b60005b838110156112bd5781810151838201526020016112a5565b50506000910152565b600081518084526112de8160208601602086016112a2565b601f01601f19169290920160200192915050565b600060406001600160401b038516835260208181850152845160a08386015261131e60e08601826112c6565b905081860151603f198087840301606088015261133b83836112c6565b88860151888203830160808a01528051808352908601945060009350908501905b8084101561138e57845180516001600160a01b031683528601518683015293850193600193909301929086019061135c565b5060608901516001600160a01b031660a08901526080890151888203830160c08a015295506113bd81876112c6565b9a9950505050505050505050565b6000602082840312156113dd57600080fd5b5051919050565b6000608082840312156113f657600080fd5b604051608081018181106001600160401b038211171561141857611418610dc8565b604052825161142681610e88565b8152602083015161143681610e88565b6020820152604083015161144981610e88565b60408201526060928301519281019290925250919050565b60006020828403121561147357600080fd5b8151610dc181610e88565b600082516114908184602087016112a2565b9190910192915050565b602081526000610dc160208301846112c656fea164736f6c6343000813000a00000000000000000000000080226fc0ee2b096224eeac085bb9a8cba1146f7d000000000000000000000000cc0f4d8235b3de2f469a7b9dbc631a0b7e14ba66

Deployed Bytecode

0x6080604052600436106100705760003560e01c806385572ffb1161004e57806385572ffb14610110578063b0f479a114610132578063b9ff1c6a14610165578063e5f4d0b31461018557600080fd5b806301ffc9a71461007557806341af5b52146100aa57806381d708d6146100e2575b600080fd5b34801561008157600080fd5b50610095610090366004610d97565b610198565b60405190151581526020015b60405180910390f35b3480156100b657600080fd5b506000546100ca906001600160a01b031681565b6040516001600160a01b0390911681526020016100a1565b3480156100ee57600080fd5b506101026100fd366004610ecd565b6101cf565b6040519081526020016100a1565b34801561011c57600080fd5b5061013061012b366004610f85565b6101e7565b005b34801561013e57600080fd5b507f00000000000000000000000080226fc0ee2b096224eeac085bb9a8cba1146f7d6100ca565b34801561017157600080fd5b506001546100ca906001600160a01b031681565b610102610193366004610fbf565b61024b565b60006001600160e01b031982166385572ffb60e01b14806101c957506001600160e01b031982166301ffc9a760e01b145b92915050565b6000806101dd858585610586565b9695505050505050565b336001600160a01b037f00000000000000000000000080226fc0ee2b096224eeac085bb9a8cba1146f7d1614610237576040516335fdcccd60e21b81523360048201526024015b60405180910390fd5b6102486102438261112b565b610624565b50565b6001546040805163011c6d7f60e51b815290516000926001600160a01b03169163238dafe09160048083019260209291908290030181865afa158015610295573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102b991906111d7565b6102f05760405162461bcd60e51b8152602060048201526008602482015267111254d05093115160c21b604482015260640161022e565b600154604051632de98f8f60e01b81526001600160a01b0385811660048301526001600160401b03881660248301526000921690632de98f8f9060440160c0604051808303816000875af115801561034c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061037091906111f4565b80519091506103ae5760405162461bcd60e51b815260206004820152600a6024820152691094911254d05093115160b21b604482015260640161022e565b6103be84338584606001516107bd565b6000806103cc838887610586565b91509150803410156104095760405162461bcd60e51b815260040161022e906020808252600490820152634645455360e01b604082015260600190565b60006104158234611281565b905080156104a057604051600090339083908381818185875af1925050503d806000811461045f576040519150601f19603f3d011682016040523d82523d6000602084013e610464565b606091505b505090508061049e5760405162461bcd60e51b815260206004820152600660248201526514915195539160d21b604482015260640161022e565b505b6000546040516396f4e9f960e01b81526001600160a01b03909116906396f4e9f99084906104d4908d9088906004016112f2565b60206040518083038185885af11580156104f2573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061051791906113cb565b604080516001600160a01b03808c1682528a166020820152908101889052606081018490529095506001600160401b038a169086907fb462a55eb375b80efdc6ea7d078356a72b746aef3ae5c97670b631f63cd8ff7d9060800160405180910390a3505050505b949350505050565b61058e610d5f565b60008061059c868686610839565b60005460808801516040516320487ded60e01b815292935083926001600160a01b03909216916320487ded916105d69185906004016112f2565b602060405180830381865afa1580156105f3573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061061791906113cb565b9250925050935093915050565b6000816060015180602001905181019061063e91906113e4565b60015460408281015160208601519151632de98f8f60e01b81526001600160a01b0391821660048201526001600160401b03909216602483015292935060009290911690632de98f8f9060440160c0604051808303816000875af11580156106aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ce91906111f4565b905080602001516001600160a01b031683604001518060200190518101906106f69190611461565b6001600160a01b0316146107355760405162461bcd60e51b815260040161022e90602080825260049082015263082aaa8960e31b604082015260600190565b815160408301516060808501519084015161075590839085908490610a46565b6020808701518751604080516001600160a01b03808916825287169481019490945283018490526001600160401b03909116917f1eb7d864650f669fdc7cb97942971fadf1983930d028aaa76b73c62547adcf589060600160405180910390a3505050505050565b6107d26001600160a01b038516843085610ac7565b801561083357604051630852cd8d60e31b8152600481018390526001600160a01b038516906342966c6890602401600060405180830381600087803b15801561081a57600080fd5b505af115801561082e573d6000803e3d6000fd5b505050505b50505050565b610841610d5f565b6040805160a0810190915260208501516001600160a01b031660c08201526000908060e0810160405160208183030381529060405281526020016040518060800160405280876001600160a01b0316815260200188604001516001600160a01b031681526020018860a001516001600160a01b0316815260200186815250604051602001610905919081516001600160a01b039081168252602080840151821690830152604080840151909116908201526060918201519181019190915260800190565b60408051601f198184030181529190528152602001600060405190808252806020026020018201604052801561096157816020015b604080518082019091526000808252602082015281526020019060019003908161093a5790505b50815260200160006001600160a01b03168152602001610a3b6040518060200160405280600160009054906101000a90046001600160a01b03166001600160a01b031663f68016b76040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109fc91906113cb565b905260408051915160248084019190915281518084039091018152604490920190526020810180516001600160e01b03166397a657c960e01b17905290565b905295945050505050565b8015610ab3576040516340c10f1960e01b81526001600160a01b038481166004830152602482018490528516906340c10f1990604401600060405180830381600087803b158015610a9657600080fd5b505af1158015610aaa573d6000803e3d6000fd5b50505050610833565b6108336001600160a01b0385168484610b32565b6040516001600160a01b03808516602483015283166044820152606481018290526108339085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610b67565b6040516001600160a01b038316602482015260448101829052610b6290849063a9059cbb60e01b90606401610afb565b505050565b6000610bbc826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610c3c9092919063ffffffff16565b9050805160001480610bdd575080806020019051810190610bdd91906111d7565b610b625760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161022e565b606061057e848460008585600080866001600160a01b03168587604051610c63919061147e565b60006040518083038185875af1925050503d8060008114610ca0576040519150601f19603f3d011682016040523d82523d6000602084013e610ca5565b606091505b5091509150610cb687838387610cc1565b979650505050505050565b60608315610d30578251600003610d29576001600160a01b0385163b610d295760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161022e565b508161057e565b61057e8383815115610d455781518083602001fd5b8060405162461bcd60e51b815260040161022e919061149a565b6040518060a0016040528060608152602001606081526020016060815260200160006001600160a01b03168152602001606081525090565b600060208284031215610da957600080fd5b81356001600160e01b031981168114610dc157600080fd5b9392505050565b634e487b7160e01b600052604160045260246000fd5b60405160c081016001600160401b0381118282101715610e0057610e00610dc8565b60405290565b604080519081016001600160401b0381118282101715610e0057610e00610dc8565b60405160a081016001600160401b0381118282101715610e0057610e00610dc8565b604051601f8201601f191681016001600160401b0381118282101715610e7257610e72610dc8565b604052919050565b801515811461024857600080fd5b6001600160a01b038116811461024857600080fd5b8035610ea881610e88565b919050565b6001600160401b038116811461024857600080fd5b8035610ea881610ead565b6000806000838503610100811215610ee457600080fd5b60c0811215610ef257600080fd5b50610efb610dde565b8435610f0681610e7a565b81526020850135610f1681610e88565b60208201526040850135610f2981610e88565b60408201526060850135610f3c81610e7a565b60608201526080850135610f4f81610ead565b608082015260a0850135610f6281610e88565b60a08201529250610f7560c08501610e9d565b915060e084013590509250925092565b600060208284031215610f9757600080fd5b81356001600160401b03811115610fad57600080fd5b820160a08185031215610dc157600080fd5b60008060008060808587031215610fd557600080fd5b8435610fe081610ead565b93506020850135610ff081610e88565b9250604085013561100081610e88565b9396929550929360600135925050565b600082601f83011261102157600080fd5b81356001600160401b0381111561103a5761103a610dc8565b61104d601f8201601f1916602001610e4a565b81815284602083860101111561106257600080fd5b816020850160208301376000918101602001919091529392505050565b600082601f83011261109057600080fd5b813560206001600160401b038211156110ab576110ab610dc8565b6110b9818360051b01610e4a565b82815260069290921b840181019181810190868411156110d857600080fd5b8286015b8481101561112057604081890312156110f55760008081fd5b6110fd610e06565b813561110881610e88565b815281850135858201528352918301916040016110dc565b509695505050505050565b600060a0823603121561113d57600080fd5b611145610e28565b8235815261115560208401610ec2565b602082015260408301356001600160401b038082111561117457600080fd5b61118036838701611010565b6040840152606085013591508082111561119957600080fd5b6111a536838701611010565b606084015260808501359150808211156111be57600080fd5b506111cb3682860161107f565b60808301525092915050565b6000602082840312156111e957600080fd5b8151610dc181610e7a565b600060c0828403121561120657600080fd5b61120e610dde565b825161121981610e7a565b8152602083015161122981610e88565b6020820152604083015161123c81610e88565b6040820152606083015161124f81610e7a565b6060820152608083015161126281610ead565b608082015260a083015161127581610e88565b60a08201529392505050565b818103818111156101c957634e487b7160e01b600052601160045260246000fd5b60005b838110156112bd5781810151838201526020016112a5565b50506000910152565b600081518084526112de8160208601602086016112a2565b601f01601f19169290920160200192915050565b600060406001600160401b038516835260208181850152845160a08386015261131e60e08601826112c6565b905081860151603f198087840301606088015261133b83836112c6565b88860151888203830160808a01528051808352908601945060009350908501905b8084101561138e57845180516001600160a01b031683528601518683015293850193600193909301929086019061135c565b5060608901516001600160a01b031660a08901526080890151888203830160c08a015295506113bd81876112c6565b9a9950505050505050505050565b6000602082840312156113dd57600080fd5b5051919050565b6000608082840312156113f657600080fd5b604051608081018181106001600160401b038211171561141857611418610dc8565b604052825161142681610e88565b8152602083015161143681610e88565b6020820152604083015161144981610e88565b60408201526060928301519281019290925250919050565b60006020828403121561147357600080fd5b8151610dc181610e88565b600082516114908184602087016112a2565b9190910192915050565b602081526000610dc160208301846112c656fea164736f6c6343000813000a

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

00000000000000000000000080226fc0ee2b096224eeac085bb9a8cba1146f7d000000000000000000000000cc0f4d8235b3de2f469a7b9dbc631a0b7e14ba66

-----Decoded View---------------
Arg [0] : _bridgeRouter (address): 0x80226fc0Ee2b096224EeAc085Bb9a8cba1146f7D
Arg [1] : _bridgeConfigs (address): 0xcc0f4d8235b3De2f469A7b9dBc631a0b7E14bA66

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 00000000000000000000000080226fc0ee2b096224eeac085bb9a8cba1146f7d
Arg [1] : 000000000000000000000000cc0f4d8235b3de2f469a7b9dbc631a0b7e14ba66


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.