ETH Price: $2,948.79 (-0.54%)

Contract

0x9FE48EBA298A2F9f39Ce62698663E8Eef1B42F5d

Overview

ETH Balance

0.0085 ETH

ETH Value

$25.06 (@ $2,948.79/ETH)

Token Holdings

More Info

Private Name Tags

Transaction Hash
Block
From
To
Deposit For Burn4232643532026-01-20 7:06:364 days ago1768892796IN
Yei Finance: CCTP Bridge
0 ETH0.000003790.02
Deposit For Burn4188077662026-01-07 9:37:2517 days ago1767778645IN
Yei Finance: CCTP Bridge
0 ETH0.000001910.01
Deposit For Burn4183711292026-01-06 3:20:4918 days ago1767669649IN
Yei Finance: CCTP Bridge
0 ETH0.000001910.01
Deposit For Burn4166432572026-01-01 3:25:1923 days ago1767237919IN
Yei Finance: CCTP Bridge
0 ETH0.000001910.01
Deposit For Burn4129827372025-12-21 13:27:0734 days ago1766323627IN
Yei Finance: CCTP Bridge
0 ETH0.000001910.01
Deposit For Burn4095552162025-12-11 15:42:0944 days ago1765467729IN
Yei Finance: CCTP Bridge
0 ETH0.000005450.02875
Deposit For Burn4065289172025-12-02 22:03:0752 days ago1764712987IN
Yei Finance: CCTP Bridge
0 ETH0.000001920.01
Deposit For Burn4061027622025-12-01 16:33:0153 days ago1764606781IN
Yei Finance: CCTP Bridge
0 ETH0.000010960.057004
Deposit For Burn4055551762025-11-30 2:37:2155 days ago1764470241IN
Yei Finance: CCTP Bridge
0 ETH0.000001910.01
Deposit For Burn4051480612025-11-28 22:20:5256 days ago1764368452IN
Yei Finance: CCTP Bridge
0 ETH0.000001910.01
Deposit For Burn4049660382025-11-28 9:43:1957 days ago1764322999IN
Yei Finance: CCTP Bridge
0 ETH0.000001970.010307
Deposit For Burn4047450292025-11-27 18:22:5457 days ago1764267774IN
Yei Finance: CCTP Bridge
0 ETH0.000001920.01
Deposit For Burn4039091562025-11-25 8:26:3160 days ago1764059191IN
Yei Finance: CCTP Bridge
0 ETH0.00000190.01
Deposit For Burn4029024922025-11-22 10:24:1063 days ago1763807050IN
Yei Finance: CCTP Bridge
0 ETH0.000001920.01
Deposit For Burn4025106452025-11-21 7:12:5464 days ago1763709174IN
Yei Finance: CCTP Bridge
0 ETH0.000001920.01
Deposit For Burn4024754542025-11-21 4:46:2664 days ago1763700386IN
Yei Finance: CCTP Bridge
0 ETH0.000002980.015646
Deposit For Burn4023348822025-11-20 19:00:5364 days ago1763665253IN
Yei Finance: CCTP Bridge
0 ETH0.000020160.105104
Deposit For Burn4022102052025-11-20 10:22:2965 days ago1763634149IN
Yei Finance: CCTP Bridge
0 ETH0.00000190.01
Deposit For Burn4016231712025-11-18 17:37:2566 days ago1763487445IN
Yei Finance: CCTP Bridge
0 ETH0.000001930.01
Deposit For Burn4014915052025-11-18 8:28:5467 days ago1763454534IN
Yei Finance: CCTP Bridge
0 ETH0.000001890.01
Deposit For Burn4014369462025-11-18 4:41:5667 days ago1763440916IN
Yei Finance: CCTP Bridge
0 ETH0.000002170.010931
Deposit For Burn4010694902025-11-17 3:12:1068 days ago1763349130IN
Yei Finance: CCTP Bridge
0 ETH0.000001920.01
Deposit For Burn4005993672025-11-15 18:29:3769 days ago1763231377IN
Yei Finance: CCTP Bridge
0 ETH0.000001920.01
Deposit For Burn4004208582025-11-15 6:05:4970 days ago1763186749IN
Yei Finance: CCTP Bridge
0 ETH0.000001920.01
Deposit For Burn3999218452025-11-13 19:28:2371 days ago1763062103IN
Yei Finance: CCTP Bridge
0 ETH0.000008870.045106
View all transactions

Latest 18 internal transactions

Parent Transaction Hash Block From To
3950580282025-10-30 18:09:3285 days ago1761847772
Yei Finance: CCTP Bridge
0.000005 ETH
3950525142025-10-30 17:46:3485 days ago1761846394
Yei Finance: CCTP Bridge
0.000005 ETH
3912343552025-10-19 16:51:2196 days ago1760892681
Yei Finance: CCTP Bridge
0.000005 ETH
3896930462025-10-15 5:54:50101 days ago1760507690
Yei Finance: CCTP Bridge
0.000005 ETH
3859790502025-10-04 12:28:51112 days ago1759580931
Yei Finance: CCTP Bridge
0.000005 ETH
3793797162025-09-15 10:44:00131 days ago1757933040
Yei Finance: CCTP Bridge
0.000005 ETH
3697614132025-08-18 15:26:01159 days ago1755530761
Yei Finance: CCTP Bridge
0.000005 ETH
3694109362025-08-17 15:07:36160 days ago1755443256
Yei Finance: CCTP Bridge
0.000005 ETH
3681662382025-08-14 0:47:49163 days ago1755132469
Yei Finance: CCTP Bridge
0.000005 ETH
3664160902025-08-08 23:28:13168 days ago1754695693
Yei Finance: CCTP Bridge
0.000005 ETH
3661681862025-08-08 6:17:23169 days ago1754633843
Yei Finance: CCTP Bridge
0.000005 ETH
3659884962025-08-07 17:50:05169 days ago1754589005
Yei Finance: CCTP Bridge
0.000005 ETH
3656362752025-08-06 17:23:51170 days ago1754501031
Yei Finance: CCTP Bridge
0.000005 ETH
3652524052025-08-05 14:40:20172 days ago1754404820
Yei Finance: CCTP Bridge
0.000005 ETH
3651216192025-08-05 5:34:15172 days ago1754372055
Yei Finance: CCTP Bridge
0.000005 ETH
3648887942025-08-04 13:23:41173 days ago1754313821
Yei Finance: CCTP Bridge
0.000005 ETH
3648372872025-08-04 9:49:17173 days ago1754300957
Yei Finance: CCTP Bridge
0.000005 ETH
3613537472025-07-25 8:10:05183 days ago1753431005  Contract Creation0 ETH

Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
YeiCctpV2Agent

