ETH Price: $2,588.76 (-16.77%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

1 address found via
Transaction Hash
Method
Block
From
To
Send217643692025-02-03 7:03:472 hrs ago1738566227IN
0x7e77461C...72eA45747
0 ETH0.0022894715.22629537
Send217629252025-02-03 2:13:117 hrs ago1738548791IN
0x7e77461C...72eA45747
0 ETH0.09546227634.87875714
Send217628802025-02-03 2:04:117 hrs ago1738548251IN
0x7e77461C...72eA45747
0 ETH0.05151836342.6493721
Send217613012025-02-02 20:46:3513 hrs ago1738529195IN
0x7e77461C...72eA45747
0 ETH0.0015865210.5499683
Send217577432025-02-02 8:49:4725 hrs ago1738486187IN
0x7e77461C...72eA45747
0 ETH0.000509233.38650428
Send217575212025-02-02 8:05:1125 hrs ago1738483511IN
0x7e77461C...72eA45747
0 ETH0.000356332.36983195
Send217575092025-02-02 8:02:4725 hrs ago1738483367IN
0x7e77461C...72eA45747
0 ETH0.000343172.28229467
Send217572872025-02-02 7:18:1126 hrs ago1738480691IN
0x7e77461C...72eA45747
0 ETH0.000320452.13134291
Send217569142025-02-02 6:02:1127 hrs ago1738476131IN
0x7e77461C...72eA45747
0 ETH0.000229771.52814158
Send217562032025-02-02 3:38:5930 hrs ago1738467539IN
0x7e77461C...72eA45747
0 ETH0.000644884.28859604
Send217519252025-02-01 13:19:3544 hrs ago1738415975IN
0x7e77461C...72eA45747
0 ETH0.00038282.54553779
Send217508222025-02-01 9:38:112 days ago1738402691IN
0x7e77461C...72eA45747
0 ETH0.000401332.66876218
Send217502272025-02-01 7:38:352 days ago1738395515IN
0x7e77461C...72eA45747
0 ETH0.0003142.08820932
Send217491072025-02-01 3:52:592 days ago1738381979IN
0x7e77461C...72eA45747
0 ETH0.000258881.72162511
Send217485422025-02-01 1:59:352 days ago1738375175IN
0x7e77461C...72eA45747
0 ETH0.000211441.40625131
Send217423832025-01-31 5:19:593 days ago1738300799IN
0x7e77461C...72eA45747
0 ETH0.000315072.09540116
Send217409832025-01-31 0:38:353 days ago1738283915IN
0x7e77461C...72eA45747
0 ETH0.000329712.19266531
Send217394342025-01-30 19:26:353 days ago1738265195IN
0x7e77461C...72eA45747
0 ETH0.000916626.09574297
Send217362332025-01-30 8:42:474 days ago1738226567IN
0x7e77461C...72eA45747
0 ETH0.0003722.47370532
Send217343152025-01-30 2:18:114 days ago1738203491IN
0x7e77461C...72eA45747
0 ETH0.000336732.23933272
Send217330052025-01-29 21:54:594 days ago1738187699IN
0x7e77461C...72eA45747
0 ETH0.000697674.6396478
Send217329752025-01-29 21:48:594 days ago1738187339IN
0x7e77461C...72eA45747
0 ETH0.00081155.39663961
Send217309852025-01-29 15:09:234 days ago1738163363IN
0x7e77461C...72eA45747
0 ETH0.000852835.67112382
Send217295672025-01-29 10:23:594 days ago1738146239IN
0x7e77461C...72eA45747
0 ETH0.000411742.73816932
Send217295242025-01-29 10:15:234 days ago1738145723IN
0x7e77461C...72eA45747
0 ETH0.000424382.82238933
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x3cdc4bf5...ACA3B42A8
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
L1_HopCCTPImplementation

Compiler Version
v0.8.24+commit.e11b9ed9

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
File 1 of 6 : L1_HopCCTPImplementation.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.24;

import "./HopCCTPImplementation.sol";

contract L1_HopCCTPImplementation is HopCCTPImplementation {
    constructor(
        address nativeTokenAddress,
        address cctpAddress,
        address feeCollectorAddress,
        uint256 minBonderFee,
        uint256[] memory chainIds,
        uint32[] memory domains
    ) HopCCTPImplementation(
        nativeTokenAddress,
        cctpAddress,
        feeCollectorAddress,
        minBonderFee,
        chainIds,
        domains
    ) {}
}

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

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";

interface ICCTP {
    function depositForBurn(
        uint256 amount,
        uint32 destinationDomain,
        bytes32 mintRecipient,
        address burnToken
    ) external returns (uint64 _nonce);
}

abstract contract HopCCTPImplementation {
    using SafeERC20 for IERC20;

    IERC20 public immutable nativeToken;
    ICCTP public immutable cctp;
    address public immutable feeCollectorAddress;
    uint256 public immutable minBonderFee;
    mapping(uint256 => bool) public activeChainIds;
    mapping(uint256 => uint32) public destinationDomains;

    event CCTPTransferSent(
        uint64 indexed cctpNonce,
        uint256 indexed chainId,
        address indexed recipient,
        uint256 amount,
        uint256 bonderFee
    );

    constructor(
        address nativeTokenAddress,
        address cctpAddress,
        address _feeCollectorAddress,
        uint256 _minBonderFee,
        uint256[] memory chainIds,
        uint32[] memory domains
    ) {
        nativeToken = IERC20(nativeTokenAddress);
        cctp = ICCTP(cctpAddress);
        feeCollectorAddress = _feeCollectorAddress;
        minBonderFee = _minBonderFee;
        for (uint256 i = 0; i < chainIds.length; i++) {
            require(chainIds[i] != block.chainid, "HOP_CCTP: Cannot activate this chain");
            activeChainIds[chainIds[i]] = true;
            destinationDomains[chainIds[i]] = domains[i];
        }

        nativeToken.approve(address(cctp), type(uint256).max);
    }

    // @notice amount is the total amount the user wants to send including the bonderFee
    function send(
        uint256 chainId,
        address recipient,
        uint256 amount,
        uint256 bonderFee
    )
        external
    {
        nativeToken.safeTransferFrom(msg.sender, address(this), amount);
        _send(chainId, recipient, amount, bonderFee);
    }

    function _send(
        uint256 chainId,
        address recipient,
        uint256 amount,
        uint256 bonderFee
    )
        internal
    {
        require(amount > 0, "HOP_CCTP: Bonder fee cannot exceed amount");
        require(amount > bonderFee, "HOP_CCTP: Bonder fee cannot exceed amount");
        require(bonderFee >= minBonderFee, "HOP_CCTP: Min bonder fee required");
        require(activeChainIds[chainId], "HOP_CCTP: Cannot send to unsupported chainId");
        require(chainId != block.chainid, "HOP_CCTP: Cannot send to the same chain");

        nativeToken.safeTransfer(feeCollectorAddress, bonderFee);

        uint256 amountAfterFee = amount - bonderFee;
        uint64 cctpNonce = cctp.depositForBurn(
            amountAfterFee,
            destinationDomains[chainId],
            bytes32(uint256(uint160(recipient))),
            address(nativeToken)
        );

        emit CCTPTransferSent(
            cctpNonce,
            chainId,
            recipient,
            amount,
            bonderFee
        );
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"nativeTokenAddress","type":"address"},{"internalType":"address","name":"cctpAddress","type":"address"},{"internalType":"address","name":"feeCollectorAddress","type":"address"},{"internalType":"uint256","name":"minBonderFee","type":"uint256"},{"internalType":"uint256[]","name":"chainIds","type":"uint256[]"},{"internalType":"uint32[]","name":"domains","type":"uint32[]"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"cctpNonce","type":"uint64"},{"indexed":true,"internalType":"uint256","name":"chainId","type":"uint256"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"bonderFee","type":"uint256"}],"name":"CCTPTransferSent","type":"event"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"activeChainIds","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cctp","outputs":[{"internalType":"contract ICCTP","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"destinationDomains","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeCollectorAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minBonderFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nativeToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"bonderFee","type":"uint256"}],"name":"send","outputs":[],"stateMutability":"nonpayable","type":"function"}]

