ETH Price: $2,868.82 (-2.47%)

Contract

0x854dc4372Cf8B0D3b06B24764dfDadAe99608611

Overview

ETH Balance

0.00000215308542147 ETH

ETH Value

Less Than $0.01 (@ $2,868.82/ETH)

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To
Deposit For Burn3648199862025-08-04 8:37:17174 days ago1754296637IN
0x854dc437...e99608611
0.00000139 ETH0.000001610.01
Deposit For Burn3634988912025-07-31 12:58:02178 days ago1753966682IN
0x854dc437...e99608611
0.00000076 ETH0.000001990.01
Withdraw Fees3633782782025-07-31 4:35:51179 days ago1753936551IN
0x854dc437...e99608611
0 ETH0.000000360.01
Deposit For Burn3614715812025-07-25 16:20:00184 days ago1753460400IN
0x854dc437...e99608611
0.00000399 ETH0.000002850.016946
Deposit For Burn3614314822025-07-25 13:33:15184 days ago1753450395IN
0x854dc437...e99608611
0.00000353 ETH0.000003580.02206
Deposit For Burn3611077632025-07-24 15:06:59185 days ago1753369619IN
0x854dc437...e99608611
0.0000034 ETH0.000010890.06671
Deposit For Burn3609350932025-07-24 3:08:45186 days ago1753326525IN
0x854dc437...e99608611
0.00000391 ETH0.000001620.01
Deposit For Burn3607461752025-07-23 14:02:55186 days ago1753279375IN
0x854dc437...e99608611
0.00000347 ETH0.00006820.420458
Deposit For Burn3607435772025-07-23 13:52:10186 days ago1753278730IN
0x854dc437...e99608611
0.00000404 ETH0.000135280.843313
Deposit For Burn3606302162025-07-23 6:00:31186 days ago1753250431IN
0x854dc437...e99608611
0.00000343 ETH0.000001620.01
Deposit For Burn3603266782025-07-22 8:57:29187 days ago1753174649IN
0x854dc437...e99608611
0.00050848 ETH0.000001730.01
Deposit For Burn3601251322025-07-21 18:58:51188 days ago1753124331IN
0x854dc437...e99608611
0.00001457 ETH0.000001730.01
Deposit For Burn3600300272025-07-21 12:23:25188 days ago1753100605IN
0x854dc437...e99608611
0.00000372 ETH0.000002350.013182
Deposit For Burn3596905702025-07-20 12:51:06189 days ago1753015866IN
0x854dc437...e99608611
0.00020438 ETH0.000001730.01
Deposit For Burn3596297532025-07-20 8:38:11189 days ago1753000691IN
0x854dc437...e99608611
0.0000035 ETH0.000001650.01
Deposit For Burn3594238502025-07-19 18:20:59190 days ago1752949259IN
0x854dc437...e99608611
0.00000364 ETH0.000001650.01
Deposit For Burn3593504752025-07-19 13:15:33190 days ago1752930933IN
0x854dc437...e99608611
0.00000363 ETH0.000001940.011337
Deposit For Burn3592750652025-07-19 8:01:34190 days ago1752912094IN
0x854dc437...e99608611
0.00000277 ETH0.000001670.01
Deposit For Burn3592646792025-07-19 7:18:20190 days ago1752909500IN
0x854dc437...e99608611
0.00000808 ETH0.000001670.01
Deposit For Burn3590696122025-07-18 17:46:16191 days ago1752860776IN
0x854dc437...e99608611
0.0000145 ETH0.000005940.034303
Deposit For Burn3590283742025-07-18 14:54:48191 days ago1752850488IN
0x854dc437...e99608611
0.00000617 ETH0.000023040.139427
Deposit For Burn3590115852025-07-18 13:44:58191 days ago1752846298IN
0x854dc437...e99608611
0.00000349 ETH0.000015140.091655
Deposit For Burn3589897822025-07-18 12:14:17191 days ago1752840857IN
0x854dc437...e99608611
0.00000372 ETH0.000005080.029111
Deposit For Burn3589872452025-07-18 12:03:44191 days ago1752840224IN
0x854dc437...e99608611
0.00000357 ETH0.000002990.016457
Deposit For Burn3589353692025-07-18 8:28:02191 days ago1752827282IN
0x854dc437...e99608611
0.00000357 ETH0.000003560.020031
View all transactions

Latest 25 internal transactions (View All)