Compiler Version
v0.8.28+commit.7893614a

Optimization Enabled:
Yes with 200 runs

Other Settings:
cancun EvmVersion
// SPDX-License-Identifier: MIT
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 {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";
import {Pausable} from "@openzeppelin/contracts/utils/Pausable.sol";

import {AggregatorV3Interface} from "../interfaces/AggregatorV3Interface.sol";
import {IYeiCctpV2Agent} from "../interfaces/v2/IYeiCctpV2Agent.sol";
import {ITokenMessengerV2} from "../interfaces/v2/ITokenMessengerV2.sol";
import {ITokenMinter} from "../interfaces/ITokenMinter.sol";

contract YeiCctpV2Agent is IYeiCctpV2Agent, AccessControl, Pausable {
    using SafeERC20 for IERC20;

    bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE");
    uint256 public constant FEE_PERCENTAGE_BASIS = 1e4;
    uint8 public constant USDC_DECIMALS = 6;

    ITokenMessengerV2 public tokenMessenger;
    ITokenMinter public tokenMinter;
    IERC20 public usdc;
    AggregatorV3Interface public priceFeed;
    uint8 public decimalScale;

    uint256 public fixedFeeThreshold;
    uint256 public fixedFee;
    uint256 public feePercentage;
    uint256 public gasOnDestinationFee;
    bytes32 public destinationCaller;
    uint32 public finalityThreshold;
    uint256 public oracleStalenessThreshold;
    bool private initialized;

    // Empty hook data for intermediate burns (no gas on destination)
    bytes private constant EMPTY_HOOK_DATA = abi.encode(false);

    constructor(address admin) {
        _grantRole(DEFAULT_ADMIN_ROLE, admin);
        _grantRole(ADMIN_ROLE, admin);
        _pause();
    }

    function init(
        address _tokenMessenger,
        address _tokenMinter,
        address _usdc,
        address _priceFeed,
        uint256 _fixedFeeThreshold,
        uint256 _fixedFee,
        uint256 _feePercentage,
        uint256 _gasOnDestinationFee,
        address _destinationCaller,
        uint32 _finalityThreshold,
        uint256 _oracleStalenessThreshold
    ) external onlyRole(ADMIN_ROLE) {
        require(!initialized, "Already initialized");

        tokenMessenger = ITokenMessengerV2(_tokenMessenger);
        tokenMinter = ITokenMinter(_tokenMinter);
        usdc = IERC20(_usdc);
        priceFeed = AggregatorV3Interface(_priceFeed);
        decimalScale = 18 - USDC_DECIMALS + priceFeed.decimals();
        fixedFeeThreshold = _fixedFeeThreshold;
        fixedFee = _fixedFee;
        feePercentage = _feePercentage;
        gasOnDestinationFee = _gasOnDestinationFee;
        destinationCaller = bytes32(uint256(uint160(_destinationCaller)));
        finalityThreshold = _finalityThreshold;
        oracleStalenessThreshold = _oracleStalenessThreshold;
        initialized = true;
        _unpause();
    }

    function depositForBurn(uint256 amount, uint32 destinationDomain, bytes32 mintRecipient, bool gasOnDestination)
        external
        payable
        whenNotPaused
    {
        _depositForBurn(
            amount,
            destinationDomain,
            mintRecipient,
            address(usdc),
            destinationCaller,
            finalityThreshold,
            abi.encode(gasOnDestination),
            gasOnDestination
        );
    }

    struct depositForBurnVars {
        uint256 fee;
        uint256 feeForGasOnDestination;
        uint256 totalFee;
        uint256 burnLimit;
    }

    function _depositForBurn(
        uint256 amount,
        uint32 destinationDomain,
        bytes32 mintRecipient,
        address burnToken,
        bytes32 _destinationCaller,
        uint32 _finalityThreshold,
        bytes memory hookData,
        bool gasOnDestination
    ) internal {
        depositForBurnVars memory vars;
        vars.fee = getFeeInNativeToken(amount);
        vars.feeForGasOnDestination = gasOnDestination ? gasOnDestinationFee : 0;
        vars.totalFee = vars.fee + vars.feeForGasOnDestination;
        if (msg.value < vars.totalFee) {
            revert InsufficientFee(vars.totalFee, msg.value);
        }

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

        vars.burnLimit = tokenMinter.burnLimitsPerMessage(burnToken);

        while (amount > vars.burnLimit) {
            tokenMessenger.depositForBurnWithHook(
                vars.burnLimit,
                destinationDomain,
                mintRecipient,
                burnToken,
                _destinationCaller,
                0,
                _finalityThreshold,
                EMPTY_HOOK_DATA
            );
            emit DepositForBurn(msg.sender, vars.burnLimit, 0, 0, mintRecipient);
            amount -= vars.burnLimit;
        }

        // Handle remaining amount
        tokenMessenger.depositForBurnWithHook(
            amount, destinationDomain, mintRecipient, burnToken, _destinationCaller, 0, _finalityThreshold, hookData
        );
        emit DepositForBurn(msg.sender, amount, vars.fee, vars.feeForGasOnDestination, mintRecipient);

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

    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,, uint256 updatedAt,) = priceFeed.latestRoundData();

        if (block.timestamp < updatedAt || block.timestamp - updatedAt > oracleStalenessThreshold) {
            revert StalePriceData(updatedAt, block.timestamp);
        }

        return 10 ** decimalScale * feeInUSDC / uint256(price);
    }

    function withdrawFees() external onlyRole(ADMIN_ROLE) {
        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 onlyRole(ADMIN_ROLE) {
        fixedFeeThreshold = _fixedFeeThreshold;
    }

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

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

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

    function setDestinationCaller(address _destinationCaller) external onlyRole(ADMIN_ROLE) {
        destinationCaller = bytes32(uint256(uint160(_destinationCaller)));
    }

    function setFinalityThreshold(uint32 _finalityThreshold) external onlyRole(ADMIN_ROLE) {
        finalityThreshold = _finalityThreshold;
    }

    function setOracleStalenessThreshold(uint256 _oracleStalenessThreshold) external onlyRole(ADMIN_ROLE) {
        oracleStalenessThreshold = _oracleStalenessThreshold;
    }

    function pause() external onlyRole(ADMIN_ROLE) {
        _pause();
    }

    function unpause() external onlyRole(ADMIN_ROLE) {
        _unpause();
    }
}

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

pragma solidity ^0.8.20;

import {IERC20} from "../IERC20.sol";
import {IERC1363} from "../../../interfaces/IERC1363.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC-20 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 {
    /**
     * @dev An operation with an ERC-20 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 Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.
     */
    function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {
        return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));
    }

    /**
     * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.
     */
    function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {
        return _callOptionalReturnBool(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.
     *
     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
     * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
     */
    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.
     *
     * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
     * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
     * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
     * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
     */
    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.
     *
     * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function
     * only sets the "standard" allowance. Any temporary allowance will remain active, in addition to the value being
     * set here.
     */
    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 Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no
     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * Reverts if the returned value is other than `true`.
     */
    function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
        if (to.code.length == 0) {
            safeTransfer(token, to, value);
        } else if (!token.transferAndCall(to, value, data)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target
     * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * Reverts if the returned value is other than `true`.
     */
    function transferFromAndCallRelaxed(
        IERC1363 token,
        address from,
        address to,
        uint256 value,
        bytes memory data
    ) internal {
        if (to.code.length == 0) {
            safeTransferFrom(token, from, to, value);
        } else if (!token.transferFromAndCall(from, to, value, data)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no
     * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
     * targeting contracts.
     *
     * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.
     * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}
     * once without retrying, and relies on the returned value to be true.
     *
     * Reverts if the returned value is other than `true`.
     */
    function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
        if (to.code.length == 0) {
            forceApprove(token, to, value);
        } else if (!token.approveAndCall(to, value, data)) {
            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 {_callOptionalReturnBool} that reverts if call fails to meet the requirements.
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        uint256 returnSize;
        uint256 returnValue;
        assembly ("memory-safe") {
            let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
            // bubble errors
            if iszero(success) {
                let ptr := mload(0x40)
                returndatacopy(ptr, 0, returndatasize())
                revert(ptr, returndatasize())
            }
            returnSize := returndatasize()
            returnValue := mload(0)
        }

        if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {
            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 silently catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        bool success;
        uint256 returnSize;
        uint256 returnValue;
        assembly ("memory-safe") {
            success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
            returnSize := returndatasize()
            returnValue := mload(0)
        }
        return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);
    }
}

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

pragma solidity >=0.4.16;

/**
 * @dev Interface of the ERC-20 standard as defined in the ERC.
 */
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.4.0) (access/AccessControl.sol)

pragma solidity ^0.8.20;

import {IAccessControl} from "./IAccessControl.sol";
import {Context} from "../utils/Context.sol";
import {IERC165, ERC165} from "../utils/introspection/ERC165.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```solidity
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```solidity
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}
 * to enforce additional security measures for this role.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address account => bool) hasRole;
        bytes32 adminRole;
    }

    mapping(bytes32 role => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with an {AccessControlUnauthorizedAccount} error including the required role.
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role);
        _;
    }

    /// @inheritdoc IERC165
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view virtual returns (bool) {
        return _roles[role].hasRole[account];
    }

    /**
     * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `_msgSender()`
     * is missing `role`. Overriding this function changes the behavior of the {onlyRole} modifier.
     */
    function _checkRole(bytes32 role) internal view virtual {
        _checkRole(role, _msgSender());
    }

    /**
     * @dev Reverts with an {AccessControlUnauthorizedAccount} error if `account`
     * is missing `role`.
     */
    function _checkRole(bytes32 role, address account) internal view virtual {
        if (!hasRole(role, account)) {
            revert AccessControlUnauthorizedAccount(account, role);
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view virtual returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleGranted} event.
     */
    function grantRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleRevoked} event.
     */
    function revokeRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been revoked `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `callerConfirmation`.
     *
     * May emit a {RoleRevoked} event.
     */
    function renounceRole(bytes32 role, address callerConfirmation) public virtual {
        if (callerConfirmation != _msgSender()) {
            revert AccessControlBadConfirmation();
        }

        _revokeRole(role, callerConfirmation);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    /**
     * @dev Attempts to grant `role` to `account` and returns a boolean indicating if `role` was granted.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleGranted} event.
     */
    function _grantRole(bytes32 role, address account) internal virtual returns (bool) {
        if (!hasRole(role, account)) {
            _roles[role].hasRole[account] = true;
            emit RoleGranted(role, account, _msgSender());
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Attempts to revoke `role` from `account` and returns a boolean indicating if `role` was revoked.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleRevoked} event.
     */
    function _revokeRole(bytes32 role, address account) internal virtual returns (bool) {
        if (hasRole(role, account)) {
            _roles[role].hasRole[account] = false;
            emit RoleRevoked(role, account, _msgSender());
            return true;
        } else {
            return false;
        }
    }
}

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

pragma solidity ^0.8.20;

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

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    bool private _paused;

    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    /**
     * @dev The operation failed because the contract is paused.
     */
    error EnforcedPause();

    /**
     * @dev The operation failed because the contract is not paused.
     */
    error ExpectedPause();

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        _requireNotPaused();
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        _requirePaused();
        _;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        if (paused()) {
            revert EnforcedPause();
        }
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        if (!paused()) {
            revert ExpectedPause();
        }
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

// 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: MIT
pragma solidity ^0.8.20;

interface IYeiCctpV2Agent {
    error InsufficientFee(uint256 required, uint256 got);
    error ExceededBurnLimit(uint256 limit, uint256 got);
    error StalePriceData(uint256 updatedAt, uint256 currentTime);

    event DepositForBurn(
        address indexed from, uint256 amount, uint256 fee, uint256 feeForGasOnDestination, bytes32 mintRecipient
    );
    event FeesWithdrawn(address indexed owner, uint256 balance);

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

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

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

    function setOracleStalenessThreshold(uint256 _oracleStalenessThreshold) external;

    function init(
        address _tokenMessenger,
        address _tokenMinter,
        address _usdc,
        address _priceFeed,
        uint256 _fixedFeeThreshold,
        uint256 _fixedFee,
        uint256 _feePercentage,
        uint256 _gasOnDestinationFee,
        address _destinationCaller,
        uint32 _finalityThreshold,
        uint256 _oracleStalenessThreshold
    ) external;

    function pause() external;

    function unpause() external;
}

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

interface ITokenMessengerV2 {
    function depositForBurn(
        uint256 amount,
        uint32 destinationDomain,
        bytes32 mintRecipient,
        address burnToken,
        bytes32 destinationCaller,
        uint256 maxFee,
        uint32 minFinalityThreshold
    ) external;

    function depositForBurnWithHook(
        uint256 amount,
        uint32 destinationDomain,
        bytes32 mintRecipient,
        address burnToken,
        bytes32 destinationCaller,
        uint256 maxFee,
        uint32 minFinalityThreshold,
        bytes calldata hookData
    ) external;
}

// 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.4.0) (interfaces/IERC1363.sol)

pragma solidity >=0.6.2;

import {IERC20} from "./IERC20.sol";
import {IERC165} from "./IERC165.sol";

/**
 * @title IERC1363
 * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].
 *
 * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract
 * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.
 */
interface IERC1363 is IERC20, IERC165 {
    /*
     * Note: the ERC-165 identifier for this interface is 0xb0202a11.
     * 0xb0202a11 ===
     *   bytes4(keccak256('transferAndCall(address,uint256)')) ^
     *   bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^
     *   bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^
     *   bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^
     *   bytes4(keccak256('approveAndCall(address,uint256)')) ^
     *   bytes4(keccak256('approveAndCall(address,uint256,bytes)'))
     */

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferAndCall(address to, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from the caller's account to `to`
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @param data Additional data with no specified format, sent in call to `to`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param from The address which you want to send tokens from.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferFromAndCall(address from, address to, uint256 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
     * and then calls {IERC1363Receiver-onTransferReceived} on `to`.
     * @param from The address which you want to send tokens from.
     * @param to The address which you want to transfer to.
     * @param value The amount of tokens to be transferred.
     * @param data Additional data with no specified format, sent in call to `to`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
     * @param spender The address which will spend the funds.
     * @param value The amount of tokens to be spent.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function approveAndCall(address spender, uint256 value) external returns (bool);

    /**
     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the
     * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
     * @param spender The address which will spend the funds.
     * @param value The amount of tokens to be spent.
     * @param data Additional data with no specified format, sent in call to `spender`.
     * @return A boolean value indicating whether the operation succeeded unless throwing.
     */
    function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);
}

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

pragma solidity >=0.8.4;

/**
 * @dev External interface of AccessControl declared to support ERC-165 detection.
 */
interface IAccessControl {
    /**
     * @dev The `account` is missing a role.
     */
    error AccessControlUnauthorizedAccount(address account, bytes32 neededRole);

    /**
     * @dev The caller of a function is not the expected one.
     *
     * NOTE: Don't confuse with {AccessControlUnauthorizedAccount}.
     */
    error AccessControlBadConfirmation();

    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted to signal this.
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call. This account bears the admin role (for the granted role).
     * Expected in cases where the role was granted using the internal {AccessControl-_grantRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `callerConfirmation`.
     */
    function renounceRole(bytes32 role, address callerConfirmation) external;
}

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/ERC165.sol)

pragma solidity ^0.8.20;

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

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC-165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 */
abstract contract ERC165 is IERC165 {
    /// @inheritdoc IERC165
    function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

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

pragma solidity >=0.4.16;

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

File 15 of 16 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)

pragma solidity >=0.4.16;

import {IERC165} from "../utils/introspection/IERC165.sol";

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)

pragma solidity >=0.4.16;

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

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AccessControlBadConfirmation","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}],"name":"AccessControlUnauthorizedAccount","type":"error"},{"inputs":[],"name":"EnforcedPause","type":"error"},{"inputs":[{"internalType":"uint256","name":"limit","type":"uint256"},{"internalType":"uint256","name":"got","type":"uint256"}],"name":"ExceededBurnLimit","type":"error"},{"inputs":[],"name":"ExpectedPause","type":"error"},{"inputs":[{"internalType":"uint256","name":"required","type":"uint256"},{"internalType":"uint256","name":"got","type":"uint256"}],"name":"InsufficientFee","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"inputs":[{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint256","name":"currentTime","type":"uint256"}],"name":"StalePriceData","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"feeForGasOnDestination","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"mintRecipient","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":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"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":"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":"bool","name":"gasOnDestination","type":"bool"}],"name":"depositForBurn","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"destinationCaller","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feePercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"finalityThreshold","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"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":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenMessenger","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"},{"internalType":"address","name":"_destinationCaller","type":"address"},{"internalType":"uint32","name":"_finalityThreshold","type":"uint32"},{"internalType":"uint256","name":"_oracleStalenessThreshold","type":"uint256"}],"name":"init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"oracleStalenessThreshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"priceFeed","outputs":[{"internalType":"contract AggregatorV3Interface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_destinationCaller","type":"address"}],"name":"setDestinationCaller","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_feePercentage","type":"uint256"}],"name":"setFeePercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"_finalityThreshold","type":"uint32"}],"name":"setFinalityThreshold","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":[{"internalType":"uint256","name":"_oracleStalenessThreshold","type":"uint256"}],"name":"setOracleStalenessThreshold","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenMessenger","outputs":[{"internalType":"contract ITokenMessengerV2","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenMinter","outputs":[{"internalType":"contract ITokenMinter","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","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"}]

