ETH Price: $3,238.04 (-2.62%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Send Order239279522025-12-02 19:46:479 days ago1764704807IN
0x8888887C...edc1A6Dd0
0 ETH0.000056490.1018699
Send Order238934782025-11-28 0:01:1113 days ago1764288071IN
0x8888887C...edc1A6Dd0
0 ETH0.000035930.05408014
Send Order238934682025-11-27 23:59:1113 days ago1764287951IN
0x8888887C...edc1A6Dd0
0 ETH0.000031630.05046104
Fill Order238907792025-11-27 14:55:4714 days ago1764255347IN
0x8888887C...edc1A6Dd0
0 ETH0.000046730.09472279
Send Order238907752025-11-27 14:54:5914 days ago1764255299IN
0x8888887C...edc1A6Dd0
0 ETH0.000019580.09717589
Send Order238885992025-11-27 7:35:5914 days ago1764228959IN
0x8888887C...edc1A6Dd0
0 ETH0.000044430.07082172
Send Order238844712025-11-26 17:42:1115 days ago1764178931IN
0x8888887C...edc1A6Dd0
0 ETH0.000300720.46508395
Fill Order238844682025-11-26 17:41:3515 days ago1764178895IN
0x8888887C...edc1A6Dd0
0 ETH0.000283210.44999073
Send Order238844582025-11-26 17:39:2315 days ago1764178763IN
0x8888887C...edc1A6Dd0
0 ETH0.000272930.42224542
Take Order238844442025-11-26 17:36:3515 days ago1764178595IN
0x8888887C...edc1A6Dd0
0 ETH0.000237290.40137483
Send Order238826992025-11-26 11:43:4715 days ago1764157427IN
0x8888887C...edc1A6Dd0
0 ETH0.000050560.07712517
Fill Order238773932025-11-25 17:49:4716 days ago1764092987IN
0x8888887C...edc1A6Dd0
0 ETH0.000105310.20425479
Send Order238710672025-11-24 20:25:3517 days ago1764015935IN
0x8888887C...edc1A6Dd0
0 ETH0.000200330.30991514
Send Order238710402025-11-24 20:20:1117 days ago1764015611IN
0x8888887C...edc1A6Dd0
0 ETH0.000272490.42577268
Take Order238710292025-11-24 20:17:5917 days ago1764015479IN
0x8888887C...edc1A6Dd0
0 ETH0.000272660.47211708
Send Order238709552025-11-24 20:02:5917 days ago1764014579IN
0x8888887C...edc1A6Dd0
0 ETH0.000257710.4025626
Send Order238709492025-11-24 20:01:4717 days ago1764014507IN
0x8888887C...edc1A6Dd0
0 ETH0.00025770.40253146
Take Order238701792025-11-24 17:24:3517 days ago1764005075IN
0x8888887C...edc1A6Dd0
0 ETH0.000501120.7090457
Send Order238701702025-11-24 17:22:4717 days ago1764004967IN
0x8888887C...edc1A6Dd0
0 ETH0.000449680.68582701
Take Order238701502025-11-24 17:18:4717 days ago1764004727IN
0x8888887C...edc1A6Dd0
0 ETH0.000274170.48456689
Send Order238700702025-11-24 17:02:4717 days ago1764003767IN
0x8888887C...edc1A6Dd0
0 ETH0.000364280.54027042
Take Order238700512025-11-24 16:58:5917 days ago1764003539IN
0x8888887C...edc1A6Dd0
0 ETH0.000435590.53587194
Send Order238671672025-11-24 7:14:3517 days ago1763968475IN
0x8888887C...edc1A6Dd0
0 ETH0.000093560.12228427
Take Order238500722025-11-21 21:33:2320 days ago1763760803IN
0x8888887C...edc1A6Dd0
0 ETH0.000196920.3316413
Fill Order238490862025-11-21 18:14:2320 days ago1763748863IN
0x8888887C...edc1A6Dd0
0 ETH0.000806851.35450979
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Method Block
From
To
Transfer238907792025-11-27 14:55:4714 days ago1764255347
0x8888887C...edc1A6Dd0
0.03327465 ETH
Transfer238907792025-11-27 14:55:4714 days ago1764255347
0x8888887C...edc1A6Dd0
0.00008214 ETH
Transfer238907792025-11-27 14:55:4714 days ago1764255347
0x8888887C...edc1A6Dd0
0.03319251 ETH
Transfer238844682025-11-26 17:41:3515 days ago1764178895
0x8888887C...edc1A6Dd0
0.00047125 ETH
Transfer238844682025-11-26 17:41:3515 days ago1764178895
0x8888887C...edc1A6Dd0
0.00011177 ETH
Transfer238844682025-11-26 17:41:3515 days ago1764178895
0x8888887C...edc1A6Dd0
0.00035947 ETH
Transfer238500722025-11-21 21:33:2320 days ago1763760803
0x8888887C...edc1A6Dd0
0.00164026 ETH
Transfer238500722025-11-21 21:33:2320 days ago1763760803
0x8888887C...edc1A6Dd0
0.00012973 ETH
Transfer238500722025-11-21 21:33:2320 days ago1763760803
0x8888887C...edc1A6Dd0
0.00151052 ETH
Transfer238490862025-11-21 18:14:2320 days ago1763748863
0x8888887C...edc1A6Dd0
0.00231928 ETH
Transfer238490862025-11-21 18:14:2320 days ago1763748863
0x8888887C...edc1A6Dd0
0.00042769 ETH
Transfer238490862025-11-21 18:14:2320 days ago1763748863
0x8888887C...edc1A6Dd0
0.00189158 ETH
Transfer238373842025-11-20 2:48:3521 days ago1763606915
0x8888887C...edc1A6Dd0
0.00763456 ETH
Transfer238373842025-11-20 2:48:3521 days ago1763606915
0x8888887C...edc1A6Dd0
0.0001223 ETH
Transfer238373842025-11-20 2:48:3521 days ago1763606915
0x8888887C...edc1A6Dd0
0.00751225 ETH
Transfer238372642025-11-20 2:24:3521 days ago1763605475
0x8888887C...edc1A6Dd0
0.0031763 ETH
Transfer238372642025-11-20 2:24:3521 days ago1763605475
0x8888887C...edc1A6Dd0
0.00011723 ETH
Transfer238372642025-11-20 2:24:3521 days ago1763605475
0x8888887C...edc1A6Dd0
0.00305906 ETH
Transfer238372632025-11-20 2:24:2321 days ago1763605463
0x8888887C...edc1A6Dd0
0.00316945 ETH
Transfer238372632025-11-20 2:24:2321 days ago1763605463
0x8888887C...edc1A6Dd0
0.00011038 ETH
Transfer238372632025-11-20 2:24:2321 days ago1763605463
0x8888887C...edc1A6Dd0
0.00305906 ETH
Transfer238372602025-11-20 2:23:4721 days ago1763605427
0x8888887C...edc1A6Dd0
0.00317434 ETH
Transfer238372602025-11-20 2:23:4721 days ago1763605427
0x8888887C...edc1A6Dd0
0.00011077 ETH
Transfer238372602025-11-20 2:23:4721 days ago1763605427
0x8888887C...edc1A6Dd0
0.00306356 ETH
Transfer238372542025-11-20 2:22:3521 days ago1763605355
0x8888887C...edc1A6Dd0
0.0031715 ETH
View All Internal Transactions
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
InterChainRouterV4

Compiler Version
v0.8.28+commit.7893614a

Optimization Enabled:
Yes with 600 runs

Other Settings:
paris EvmVersion
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;

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

// Replace custom _safeTransfer with:
contract InterChainRouterV4 is IEIP712Types, ReentrancyGuard {
    using SafeERC20 for IERC20;

    IPermit2 immutable PERMIT2;
    ITokenMessenger immutable TOKEN_MESSENGER;
    IMessageTransmitter immutable MESSAGE_TRANSMITTER;
    address immutable USDC_ADDRESS;

    // EIP-712 types
    bytes32 public constant _ORDER_PARAMS_TYPEHASH = keccak256("OrderParameters(address srcAsset,address dstAsset,uint256 srcQuantity,uint256 dstQuantity,uint256 minQuantity,uint128 darkSalt)");
    bytes32 public constant _WITNESS_TYPEHASH = keccak256("SignedOrder(address sender,OrderParameters parameters,uint256 deadline,address target,address filler,string orderType,bytes[] customData)OrderParameters(address srcAsset,address dstAsset,uint256 srcQuantity,uint256 dstQuantity,uint256 minQuantity,uint128 darkSalt)");
    string public constant witnessTypeString = "SignedOrder witness)OrderParameters(address srcAsset,address dstAsset,uint256 srcQuantity,uint256 dstQuantity,uint256 minQuantity,uint128 darkSalt)SignedOrder(address sender,OrderParameters parameters,uint256 deadline,address target,address filler,string orderType,bytes[] customData)TokenPermissions(address token,uint256 amount)";
    
    // Pre-computed order type identifiers
    bytes32 public constant TYPE_DEX = keccak256("DEX");      //X1->Y1; Single Chain Dex swaps
    bytes32 public constant TYPE_RELAY = keccak256("CCTP");   //X1->USDC2 *X1 is possibly USDC; CCTP, swap into USDC cross chain
    bytes32 public constant TYPE_CROSS = keccak256("CROSS");  //X1->Y2 *X1 is possibly USDC; cross-chain swap into token 

    constructor(
        address _permit2,
        address _tokenMessenger,
        address _messageTransmitter,
        address _usdcAddress
    ) {
        PERMIT2 = IPermit2(_permit2);
        TOKEN_MESSENGER = ITokenMessenger(_tokenMessenger);
        MESSAGE_TRANSMITTER = IMessageTransmitter(_messageTransmitter);
        USDC_ADDRESS = _usdcAddress;
    }

    /// @notice fill a Single Chain Order (X1-->Y1)
    function fillOrder(
        SignedOrder calldata order,
        SigPayload calldata payload,
        MulticallData calldata arb,
        uint256 minOut
    ) external nonReentrant {
        //1. pull tokens
        _assertOrderRequirements(order, TYPE_DEX, true);
        bytes32 orderHash = pullTokens(order, payload);

        //2. Approve 
        _reApprove(order.parameters.srcAsset, arb.multicallTarget, order.parameters.srcQuantity);

        //3. Execute multicall data one shot
        IMulticall(arb.multicallTarget).multicall(arb.calls, arb.refundTo, arb.nftRecipient);

        //4. Verify swap amount
        if (!_payout(orderHash, order, order.parameters.dstAsset, order.parameters.minQuantity, minOut)) revert InsufficientOutput();
    }

    /// @notice send a Multichain Order (X1-->Y2)
    function sendOrder(
        SignedOrder calldata order,
        SigPayload calldata payload,
        MulticallData calldata arb,
        uint256 minOut
    ) external nonReentrant {
        // pull funds
        bytes32 orderHash = pullTokens(order, payload);
        CCTPParams memory cctp = _cacheCCTPParams(order.customData);

        // Make optional Swap
        if (order.parameters.srcAsset != USDC_ADDRESS) {
            _reApprove(order.parameters.srcAsset, arb.multicallTarget, order.parameters.srcQuantity);
            IMulticall(arb.multicallTarget).multicall(arb.calls, arb.refundTo, arb.nftRecipient);
        }


        uint256 balance=IERC20(USDC_ADDRESS).balanceOf(address(this));
        if (balance<cctp.minAmountUsdc) revert InsufficientOutput();
        if (order.parameters.srcAsset!=USDC_ADDRESS && balance<minOut) revert MEVprotect(minOut, balance);

        //Execute CCTP deposits 
        bool useHook = keccak256(bytes(order.orderType)) == TYPE_CROSS;
        _executeCCTPDeposit(order, cctp, balance, orderHash, useHook);

        emit OrderBridged(
            orderHash,
            order.orderType,
            cctp.destinationDomain,
            order.target,
            order.filler,
            order.parameters.srcAsset,
            order.parameters.dstAsset,
            balance,
            cctp.maxFee
        );

    }

    /// @notice recieve a Multichain Order (X1-->Y2)
    function takeOrder(
        bytes calldata message,
        bytes calldata attestation,
        SignedOrder calldata order,
        MulticallData calldata arb,
        uint256 minOut
    ) external nonReentrant returns(bool fin) {
        
        // 1. Verify order
        bytes32 orderHash = _extractHookData(message);
        if (hashOrder(order) != orderHash) revert OrderHash(hashOrder(order), orderHash);
        _assertOrderRequirements(order, TYPE_CROSS, false);

        //2. Mint USDC via Iris
        (bool success, bytes memory data) = address(MESSAGE_TRANSMITTER).call(
            abi.encodeWithSelector(
                IMessageTransmitter.receiveMessage.selector,
                message,
                attestation
            )
        );
        if (!success) revert CCTPRedemption(data);

        uint256 usdcReceived = IERC20(USDC_ADDRESS).balanceOf(address(this));


        // 3. Approve & Multicall
        if (arb.multicallTarget!=address(0)){
            _reApprove(USDC_ADDRESS, arb.multicallTarget, usdcReceived);        
            IMulticall(arb.multicallTarget).multicall(arb.calls, arb.refundTo, arb.nftRecipient);
        }


        // 4. Attempt User Payout
        if (_payout(orderHash, order, order.parameters.dstAsset, order.parameters.minQuantity, minOut)) {
            return true;
        }
        
        if (_payout(orderHash, order, USDC_ADDRESS, usdcReceived, 0)) {
            return false;
        }

        revert InsufficientOutput();
    }
    
    //*HELPER FUNCTIONS*//
    function pullTokens(
        SignedOrder calldata order,
        SigPayload calldata payload
    ) private returns (bytes32 orderHash) {
        orderHash = hashOrder(order);
        
        PERMIT2.permitWitnessTransferFrom(
            IPermit2.PermitTransferFrom({
                permitted: IPermit2.TokenPermissions({
                    token: order.parameters.srcAsset,
                    amount: order.parameters.srcQuantity
                }),
                nonce: payload.nonce,
                deadline: order.deadline
            }),
            IPermit2.SignatureTransferDetails({
                to: address(this),
                requestedAmount: order.parameters.srcQuantity
            }),
            order.sender,
            orderHash,
            witnessTypeString,
            payload.signature
        );

        return orderHash;
    }
    
    function _payout(
        bytes32 orderHash,
        SignedOrder calldata order,
        address payoutAsset,
        uint256 minQuantity, 
        uint256 mevOut
    ) private returns (bool) {
        uint256 balance;

        if (payoutAsset == address(0)) {
            // ETH case
            balance = address(this).balance;
            if (balance < minQuantity) { return false; }
            if (balance < mevOut) revert MEVprotect(mevOut, balance);
            (bool ok,) = order.target.call{value: balance}("");
            if (!ok) {return ok;}
        } else {
            // ERC20 case – use low-level calls for broader token compatibility
            (bool balOk, bytes memory balData) = payoutAsset.staticcall(
                abi.encodeWithSelector(IERC20.balanceOf.selector, address(this))
            );
            if (!(balOk && balData.length >= 32)) {
                return false; // could not fetch balance safely
            }
            balance = abi.decode(balData, (uint256));
            if (balance < minQuantity) { return false; }
            if (balance < mevOut) revert MEVprotect(mevOut, balance);

            //payout
            IERC20(payoutAsset).safeTransfer(order.target, balance);
        }

        emit OrderFilled(
            orderHash,
            order.orderType,
            order.target,
            order.filler,
            order.parameters.srcAsset,
            payoutAsset,
            order.parameters.srcQuantity,
            balance
        );

        return true;
    }

    function _executeCCTPDeposit(
        SignedOrder calldata order,
        CCTPParams memory cctp,
        uint256 balance,
        bytes32 orderHash,
        bool useHook
    ) private {
        // Assert order requirements based on type
        bytes32 expectedType = useHook ? TYPE_CROSS : TYPE_RELAY;
        _assertOrderRequirements(order, expectedType, true);
        
        // Handle fee for RELAY orders with USDC as source
        if (!useHook && order.parameters.srcAsset == USDC_ADDRESS) {
            uint256 fee = order.parameters.srcQuantity - order.parameters.dstQuantity;
            balance -= fee;
            IERC20(order.parameters.srcAsset).safeTransfer(order.filler, fee);
        }
        
        // Approve messenger to spend USDC
        _reApprove(USDC_ADDRESS, address(TOKEN_MESSENGER), balance);
        
        // Prepare CCTP call based on hook requirement
        bytes memory cctpCall = useHook 
            ? abi.encodeWithSelector(
                ITokenMessenger.depositForBurnWithHook.selector,
                balance,
                cctp.destinationDomain,
                _addressToBytes32(address(this)),      // Router receives for CROSS
                USDC_ADDRESS,
                _addressToBytes32(address(this)),      // Router as mint recipient
                cctp.maxFee,
                cctp.minFinalityThreshold,
                abi.encodePacked(orderHash)            // Hook data
            )
            : abi.encodeWithSelector(
                ITokenMessenger.depositForBurn.selector,
                balance,
                cctp.destinationDomain,
                _addressToBytes32(order.target),       // User receives for RELAY
                USDC_ADDRESS,
                _addressToBytes32(address(0)),         // No mint recipient
                cctp.maxFee,
                cctp.minFinalityThreshold
            );
        
        // Execute CCTP call
        (bool success, bytes memory data) = address(TOKEN_MESSENGER).call(cctpCall);
        if (!success) revert CCTPDepositFailed(data);
    }   
    // EIP-712 compliant hashing
    function hashOrder(SignedOrder calldata o) public pure returns (bytes32) {
        bytes32 paramsHash = _hashParams(o.parameters);
        
        return keccak256(
            abi.encode(
                _WITNESS_TYPEHASH,
                o.sender,
                paramsHash,
                o.deadline,
                o.target,
                o.filler,
                keccak256(bytes(o.orderType)),
                _hashCustomDatas(o.customData)
            )
        );
    }

    // EIP-712 compliant hashing
    function _hashParams(OrderParameters calldata params) public pure returns (bytes32) {
        return keccak256(
            abi.encode(
                _ORDER_PARAMS_TYPEHASH,
                params.srcAsset,
                params.dstAsset,
                params.srcQuantity,
                params.dstQuantity,
                params.minQuantity,
                params.darkSalt
            )
        );
    }

    // EIP-712 compliant hashing
    function _hashCustomDatas(bytes[] calldata datas) internal pure returns (bytes32) {
        uint256 len = datas.length;
        bytes32[] memory inner = new bytes32[](len);
        for (uint256 i; i < len; ++i) {
            inner[i] = keccak256(datas[i]);
        }
        return keccak256(abi.encodePacked(inner));
    }

    function _assertOrderRequirements(
        SignedOrder calldata order,
        bytes32 requiredType,
        bool time_in_force
    ) internal view {
        if (time_in_force) {
            if (order.deadline < block.timestamp) revert Expired();
        }
        if (order.filler != address(0) && order.filler != msg.sender) {
            revert Unauthorized();
        }
        if (keccak256(bytes(order.orderType)) != requiredType) {
            revert InvalidType();
        }
    }

    function _cacheCCTPParams(bytes[] calldata customData) internal pure returns (CCTPParams memory params) {
        // Require 5 elements for CCTP parameters
        if (customData.length != 5) {revert InvalidCCTPParams();}
        assembly {
            // customData.offset is the start of the dynamic array's "head" in calldata
            
            // 1) destinationDomain (uint32) from customData[0]
            let data0 := add(calldataload(add(customData.offset, 0x00)), customData.offset)
            let raw0 := calldataload(add(data0, 0x20))
            mstore(params, shr(224, raw0))              // store at params + 0x00
            
            // 2) minAmountUsdc (uint256) from customData[1] - NEW FIELD IN SECOND POSITION
            let data1 := add(calldataload(add(customData.offset, 0x20)), customData.offset)
            let raw1 := calldataload(add(data1, 0x20))
            mstore(add(params, 0x20), raw1)             // store at params + 0x20
            
            // 3) maxFee (uint256) from customData[2]
            let data2 := add(calldataload(add(customData.offset, 0x40)), customData.offset)
            let raw2 := calldataload(add(data2, 0x20))
            mstore(add(params, 0x40), raw2)             // store at params + 0x40
            
            // 4) minFinalityThreshold (uint32) from customData[3]
            let data3 := add(calldataload(add(customData.offset, 0x60)), customData.offset)
            let raw3 := calldataload(add(data3, 0x20))
            mstore(add(params, 0x60), shr(224, raw3))   // store at params + 0x60
            
            // 5) crossChainFee (uint32) from customData[4]
            let data4 := add(calldataload(add(customData.offset, 0x80)), customData.offset)
            let raw4 := calldataload(add(data4, 0x20))
            mstore(add(params, 0x80), shr(224, raw4))   // store at params + 0x80
        }
    }


    function _extractHookData(bytes calldata message) internal pure returns (bytes32 orderHash) {
        require(message.length >= 32, "message too short");

        // hookData is the last 32 bytes regardless of message length
        // TOKEN_MESSENGER uses abi.encodeWithSelector to encode the message which makes
        assembly {
            //  ptr = message.offset + message.length - 32
            orderHash := calldataload(
                sub(add(message.offset, message.length), 32)
            )
        }
    }

    function _addressToBytes32(address _addr) internal pure returns (bytes32) {
        return bytes32(uint256(uint160(_addr)));
    }

    function _reApprove(address token, address spender, uint256 amountNeeded) internal {
        (bool ok, bytes memory data) = token.staticcall(
            abi.encodeWithSelector(IERC20.allowance.selector, address(this), spender)
        );

        uint256 allowance = ok && data.length >= 32 ? abi.decode(data, (uint256)) : 0;
        if (allowance >= amountNeeded) return; // no-op if already sufficient

        IERC20(token).forceApprove(spender, type(uint256).max);
    }


    
    // Receive ETH from multicall swaps
    receive() external payable {}
}

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

File 3 of 9 : 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";

File 4 of 9 : 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";

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

    /**
     * @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);
}

// pragma solidity ^0.8.0;

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

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

//     function safeTransfer(IERC20 token, address to, uint256 value) internal {
//         _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
//     }

//     function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
//         _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
//     }

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

//     function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
//         uint256 newAllowance = token.allowance(address(this), spender) + value;
//         _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
//     }

//     function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
//         unchecked {
//             uint256 oldAllowance = token.allowance(address(this), spender);
//             require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
//             uint256 newAllowance = oldAllowance - value;
//             _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
//         }
//     }

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

//         bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
//         if (returndata.length > 0) { // Return data is optional
//             // solhint-disable-next-line max-line-length
//             require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
//         }
//     }
// }
// 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 {
        if (!_safeTransfer(token, to, value, true)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @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 {
        if (!_safeTransferFrom(token, from, to, value, true)) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @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 _safeTransfer(token, to, value, false);
    }

    /**
     * @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 _safeTransferFrom(token, from, to, value, false);
    }

    /**
     * @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 {
        if (!_safeApprove(token, spender, value, false)) {
            if (!_safeApprove(token, spender, 0, true)) revert SafeERC20FailedOperation(address(token));
            if (!_safeApprove(token, spender, value, true)) revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @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 `token.transfer(to, value)` call, 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 to The recipient of the tokens
     * @param value The amount of token to transfer
     * @param bubble Behavior switch if the transfer call reverts: bubble the revert reason or return a false boolean.
     */
    function _safeTransfer(IERC20 token, address to, uint256 value, bool bubble) private returns (bool success) {
        bytes4 selector = IERC20.transfer.selector;

        assembly ("memory-safe") {
            let fmp := mload(0x40)
            mstore(0x00, selector)
            mstore(0x04, and(to, shr(96, not(0))))
            mstore(0x24, value)
            success := call(gas(), token, 0, 0x00, 0x44, 0x00, 0x20)
            // if call success and return is true, all is good.
            // otherwise (not success or return is not true), we need to perform further checks
            if iszero(and(success, eq(mload(0x00), 1))) {
                // if the call was a failure and bubble is enabled, bubble the error
                if and(iszero(success), bubble) {
                    returndatacopy(fmp, 0x00, returndatasize())
                    revert(fmp, returndatasize())
                }
                // if the return value is not true, then the call is only successful if:
                // - the token address has code
                // - the returndata is empty
                success := and(success, and(iszero(returndatasize()), gt(extcodesize(token), 0)))
            }
            mstore(0x40, fmp)
        }
    }

    /**
     * @dev Imitates a Solidity `token.transferFrom(from, to, value)` call, 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 from The sender of the tokens
     * @param to The recipient of the tokens
     * @param value The amount of token to transfer
     * @param bubble Behavior switch if the transfer call reverts: bubble the revert reason or return a false boolean.
     */
    function _safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value,
        bool bubble
    ) private returns (bool success) {
        bytes4 selector = IERC20.transferFrom.selector;

        assembly ("memory-safe") {
            let fmp := mload(0x40)
            mstore(0x00, selector)
            mstore(0x04, and(from, shr(96, not(0))))
            mstore(0x24, and(to, shr(96, not(0))))
            mstore(0x44, value)
            success := call(gas(), token, 0, 0x00, 0x64, 0x00, 0x20)
            // if call success and return is true, all is good.
            // otherwise (not success or return is not true), we need to perform further checks
            if iszero(and(success, eq(mload(0x00), 1))) {
                // if the call was a failure and bubble is enabled, bubble the error
                if and(iszero(success), bubble) {
                    returndatacopy(fmp, 0x00, returndatasize())
                    revert(fmp, returndatasize())
                }
                // if the return value is not true, then the call is only successful if:
                // - the token address has code
                // - the returndata is empty
                success := and(success, and(iszero(returndatasize()), gt(extcodesize(token), 0)))
            }
            mstore(0x40, fmp)
            mstore(0x60, 0)
        }
    }

    /**
     * @dev Imitates a Solidity `token.approve(spender, value)` call, 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 spender The spender of the tokens
     * @param value The amount of token to transfer
     * @param bubble Behavior switch if the transfer call reverts: bubble the revert reason or return a false boolean.
     */
    function _safeApprove(IERC20 token, address spender, uint256 value, bool bubble) private returns (bool success) {
        bytes4 selector = IERC20.approve.selector;

        assembly ("memory-safe") {
            let fmp := mload(0x40)
            mstore(0x00, selector)
            mstore(0x04, and(spender, shr(96, not(0))))
            mstore(0x24, value)
            success := call(gas(), token, 0, 0x00, 0x44, 0x00, 0x20)
            // if call success and return is true, all is good.
            // otherwise (not success or return is not true), we need to perform further checks
            if iszero(and(success, eq(mload(0x00), 1))) {
                // if the call was a failure and bubble is enabled, bubble the error
                if and(iszero(success), bubble) {
                    returndatacopy(fmp, 0x00, returndatasize())
                    revert(fmp, returndatasize())
                }
                // if the return value is not true, then the call is only successful if:
                // - the token address has code
                // - the returndata is empty
                success := and(success, and(iszero(returndatasize()), gt(extcodesize(token), 0)))
            }
            mstore(0x40, fmp)
        }
    }
}

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