Parent Transaction Hash Block From To
3634988912025-07-31 12:58:02178 days ago1753966682
0x854dc437...e99608611
0 ETH
3633782782025-07-31 4:35:51179 days ago1753936551
0x854dc437...e99608611
0.03826412 ETH
3614715812025-07-25 16:20:00184 days ago1753460400
0x854dc437...e99608611
0 ETH
3603266782025-07-22 8:57:29187 days ago1753174649
0x854dc437...e99608611
0.000005 ETH
3593504752025-07-19 13:15:33190 days ago1752930933
0x854dc437...e99608611
0 ETH
3590696122025-07-18 17:46:16191 days ago1752860776
0x854dc437...e99608611
0.00000001 ETH
3589897822025-07-18 12:14:17191 days ago1752840857
0x854dc437...e99608611
0 ETH
3587374222025-07-17 18:44:59192 days ago1752777899
0x854dc437...e99608611
0.000005 ETH
3587073992025-07-17 16:40:00192 days ago1752770400
0x854dc437...e99608611
0.00000002 ETH
3580206212025-07-15 17:03:32194 days ago1752599012
0x854dc437...e99608611
0 ETH
3565873432025-07-11 13:34:41198 days ago1752240881
0x854dc437...e99608611
0.000005 ETH
3565297822025-07-11 9:35:10198 days ago1752226510
0x854dc437...e99608611
0 ETH
3544260742025-07-05 7:08:22204 days ago1751699302
0x854dc437...e99608611
0.000005 ETH
3537109022025-07-03 5:18:01206 days ago1751519881
0x854dc437...e99608611
0.00000449 ETH
3534832632025-07-02 13:28:39207 days ago1751462919
0x854dc437...e99608611
0 ETH
3532208252025-07-01 19:13:37208 days ago1751397217
0x854dc437...e99608611
0.00000002 ETH
3531677652025-07-01 15:32:09208 days ago1751383929
0x854dc437...e99608611
0.00000024 ETH
3530796892025-07-01 9:24:59208 days ago1751361899
0x854dc437...e99608611
0.000005 ETH
3527236842025-06-30 8:40:16209 days ago1751272816
0x854dc437...e99608611
0.08844157 ETH
3526724772025-06-30 5:06:54209 days ago1751260014
0x854dc437...e99608611
0.00000013 ETH
3521483162025-06-28 16:38:43211 days ago1751128723
0x854dc437...e99608611
0.000005 ETH
3519738872025-06-28 4:31:02212 days ago1751085062
0x854dc437...e99608611
0.000005 ETH
3516308662025-06-27 4:37:29213 days ago1750999049
0x854dc437...e99608611
0.000005 ETH
3516134562025-06-27 3:24:40213 days ago1750994680
0x854dc437...e99608611
0.000005 ETH
3514390552025-06-26 15:16:55213 days ago1750951015
0x854dc437...e99608611
0 ETH
View All Internal Transactions

Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
YeiCctpAgentV2

Compiler Version
v0.8.28+commit.7893614a

Optimization Enabled:
Yes with 200 runs

Other Settings:
cancun EvmVersion
// SPDX-License-Identifier: AGPL-3.0
pragma solidity ^0.8.20;

import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";

import {AggregatorV3Interface} from "./interfaces/AggregatorV3Interface.sol";
import {IYeiCctpAgentV2} from "./interfaces/IYeiCctpAgentV2.sol";
import {ICircleCctp} from "./interfaces/ICircleCctp.sol";
import {ITokenMinter} from "./interfaces/ITokenMinter.sol";

contract YeiCctpAgentV2 is Ownable, IYeiCctpAgentV2 {
    using SafeERC20 for IERC20;

    uint256 public constant FEE_PERCENTAGE_BASIS = 1e4;
    uint8 public constant USDC_DECIMALS = 6;

    ICircleCctp public immutable cctp;
    ITokenMinter public immutable tokenMinter;
    IERC20 public immutable usdc;
    AggregatorV3Interface public immutable priceFeed;
    uint8 public immutable decimalScale;

    uint256 public fixedFeeThreshold;
    uint256 public fixedFee;
    uint256 public feePercentage;
    uint256 public gasOnDestinationFee;

    constructor(
        address _cctp,
        address _tokenMinter,
        address _usdc,
        address _priceFeed,
        uint256 _fixedFeeThreshold,
        uint256 _fixedFee,
        uint256 _feePercentage,
        uint256 _gasOnDestinationFee
    ) Ownable(msg.sender) {
        cctp = ICircleCctp(_cctp);
        tokenMinter = ITokenMinter(_tokenMinter);
        usdc = IERC20(_usdc);
        priceFeed = AggregatorV3Interface(_priceFeed);
        decimalScale = 18 - USDC_DECIMALS + priceFeed.decimals();
        fixedFeeThreshold = _fixedFeeThreshold;
        fixedFee = _fixedFee;
        feePercentage = _feePercentage;
        gasOnDestinationFee = _gasOnDestinationFee;
    }

    function depositForBurn(
        uint256 amount,
        uint32 destinationDomain,
        bytes32 mintRecipient,
        address burnToken,
        bool gasOnDestination
    ) external payable returns (uint64) {
        uint256 fee = getFeeInNativeToken(amount);
        uint256 feeForGasOnDestination = gasOnDestination ? gasOnDestinationFee : 0;
        uint256 totalFee = fee + feeForGasOnDestination;
        if (msg.value < totalFee) {
            revert InsufficientFee(totalFee, msg.value);
        }

        usdc.safeTransferFrom(msg.sender, address(this), amount);
        usdc.forceApprove(address(cctp), amount);

        uint256 burnLimit = tokenMinter.burnLimitsPerMessage(burnToken);
        uint64 burnResult;
        while (amount > burnLimit) {
            burnResult = cctp.depositForBurn(burnLimit, destinationDomain, mintRecipient, burnToken);
            emit DepositForBurn(msg.sender, burnLimit, burnResult, 0, 0, mintRecipient);
            amount -= burnLimit;
        }
        burnResult = cctp.depositForBurn(amount, destinationDomain, mintRecipient, burnToken);
        emit DepositForBurn(msg.sender, amount, burnResult, fee, feeForGasOnDestination, mintRecipient);

        if (msg.value > totalFee) {
            (bool success,) = payable(msg.sender).call{value: msg.value - totalFee}("");
            require(success, "refund failed");
        }

        return burnResult;
    }

    function getFeeInUSDC(uint256 amount) public view returns (uint256 fee) {
        fee = fixedFee;
        if (amount < fixedFeeThreshold) {
            fee = (amount * feePercentage) / FEE_PERCENTAGE_BASIS;
        }
    }

    function getFeeInNativeToken(uint256 amount) public view returns (uint256) {
        uint256 feeInUSDC = getFeeInUSDC(amount);
        (, int256 price,,,) = priceFeed.latestRoundData();
        return 10 ** decimalScale * feeInUSDC / uint256(price);
    }

    function withdrawFees() external onlyOwner {
        uint256 amount = address(this).balance;
        (bool success,) = payable(msg.sender).call{value: amount}("");
        require(success, "withdrawal failed");
        emit FeesWithdrawn(msg.sender, amount);
    }

    function setFixedFeeThreshold(uint256 _fixedFeeThreshold) external onlyOwner {
        fixedFeeThreshold = _fixedFeeThreshold;
    }

    function setFixedFee(uint256 _fixedFee) external onlyOwner {
        fixedFee = _fixedFee;
    }

    function setFeePercentage(uint256 _feePercentage) external onlyOwner {
        feePercentage = _feePercentage;
    }

    function setGasOnDestinationFee(uint256 _gasOnDestinationFee) external onlyOwner {
        gasOnDestinationFee = _gasOnDestinationFee;
    }
}

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