Deployed Bytecode

0x608060405234801561000f575f80fd5b506004361061007b575f3560e01c8063c97d172e11610059578063c97d172e146100e9578063e1758bd814610119578063e3329e3214610137578063f108e225146101555761007b565b806350fc24011461007f57806389aad5dc1461009d578063a134ce5b146100cd575b5f80fd5b610087610173565b60405161009491906109ad565b60405180910390f35b6100b760048036038101906100b291906109f4565b610197565b6040516100c49190610a3d565b60405180910390f35b6100e760048036038101906100e29190610ab0565b6101b7565b005b61010360048036038101906100fe91906109f4565b610216565b6040516101109190610b2e565b60405180910390f35b610121610232565b60405161012e9190610ba2565b60405180910390f35b61013f610256565b60405161014c9190610bdb565b60405180910390f35b61015d61027a565b60405161016a9190610c03565b60405180910390f35b7f000000000000000000000000000000000000000000000000000000000000271081565b6001602052805f5260405f205f915054906101000a900463ffffffff1681565b6102043330847f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4873ffffffffffffffffffffffffffffffffffffffff1661029e909392919063ffffffff16565b61021084848484610327565b50505050565b5f602052805f5260405f205f915054906101000a900460ff1681565b7f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4881565b7f000000000000000000000000bd3fa81b58ba92a82136038b25adec7066af315581565b7f0000000000000000000000009f8d2dafe9978268ac7c67966b366d6d55e97f0781565b610321846323b872dd60e01b8585856040516024016102bf93929190610c1c565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050610684565b50505050565b5f8211610369576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161036090610cd1565b60405180910390fd5b8082116103ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103a290610cd1565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000271081101561040e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161040590610d5f565b60405180910390fd5b5f808581526020019081526020015f205f9054906101000a900460ff1661046a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161046190610ded565b60405180910390fd5b4684036104ac576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104a390610e7b565b60405180910390fd5b6105177f0000000000000000000000009f8d2dafe9978268ac7c67966b366d6d55e97f07827f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4873ffffffffffffffffffffffffffffffffffffffff1661074a9092919063ffffffff16565b5f81836105249190610ec6565b90505f7f000000000000000000000000bd3fa81b58ba92a82136038b25adec7066af315573ffffffffffffffffffffffffffffffffffffffff16636fd3504e8360015f8a81526020019081526020015f205f9054906101000a900463ffffffff168873ffffffffffffffffffffffffffffffffffffffff165f1b7f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb486040518563ffffffff1660e01b81526004016105de9493929190610f11565b6020604051808303815f875af11580156105fa573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061061e9190610f91565b90508473ffffffffffffffffffffffffffffffffffffffff16868267ffffffffffffffff167f10bf4019e09db5876a05d237bfcc676cd84eee2c23f820284906dd7cfa70d2c48787604051610674929190610fbc565b60405180910390a4505050505050565b5f6106e5826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166107d09092919063ffffffff16565b90505f81511480610706575080806020019051810190610705919061100d565b5b610745576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161073c906110a8565b60405180910390fd5b505050565b6107cb8363a9059cbb60e01b84846040516024016107699291906110c6565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050610684565b505050565b60606107de84845f856107e7565b90509392505050565b60608247101561082c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108239061115d565b60405180910390fd5b5f808673ffffffffffffffffffffffffffffffffffffffff16858760405161085491906111e7565b5f6040518083038185875af1925050503d805f811461088e576040519150601f19603f3d011682016040523d82523d5f602084013e610893565b606091505b50915091506108a4878383876108b0565b92505050949350505050565b60608315610911575f835103610909576108c985610924565b610908576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108ff90611247565b60405180910390fd5b5b82905061091c565b61091b8383610946565b5b949350505050565b5f808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b5f825111156109585781518083602001fd5b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161098c91906112b7565b60405180910390fd5b5f819050919050565b6109a781610995565b82525050565b5f6020820190506109c05f83018461099e565b92915050565b5f80fd5b6109d381610995565b81146109dd575f80fd5b50565b5f813590506109ee816109ca565b92915050565b5f60208284031215610a0957610a086109c6565b5b5f610a16848285016109e0565b91505092915050565b5f63ffffffff82169050919050565b610a3781610a1f565b82525050565b5f602082019050610a505f830184610a2e565b92915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610a7f82610a56565b9050919050565b610a8f81610a75565b8114610a99575f80fd5b50565b5f81359050610aaa81610a86565b92915050565b5f805f8060808587031215610ac857610ac76109c6565b5b5f610ad5878288016109e0565b9450506020610ae687828801610a9c565b9350506040610af7878288016109e0565b9250506060610b08878288016109e0565b91505092959194509250565b5f8115159050919050565b610b2881610b14565b82525050565b5f602082019050610b415f830184610b1f565b92915050565b5f819050919050565b5f610b6a610b65610b6084610a56565b610b47565b610a56565b9050919050565b5f610b7b82610b50565b9050919050565b5f610b8c82610b71565b9050919050565b610b9c81610b82565b82525050565b5f602082019050610bb55f830184610b93565b92915050565b5f610bc582610b71565b9050919050565b610bd581610bbb565b82525050565b5f602082019050610bee5f830184610bcc565b92915050565b610bfd81610a75565b82525050565b5f602082019050610c165f830184610bf4565b92915050565b5f606082019050610c2f5f830186610bf4565b610c3c6020830185610bf4565b610c49604083018461099e565b949350505050565b5f82825260208201905092915050565b7f484f505f434354503a20426f6e646572206665652063616e6e6f7420657863655f8201527f656420616d6f756e740000000000000000000000000000000000000000000000602082015250565b5f610cbb602983610c51565b9150610cc682610c61565b604082019050919050565b5f6020820190508181035f830152610ce881610caf565b9050919050565b7f484f505f434354503a204d696e20626f6e6465722066656520726571756972655f8201527f6400000000000000000000000000000000000000000000000000000000000000602082015250565b5f610d49602183610c51565b9150610d5482610cef565b604082019050919050565b5f6020820190508181035f830152610d7681610d3d565b9050919050565b7f484f505f434354503a2043616e6e6f742073656e6420746f20756e737570706f5f8201527f7274656420636861696e49640000000000000000000000000000000000000000602082015250565b5f610dd7602c83610c51565b9150610de282610d7d565b604082019050919050565b5f6020820190508181035f830152610e0481610dcb565b9050919050565b7f484f505f434354503a2043616e6e6f742073656e6420746f207468652073616d5f8201527f6520636861696e00000000000000000000000000000000000000000000000000602082015250565b5f610e65602783610c51565b9150610e7082610e0b565b604082019050919050565b5f6020820190508181035f830152610e9281610e59565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f610ed082610995565b9150610edb83610995565b9250828203905081811115610ef357610ef2610e99565b5b92915050565b5f819050919050565b610f0b81610ef9565b82525050565b5f608082019050610f245f83018761099e565b610f316020830186610a2e565b610f3e6040830185610f02565b610f4b6060830184610bf4565b95945050505050565b5f67ffffffffffffffff82169050919050565b610f7081610f54565b8114610f7a575f80fd5b50565b5f81519050610f8b81610f67565b92915050565b5f60208284031215610fa657610fa56109c6565b5b5f610fb384828501610f7d565b91505092915050565b5f604082019050610fcf5f83018561099e565b610fdc602083018461099e565b9392505050565b610fec81610b14565b8114610ff6575f80fd5b50565b5f8151905061100781610fe3565b92915050565b5f60208284031215611022576110216109c6565b5b5f61102f84828501610ff9565b91505092915050565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e5f8201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b5f611092602a83610c51565b915061109d82611038565b604082019050919050565b5f6020820190508181035f8301526110bf81611086565b9050919050565b5f6040820190506110d95f830185610bf4565b6110e6602083018461099e565b9392505050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f5f8201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b5f611147602683610c51565b9150611152826110ed565b604082019050919050565b5f6020820190508181035f8301526111748161113b565b9050919050565b5f81519050919050565b5f81905092915050565b5f5b838110156111ac578082015181840152602081019050611191565b5f8484015250505050565b5f6111c18261117b565b6111cb8185611185565b93506111db81856020860161118f565b80840191505092915050565b5f6111f282846111b7565b915081905092915050565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000005f82015250565b5f611231601d83610c51565b915061123c826111fd565b602082019050919050565b5f6020820190508181035f83015261125e81611225565b9050919050565b5f81519050919050565b5f601f19601f8301169050919050565b5f61128982611265565b6112938185610c51565b93506112a381856020860161118f565b6112ac8161126f565b840191505092915050565b5f6020820190508181035f8301526112cf818461127f565b90509291505056fea2646970667358221220b61aad281bd2c437706e3c2c0bdee6f3c9b5f0dcddadf5ccca72b52bb2a8ac6364736f6c63430008180033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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