pragma solidity ^0.8.20;

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

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

pragma solidity ^0.8.20;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If EIP-1153 (transient storage) is available on the chain you're deploying at,
 * consider using {ReentrancyGuardTransient} instead.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant NOT_ENTERED = 1;
    uint256 private constant ENTERED = 2;

    uint256 private _status;

    /**
     * @dev Unauthorized reentrant call.
     */
    error ReentrancyGuardReentrantCall();

    constructor() {
        _status = NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be NOT_ENTERED
        if (_status == ENTERED) {
            revert ReentrancyGuardReentrantCall();
        }

        // Any calls to nonReentrant after this point will fail
        _status = ENTERED;
    }

    function _nonReentrantAfter() private {
        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = NOT_ENTERED;
    }

    /**
     * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
     * `nonReentrant` function in the call stack.
     */
    function _reentrancyGuardEntered() internal view returns (bool) {
        return _status == ENTERED;
    }
}

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

//CCTP STRUCT
struct CCTPParams {
    uint32 destinationDomain;      // offset 0x00
    uint256 minAmountUsdc;         // offset 0x20
    uint256 maxFee;                // offset 0x40
    uint32 minFinalityThreshold;   // offset 0x60
    uint32 crossChainFee;          // offset 0x80
}

//Msg. transmitter
interface IMessageTransmitter {
   function receiveMessage(bytes calldata message, bytes calldata attestation) external returns (bool);
}