pragma solidity ^0.8.20;

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

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

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

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

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

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

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

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

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

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

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

        bytes memory returndata = address(token).functionCall(data);
        if (returndata.length != 0 && !abi.decode(returndata, (bool))) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

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

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.20;

import {Context} from "../utils/Context.sol";

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

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

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

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

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

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

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(newOwner);
    }

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

// SPDX-License-Identifier: MIT
// https://github.com/smartcontractkit/chainlink/blob/develop/contracts/src/v0.8/shared/interfaces/AggregatorV3Interface.sol

pragma solidity ^0.8.0;

// solhint-disable-next-line interface-starts-with-i
interface AggregatorV3Interface {
    function decimals() external view returns (uint8);

    function description() external view returns (string memory);

    function version() external view returns (uint256);

    function getRoundData(uint80 _roundId)
        external
        view
        returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);

    function latestRoundData()
        external
        view
        returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);
}

// SPDX-License-Identifier: AGPL-3.0
pragma solidity ^0.8.20;

interface IYeiCctpAgentV2 {
    error InsufficientFee(uint256 required, uint256 got);
    error ExceededBurnLimit(uint256 limit, uint256 got);

    event DepositForBurn(
        address indexed from,
        uint256 amount,
        uint64 indexed burnResult,
        uint256 fee,
        uint256 feeForgasOnDestination,
        bytes32 nobleAddress
    );
    event FeesWithdrawn(address indexed owner, uint256 balance);

    function depositForBurn(
        uint256 amount,
        uint32 destinationDomain,
        bytes32 mintRecipient,
        address burnToken,
        bool gasOnDestination
    ) external payable returns (uint64);

    function getFeeInUSDC(uint256 amount) external view returns (uint256);

    function getFeeInNativeToken(uint256 amount) external view returns (uint256);
}

// SPDX-License-Identifier: AGPL-3.0
pragma solidity ^0.8.20;

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

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

interface ITokenMinter {
    function burnLimitsPerMessage(address token) external view returns (uint256);
}

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

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 *
 * ==== Security Considerations
 *
 * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature
 * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be
 * considered as an intention to spend the allowance in any specific way. The second is that because permits have
 * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should
 * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be
 * generally recommended is:
 *
 * ```solidity
 * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {
 *     try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}
 *     doThing(..., value);
 * }
 *
 * function doThing(..., uint256 value) public {
 *     token.safeTransferFrom(msg.sender, address(this), value);
 *     ...
 * }
 * ```
 *
 * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of
 * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also
 * {SafeERC20-safeTransferFrom}).
 *
 * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so
 * contracts should have entry points that don't rely on permit.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     *
     * CAUTION: See Security Considerations above.
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

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

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

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

pragma solidity ^0.8.20;

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

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

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

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

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

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        if (address(this).balance < value) {
            revert AddressInsufficientBalance(address(this));
        }
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

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

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

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

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

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

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

pragma solidity ^0.8.20;

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

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

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