608060405234801561000f575f5ffd5b50604051611a4f380380611a4f83398101604081905261002e9161018a565b6100385f82610072565b506100637fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177582610072565b5061006c61011b565b506101b7565b5f828152602081815260408083206001600160a01b038516845290915281205460ff16610112575f838152602081815260408083206001600160a01b03861684529091529020805460ff191660011790556100ca3390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a4506001610115565b505f5b92915050565b610123610164565b6001805460ff1916811790556040805133815290517f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2589181900360200190a1565b60015460ff16156101885760405163d93c066560e01b815260040160405180910390fd5b565b5f6020828403121561019a575f5ffd5b81516001600160a01b03811681146101b0575f5ffd5b9392505050565b61188b806101c45f395ff3fe608060405260043610610212575f3560e01c8063952b34dd1161011e578063b6d72870116100a8578063cfb3647b1161006d578063cfb3647b146105db578063d547741f146105fa578063d596087314610619578063d9f126f114610638578063f70dbb8b14610657575f5ffd5b8063b6d7287014610542578063c1419def14610557578063c41c82e21461057d578063c4f5183b1461059c578063c7821bc9146105bc575f5ffd5b8063a0855f2d116100ee578063a0855f2d146104d3578063a217fddf146104e8578063ae06c1b7146104fb578063b04b4f981461051a578063b53251bc1461052f575f5ffd5b8063952b34dd1461044f5780639564cb3b146104805780639ec751e91461049f578063a001ecdd146104be575f5ffd5b8063476343ee1161019f57806375b238fc1161016f57806375b238fc146103c85780637e458fc3146103e85780638456cb591461040757806391792d5b1461041b57806391d1485414610430575f5ffd5b8063476343ee146103695780635c975abb1461037d5780636e8611c614610394578063741bef1a146103a9575f5ffd5b806336568abe116101e557806336568abe146102bc57806337de8106146102db5780633e413bee146102fa5780633f4ba83a146103315780634611783014610345575f5ffd5b806301ffc9a7146102165780631f45d0e41461024a578063248a9ca31461026d5780632f2ff15d1461029b575b5f5ffd5b348015610221575f5ffd5b50610235610230366004611400565b610676565b60405190151581526020015b60405180910390f35b348015610255575f5ffd5b5061025f600b5481565b604051908152602001610241565b348015610278575f5ffd5b5061025f61028736600461142e565b5f9081526020819052604090206001015490565b3480156102a6575f5ffd5b506102ba6102b536600461145b565b6106ac565b005b3480156102c7575f5ffd5b506102ba6102d636600461145b565b6106d6565b3480156102e6575f5ffd5b506102ba6102f536600461142e565b61070e565b348015610305575f5ffd5b50600354610319906001600160a01b031681565b6040516001600160a01b039091168152602001610241565b34801561033c575f5ffd5b506102ba61072b565b348015610350575f5ffd5b506001546103199061010090046001600160a01b031681565b348015610374575f5ffd5b506102ba61074d565b348015610388575f5ffd5b5060015460ff16610235565b34801561039f575f5ffd5b5061025f60055481565b3480156103b4575f5ffd5b50600454610319906001600160a01b031681565b3480156103d3575f5ffd5b5061025f5f51602061186b5f395f51905f5281565b3480156103f3575f5ffd5b506102ba610402366004611485565b61082e565b348015610412575f5ffd5b506102ba610854565b348015610426575f5ffd5b5061025f60065481565b34801561043b575f5ffd5b5061023561044a36600461145b565b610873565b34801561045a575f5ffd5b50600a5461046b9063ffffffff1681565b60405163ffffffff9091168152602001610241565b34801561048b575f5ffd5b5061025f61049a36600461142e565b61089b565b3480156104aa575f5ffd5b5061025f6104b936600461142e565b61099d565b3480156104c9575f5ffd5b5061025f60075481565b3480156104de575f5ffd5b5061025f61271081565b3480156104f3575f5ffd5b5061025f5f81565b348015610506575f5ffd5b506102ba61051536600461142e565b6109ca565b348015610525575f5ffd5b5061025f60095481565b6102ba61053d3660046114b1565b6109e7565b34801561054d575f5ffd5b5061025f60085481565b348015610562575f5ffd5b5061056b600681565b60405160ff9091168152602001610241565b348015610588575f5ffd5b506102ba6105973660046114fa565b610a3b565b3480156105a7575f5ffd5b5060045461056b90600160a01b900460ff1681565b3480156105c7575f5ffd5b506102ba6105d636600461142e565b610be3565b3480156105e6575f5ffd5b50600254610319906001600160a01b031681565b348015610605575f5ffd5b506102ba61061436600461145b565b610c00565b348015610624575f5ffd5b506102ba6106333660046115a1565b610c24565b348015610643575f5ffd5b506102ba61065236600461142e565b610c58565b348015610662575f5ffd5b506102ba61067136600461142e565b610c75565b5f6001600160e01b03198216637965db0b60e01b14806106a657506301ffc9a760e01b6001600160e01b03198316145b92915050565b5f828152602081905260409020600101546106c681610c92565b6106d08383610c9c565b50505050565b6001600160a01b03811633146106ff5760405163334bd91960e11b815260040160405180910390fd5b6107098282610d2b565b505050565b5f51602061186b5f395f51905f5261072581610c92565b50600655565b5f51602061186b5f395f51905f5261074281610c92565b61074a610d94565b50565b5f51602061186b5f395f51905f5261076481610c92565b60405147905f90339083908381818185875af1925050503d805f81146107a5576040519150601f19603f3d011682016040523d82523d5f602084013e6107aa565b606091505b50509050806107f45760405162461bcd60e51b81526020600482015260116024820152701dda5d1a191c985dd85b0819985a5b1959607a1b60448201526064015b60405180910390fd5b60405182815233907fc0819c13be868895eb93e40eaceb96de976442fa1d404e5c55f14bb65a8c489a9060200160405180910390a2505050565b5f51602061186b5f395f51905f5261084581610c92565b506001600160a01b0316600955565b5f51602061186b5f395f51905f5261086b81610c92565b61074a610de6565b5f918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b5f5f6108a68361099d565b90505f5f60045f9054906101000a90046001600160a01b03166001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa1580156108fa573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061091e91906115d3565b509350509250508042108061093d5750600b5461093b8242611635565b115b15610964576040516316d7d15960e01b8152600481018290524260248201526044016107eb565b6004548290849061098090600160a01b900460ff16600a61172b565b61098a9190611739565b6109949190611750565b95945050505050565b6006546005548210156109c557612710600754836109bb9190611739565b6106a69190611750565b919050565b5f51602061186b5f395f51905f526109e181610c92565b50600755565b6109ef610e21565b600354600954600a546040805185151560208201526106d0948994899489946001600160a01b0390931693919263ffffffff909116910160405160208183030381529060405288610e47565b5f51602061186b5f395f51905f52610a5281610c92565b600c5460ff1615610a9b5760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b60448201526064016107eb565b600180546001600160a01b03808f1661010002610100600160a81b031990921691909117909155600280548d83166001600160a01b031991821617909155600380548d841690831617905560048054928c1692909116821781556040805163313ce56760e01b8152905163313ce567928281019260209291908290030181865afa158015610b2b573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b4f919061176f565b610b5b6006601261178f565b610b6591906117a8565b6004805460ff60a01b1916600160a01b60ff939093169290920291909117905560058890556006879055600786905560088590556001600160a01b038416600955600a805463ffffffff191663ffffffff8516179055600b829055600c805460ff19166001179055610bd5610d94565b505050505050505050505050565b5f51602061186b5f395f51905f52610bfa81610c92565b50600555565b5f82815260208190526040902060010154610c1a81610c92565b6106d08383610d2b565b5f51602061186b5f395f51905f52610c3b81610c92565b50600a805463ffffffff191663ffffffff92909216919091179055565b5f51602061186b5f395f51905f52610c6f81610c92565b50600855565b5f51602061186b5f395f51905f52610c8c81610c92565b50600b55565b61074a81336111f9565b5f610ca78383610873565b610d24575f838152602081815260408083206001600160a01b03861684529091529020805460ff19166001179055610cdc3390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45060016106a6565b505f6106a6565b5f610d368383610873565b15610d24575f838152602081815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45060016106a6565b610d9c611236565b6001805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b610dee610e21565b6001805460ff1916811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25833610dc9565b60015460ff1615610e455760405163d93c066560e01b815260040160405180910390fd5b565b610e6e60405180608001604052805f81526020015f81526020015f81526020015f81525090565b610e778961089b565b815281610e84575f610e88565b6008545b602082018190528151610e9b91906117c1565b60408201819052341015610ed157604080820151905163a458261b60e01b815260048101919091523460248201526044016107eb565b600354610ee9906001600160a01b031633308c611259565b600154600354610f0c916001600160a01b0391821691610100909104168b6112c0565b6002546040516352b7631960e11b81526001600160a01b0388811660048301529091169063a56ec63290602401602060405180830381865afa158015610f54573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f7891906117d4565b60608201525b806060015189111561108f5760018054906101000a90046001600160a01b03166001600160a01b031663779b432d82606001518a8a8a8a5f8b5f604051602001610fcc911515815260200190565b6040516020818303038152906040526040518963ffffffff1660e01b8152600401610ffe9897969594939291906117eb565b5f604051808303815f87803b158015611015575f5ffd5b505af1158015611027573d5f5f3e3d5ffd5b50505050606081810151604080519182525f602083018190529082015290810188905233907f9def29ee1e52d8cc418ce8483ab7931bd160355306260e3e236c4cc907ca4e9f9060800160405180910390a26060810151611088908a611635565b9850610f7e565b60015460405163779b432d60e01b81526101009091046001600160a01b03169063779b432d906110d1908c908c908c908c908c905f908d908d906004016117eb565b5f604051808303815f87803b1580156110e8575f5ffd5b505af11580156110fa573d5f5f3e3d5ffd5b50508251602080850151604080518f81529283019390935281830152606081018b905290513393507f9def29ee1e52d8cc418ce8483ab7931bd160355306260e3e236c4cc907ca4e9f92509081900360800190a280604001513411156111ee5760408101515f90339061116d9034611635565b6040515f81818185875af1925050503d805f81146111a6576040519150601f19603f3d011682016040523d82523d5f602084013e6111ab565b606091505b50509050806111ec5760405162461bcd60e51b815260206004820152600d60248201526c1c99599d5b990819985a5b1959609a1b60448201526064016107eb565b505b505050505050505050565b6112038282610873565b6112325760405163e2517d3f60e01b81526001600160a01b0382166004820152602481018390526044016107eb565b5050565b60015460ff16610e4557604051638dfc202b60e01b815260040160405180910390fd5b6040516001600160a01b0384811660248301528381166044830152606482018390526106d09186918216906323b872dd906084015b604051602081830303815290604052915060e01b6020820180516001600160e01b03838183161783525050505061134b565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b17905261131184826113b7565b6106d0576040516001600160a01b0384811660248301525f604483015261134591869182169063095ea7b39060640161128e565b6106d084825b5f5f60205f8451602086015f885af18061136a576040513d5f823e3d81fd5b50505f513d9150811561138157806001141561138e565b6001600160a01b0384163b155b156106d057604051635274afe760e01b81526001600160a01b03851660048201526024016107eb565b5f5f5f5f60205f8651602088015f8a5af192503d91505f5190508280156113f6575081156113e857806001146113f6565b5f866001600160a01b03163b115b9695505050505050565b5f60208284031215611410575f5ffd5b81356001600160e01b031981168114611427575f5ffd5b9392505050565b5f6020828403121561143e575f5ffd5b5035919050565b80356001600160a01b03811681146109c5575f5ffd5b5f5f6040838503121561146c575f5ffd5b8235915061147c60208401611445565b90509250929050565b5f60208284031215611495575f5ffd5b61142782611445565b803563ffffffff811681146109c5575f5ffd5b5f5f5f5f608085870312156114c4575f5ffd5b843593506114d46020860161149e565b925060408501359150606085013580151581146114ef575f5ffd5b939692955090935050565b5f5f5f5f5f5f5f5f5f5f5f6101608c8e031215611515575f5ffd5b61151e8c611445565b9a5061152c60208d01611445565b995061153a60408d01611445565b985061154860608d01611445565b975060808c0135965060a08c0135955060c08c0135945060e08c013593506115736101008d01611445565b92506115826101208d0161149e565b91505f6101408d01359050809150509295989b509295989b9093969950565b5f602082840312156115b1575f5ffd5b6114278261149e565b805169ffffffffffffffffffff811681146109c5575f5ffd5b5f5f5f5f5f60a086880312156115e7575f5ffd5b6115f0866115ba565b60208701516040880151606089015192975090955093509150611615608087016115ba565b90509295509295909350565b634e487b7160e01b5f52601160045260245ffd5b818103818111156106a6576106a6611621565b6001815b60018411156116835780850481111561166757611667611621565b600184161561167557908102905b60019390931c92800261164c565b935093915050565b5f82611699575060016106a6565b816116a557505f6106a6565b81600181146116bb57600281146116c5576116e1565b60019150506106a6565b60ff8411156116d6576116d6611621565b50506001821b6106a6565b5060208310610133831016604e8410600b8410161715611704575081810a6106a6565b6117105f198484611648565b805f190482111561172357611723611621565b029392505050565b5f61142760ff84168361168b565b80820281158282048414176106a6576106a6611621565b5f8261176a57634e487b7160e01b5f52601260045260245ffd5b500490565b5f6020828403121561177f575f5ffd5b815160ff81168114611427575f5ffd5b60ff82811682821603908111156106a6576106a6611621565b60ff81811683821601908111156106a6576106a6611621565b808201808211156106a6576106a6611621565b5f602082840312156117e4575f5ffd5b5051919050565b88815263ffffffff8816602082015286604082015260018060a01b03861660608201528460808201528360a082015263ffffffff831660c082015261010060e08201525f825180610100840152806020850161012085015e5f6101208285010152610120601f19601f830116840101915050999850505050505050505056fea49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177500000000000000000000000072119345bdfd1e0036fedb16ebdd5e910fd4be3b