// Minimal required for Interface MULTICALL
struct Call3Value {
    address target;
    bool allowFailure;
    uint256 value;
    bytes callData;
}

struct MulticallData {
    address multicallTarget;
    Call3Value[] calls; 
    address refundTo;
    address nftRecipient;
}

struct Result {
    bool success;
    bytes returnData;
}

interface IMulticall {
    function multicall(
        Call3Value[] calldata calls,
        address refundTo,
        address nftRecipient
    ) external payable returns (Result[] memory returnData);
}


interface IPermit2 {
    struct TokenPermissions {
        address token;
        uint256 amount;
    }

    struct PermitTransferFrom {
        TokenPermissions permitted;
        uint256 nonce;
        uint256 deadline;
    }

    struct SignatureTransferDetails {
        address to;
        uint256 requestedAmount;
    }

    function permitWitnessTransferFrom(
        PermitTransferFrom memory permit,
        SignatureTransferDetails calldata transferDetails,
        address owner,
        bytes32 witness,
        string calldata witnessTypeString,
        bytes calldata signature
    ) external;
}

interface ITokenMessenger {
    /// @notice CCTP V2: burn + deposit with optional fee and finality settings
    function depositForBurn(
        uint256 amount,
        uint32 destinationDomain,
        bytes32 mintRecipient,
        address burnToken,
        bytes32 destinationCaller,
        uint256 maxFee,
        uint32 minFinalityThreshold
    ) external returns (uint64 nonce);