Settings
{
  "remappings": [
    "forge-std/=lib/forge-std/src/",
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "interfaces/=src/interfaces/",
    "ds-test/=lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/src/",
    "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "cancun",
  "viaIR": false,
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_cctp","type":"address"},{"internalType":"address","name":"_tokenMinter","type":"address"},{"internalType":"address","name":"_usdc","type":"address"},{"internalType":"address","name":"_priceFeed","type":"address"},{"internalType":"uint256","name":"_fixedFeeThreshold","type":"uint256"},{"internalType":"uint256","name":"_fixedFee","type":"uint256"},{"internalType":"uint256","name":"_feePercentage","type":"uint256"},{"internalType":"uint256","name":"_gasOnDestinationFee","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AddressInsufficientBalance","type":"error"},{"inputs":[{"internalType":"uint256","name":"limit","type":"uint256"},{"internalType":"uint256","name":"got","type":"uint256"}],"name":"ExceededBurnLimit","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[{"internalType":"uint256","name":"required","type":"uint256"},{"internalType":"uint256","name":"got","type":"uint256"}],"name":"InsufficientFee","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":true,"internalType":"uint64","name":"burnResult","type":"uint64"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"feeForgasOnDestination","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"nobleAddress","type":"bytes32"}],"name":"DepositForBurn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"balance","type":"uint256"}],"name":"FeesWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"FEE_PERCENTAGE_BASIS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"USDC_DECIMALS","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cctp","outputs":[{"internalType":"contract ICircleCctp","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimalScale","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint32","name":"destinationDomain","type":"uint32"},{"internalType":"bytes32","name":"mintRecipient","type":"bytes32"},{"internalType":"address","name":"burnToken","type":"address"},{"internalType":"bool","name":"gasOnDestination","type":"bool"}],"name":"depositForBurn","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"feePercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fixedFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fixedFeeThreshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gasOnDestinationFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"getFeeInNativeToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"getFeeInUSDC","outputs":[{"internalType":"uint256","name":"fee","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"priceFeed","outputs":[{"internalType":"contract AggregatorV3Interface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_feePercentage","type":"uint256"}],"name":"setFeePercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fixedFee","type":"uint256"}],"name":"setFixedFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fixedFeeThreshold","type":"uint256"}],"name":"setFixedFeeThreshold","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_gasOnDestinationFee","type":"uint256"}],"name":"setGasOnDestinationFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"tokenMinter","outputs":[{"internalType":"contract ITokenMinter","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"usdc","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawFees","outputs":[],"stateMutability":"nonpayable","type":"function"}]