Deployed Bytecode

0x608060405260043610610212575f3560e01c8063952b34dd1161011e578063b6d72870116100a8578063cfb3647b1161006d578063cfb3647b146105db578063d547741f146105fa578063d596087314610619578063d9f126f114610638578063f70dbb8b14610657575f5ffd5b8063b6d7287014610542578063c1419def14610557578063c41c82e21461057d578063c4f5183b1461059c578063c7821bc9146105bc575f5ffd5b8063a0855f2d116100ee578063a0855f2d146104d3578063a217fddf146104e8578063ae06c1b7146104fb578063b04b4f981461051a578063b53251bc1461052f575f5ffd5b8063952b34dd1461044f5780639564cb3b146104805780639ec751e91461049f578063a001ecdd146104be575f5ffd5b8063476343ee1161019f57806375b238fc1161016f57806375b238fc146103c85780637e458fc3146103e85780638456cb591461040757806391792d5b1461041b57806391d1485414610430575f5ffd5b8063476343ee146103695780635c975abb1461037d5780636e8611c614610394578063741bef1a146103a9575f5ffd5b806336568abe116101e557806336568abe146102bc57806337de8106146102db5780633e413bee146102fa5780633f4ba83a146103315780634611783014610345575f5ffd5b806301ffc9a7146102165780631f45d0e41461024a578063248a9ca31461026d5780632f2ff15d1461029b575b5f5ffd5b348015610221575f5ffd5b50610235610230366004611400565b610676565b60405190151581526020015b60405180910390f35b348015610255575f5ffd5b5061025f600b5481565b604051908152602001610241565b348015610278575f5ffd5b5061025f61028736600461142e565b5f9081526020819052604090206001015490565b3480156102a6575f5ffd5b506102ba6102b536600461145b565b6106ac565b005b3480156102c7575f5ffd5b506102ba6102d636600461145b565b6106d6565b3480156102e6575f5ffd5b506102ba6102f536600461142e565b61070e565b348015610305575f5ffd5b50600354610319906001600160a01b031681565b6040516001600160a01b039091168152602001610241565b34801561033c575f5ffd5b506102ba61072b565b348015610350575f5ffd5b506001546103199061010090046001600160a01b031681565b348015610374575f5ffd5b506102ba61074d565b348015610388575f5ffd5b5060015460ff16610235565b34801561039f575f5ffd5b5061025f60055481565b3480156103b4575f5ffd5b50600454610319906001600160a01b031681565b3480156103d3575f5ffd5b5061025f5f51602061186b5f395f51905f5281565b3480156103f3575f5ffd5b506102ba610402366004611485565b61082e565b348015610412575f5ffd5b506102ba610854565b348015610426575f5ffd5b5061025f60065481565b34801561043b575f5ffd5b5061023561044a36600461145b565b610873565b34801561045a575f5ffd5b50600a5461046b9063ffffffff1681565b60405163ffffffff9091168152602001610241565b34801561048b575f5ffd5b5061025f61049a36600461142e565b61089b565b3480156104aa575f5ffd5b5061025f6104b936600461142e565b61099d565b3480156104c9575f5ffd5b5061025f60075481565b3480156104de575f5ffd5b5061025f61271081565b3480156104f3575f5ffd5b5061025f5f81565b348015610506575f5ffd5b506102ba61051536600461142e565b6109ca565b348015610525575f5ffd5b5061025f60095481565b6102ba61053d3660046114b1565b6109e7565b34801561054d575f5ffd5b5061025f60085481565b348015610562575f5ffd5b5061056b600681565b60405160ff9091168152602001610241565b348015610588575f5ffd5b506102ba6105973660046114fa565b610a3b565b3480156105a7575f5ffd5b5060045461056b90600160a01b900460ff1681565b3480156105c7575f5ffd5b506102ba6105d636600461142e565b610be3565b3480156105e6575f5ffd5b50600254610319906001600160a01b031681565b348015610605575f5ffd5b506102ba61061436600461145b565b610c00565b348015610624575f5ffd5b506102ba6106333660046115a1565b610c24565b348015610643575f5ffd5b506102ba61065236600461142e565b610c58565b348015610662575f5ffd5b506102ba61067136600461142e565b610c75565b5f6001600160e01b03198216637965db0b60e01b14806106a657506301ffc9a760e01b6001600160e01b03198316145b92915050565b5f828152602081905260409020600101546106c681610c92565b6106d08383610c9c565b50505050565b6001600160a01b03811633146106ff5760405163334bd91960e11b815260040160405180910390fd5b6107098282610d2b565b505050565b5f51602061186b5f395f51905f5261072581610c92565b50600655565b5f51602061186b5f395f51905f5261074281610c92565b61074a610d94565b50565b5f51602061186b5f395f51905f5261076481610c92565b60405147905f90339083908381818185875af1925050503d805f81146107a5576040519150601f19603f3d011682016040523d82523d5f602084013e6107aa565b606091505b50509050806107f45760405162461bcd60e51b81526020600482015260116024820152701dda5d1a191c985dd85b0819985a5b1959607a1b60448201526064015b60405180910390fd5b60405182815233907fc0819c13be868895eb93e40eaceb96de976442fa1d404e5c55f14bb65a8c489a9060200160405180910390a2505050565b5f51602061186b5f395f51905f5261084581610c92565b506001600160a01b0316600955565b5f51602061186b5f395f51905f5261086b81610c92565b61074a610de6565b5f918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b5f5f6108a68361099d565b90505f5f60045f9054906101000a90046001600160a01b03166001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa1580156108fa573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061091e91906115d3565b509350509250508042108061093d5750600b5461093b8242611635565b115b15610964576040516316d7d15960e01b8152600481018290524260248201526044016107eb565b6004548290849061098090600160a01b900460ff16600a61172b565b61098a9190611739565b6109949190611750565b95945050505050565b6006546005548210156109c557612710600754836109bb9190611739565b6106a69190611750565b919050565b5f51602061186b5f395f51905f526109e181610c92565b50600755565b6109ef610e21565b600354600954600a546040805185151560208201526106d0948994899489946001600160a01b0390931693919263ffffffff909116910160405160208183030381529060405288610e47565b5f51602061186b5f395f51905f52610a5281610c92565b600c5460ff1615610a9b5760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b60448201526064016107eb565b600180546001600160a01b03808f1661010002610100600160a81b031990921691909117909155600280548d83166001600160a01b031991821617909155600380548d841690831617905560048054928c1692909116821781556040805163313ce56760e01b8152905163313ce567928281019260209291908290030181865afa158015610b2b573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b4f919061176f565b610b5b6006601261178f565b610b6591906117a8565b6004805460ff60a01b1916600160a01b60ff939093169290920291909117905560058890556006879055600786905560088590556001600160a01b038416600955600a805463ffffffff191663ffffffff8516179055600b829055600c805460ff19166001179055610bd5610d94565b505050505050505050505050565b5f51602061186b5f395f51905f52610bfa81610c92565b50600555565b5f82815260208190526040902060010154610c1a81610c92565b6106d08383610d2b565b5f51602061186b5f395f51905f52610c3b81610c92565b50600a805463ffffffff191663ffffffff92909216919091179055565b5f51602061186b5f395f51905f52610c6f81610c92565b50600855565b5f51602061186b5f395f51905f52610c8c81610c92565b50600b55565b61074a81336111f9565b5f610ca78383610873565b610d24575f838152602081815260408083206001600160a01b03861684529091529020805460ff19166001179055610cdc3390565b6001600160a01b0316826001600160a01b0316847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45060016106a6565b505f6106a6565b5f610d368383610873565b15610d24575f838152602081815260408083206001600160a01b0386168085529252808320805460ff1916905551339286917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45060016106a6565b610d9c611236565b6001805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b610dee610e21565b6001805460ff1916811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25833610dc9565b60015460ff1615610e455760405163d93c066560e01b815260040160405180910390fd5b565b610e6e60405180608001604052805f81526020015f81526020015f81526020015f81525090565b610e778961089b565b815281610e84575f610e88565b6008545b602082018190528151610e9b91906117c1565b60408201819052341015610ed157604080820151905163a458261b60e01b815260048101919091523460248201526044016107eb565b600354610ee9906001600160a01b031633308c611259565b600154600354610f0c916001600160a01b0391821691610100909104168b6112c0565b6002546040516352b7631960e11b81526001600160a01b0388811660048301529091169063a56ec63290602401602060405180830381865afa158015610f54573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f7891906117d4565b60608201525b806060015189111561108f5760018054906101000a90046001600160a01b03166001600160a01b031663779b432d82606001518a8a8a8a5f8b5f604051602001610fcc911515815260200190565b6040516020818303038152906040526040518963ffffffff1660e01b8152600401610ffe9897969594939291906117eb565b5f604051808303815f87803b158015611015575f5ffd5b505af1158015611027573d5f5f3e3d5ffd5b50505050606081810151604080519182525f602083018190529082015290810188905233907f9def29ee1e52d8cc418ce8483ab7931bd160355306260e3e236c4cc907ca4e9f9060800160405180910390a26060810151611088908a611635565b9850610f7e565b60015460405163779b432d60e01b81526101009091046001600160a01b03169063779b432d906110d1908c908c908c908c908c905f908d908d906004016117eb565b5f604051808303815f87803b1580156110e8575f5ffd5b505af11580156110fa573d5f5f3e3d5ffd5b50508251602080850151604080518f81529283019390935281830152606081018b905290513393507f9def29ee1e52d8cc418ce8483ab7931bd160355306260e3e236c4cc907ca4e9f92509081900360800190a280604001513411156111ee5760408101515f90339061116d9034611635565b6040515f81818185875af1925050503d805f81146111a6576040519150601f19603f3d011682016040523d82523d5f602084013e6111ab565b606091505b50509050806111ec5760405162461bcd60e51b815260206004820152600d60248201526c1c99599d5b990819985a5b1959609a1b60448201526064016107eb565b505b505050505050505050565b6112038282610873565b6112325760405163e2517d3f60e01b81526001600160a01b0382166004820152602481018390526044016107eb565b5050565b60015460ff16610e4557604051638dfc202b60e01b815260040160405180910390fd5b6040516001600160a01b0384811660248301528381166044830152606482018390526106d09186918216906323b872dd906084015b604051602081830303815290604052915060e01b6020820180516001600160e01b03838183161783525050505061134b565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b17905261131184826113b7565b6106d0576040516001600160a01b0384811660248301525f604483015261134591869182169063095ea7b39060640161128e565b6106d084825b5f5f60205f8451602086015f885af18061136a576040513d5f823e3d81fd5b50505f513d9150811561138157806001141561138e565b6001600160a01b0384163b155b156106d057604051635274afe760e01b81526001600160a01b03851660048201526024016107eb565b5f5f5f5f60205f8651602088015f8a5af192503d91505f5190508280156113f6575081156113e857806001146113f6565b5f866001600160a01b03163b115b9695505050505050565b5f60208284031215611410575f5ffd5b81356001600160e01b031981168114611427575f5ffd5b9392505050565b5f6020828403121561143e575f5ffd5b5035919050565b80356001600160a01b03811681146109c5575f5ffd5b5f5f6040838503121561146c575f5ffd5b8235915061147c60208401611445565b90509250929050565b5f60208284031215611495575f5ffd5b61142782611445565b803563ffffffff811681146109c5575f5ffd5b5f5f5f5f608085870312156114c4575f5ffd5b843593506114d46020860161149e565b925060408501359150606085013580151581146114ef575f5ffd5b939692955090935050565b5f5f5f5f5f5f5f5f5f5f5f6101608c8e031215611515575f5ffd5b61151e8c611445565b9a5061152c60208d01611445565b995061153a60408d01611445565b985061154860608d01611445565b975060808c0135965060a08c0135955060c08c0135945060e08c013593506115736101008d01611445565b92506115826101208d0161149e565b91505f6101408d01359050809150509295989b509295989b9093969950565b5f602082840312156115b1575f5ffd5b6114278261149e565b805169ffffffffffffffffffff811681146109c5575f5ffd5b5f5f5f5f5f60a086880312156115e7575f5ffd5b6115f0866115ba565b60208701516040880151606089015192975090955093509150611615608087016115ba565b90509295509295909350565b634e487b7160e01b5f52601160045260245ffd5b818103818111156106a6576106a6611621565b6001815b60018411156116835780850481111561166757611667611621565b600184161561167557908102905b60019390931c92800261164c565b935093915050565b5f82611699575060016106a6565b816116a557505f6106a6565b81600181146116bb57600281146116c5576116e1565b60019150506106a6565b60ff8411156116d6576116d6611621565b50506001821b6106a6565b5060208310610133831016604e8410600b8410161715611704575081810a6106a6565b6117105f198484611648565b805f190482111561172357611723611621565b029392505050565b5f61142760ff84168361168b565b80820281158282048414176106a6576106a6611621565b5f8261176a57634e487b7160e01b5f52601260045260245ffd5b500490565b5f6020828403121561177f575f5ffd5b815160ff81168114611427575f5ffd5b60ff82811682821603908111156106a6576106a6611621565b60ff81811683821601908111156106a6576106a6611621565b808201808211156106a6576106a6611621565b5f602082840312156117e4575f5ffd5b5051919050565b88815263ffffffff8816602082015286604082015260018060a01b03861660608201528460808201528360a082015263ffffffff831660c082015261010060e08201525f825180610100840152806020850161012085015e5f6101208285010152610120601f19601f830116840101915050999850505050505050505056fea49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775

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

00000000000000000000000072119345bdfd1e0036fedb16ebdd5e910fd4be3b

-----Decoded View---------------
Arg [0] : admin (address): 0x72119345BdFD1E0036FedB16ebDd5E910Fd4Be3b

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000072119345bdfd1e0036fedb16ebdd5e910fd4be3b


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.