    /// @notice CCTP V2 hook-enabled variant
    function depositForBurnWithHook(
        uint256 amount,
        uint32 destinationDomain,
        bytes32 mintRecipient,
        address burnToken,
        bytes32 destinationCaller,
        uint256 maxFee,
        uint32 minFinalityThreshold,
        bytes calldata hookData
    ) external returns (uint64 nonce);
}

interface IEIP712Types {
    struct OrderParameters {
        address srcAsset;
        address dstAsset;
        uint256 srcQuantity;
        uint256 dstQuantity;
        uint256 minQuantity;
        uint128 darkSalt;
    }
    
    struct SignedOrder {
        address sender;
        OrderParameters parameters;
        uint256 deadline;
        address target;
        address filler;
        string orderType;
        bytes[] customData;  
    }
    
    struct SigPayload {
        uint256 nonce;
        bytes signature;
    }


    //for single chain AND the final step of cross chain (i.e. multicall in recieveHook)
    event OrderFilled(
        bytes32 indexed orderUUID,
        string  orderType,
        address target,
        address filler,
        address srcAsset,
        address dstAsset,
        uint256 srcQuantity,
        uint256 dstQuantity
    );

    //For bridging X1 --> X2  i.e. CCTP, OFT, etc. 
    event OrderBridged(
        bytes32 indexed orderUUID,
        string  orderType,
        uint32  dstCID,
        address target, //whomever is getting paid out on dest chain
        address filler, //always be the person relaying
        address srcAsset, //asset on the source chain i.e. if going USDC on arb to USDC on eth this is the USDC-arb address
        address dstAsset,
        uint256 bridgeQuantity,
        uint256 maxFee
    );