610120604052348015610010575f5ffd5b5060405161146f38038061146f83398101604081905261002f9161017f565b338061005457604051631e4fbdf760e01b81525f600482015260240160405180910390fd5b61005d81610115565b506001600160a01b0380891660805287811660a05286811660c052851660e08190526040805163313ce56760e01b8152905163313ce567916004808201926020929091908290030181865afa1580156100b8573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906100dc91906101f5565b6100e860066012610230565b6100f2919061024f565b60ff16610100526001939093556002919091556003556004555061026892505050565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b038116811461017a575f5ffd5b919050565b5f5f5f5f5f5f5f5f610100898b031215610197575f5ffd5b6101a089610164565b97506101ae60208a01610164565b96506101bc60408a01610164565b95506101ca60608a01610164565b60808a015160a08b015160c08c015160e0909c01519a9d999c50979a91999098919650945092505050565b5f60208284031215610205575f5ffd5b815160ff81168114610215575f5ffd5b9392505050565b634e487b7160e01b5f52601160045260245ffd5b60ff82811682821603908111156102495761024961021c565b92915050565b60ff81811683821601908111156102495761024961021c565b60805160a05160c05160e051610100516111926102dd5f395f818161035401526109e401525f818161022e015261095c01525f8181610198015281816104a101526104d601525f81816103a6015261053e01525f81816103f8015281816104f8015281816105ee01526106fa01526111925ff3fe608060405260043610610131575f3560e01c8063a001ecdd116100a8578063c4f5183b1161006d578063c4f5183b14610343578063c7821bc914610376578063cfb3647b14610395578063d9f126f1146103c8578063e3329e32146103e7578063f2fde38b1461041a575f5ffd5b8063a001ecdd146102bf578063a0855f2d146102d4578063ae06c1b7146102e9578063b6d7287014610308578063c1419def1461031d575f5ffd5b8063715018a6116100f9578063715018a614610209578063741bef1a1461021d5780638da5cb5b1461025057806391792d5b1461026c5780639564cb3b146102815780639ec751e9146102a0575f5ffd5b8063287304061461013557806337de8106146101665780633e413bee14610187578063476343ee146101d25780636e8611c6146101e6575b5f5ffd5b610148610143366004610e94565b610439565b60405167ffffffffffffffff90911681526020015b60405180910390f35b348015610171575f5ffd5b50610185610180366004610ef5565b610860565b005b348015610192575f5ffd5b506101ba7f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161015d565b3480156101dd575f5ffd5b5061018561086d565b3480156101f1575f5ffd5b506101fb60015481565b60405190815260200161015d565b348015610214575f5ffd5b50610185610939565b348015610228575f5ffd5b506101ba7f000000000000000000000000000000000000000000000000000000000000000081565b34801561025b575f5ffd5b505f546001600160a01b03166101ba565b348015610277575f5ffd5b506101fb60025481565b34801561028c575f5ffd5b506101fb61029b366004610ef5565b61094c565b3480156102ab575f5ffd5b506101fb6102ba366004610ef5565b610a2b565b3480156102ca575f5ffd5b506101fb60035481565b3480156102df575f5ffd5b506101fb61271081565b3480156102f4575f5ffd5b50610185610303366004610ef5565b610a5b565b348015610313575f5ffd5b506101fb60045481565b348015610328575f5ffd5b50610331600681565b60405160ff909116815260200161015d565b34801561034e575f5ffd5b506103317f000000000000000000000000000000000000000000000000000000000000000081565b348015610381575f5ffd5b50610185610390366004610ef5565b610a68565b3480156103a0575f5ffd5b506101ba7f000000000000000000000000000000000000000000000000000000000000000081565b3480156103d3575f5ffd5b506101856103e2366004610ef5565b610a75565b3480156103f2575f5ffd5b506101ba7f000000000000000000000000000000000000000000000000000000000000000081565b348015610425575f5ffd5b50610185610434366004610f0c565b610a82565b5f5f6104448761094c565b90505f83610452575f610456565b6004545b90505f6104638284610f39565b9050803410156104945760405163a458261b60e01b8152600481018290523460248201526044015b60405180910390fd5b6104c96001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633308c610abf565b61051d6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f00000000000000000000000000000000000000000000000000000000000000008b610b2c565b6040516352b7631960e11b81526001600160a01b0387811660048301525f917f00000000000000000000000000000000000000000000000000000000000000009091169063a56ec63290602401602060405180830381865afa158015610585573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105a99190610f4c565b90505f5b818b11156106c1576040516337e9a82760e11b81526004810183905263ffffffff8b166024820152604481018a90526001600160a01b0389811660648301527f00000000000000000000000000000000000000000000000000000000000000001690636fd3504e906084016020604051808303815f875af1158015610634573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106589190610f63565b604080518481525f6020820181905281830152606081018c9052905191925067ffffffffffffffff83169133917f44ab89ad836f45fdcf3c8d9333a3f3db103af3aca6669f8dc6a65f32f50460bb919081900360800190a36106ba828c610f8a565b9a506105ad565b6040516337e9a82760e11b8152600481018c905263ffffffff8b166024820152604481018a90526001600160a01b0389811660648301527f00000000000000000000000000000000000000000000000000000000000000001690636fd3504e906084016020604051808303815f875af1158015610740573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107649190610f63565b604080518d815260208101889052908101869052606081018b905290915067ffffffffffffffff82169033907f44ab89ad836f45fdcf3c8d9333a3f3db103af3aca6669f8dc6a65f32f50460bb9060800160405180910390a382341115610852575f336107d18534610f8a565b6040515f81818185875af1925050503d805f811461080a576040519150601f19603f3d011682016040523d82523d5f602084013e61080f565b606091505b50509050806108505760405162461bcd60e51b815260206004820152600d60248201526c1c99599d5b990819985a5b1959609a1b604482015260640161048b565b505b9a9950505050505050505050565b610868610bbb565b600255565b610875610bbb565b60405147905f90339083908381818185875af1925050503d805f81146108b6576040519150601f19603f3d011682016040523d82523d5f602084013e6108bb565b606091505b50509050806109005760405162461bcd60e51b81526020600482015260116024820152701dda5d1a191c985dd85b0819985a5b1959607a1b604482015260640161048b565b60405182815233907fc0819c13be868895eb93e40eaceb96de976442fa1d404e5c55f14bb65a8c489a9060200160405180910390a25050565b610941610bbb565b61094a5f610be7565b565b5f5f61095783610a2b565b90505f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa1580156109b6573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109da9190610fb6565b50505091505080827f0000000000000000000000000000000000000000000000000000000000000000600a610a0f91906110e7565b610a1991906110f5565b610a23919061110c565b949350505050565b600254600154821015610a565761271060035483610a4991906110f5565b610a53919061110c565b90505b919050565b610a63610bbb565b600355565b610a70610bbb565b600155565b610a7d610bbb565b600455565b610a8a610bbb565b6001600160a01b038116610ab357604051631e4fbdf760e01b81525f600482015260240161048b565b610abc81610be7565b50565b6040516001600160a01b038481166024830152838116604483015260648201839052610b269186918216906323b872dd906084015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050610c36565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b179052610b7d8482610c9c565b610b26576040516001600160a01b0384811660248301525f6044830152610bb191869182169063095ea7b390606401610af4565b610b268482610c36565b5f546001600160a01b0316331461094a5760405163118cdaa760e01b815233600482015260240161048b565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f610c4a6001600160a01b03841683610d3f565b905080515f14158015610c6e575080806020019051810190610c6c919061112b565b155b15610c9757604051635274afe760e01b81526001600160a01b038416600482015260240161048b565b505050565b5f5f5f846001600160a01b031684604051610cb79190611146565b5f604051808303815f865af19150503d805f8114610cf0576040519150601f19603f3d011682016040523d82523d5f602084013e610cf5565b606091505b5091509150818015610d1f575080511580610d1f575080806020019051810190610d1f919061112b565b8015610d3457505f856001600160a01b03163b115b925050505b92915050565b6060610d4c83835f610d53565b9392505050565b606081471015610d785760405163cd78605960e01b815230600482015260240161048b565b5f5f856001600160a01b03168486604051610d939190611146565b5f6040518083038185875af1925050503d805f8114610dcd576040519150601f19603f3d011682016040523d82523d5f602084013e610dd2565b606091505b5091509150610de2868383610dec565b9695505050505050565b606082610e0157610dfc82610e48565b610d4c565b8151158015610e1857506001600160a01b0384163b155b15610e4157604051639996b31560e01b81526001600160a01b038516600482015260240161048b565b5080610d4c565b805115610e585780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b80356001600160a01b0381168114610a56575f5ffd5b8015158114610abc575f5ffd5b5f5f5f5f5f60a08688031215610ea8575f5ffd5b85359450602086013563ffffffff81168114610ec2575f5ffd5b935060408601359250610ed760608701610e71565b91506080860135610ee781610e87565b809150509295509295909350565b5f60208284031215610f05575f5ffd5b5035919050565b5f60208284031215610f1c575f5ffd5b610d4c82610e71565b634e487b7160e01b5f52601160045260245ffd5b80820180821115610d3957610d39610f25565b5f60208284031215610f5c575f5ffd5b5051919050565b5f60208284031215610f73575f5ffd5b815167ffffffffffffffff81168114610d4c575f5ffd5b81810381811115610d3957610d39610f25565b805169ffffffffffffffffffff81168114610a56575f5ffd5b5f5f5f5f5f60a08688031215610fca575f5ffd5b610fd386610f9d565b60208701516040880151606089015192975090955093509150610ff860808701610f9d565b90509295509295909350565b6001815b600184111561103f5780850481111561102357611023610f25565b600184161561103157908102905b60019390931c928002611008565b935093915050565b5f8261105557506001610d39565b8161106157505f610d39565b816001811461107757600281146110815761109d565b6001915050610d39565b60ff84111561109257611092610f25565b50506001821b610d39565b5060208310610133831016604e8410600b84101617156110c0575081810a610d39565b6110cc5f198484611004565b805f19048211156110df576110df610f25565b029392505050565b5f610d4c60ff841683611047565b8082028115828204841417610d3957610d39610f25565b5f8261112657634e487b7160e01b5f52601260045260245ffd5b500490565b5f6020828403121561113b575f5ffd5b8151610d4c81610e87565b5f82518060208501845e5f92019182525091905056fea264697066735822122009d6bddef88dbdb053f876b31efb0f0606fc3f75039d15ba0f37fa6221e2e87c64736f6c634300081c003300000000000000000000000019330d10d9cc8751218eaf51e8885d058642e08a000000000000000000000000e7ed1fa7f45d05c508232aa32649d89b73b8ba48000000000000000000000000af88d065e77c8cc2239327c5edb3a432268e5831000000000000000000000000639fe6ab55c921f74e7fac1ee960c0b6293ba6120000000000000000000000000000000000000000000000000000002e90edd000000000000000000000000000000000000000000000000000000000000098968000000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000001c6bf52634000

Deployed Bytecode

0x608060405260043610610131575f3560e01c8063a001ecdd116100a8578063c4f5183b1161006d578063c4f5183b14610343578063c7821bc914610376578063cfb3647b14610395578063d9f126f1146103c8578063e3329e32146103e7578063f2fde38b1461041a575f5ffd5b8063a001ecdd146102bf578063a0855f2d146102d4578063ae06c1b7146102e9578063b6d7287014610308578063c1419def1461031d575f5ffd5b8063715018a6116100f9578063715018a614610209578063741bef1a1461021d5780638da5cb5b1461025057806391792d5b1461026c5780639564cb3b146102815780639ec751e9146102a0575f5ffd5b8063287304061461013557806337de8106146101665780633e413bee14610187578063476343ee146101d25780636e8611c6146101e6575b5f5ffd5b610148610143366004610e94565b610439565b60405167ffffffffffffffff90911681526020015b60405180910390f35b348015610171575f5ffd5b50610185610180366004610ef5565b610860565b005b348015610192575f5ffd5b506101ba7f000000000000000000000000af88d065e77c8cc2239327c5edb3a432268e583181565b6040516001600160a01b03909116815260200161015d565b3480156101dd575f5ffd5b5061018561086d565b3480156101f1575f5ffd5b506101fb60015481565b60405190815260200161015d565b348015610214575f5ffd5b50610185610939565b348015610228575f5ffd5b506101ba7f000000000000000000000000639fe6ab55c921f74e7fac1ee960c0b6293ba61281565b34801561025b575f5ffd5b505f546001600160a01b03166101ba565b348015610277575f5ffd5b506101fb60025481565b34801561028c575f5ffd5b506101fb61029b366004610ef5565b61094c565b3480156102ab575f5ffd5b506101fb6102ba366004610ef5565b610a2b565b3480156102ca575f5ffd5b506101fb60035481565b3480156102df575f5ffd5b506101fb61271081565b3480156102f4575f5ffd5b50610185610303366004610ef5565b610a5b565b348015610313575f5ffd5b506101fb60045481565b348015610328575f5ffd5b50610331600681565b60405160ff909116815260200161015d565b34801561034e575f5ffd5b506103317f000000000000000000000000000000000000000000000000000000000000001481565b348015610381575f5ffd5b50610185610390366004610ef5565b610a68565b3480156103a0575f5ffd5b506101ba7f000000000000000000000000e7ed1fa7f45d05c508232aa32649d89b73b8ba4881565b3480156103d3575f5ffd5b506101856103e2366004610ef5565b610a75565b3480156103f2575f5ffd5b506101ba7f00000000000000000000000019330d10d9cc8751218eaf51e8885d058642e08a81565b348015610425575f5ffd5b50610185610434366004610f0c565b610a82565b5f5f6104448761094c565b90505f83610452575f610456565b6004545b90505f6104638284610f39565b9050803410156104945760405163a458261b60e01b8152600481018290523460248201526044015b60405180910390fd5b6104c96001600160a01b037f000000000000000000000000af88d065e77c8cc2239327c5edb3a432268e58311633308c610abf565b61051d6001600160a01b037f000000000000000000000000af88d065e77c8cc2239327c5edb3a432268e5831167f00000000000000000000000019330d10d9cc8751218eaf51e8885d058642e08a8b610b2c565b6040516352b7631960e11b81526001600160a01b0387811660048301525f917f000000000000000000000000e7ed1fa7f45d05c508232aa32649d89b73b8ba489091169063a56ec63290602401602060405180830381865afa158015610585573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105a99190610f4c565b90505f5b818b11156106c1576040516337e9a82760e11b81526004810183905263ffffffff8b166024820152604481018a90526001600160a01b0389811660648301527f00000000000000000000000019330d10d9cc8751218eaf51e8885d058642e08a1690636fd3504e906084016020604051808303815f875af1158015610634573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106589190610f63565b604080518481525f6020820181905281830152606081018c9052905191925067ffffffffffffffff83169133917f44ab89ad836f45fdcf3c8d9333a3f3db103af3aca6669f8dc6a65f32f50460bb919081900360800190a36106ba828c610f8a565b9a506105ad565b6040516337e9a82760e11b8152600481018c905263ffffffff8b166024820152604481018a90526001600160a01b0389811660648301527f00000000000000000000000019330d10d9cc8751218eaf51e8885d058642e08a1690636fd3504e906084016020604051808303815f875af1158015610740573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107649190610f63565b604080518d815260208101889052908101869052606081018b905290915067ffffffffffffffff82169033907f44ab89ad836f45fdcf3c8d9333a3f3db103af3aca6669f8dc6a65f32f50460bb9060800160405180910390a382341115610852575f336107d18534610f8a565b6040515f81818185875af1925050503d805f811461080a576040519150601f19603f3d011682016040523d82523d5f602084013e61080f565b606091505b50509050806108505760405162461bcd60e51b815260206004820152600d60248201526c1c99599d5b990819985a5b1959609a1b604482015260640161048b565b505b9a9950505050505050505050565b610868610bbb565b600255565b610875610bbb565b60405147905f90339083908381818185875af1925050503d805f81146108b6576040519150601f19603f3d011682016040523d82523d5f602084013e6108bb565b606091505b50509050806109005760405162461bcd60e51b81526020600482015260116024820152701dda5d1a191c985dd85b0819985a5b1959607a1b604482015260640161048b565b60405182815233907fc0819c13be868895eb93e40eaceb96de976442fa1d404e5c55f14bb65a8c489a9060200160405180910390a25050565b610941610bbb565b61094a5f610be7565b565b5f5f61095783610a2b565b90505f7f000000000000000000000000639fe6ab55c921f74e7fac1ee960c0b6293ba6126001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa1580156109b6573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109da9190610fb6565b50505091505080827f0000000000000000000000000000000000000000000000000000000000000014600a610a0f91906110e7565b610a1991906110f5565b610a23919061110c565b949350505050565b600254600154821015610a565761271060035483610a4991906110f5565b610a53919061110c565b90505b919050565b610a63610bbb565b600355565b610a70610bbb565b600155565b610a7d610bbb565b600455565b610a8a610bbb565b6001600160a01b038116610ab357604051631e4fbdf760e01b81525f600482015260240161048b565b610abc81610be7565b50565b6040516001600160a01b038481166024830152838116604483015260648201839052610b269186918216906323b872dd906084015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050610c36565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b179052610b7d8482610c9c565b610b26576040516001600160a01b0384811660248301525f6044830152610bb191869182169063095ea7b390606401610af4565b610b268482610c36565b5f546001600160a01b0316331461094a5760405163118cdaa760e01b815233600482015260240161048b565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f610c4a6001600160a01b03841683610d3f565b905080515f14158015610c6e575080806020019051810190610c6c919061112b565b155b15610c9757604051635274afe760e01b81526001600160a01b038416600482015260240161048b565b505050565b5f5f5f846001600160a01b031684604051610cb79190611146565b5f604051808303815f865af19150503d805f8114610cf0576040519150601f19603f3d011682016040523d82523d5f602084013e610cf5565b606091505b5091509150818015610d1f575080511580610d1f575080806020019051810190610d1f919061112b565b8015610d3457505f856001600160a01b03163b115b925050505b92915050565b6060610d4c83835f610d53565b9392505050565b606081471015610d785760405163cd78605960e01b815230600482015260240161048b565b5f5f856001600160a01b03168486604051610d939190611146565b5f6040518083038185875af1925050503d805f8114610dcd576040519150601f19603f3d011682016040523d82523d5f602084013e610dd2565b606091505b5091509150610de2868383610dec565b9695505050505050565b606082610e0157610dfc82610e48565b610d4c565b8151158015610e1857506001600160a01b0384163b155b15610e4157604051639996b31560e01b81526001600160a01b038516600482015260240161048b565b5080610d4c565b805115610e585780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b80356001600160a01b0381168114610a56575f5ffd5b8015158114610abc575f5ffd5b5f5f5f5f5f60a08688031215610ea8575f5ffd5b85359450602086013563ffffffff81168114610ec2575f5ffd5b935060408601359250610ed760608701610e71565b91506080860135610ee781610e87565b809150509295509295909350565b5f60208284031215610f05575f5ffd5b5035919050565b5f60208284031215610f1c575f5ffd5b610d4c82610e71565b634e487b7160e01b5f52601160045260245ffd5b80820180821115610d3957610d39610f25565b5f60208284031215610f5c575f5ffd5b5051919050565b5f60208284031215610f73575f5ffd5b815167ffffffffffffffff81168114610d4c575f5ffd5b81810381811115610d3957610d39610f25565b805169ffffffffffffffffffff81168114610a56575f5ffd5b5f5f5f5f5f60a08688031215610fca575f5ffd5b610fd386610f9d565b60208701516040880151606089015192975090955093509150610ff860808701610f9d565b90509295509295909350565b6001815b600184111561103f5780850481111561102357611023610f25565b600184161561103157908102905b60019390931c928002611008565b935093915050565b5f8261105557506001610d39565b8161106157505f610d39565b816001811461107757600281146110815761109d565b6001915050610d39565b60ff84111561109257611092610f25565b50506001821b610d39565b5060208310610133831016604e8410600b84101617156110c0575081810a610d39565b6110cc5f198484611004565b805f19048211156110df576110df610f25565b029392505050565b5f610d4c60ff841683611047565b8082028115828204841417610d3957610d39610f25565b5f8261112657634e487b7160e01b5f52601260045260245ffd5b500490565b5f6020828403121561113b575f5ffd5b8151610d4c81610e87565b5f82518060208501845e5f92019182525091905056fea264697066735822122009d6bddef88dbdb053f876b31efb0f0606fc3f75039d15ba0f37fa6221e2e87c64736f6c634300081c0033

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