    // Common errors
    error Expired();
    error Unauthorized();
    error InvalidCCTPParams();
    error InvalidType();
    error InsufficientOutput();
    error OrderHash(bytes32 h1, bytes32 h2); // just for debugging
    error CCTPRedemption(bytes reason);      // include revert data.
    error CCTPDepositFailed(bytes reason);   // include revert data.
    error PayoutFailed(bytes reason);
    error MEVprotect(uint256 minExpected, uint256 actual);
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 600
  },
  "evmVersion": "paris",
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "metadata": {
    "useLiteralContent": true
  }
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_permit2","type":"address"},{"internalType":"address","name":"_tokenMessenger","type":"address"},{"internalType":"address","name":"_messageTransmitter","type":"address"},{"internalType":"address","name":"_usdcAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"bytes","name":"reason","type":"bytes"}],"name":"CCTPDepositFailed","type":"error"},{"inputs":[{"internalType":"bytes","name":"reason","type":"bytes"}],"name":"CCTPRedemption","type":"error"},{"inputs":[],"name":"Expired","type":"error"},{"inputs":[],"name":"InsufficientOutput","type":"error"},{"inputs":[],"name":"InvalidCCTPParams","type":"error"},{"inputs":[],"name":"InvalidType","type":"error"},{"inputs":[{"internalType":"uint256","name":"minExpected","type":"uint256"},{"internalType":"uint256","name":"actual","type":"uint256"}],"name":"MEVprotect","type":"error"},{"inputs":[{"internalType":"bytes32","name":"h1","type":"bytes32"},{"internalType":"bytes32","name":"h2","type":"bytes32"}],"name":"OrderHash","type":"error"},{"inputs":[{"internalType":"bytes","name":"reason","type":"bytes"}],"name":"PayoutFailed","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"inputs":[],"name":"Unauthorized","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"orderUUID","type":"bytes32"},{"indexed":false,"internalType":"string","name":"orderType","type":"string"},{"indexed":false,"internalType":"uint32","name":"dstCID","type":"uint32"},{"indexed":false,"internalType":"address","name":"target","type":"address"},{"indexed":false,"internalType":"address","name":"filler","type":"address"},{"indexed":false,"internalType":"address","name":"srcAsset","type":"address"},{"indexed":false,"internalType":"address","name":"dstAsset","type":"address"},{"indexed":false,"internalType":"uint256","name":"bridgeQuantity","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"maxFee","type":"uint256"}],"name":"OrderBridged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"orderUUID","type":"bytes32"},{"indexed":false,"internalType":"string","name":"orderType","type":"string"},{"indexed":false,"internalType":"address","name":"target","type":"address"},{"indexed":false,"internalType":"address","name":"filler","type":"address"},{"indexed":false,"internalType":"address","name":"srcAsset","type":"address"},{"indexed":false,"internalType":"address","name":"dstAsset","type":"address"},{"indexed":false,"internalType":"uint256","name":"srcQuantity","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"dstQuantity","type":"uint256"}],"name":"OrderFilled","type":"event"},{"inputs":[],"name":"TYPE_CROSS","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TYPE_DEX","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TYPE_RELAY","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_ORDER_PARAMS_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_WITNESS_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"srcAsset","type":"address"},{"internalType":"address","name":"dstAsset","type":"address"},{"internalType":"uint256","name":"srcQuantity","type":"uint256"},{"internalType":"uint256","name":"dstQuantity","type":"uint256"},{"internalType":"uint256","name":"minQuantity","type":"uint256"},{"internalType":"uint128","name":"darkSalt","type":"uint128"}],"internalType":"struct IEIP712Types.OrderParameters","name":"params","type":"tuple"}],"name":"_hashParams","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"sender","type":"address"},{"components":[{"internalType":"address","name":"srcAsset","type":"address"},{"internalType":"address","name":"dstAsset","type":"address"},{"internalType":"uint256","name":"srcQuantity","type":"uint256"},{"internalType":"uint256","name":"dstQuantity","type":"uint256"},{"internalType":"uint256","name":"minQuantity","type":"uint256"},{"internalType":"uint128","name":"darkSalt","type":"uint128"}],"internalType":"struct IEIP712Types.OrderParameters","name":"parameters","type":"tuple"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"address","name":"target","type":"address"},{"internalType":"address","name":"filler","type":"address"},{"internalType":"string","name":"orderType","type":"string"},{"internalType":"bytes[]","name":"customData","type":"bytes[]"}],"internalType":"struct IEIP712Types.SignedOrder","name":"order","type":"tuple"},{"components":[{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"internalType":"struct IEIP712Types.SigPayload","name":"payload","type":"tuple"},{"components":[{"internalType":"address","name":"multicallTarget","type":"address"},{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bool","name":"allowFailure","type":"bool"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"callData","type":"bytes"}],"internalType":"struct Call3Value[]","name":"calls","type":"tuple[]"},{"internalType":"address","name":"refundTo","type":"address"},{"internalType":"address","name":"nftRecipient","type":"address"}],"internalType":"struct MulticallData","name":"arb","type":"tuple"},{"internalType":"uint256","name":"minOut","type":"uint256"}],"name":"fillOrder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"sender","type":"address"},{"components":[{"internalType":"address","name":"srcAsset","type":"address"},{"internalType":"address","name":"dstAsset","type":"address"},{"internalType":"uint256","name":"srcQuantity","type":"uint256"},{"internalType":"uint256","name":"dstQuantity","type":"uint256"},{"internalType":"uint256","name":"minQuantity","type":"uint256"},{"internalType":"uint128","name":"darkSalt","type":"uint128"}],"internalType":"struct IEIP712Types.OrderParameters","name":"parameters","type":"tuple"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"address","name":"target","type":"address"},{"internalType":"address","name":"filler","type":"address"},{"internalType":"string","name":"orderType","type":"string"},{"internalType":"bytes[]","name":"customData","type":"bytes[]"}],"internalType":"struct IEIP712Types.SignedOrder","name":"o","type":"tuple"}],"name":"hashOrder","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"sender","type":"address"},{"components":[{"internalType":"address","name":"srcAsset","type":"address"},{"internalType":"address","name":"dstAsset","type":"address"},{"internalType":"uint256","name":"srcQuantity","type":"uint256"},{"internalType":"uint256","name":"dstQuantity","type":"uint256"},{"internalType":"uint256","name":"minQuantity","type":"uint256"},{"internalType":"uint128","name":"darkSalt","type":"uint128"}],"internalType":"struct IEIP712Types.OrderParameters","name":"parameters","type":"tuple"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"address","name":"target","type":"address"},{"internalType":"address","name":"filler","type":"address"},{"internalType":"string","name":"orderType","type":"string"},{"internalType":"bytes[]","name":"customData","type":"bytes[]"}],"internalType":"struct IEIP712Types.SignedOrder","name":"order","type":"tuple"},{"components":[{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"internalType":"struct IEIP712Types.SigPayload","name":"payload","type":"tuple"},{"components":[{"internalType":"address","name":"multicallTarget","type":"address"},{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bool","name":"allowFailure","type":"bool"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"callData","type":"bytes"}],"internalType":"struct Call3Value[]","name":"calls","type":"tuple[]"},{"internalType":"address","name":"refundTo","type":"address"},{"internalType":"address","name":"nftRecipient","type":"address"}],"internalType":"struct MulticallData","name":"arb","type":"tuple"},{"internalType":"uint256","name":"minOut","type":"uint256"}],"name":"sendOrder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"message","type":"bytes"},{"internalType":"bytes","name":"attestation","type":"bytes"},{"components":[{"internalType":"address","name":"sender","type":"address"},{"components":[{"internalType":"address","name":"srcAsset","type":"address"},{"internalType":"address","name":"dstAsset","type":"address"},{"internalType":"uint256","name":"srcQuantity","type":"uint256"},{"internalType":"uint256","name":"dstQuantity","type":"uint256"},{"internalType":"uint256","name":"minQuantity","type":"uint256"},{"internalType":"uint128","name":"darkSalt","type":"uint128"}],"internalType":"struct IEIP712Types.OrderParameters","name":"parameters","type":"tuple"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"address","name":"target","type":"address"},{"internalType":"address","name":"filler","type":"address"},{"internalType":"string","name":"orderType","type":"string"},{"internalType":"bytes[]","name":"customData","type":"bytes[]"}],"internalType":"struct IEIP712Types.SignedOrder","name":"order","type":"tuple"},{"components":[{"internalType":"address","name":"multicallTarget","type":"address"},{"components":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bool","name":"allowFailure","type":"bool"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"callData","type":"bytes"}],"internalType":"struct Call3Value[]","name":"calls","type":"tuple[]"},{"internalType":"address","name":"refundTo","type":"address"},{"internalType":"address","name":"nftRecipient","type":"address"}],"internalType":"struct MulticallData","name":"arb","type":"tuple"},{"internalType":"uint256","name":"minOut","type":"uint256"}],"name":"takeOrder","outputs":[{"internalType":"bool","name":"fin","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"witnessTypeString","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

61010060405234801561001157600080fd5b506040516125e33803806125e383398101604081905261003091610073565b60016000556001600160a01b0393841660805291831660a052821660c0521660e0526100c7565b80516001600160a01b038116811461006e57600080fd5b919050565b6000806000806080858703121561008957600080fd5b61009285610057565b93506100a060208601610057565b92506100ae60408601610057565b91506100bc60608601610057565b905092959194509250565b60805160a05160c05160e05161249d6101466000396000818161041f0152818161054f015281816105f301528181610b3101528181610bc801528181610ce30152818161119e0152818161123d015281816112ba015261137301526000610a2d01526000818161125e015261140e01526000610e7c015261249d6000f3fe6080604052600436106100c05760003560e01c806391ba38ec11610074578063efc8aac41161004e578063efc8aac41461021f578063fdea61961461024f578063fe79f6191461028357600080fd5b806391ba38ec146101bd578063b51ed51b146101df578063dec9f72f146101ff57600080fd5b806369a2aad2116100a557806369a2aad2146101335780636e2d09911461016757806374b9e8381461019b57600080fd5b80631e4e30fd146100cc5780632ec926a7146100ff57600080fd5b366100c757005b600080fd5b3480156100d857600080fd5b506100ec6100e73660046119d7565b6102b7565b6040519081526020015b60405180910390f35b34801561010b57600080fd5b506100ec7f28a6b1c3ac828653bad9f95ff5c3e77405a556137c9a922feb6dfe7732db081b81565b34801561013f57600080fd5b506100ec7f776716c31b7a1fae26c9746a93f9980261d9065bd9b539720624eafe20da3d5e81565b34801561017357600080fd5b506100ec7fb15c6f4cb2704b59886404596581f035599143a4de893556943a4865c51863a581565b3480156101a757600080fd5b506101b06103c6565b6040516100f69190611a64565b3480156101c957600080fd5b506101dd6101d8366004611a90565b6103e5565b005b3480156101eb57600080fd5b506101dd6101fa366004611a90565b610778565b34801561020b57600080fd5b506100ec61021a366004611b31565b6108db565b34801561022b57600080fd5b5061023f61023a366004611b95565b6109a8565b60405190151581526020016100f6565b34801561025b57600080fd5b506100ec7f51489d4263e7aff6c512a83666a144c08d740a160db30b26495ddfc5e7f1c21e81565b34801561028f57600080fd5b506100ec7f30fdb2c970f3affdeb948b19a7ed10455583a16fe94c184964134c3d830930eb81565b6000806102c6836020016108db565b90507f28a6b1c3ac828653bad9f95ff5c3e77405a556137c9a922feb6dfe7732db081b6102f66020850185611c89565b8260e086013561030e61012088016101008901611c89565b61032061014089016101208a01611c89565b61032e6101408a018a611ca4565b60405161033c929190611ceb565b60405190819003902061035b6103566101608c018c611cfb565b610d4a565b6040805160208101999099526001600160a01b03978816908901526060880195909552608087019390935290841660a086015290921660c084015260e08301919091526101008201526101200160405160208183030381529060405280519060200120915050919050565b60405180610180016040528061014a815260200161231e61014a913981565b6103ed610e30565b60006103f98585610e5a565b9050600061041361040e610160880188611cfb565b610f89565b90506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001661044f6040880160208901611c89565b6001600160a01b031614610537576104876104706040880160208901611c89565b61047d6020870187611c89565b606089013561102c565b6104946020850185611c89565b6001600160a01b03166330be55676104af6020870187611cfb565b6104bf6060890160408a01611c89565b6104cf60808a0160608b01611c89565b6040518563ffffffff1660e01b81526004016104ee9493929190611d7f565b6000604051808303816000875af115801561050d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526105359190810190611f04565b505b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa15801561059e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105c2919061207b565b905081602001518110156105e95760405163bb2875c360e01b815260040160405180910390fd5b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166106236040890160208a01611c89565b6001600160a01b03161415801561063957508381105b1561066657604051633990cfef60e21b815260048101859052602481018290526044015b60405180910390fd5b60007f776716c31b7a1fae26c9746a93f9980261d9065bd9b539720624eafe20da3d5e6106976101408a018a611ca4565b6040516106a5929190611ceb565b60405180910390201490506106bd888484878561112e565b837ffa056c6fc7e49102eebc5a584edb89991a093392880d7bf55957c02805dd0cce6106ed6101408b018b611ca4565b86516107016101208e016101008f01611c89565b8d6101200160208101906107159190611c89565b8e602001600001602081019061072b9190611c89565b8f60200160200160208101906107419190611c89565b8a8c6040015160405161075c99989796959493929190612094565b60405180910390a2505050506107726001600055565b50505050565b610780610e30565b6107ac847f51489d4263e7aff6c512a83666a144c08d740a160db30b26495ddfc5e7f1c21e60016114b6565b60006107b88585610e5a565b90506107e46107cd6040870160208801611c89565b6107da6020860186611c89565b606088013561102c565b6107f16020840184611c89565b6001600160a01b03166330be556761080c6020860186611cfb565b61081c6060880160408901611c89565b61082c6080890160608a01611c89565b6040518563ffffffff1660e01b815260040161084b9493929190611d7f565b6000604051808303816000875af115801561086a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526108929190810190611f04565b506108b381866108a86060820160408301611c89565b60a08901358661158b565b6108d05760405163bb2875c360e01b815260040160405180910390fd5b506107726001600055565b60007f30fdb2c970f3affdeb948b19a7ed10455583a16fe94c184964134c3d830930eb61090b6020840184611c89565b61091b6040850160208601611c89565b60408501356060860135608087013561093a60c0890160a08a016120f2565b6040805160208101989098526001600160a01b0396871690880152949093166060860152608085019190915260a084015260c08301526fffffffffffffffffffffffffffffffff1660e082015261010001604051602081830303815290604052805190602001209050919050565b60006109b2610e30565b60006109be8989611825565b9050806109ca866102b7565b146109fc576109d8856102b7565b604051631671c27b60e21b815260048101919091526024810182905260440161065d565b610a28857f776716c31b7a1fae26c9746a93f9980261d9065bd9b539720624eafe20da3d5e60006114b6565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166357ecfd2860e01b8c8c8c8c604051602401610a749493929190612124565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b0319909416939093179092529051610ab2919061214b565b6000604051808303816000865af19150503d8060008114610aef576040519150601f19603f3d011682016040523d82523d6000602084013e610af4565b606091505b509150915081610b1957806040516321f172cd60e21b815260040161065d9190611a64565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610b80573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba4919061207b565b90506000610bb56020890189611c89565b6001600160a01b031614610caa57610bfa7f0000000000000000000000000000000000000000000000000000000000000000610bf460208a018a611c89565b8361102c565b610c076020880188611c89565b6001600160a01b03166330be5567610c2260208a018a611cfb565b610c3260608c0160408d01611c89565b610c4260808d0160608e01611c89565b6040518563ffffffff1660e01b8152600401610c619493929190611d7f565b6000604051808303816000875af1158015610c80573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610ca89190810190611f04565b505b610cca8489610cbf6060820160408301611c89565b60a08c01358a61158b565b15610cdc576001945050505050610d35565b610d0a84897f000000000000000000000000000000000000000000000000000000000000000084600061158b565b15610d1c576000945050505050610d35565b60405163bb2875c360e01b815260040160405180910390fd5b610d3f6001600055565b979650505050505050565b600081818167ffffffffffffffff811115610d6757610d67611e94565b604051908082528060200260200182016040528015610d90578160200160208202803683370190505b50905060005b82811015610dfd57858582818110610db057610db0612167565b9050602002810190610dc29190611ca4565b604051610dd0929190611ceb565b6040518091039020828281518110610dea57610dea612167565b6020908102919091010152600101610d96565b5080604051602001610e0f919061217d565b60405160208183030381529060405280519060200120925050505b92915050565b600260005403610e5357604051633ee5aeb560e01b815260040160405180910390fd5b6002600055565b6000610e65836102b7565b6040805160a0810182529192506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163137c29fe91819060608201908190610ebb908a0160208b01611c89565b6001600160a01b031681526060890135602091820181905291835287358382015260e0890135604093840152825180840190935230835282810191909152610f0590880188611c89565b8560405180610180016040528061014a815260200161231e61014a9139610f2f60208a018a611ca4565b6040518863ffffffff1660e01b8152600401610f5197969594939291906121b3565b600060405180830381600087803b158015610f6b57600080fd5b505af1158015610f7f573d6000803e3d6000fd5b5050505092915050565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915260058214610fd5576040516368804db160e01b815260040160405180910390fd5b60208335840181013560e090811c8352818501358501820135838301526040808601358601830135908401526060808601358601830135821c9084015260808086013590950190910135901c928101929092525090565b604080513060248201526001600160a01b0384811660448084019190915283518084039091018152606490920183526020820180516001600160e01b0316636eb1769f60e11b179052915160009283929087169161108a919061214b565b600060405180830381855afa9150503d80600081146110c5576040519150601f19603f3d011682016040523d82523d6000602084013e6110ca565b606091505b509150915060008280156110e057506020825110155b6110eb5760006110ff565b818060200190518101906110ff919061207b565b905083811061111057505050505050565b6111266001600160a01b03871686600019611882565b505050505050565b60008161115b577fb15c6f4cb2704b59886404596581f035599143a4de893556943a4865c51863a561117d565b7f776716c31b7a1fae26c9746a93f9980261d9065bd9b539720624eafe20da3d5e5b905061118b868260016114b6565b811580156111d957506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166111ce6040880160208901611c89565b6001600160a01b0316145b156112385760006111f260808801356060890135612255565b90506111fe8186612255565b945061123661121561014089016101208a01611c89565b8261122660408b0160208c01611c89565b6001600160a01b031691906118fe565b505b6112837f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000008661102c565b600082611363578551634701287760e11b9086906112b86112ac6101208c016101008d01611c89565b6001600160a01b031690565b7f000000000000000000000000000000000000000000000000000000000000000060006040808d015160608e01519151602481019790975263ffffffff958616604488015260648701949094526001600160a01b03909216608486015260a485015260c48401919091521660e48201526101040160408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611407565b855163779b432d60e01b908690307f0000000000000000000000000000000000000000000000000000000000000000308b604001518c606001518b6040516020016113b091815260200190565b60408051601f19818403018152908290526113d49897969594939291602401612276565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091525b90506000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031683604051611444919061214b565b6000604051808303816000865af19150503d8060008114611481576040519150601f19603f3d011682016040523d82523d6000602084013e611486565b606091505b5091509150816114ab578060405163169ecfb160e11b815260040161065d9190611a64565b505050505050505050565b80156114e157428360e0013510156114e157604051630407b05b60e31b815260040160405180910390fd5b60006114f561014085016101208601611c89565b6001600160a01b03161415801561152657503361151a61014085016101208601611c89565b6001600160a01b031614155b15611543576040516282b42960e81b815260040160405180910390fd5b81611552610140850185611ca4565b604051611560929190611ceb565b6040518091039020146115865760405163b968846160e01b815260040160405180910390fd5b505050565b6000806001600160a01b038516611656575047838110156115b057600091505061181c565b828110156115db57604051633990cfef60e21b8152600481018490526024810182905260440161065d565b60006115ef61012088016101008901611c89565b6001600160a01b03168260405160006040518083038185875af1925050503d8060008114611639576040519150601f19603f3d011682016040523d82523d6000602084013e61163e565b606091505b505090508061165057915061181c9050565b5061178c565b604080513060248083019190915282518083039091018152604490910182526020810180516001600160e01b03166370a0823160e01b179052905160009182916001600160a01b038916916116aa9161214b565b600060405180830381855afa9150503d80600081146116e5576040519150601f19603f3d011682016040523d82523d6000602084013e6116ea565b606091505b50915091508180156116fe57506020815110155b61170e576000935050505061181c565b80806020019051810190611722919061207b565b925085831015611738576000935050505061181c565b8483101561176357604051633990cfef60e21b8152600481018690526024810184905260440161065d565b6117896117786101208a016101008b01611c89565b6001600160a01b03891690856118fe565b50505b867fcff4c6fa646ccfbe7edf1ab0a8e2f1fe0d66da25a65692c3cb625145a4de23316117bc610140890189611ca4565b6117ce6101208b016101008c01611c89565b6117e06101408c016101208d01611c89565b6117f060408d0160208e01611c89565b8b8d602001604001358960405161180e9897969594939291906122ca565b60405180910390a260019150505b95945050505050565b600060208210156118785760405162461bcd60e51b815260206004820152601160248201527f6d65737361676520746f6f2073686f7274000000000000000000000000000000604482015260640161065d565b5001601f19013590565b61188f838383600061190b565b611586576118a183836000600161190b565b6118c957604051635274afe760e01b81526001600160a01b038416600482015260240161065d565b6118d6838383600161190b565b61158657604051635274afe760e01b81526001600160a01b038416600482015260240161065d565b6118d68383836001611971565b60405163095ea7b360e01b60008181526001600160a01b038616600452602485905291602083604481808b5af192506001600051148316611965578383151615611958573d6000823e3d81fd5b6000873b113d1516831692505b60405250949350505050565b60405163a9059cbb60e01b60008181526001600160a01b038616600452602485905291602083604481808b5af192506001600051148316611965578383151615611958573d6000823e3d81fd5b600061018082840312156119d157600080fd5b50919050565b6000602082840312156119e957600080fd5b813567ffffffffffffffff811115611a0057600080fd5b611a0c848285016119be565b949350505050565b60005b83811015611a2f578181015183820152602001611a17565b50506000910152565b60008151808452611a50816020860160208601611a14565b601f01601f19169290920160200192915050565b602081526000611a776020830184611a38565b9392505050565b6000608082840312156119d157600080fd5b60008060008060808587031215611aa657600080fd5b843567ffffffffffffffff811115611abd57600080fd5b611ac9878288016119be565b945050602085013567ffffffffffffffff811115611ae657600080fd5b850160408188031215611af857600080fd5b9250604085013567ffffffffffffffff811115611b1457600080fd5b611b2087828801611a7e565b949793965093946060013593505050565b600060c0828403128015611b4457600080fd5b509092915050565b60008083601f840112611b5e57600080fd5b50813567ffffffffffffffff811115611b7657600080fd5b602083019150836020828501011115611b8e57600080fd5b9250929050565b600080600080600080600060a0888a031215611bb057600080fd5b873567ffffffffffffffff811115611bc757600080fd5b611bd38a828b01611b4c565b909850965050602088013567ffffffffffffffff811115611bf357600080fd5b611bff8a828b01611b4c565b909650945050604088013567ffffffffffffffff811115611c1f57600080fd5b611c2b8a828b016119be565b935050606088013567ffffffffffffffff811115611c4857600080fd5b611c548a828b01611a7e565b979a969950949793969295929450505060809091013590565b80356001600160a01b0381168114611c8457600080fd5b919050565b600060208284031215611c9b57600080fd5b611a7782611c6d565b6000808335601e19843603018112611cbb57600080fd5b83018035915067ffffffffffffffff821115611cd657600080fd5b602001915036819003821315611b8e57600080fd5b8183823760009101908152919050565b6000808335601e19843603018112611d1257600080fd5b83018035915067ffffffffffffffff821115611d2d57600080fd5b6020019150600581901b3603821315611b8e57600080fd5b8015158114611d5357600080fd5b50565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6060808252810184905260006080600586901b830181019083018783607e1936839003015b89821015611e6b57868503607f190184528235818112611dc357600080fd5b8b016001600160a01b03611dd682611c6d565b1686526020810135611de781611d45565b1515602087015260408181013590870152606081013536829003601e19018112611e1057600080fd5b0160208101903567ffffffffffffffff811115611e2c57600080fd5b803603821315611e3b57600080fd5b60806060880152611e50608088018284611d56565b96505050602083019250602084019350600182019150611da4565b5050506001600160a01b03861660208501525090506001600160a01b038316604083015261181c565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff81118282101715611ecd57611ecd611e94565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715611efc57611efc611e94565b604052919050565b600060208284031215611f1657600080fd5b815167ffffffffffffffff811115611f2d57600080fd5b8201601f81018413611f3e57600080fd5b805167ffffffffffffffff811115611f5857611f58611e94565b8060051b611f6860208201611ed3565b91825260208184018101929081019087841115611f8457600080fd5b6020850192505b83831015610d3f57825167ffffffffffffffff811115611faa57600080fd5b85016040818a03601f19011215611fc057600080fd5b611fc8611eaa565b6020820151611fd681611d45565b8152604082015167ffffffffffffffff811115611ff257600080fd5b60208184010192505089601f83011261200a57600080fd5b815167ffffffffffffffff81111561202457612024611e94565b612037601f8201601f1916602001611ed3565b8181528b602083860101111561204c57600080fd5b61205d826020830160208701611a14565b80602084015250508084525050602082019150602083019250611f8b565b60006020828403121561208d57600080fd5b5051919050565b610100815260006120aa61010083018b8d611d56565b63ffffffff999099166020830152506001600160a01b03968716604082015294861660608601529285166080850152931660a083015260c082019290925260e0015292915050565b60006020828403121561210457600080fd5b81356fffffffffffffffffffffffffffffffff81168114611a7757600080fd5b604081526000612138604083018688611d56565b8281036020840152610d3f818587611d56565b6000825161215d818460208701611a14565b9190910192915050565b634e487b7160e01b600052603260045260246000fd5b8151600090829060208501835b828110156121a857815184526020938401939091019060010161218a565b509195945050505050565b6121d181895180516001600160a01b03168252602090810151910152565b6020880151604082015260408801516060820152612205608082018880516001600160a01b03168252602090810151910152565b6001600160a01b03861660c08201528460e08201526101406101008201526000612233610140830186611a38565b828103610120840152612247818587611d56565b9a9950505050505050505050565b81810381811115610e2a57634e487b7160e01b600052601160045260246000fd5b88815263ffffffff881660208201528660408201526001600160a01b03861660608201528460808201528360a082015263ffffffff831660c082015261010060e08201526000612247610100830184611a38565b60e0815260006122de60e083018a8c611d56565b6001600160a01b039889166020840152968816604083015250938616606085015291909416608083015260a082019390935260c001919091529291505056fe5369676e65644f72646572207769746e657373294f72646572506172616d657465727328616464726573732073726341737365742c616464726573732064737441737365742c75696e74323536207372635175616e746974792c75696e74323536206473745175616e746974792c75696e74323536206d696e5175616e746974792c75696e74313238206461726b53616c74295369676e65644f7264657228616464726573732073656e6465722c4f72646572506172616d657465727320706172616d65746572732c75696e7432353620646561646c696e652c61646472657373207461726765742c616464726573732066696c6c65722c737472696e67206f72646572547970652c62797465735b5d20637573746f6d4461746129546f6b656e5065726d697373696f6e73286164647265737320746f6b656e2c75696e7432353620616d6f756e7429a2646970667358221220c2418113976ad276ebafdff72db7139e26fa807093ad96899a7de9b99cac449b64736f6c634300081c0033000000000000000000000000000000000022d473030f116ddee9f6b43ac78ba300000000000000000000000028b5a0e9c621a5badaa536219b3a228c8168cf5d00000000000000000000000081d40f21f12a8f0e3252bccb954d722d4c464b64000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48

Deployed Bytecode

0x6080604052600436106100c05760003560e01c806391ba38ec11610074578063efc8aac41161004e578063efc8aac41461021f578063fdea61961461024f578063fe79f6191461028357600080fd5b806391ba38ec146101bd578063b51ed51b146101df578063dec9f72f146101ff57600080fd5b806369a2aad2116100a557806369a2aad2146101335780636e2d09911461016757806374b9e8381461019b57600080fd5b80631e4e30fd146100cc5780632ec926a7146100ff57600080fd5b366100c757005b600080fd5b3480156100d857600080fd5b506100ec6100e73660046119d7565b6102b7565b6040519081526020015b60405180910390f35b34801561010b57600080fd5b506100ec7f28a6b1c3ac828653bad9f95ff5c3e77405a556137c9a922feb6dfe7732db081b81565b34801561013f57600080fd5b506100ec7f776716c31b7a1fae26c9746a93f9980261d9065bd9b539720624eafe20da3d5e81565b34801561017357600080fd5b506100ec7fb15c6f4cb2704b59886404596581f035599143a4de893556943a4865c51863a581565b3480156101a757600080fd5b506101b06103c6565b6040516100f69190611a64565b3480156101c957600080fd5b506101dd6101d8366004611a90565b6103e5565b005b3480156101eb57600080fd5b506101dd6101fa366004611a90565b610778565b34801561020b57600080fd5b506100ec61021a366004611b31565b6108db565b34801561022b57600080fd5b5061023f61023a366004611b95565b6109a8565b60405190151581526020016100f6565b34801561025b57600080fd5b506100ec7f51489d4263e7aff6c512a83666a144c08d740a160db30b26495ddfc5e7f1c21e81565b34801561028f57600080fd5b506100ec7f30fdb2c970f3affdeb948b19a7ed10455583a16fe94c184964134c3d830930eb81565b6000806102c6836020016108db565b90507f28a6b1c3ac828653bad9f95ff5c3e77405a556137c9a922feb6dfe7732db081b6102f66020850185611c89565b8260e086013561030e61012088016101008901611c89565b61032061014089016101208a01611c89565b61032e6101408a018a611ca4565b60405161033c929190611ceb565b60405190819003902061035b6103566101608c018c611cfb565b610d4a565b6040805160208101999099526001600160a01b03978816908901526060880195909552608087019390935290841660a086015290921660c084015260e08301919091526101008201526101200160405160208183030381529060405280519060200120915050919050565b60405180610180016040528061014a815260200161231e61014a913981565b6103ed610e30565b60006103f98585610e5a565b9050600061041361040e610160880188611cfb565b610f89565b90506001600160a01b037f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb481661044f6040880160208901611c89565b6001600160a01b031614610537576104876104706040880160208901611c89565b61047d6020870187611c89565b606089013561102c565b6104946020850185611c89565b6001600160a01b03166330be55676104af6020870187611cfb565b6104bf6060890160408a01611c89565b6104cf60808a0160608b01611c89565b6040518563ffffffff1660e01b81526004016104ee9493929190611d7f565b6000604051808303816000875af115801561050d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526105359190810190611f04565b505b6040516370a0823160e01b81523060048201526000907f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb486001600160a01b0316906370a0823190602401602060405180830381865afa15801561059e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105c2919061207b565b905081602001518110156105e95760405163bb2875c360e01b815260040160405180910390fd5b6001600160a01b037f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48166106236040890160208a01611c89565b6001600160a01b03161415801561063957508381105b1561066657604051633990cfef60e21b815260048101859052602481018290526044015b60405180910390fd5b60007f776716c31b7a1fae26c9746a93f9980261d9065bd9b539720624eafe20da3d5e6106976101408a018a611ca4565b6040516106a5929190611ceb565b60405180910390201490506106bd888484878561112e565b837ffa056c6fc7e49102eebc5a584edb89991a093392880d7bf55957c02805dd0cce6106ed6101408b018b611ca4565b86516107016101208e016101008f01611c89565b8d6101200160208101906107159190611c89565b8e602001600001602081019061072b9190611c89565b8f60200160200160208101906107419190611c89565b8a8c6040015160405161075c99989796959493929190612094565b60405180910390a2505050506107726001600055565b50505050565b610780610e30565b6107ac847f51489d4263e7aff6c512a83666a144c08d740a160db30b26495ddfc5e7f1c21e60016114b6565b60006107b88585610e5a565b90506107e46107cd6040870160208801611c89565b6107da6020860186611c89565b606088013561102c565b6107f16020840184611c89565b6001600160a01b03166330be556761080c6020860186611cfb565b61081c6060880160408901611c89565b61082c6080890160608a01611c89565b6040518563ffffffff1660e01b815260040161084b9493929190611d7f565b6000604051808303816000875af115801561086a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526108929190810190611f04565b506108b381866108a86060820160408301611c89565b60a08901358661158b565b6108d05760405163bb2875c360e01b815260040160405180910390fd5b506107726001600055565b60007f30fdb2c970f3affdeb948b19a7ed10455583a16fe94c184964134c3d830930eb61090b6020840184611c89565b61091b6040850160208601611c89565b60408501356060860135608087013561093a60c0890160a08a016120f2565b6040805160208101989098526001600160a01b0396871690880152949093166060860152608085019190915260a084015260c08301526fffffffffffffffffffffffffffffffff1660e082015261010001604051602081830303815290604052805190602001209050919050565b60006109b2610e30565b60006109be8989611825565b9050806109ca866102b7565b146109fc576109d8856102b7565b604051631671c27b60e21b815260048101919091526024810182905260440161065d565b610a28857f776716c31b7a1fae26c9746a93f9980261d9065bd9b539720624eafe20da3d5e60006114b6565b6000807f00000000000000000000000081d40f21f12a8f0e3252bccb954d722d4c464b646001600160a01b03166357ecfd2860e01b8c8c8c8c604051602401610a749493929190612124565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b0319909416939093179092529051610ab2919061214b565b6000604051808303816000865af19150503d8060008114610aef576040519150601f19603f3d011682016040523d82523d6000602084013e610af4565b606091505b509150915081610b1957806040516321f172cd60e21b815260040161065d9190611a64565b6040516370a0823160e01b81523060048201526000907f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb486001600160a01b0316906370a0823190602401602060405180830381865afa158015610b80573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba4919061207b565b90506000610bb56020890189611c89565b6001600160a01b031614610caa57610bfa7f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48610bf460208a018a611c89565b8361102c565b610c076020880188611c89565b6001600160a01b03166330be5567610c2260208a018a611cfb565b610c3260608c0160408d01611c89565b610c4260808d0160608e01611c89565b6040518563ffffffff1660e01b8152600401610c619493929190611d7f565b6000604051808303816000875af1158015610c80573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610ca89190810190611f04565b505b610cca8489610cbf6060820160408301611c89565b60a08c01358a61158b565b15610cdc576001945050505050610d35565b610d0a84897f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4884600061158b565b15610d1c576000945050505050610d35565b60405163bb2875c360e01b815260040160405180910390fd5b610d3f6001600055565b979650505050505050565b600081818167ffffffffffffffff811115610d6757610d67611e94565b604051908082528060200260200182016040528015610d90578160200160208202803683370190505b50905060005b82811015610dfd57858582818110610db057610db0612167565b9050602002810190610dc29190611ca4565b604051610dd0929190611ceb565b6040518091039020828281518110610dea57610dea612167565b6020908102919091010152600101610d96565b5080604051602001610e0f919061217d565b60405160208183030381529060405280519060200120925050505b92915050565b600260005403610e5357604051633ee5aeb560e01b815260040160405180910390fd5b6002600055565b6000610e65836102b7565b6040805160a0810182529192506001600160a01b037f000000000000000000000000000000000022d473030f116ddee9f6b43ac78ba3169163137c29fe91819060608201908190610ebb908a0160208b01611c89565b6001600160a01b031681526060890135602091820181905291835287358382015260e0890135604093840152825180840190935230835282810191909152610f0590880188611c89565b8560405180610180016040528061014a815260200161231e61014a9139610f2f60208a018a611ca4565b6040518863ffffffff1660e01b8152600401610f5197969594939291906121b3565b600060405180830381600087803b158015610f6b57600080fd5b505af1158015610f7f573d6000803e3d6000fd5b5050505092915050565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915260058214610fd5576040516368804db160e01b815260040160405180910390fd5b60208335840181013560e090811c8352818501358501820135838301526040808601358601830135908401526060808601358601830135821c9084015260808086013590950190910135901c928101929092525090565b604080513060248201526001600160a01b0384811660448084019190915283518084039091018152606490920183526020820180516001600160e01b0316636eb1769f60e11b179052915160009283929087169161108a919061214b565b600060405180830381855afa9150503d80600081146110c5576040519150601f19603f3d011682016040523d82523d6000602084013e6110ca565b606091505b509150915060008280156110e057506020825110155b6110eb5760006110ff565b818060200190518101906110ff919061207b565b905083811061111057505050505050565b6111266001600160a01b03871686600019611882565b505050505050565b60008161115b577fb15c6f4cb2704b59886404596581f035599143a4de893556943a4865c51863a561117d565b7f776716c31b7a1fae26c9746a93f9980261d9065bd9b539720624eafe20da3d5e5b905061118b868260016114b6565b811580156111d957506001600160a01b037f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48166111ce6040880160208901611c89565b6001600160a01b0316145b156112385760006111f260808801356060890135612255565b90506111fe8186612255565b945061123661121561014089016101208a01611c89565b8261122660408b0160208c01611c89565b6001600160a01b031691906118fe565b505b6112837f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb487f00000000000000000000000028b5a0e9c621a5badaa536219b3a228c8168cf5d8661102c565b600082611363578551634701287760e11b9086906112b86112ac6101208c016101008d01611c89565b6001600160a01b031690565b7f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4860006040808d015160608e01519151602481019790975263ffffffff958616604488015260648701949094526001600160a01b03909216608486015260a485015260c48401919091521660e48201526101040160408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611407565b855163779b432d60e01b908690307f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48308b604001518c606001518b6040516020016113b091815260200190565b60408051601f19818403018152908290526113d49897969594939291602401612276565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091525b90506000807f00000000000000000000000028b5a0e9c621a5badaa536219b3a228c8168cf5d6001600160a01b031683604051611444919061214b565b6000604051808303816000865af19150503d8060008114611481576040519150601f19603f3d011682016040523d82523d6000602084013e611486565b606091505b5091509150816114ab578060405163169ecfb160e11b815260040161065d9190611a64565b505050505050505050565b80156114e157428360e0013510156114e157604051630407b05b60e31b815260040160405180910390fd5b60006114f561014085016101208601611c89565b6001600160a01b03161415801561152657503361151a61014085016101208601611c89565b6001600160a01b031614155b15611543576040516282b42960e81b815260040160405180910390fd5b81611552610140850185611ca4565b604051611560929190611ceb565b6040518091039020146115865760405163b968846160e01b815260040160405180910390fd5b505050565b6000806001600160a01b038516611656575047838110156115b057600091505061181c565b828110156115db57604051633990cfef60e21b8152600481018490526024810182905260440161065d565b60006115ef61012088016101008901611c89565b6001600160a01b03168260405160006040518083038185875af1925050503d8060008114611639576040519150601f19603f3d011682016040523d82523d6000602084013e61163e565b606091505b505090508061165057915061181c9050565b5061178c565b604080513060248083019190915282518083039091018152604490910182526020810180516001600160e01b03166370a0823160e01b179052905160009182916001600160a01b038916916116aa9161214b565b600060405180830381855afa9150503d80600081146116e5576040519150601f19603f3d011682016040523d82523d6000602084013e6116ea565b606091505b50915091508180156116fe57506020815110155b61170e576000935050505061181c565b80806020019051810190611722919061207b565b925085831015611738576000935050505061181c565b8483101561176357604051633990cfef60e21b8152600481018690526024810184905260440161065d565b6117896117786101208a016101008b01611c89565b6001600160a01b03891690856118fe565b50505b867fcff4c6fa646ccfbe7edf1ab0a8e2f1fe0d66da25a65692c3cb625145a4de23316117bc610140890189611ca4565b6117ce6101208b016101008c01611c89565b6117e06101408c016101208d01611c89565b6117f060408d0160208e01611c89565b8b8d602001604001358960405161180e9897969594939291906122ca565b60405180910390a260019150505b95945050505050565b600060208210156118785760405162461bcd60e51b815260206004820152601160248201527f6d65737361676520746f6f2073686f7274000000000000000000000000000000604482015260640161065d565b5001601f19013590565b61188f838383600061190b565b611586576118a183836000600161190b565b6118c957604051635274afe760e01b81526001600160a01b038416600482015260240161065d565b6118d6838383600161190b565b61158657604051635274afe760e01b81526001600160a01b038416600482015260240161065d565b6118d68383836001611971565b60405163095ea7b360e01b60008181526001600160a01b038616600452602485905291602083604481808b5af192506001600051148316611965578383151615611958573d6000823e3d81fd5b6000873b113d1516831692505b60405250949350505050565b60405163a9059cbb60e01b60008181526001600160a01b038616600452602485905291602083604481808b5af192506001600051148316611965578383151615611958573d6000823e3d81fd5b600061018082840312156119d157600080fd5b50919050565b6000602082840312156119e957600080fd5b813567ffffffffffffffff811115611a0057600080fd5b611a0c848285016119be565b949350505050565b60005b83811015611a2f578181015183820152602001611a17565b50506000910152565b60008151808452611a50816020860160208601611a14565b601f01601f19169290920160200192915050565b602081526000611a776020830184611a38565b9392505050565b6000608082840312156119d157600080fd5b60008060008060808587031215611aa657600080fd5b843567ffffffffffffffff811115611abd57600080fd5b611ac9878288016119be565b945050602085013567ffffffffffffffff811115611ae657600080fd5b850160408188031215611af857600080fd5b9250604085013567ffffffffffffffff811115611b1457600080fd5b611b2087828801611a7e565b949793965093946060013593505050565b600060c0828403128015611b4457600080fd5b509092915050565b60008083601f840112611b5e57600080fd5b50813567ffffffffffffffff811115611b7657600080fd5b602083019150836020828501011115611b8e57600080fd5b9250929050565b600080600080600080600060a0888a031215611bb057600080fd5b873567ffffffffffffffff811115611bc757600080fd5b611bd38a828b01611b4c565b909850965050602088013567ffffffffffffffff811115611bf357600080fd5b611bff8a828b01611b4c565b909650945050604088013567ffffffffffffffff811115611c1f57600080fd5b611c2b8a828b016119be565b935050606088013567ffffffffffffffff811115611c4857600080fd5b611c548a828b01611a7e565b979a969950949793969295929450505060809091013590565b80356001600160a01b0381168114611c8457600080fd5b919050565b600060208284031215611c9b57600080fd5b611a7782611c6d565b6000808335601e19843603018112611cbb57600080fd5b83018035915067ffffffffffffffff821115611cd657600080fd5b602001915036819003821315611b8e57600080fd5b8183823760009101908152919050565b6000808335601e19843603018112611d1257600080fd5b83018035915067ffffffffffffffff821115611d2d57600080fd5b6020019150600581901b3603821315611b8e57600080fd5b8015158114611d5357600080fd5b50565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6060808252810184905260006080600586901b830181019083018783607e1936839003015b89821015611e6b57868503607f190184528235818112611dc357600080fd5b8b016001600160a01b03611dd682611c6d565b1686526020810135611de781611d45565b1515602087015260408181013590870152606081013536829003601e19018112611e1057600080fd5b0160208101903567ffffffffffffffff811115611e2c57600080fd5b803603821315611e3b57600080fd5b60806060880152611e50608088018284611d56565b96505050602083019250602084019350600182019150611da4565b5050506001600160a01b03861660208501525090506001600160a01b038316604083015261181c565b634e487b7160e01b600052604160045260246000fd5b6040805190810167ffffffffffffffff81118282101715611ecd57611ecd611e94565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715611efc57611efc611e94565b604052919050565b600060208284031215611f1657600080fd5b815167ffffffffffffffff811115611f2d57600080fd5b8201601f81018413611f3e57600080fd5b805167ffffffffffffffff811115611f5857611f58611e94565b8060051b611f6860208201611ed3565b91825260208184018101929081019087841115611f8457600080fd5b6020850192505b83831015610d3f57825167ffffffffffffffff811115611faa57600080fd5b85016040818a03601f19011215611fc057600080fd5b611fc8611eaa565b6020820151611fd681611d45565b8152604082015167ffffffffffffffff811115611ff257600080fd5b60208184010192505089601f83011261200a57600080fd5b815167ffffffffffffffff81111561202457612024611e94565b612037601f8201601f1916602001611ed3565b8181528b602083860101111561204c57600080fd5b61205d826020830160208701611a14565b80602084015250508084525050602082019150602083019250611f8b565b60006020828403121561208d57600080fd5b5051919050565b610100815260006120aa61010083018b8d611d56565b63ffffffff999099166020830152506001600160a01b03968716604082015294861660608601529285166080850152931660a083015260c082019290925260e0015292915050565b60006020828403121561210457600080fd5b81356fffffffffffffffffffffffffffffffff81168114611a7757600080fd5b604081526000612138604083018688611d56565b8281036020840152610d3f818587611d56565b6000825161215d818460208701611a14565b9190910192915050565b634e487b7160e01b600052603260045260246000fd5b8151600090829060208501835b828110156121a857815184526020938401939091019060010161218a565b509195945050505050565b6121d181895180516001600160a01b03168252602090810151910152565b6020880151604082015260408801516060820152612205608082018880516001600160a01b03168252602090810151910152565b6001600160a01b03861660c08201528460e08201526101406101008201526000612233610140830186611a38565b828103610120840152612247818587611d56565b9a9950505050505050505050565b81810381811115610e2a57634e487b7160e01b600052601160045260246000fd5b88815263ffffffff881660208201528660408201526001600160a01b03861660608201528460808201528360a082015263ffffffff831660c082015261010060e08201526000612247610100830184611a38565b60e0815260006122de60e083018a8c611d56565b6001600160a01b039889166020840152968816604083015250938616606085015291909416608083015260a082019390935260c001919091529291505056fe5369676e65644f72646572207769746e657373294f72646572506172616d657465727328616464726573732073726341737365742c616464726573732064737441737365742c75696e74323536207372635175616e746974792c75696e74323536206473745175616e746974792c75696e74323536206d696e5175616e746974792c75696e74313238206461726b53616c74295369676e65644f7264657228616464726573732073656e6465722c4f72646572506172616d657465727320706172616d65746572732c75696e7432353620646561646c696e652c61646472657373207461726765742c616464726573732066696c6c65722c737472696e67206f72646572547970652c62797465735b5d20637573746f6d4461746129546f6b656e5065726d697373696f6e73286164647265737320746f6b656e2c75696e7432353620616d6f756e7429a2646970667358221220c2418113976ad276ebafdff72db7139e26fa807093ad96899a7de9b99cac449b64736f6c634300081c0033

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

000000000000000000000000000000000022d473030f116ddee9f6b43ac78ba300000000000000000000000028b5a0e9c621a5badaa536219b3a228c8168cf5d00000000000000000000000081d40f21f12a8f0e3252bccb954d722d4c464b64000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48

-----Decoded View---------------
Arg [0] : _permit2 (address): 0x000000000022D473030F116dDEE9F6B43aC78BA3
Arg [1] : _tokenMessenger (address): 0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d
Arg [2] : _messageTransmitter (address): 0x81D40F21F12A8F0E3252Bccb954D722d4c464B64
Arg [3] : _usdcAddress (address): 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000000000000022d473030f116ddee9f6b43ac78ba3
Arg [1] : 00000000000000000000000028b5a0e9c621a5badaa536219b3a228c8168cf5d
Arg [2] : 00000000000000000000000081d40f21f12a8f0e3252bccb954d722d4c464b64
Arg [3] : 000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48


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