00000000000000000000000019330d10d9cc8751218eaf51e8885d058642e08a000000000000000000000000e7ed1fa7f45d05c508232aa32649d89b73b8ba48000000000000000000000000af88d065e77c8cc2239327c5edb3a432268e5831000000000000000000000000639fe6ab55c921f74e7fac1ee960c0b6293ba6120000000000000000000000000000000000000000000000000000002e90edd000000000000000000000000000000000000000000000000000000000000098968000000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000001c6bf52634000

-----Decoded View---------------
Arg [0] : _cctp (address): 0x19330d10D9Cc8751218eaf51E8885D058642E08A
Arg [1] : _tokenMinter (address): 0xE7Ed1fa7f45D05C508232aa32649D89b73b8bA48
Arg [2] : _usdc (address): 0xaf88d065e77c8cC2239327C5EDb3A432268e5831
Arg [3] : _priceFeed (address): 0x639Fe6ab55C921f74e7fac1ee960C0B6293ba612
Arg [4] : _fixedFeeThreshold (uint256): 200000000000
Arg [5] : _fixedFee (uint256): 10000000
Arg [6] : _feePercentage (uint256): 5
Arg [7] : _gasOnDestinationFee (uint256): 500000000000000

-----Encoded View---------------
8 Constructor Arguments found :
Arg [0] : 00000000000000000000000019330d10d9cc8751218eaf51e8885d058642e08a
Arg [1] : 000000000000000000000000e7ed1fa7f45d05c508232aa32649d89b73b8ba48
Arg [2] : 000000000000000000000000af88d065e77c8cc2239327c5edb3a432268e5831
Arg [3] : 000000000000000000000000639fe6ab55c921f74e7fac1ee960c0b6293ba612
Arg [4] : 0000000000000000000000000000000000000000000000000000002e90edd000
Arg [5] : 0000000000000000000000000000000000000000000000000000000000989680
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [7] : 0000000000000000000000000000000000000000000000000001c6bf52634000


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
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.