ETH Price: $3,240.42 (-2.54%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Send Order238712662025-11-24 21:06:1117 days ago1764018371IN
0x98888883...6ED14c0f1
0 ETH0.000159030.23641408
Send Order238712372025-11-24 21:00:2317 days ago1764018023IN
0x98888883...6ED14c0f1
0 ETH0.000182610.28486722
Take Order238712032025-11-24 20:53:3517 days ago1764017615IN
0x98888883...6ED14c0f1
0 ETH0.003455430.28758356
Send Order238711822025-11-24 20:49:1117 days ago1764017351IN
0x98888883...6ED14c0f1
0 ETH0.000188640.28046086
Send Order238711392025-11-24 20:40:1117 days ago1764016811IN
0x98888883...6ED14c0f1
0 ETH0.00019920.29817736
Take Order238711352025-11-24 20:39:2317 days ago1764016763IN
0x98888883...6ED14c0f1
0 ETH0.000172880.25115677
Send Order238709272025-11-24 19:57:2317 days ago1764014243IN
0x98888883...6ED14c0f1
0 ETH0.000261790.38923119
Send Order238709212025-11-24 19:56:1117 days ago1764014171IN
0x98888883...6ED14c0f1
0 ETH0.000286830.40508186
Take Order238413162025-11-20 16:04:1121 days ago1763654651IN
0x98888883...6ED14c0f1
0 ETH0.001351071.91297494
Take Order238306652025-11-19 4:11:4722 days ago1763525507IN
0x98888883...6ED14c0f1
0 ETH0.000119840.16383593
Take Order237988782025-11-14 17:19:3527 days ago1763140775IN
0x98888883...6ED14c0f1
0 ETH0.000476040.79779155
Take Order237988772025-11-14 17:19:2327 days ago1763140763IN
0x98888883...6ED14c0f1
0 ETH0.000616710.80810628
Take Order237988752025-11-14 17:18:5927 days ago1763140739IN
0x98888883...6ED14c0f1
0 ETH0.000748390.83295463
Take Order237934682025-11-13 23:10:1128 days ago1763075411IN
0x98888883...6ED14c0f1
0 ETH0.000115640.19689262
Take Order237927212025-11-13 20:39:2328 days ago1763066363IN
0x98888883...6ED14c0f1
0 ETH0.00082211.37171622
Take Order237927202025-11-13 20:39:1128 days ago1763066351IN
0x98888883...6ED14c0f1
0 ETH0.001263761.39465848

Latest 16 internal transactions

Advanced mode:
Parent Transaction Hash Method Block
From
To
Transfer237988782025-11-14 17:19:3527 days ago1763140775
0x98888883...6ED14c0f1
0.0302105 ETH
Transfer237988782025-11-14 17:19:3527 days ago1763140775
0x98888883...6ED14c0f1
0.00001935 ETH
Transfer237988782025-11-14 17:19:3527 days ago1763140775
0x98888883...6ED14c0f1
0.03019115 ETH
Transfer237988772025-11-14 17:19:2327 days ago1763140763
0x98888883...6ED14c0f1
0.03018674 ETH
Transfer237988752025-11-14 17:18:5927 days ago1763140739
0x98888883...6ED14c0f1
0.00002477 ETH
Transfer237988752025-11-14 17:18:5927 days ago1763140739
0x98888883...6ED14c0f1
0.03011811 ETH
Transfer237934682025-11-13 23:10:1128 days ago1763075411
0x98888883...6ED14c0f1
0.00300818 ETH
Transfer237934682025-11-13 23:10:1128 days ago1763075411
0x98888883...6ED14c0f1
0.00006774 ETH
Transfer237934682025-11-13 23:10:1128 days ago1763075411
0x98888883...6ED14c0f1
0.00294043 ETH
Transfer237927212025-11-13 20:39:2328 days ago1763066363
0x98888883...6ED14c0f1
0.00489033 ETH
Transfer237927212025-11-13 20:39:2328 days ago1763066363
0x98888883...6ED14c0f1
0.00000168 ETH
Transfer237927212025-11-13 20:39:2328 days ago1763066363
0x98888883...6ED14c0f1
0.00488865 ETH
Transfer237927202025-11-13 20:39:1128 days ago1763066351
0x98888883...6ED14c0f1
0.00481797 ETH
Transfer237927202025-11-13 20:39:1128 days ago1763066351
0x98888883...6ED14c0f1
0.00000298 ETH
Transfer237927202025-11-13 20:39:1128 days ago1763066351
0x98888883...6ED14c0f1
0.00481499 ETH
0x61010060237781292025-11-11 19:39:1130 days ago1762889951  Contract Creation0 ETH
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_1

Compiler Version
v0.8.28+commit.7893614a

Optimization Enabled:
Yes with 600 runs

Other Settings:
cancun 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_1 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)";

    bytes32 public constant MM_WITNESS_TYPEHASH = keccak256("MMWitness(address mmToken,uint256 amount,bytes32 orderId)");
    string public constant MM_WITNESS_TYPE_STRING = "MMWitness witness)MMWitness(address mmToken,uint256 amount,bytes32 orderId)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 
    bytes32 public constant TYPE_MM = keccak256("MARKETMAKER");  //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();
    }

    /// @notice Send tokens to market maker on source chain for cross-chain swap using Permit2
    /// @dev Pulls tokens via Permit2, optionally swaps via DEX, sends result to mmWallet
    /// @param order The signed order details
    /// @param payload Permit2 signature payload
    /// @param mmWallet Address of the market maker receiving tokens
    /// @param arb Optional multicall data for DEX swap
    /// @param minOut Minimum output amount after swap (if applicable)
    function sendMMOrder(
        SignedOrder calldata order,
        SigPayload calldata payload,
        address mmWallet,
        MulticallData calldata arb,
        uint256 minOut
    ) external nonReentrant {
        // Validate MM wallet
        if (mmWallet == address(0)) revert InvalidMMWallet();
        
        // Verify order requirements: filler, deadline, type
        _assertOrderRequirements(order, TYPE_MM, true);
        
        // Pull tokens from user via Permit2
        bytes32 orderHash = pullTokens(order, payload);
        
        // Optional DEX swap before sending to MM
        address tokenToSend = order.parameters.srcAsset;
        uint256 amountToSend = order.parameters.srcQuantity;
        
        if (arb.multicallTarget != address(0)) {
            // Perform DEX swap
            _reApprove(order.parameters.srcAsset, arb.multicallTarget, order.parameters.srcQuantity);
            IMulticall(arb.multicallTarget).multicall(arb.calls, arb.refundTo, arb.nftRecipient);
            
            // Extract output token from customData[3] (last 20 bytes)
            tokenToSend = _extractOutputToken(order.customData);
            if (tokenToSend == address(0) || tokenToSend.code.length == 0) {
                revert InvalidOutputToken(tokenToSend);
            }
            amountToSend = IERC20(tokenToSend).balanceOf(address(this));
            
            // MEV protection on swap output
            if (amountToSend < minOut) revert MEVprotect(minOut, amountToSend);
        }
        
        // Send tokens to MM wallet
        IERC20(tokenToSend).safeTransfer(mmWallet, amountToSend);
        
        emit MMWalletDeposit(
            orderHash,
            mmWallet,
            tokenToSend,
            amountToSend,
            order.orderType,
            order.parameters.srcAsset,
            order.parameters.dstAsset
        );
    }

    /// @notice Receive and complete a market maker order on destination chain
    /// @dev Pulls tokens from MM wallet via Permit2, optionally swaps via DEX, refunds excess, sends to order.target
    /// @param order The signed order details
    /// @param makerWallet Address of the market maker providing tokens
    /// @param mmWitness MM witness struct (mmToken, amount, orderId)
    /// @param mmPayload Permit2 signature payload for MM (nonce and signature)
    /// @param arb Optional multicall data for DEX swap from mmToken to dstAsset
    /// @param minOut Minimum output amount for MEV protection
    function takeMMOrder(
        SignedOrder calldata order,
        address makerWallet,
        MMWitness calldata mmWitness,
        SigPayload calldata mmPayload,
        MulticallData calldata arb,
        uint256 minOut
    ) external nonReentrant {
        // Validate maker wallet
        if (makerWallet == address(0)) revert InvalidMMWallet();
        
        // Verify order requirements (no time check as order may have been sent earlier)
        _assertOrderRequirements(order, TYPE_MM, false);
        
        // Compute order hash for event
        bytes32 orderHash = hashOrder(order);
        
        // Verify mmWitness.orderId matches the computed orderHash
        if (mmWitness.orderId != orderHash) revert OrderHash(mmWitness.orderId, orderHash);
        
        // Pull tokens from MM wallet via Permit2 with MMWitness
        pullTokensFromMM(
            makerWallet,
            mmWitness,
            mmPayload.nonce,
            order.deadline,
            mmPayload.signature
        );
        
        // Optional DEX swap if mmToken != dstAsset
        if (mmWitness.mmToken != order.parameters.dstAsset) {
            // Require multicall data for swap
            if (arb.multicallTarget == address(0)) revert InvalidDestinationMulticallData();
            
            // Approve and execute DEX swap
            _reApprove(mmWitness.mmToken, arb.multicallTarget, mmWitness.amount);
            IMulticall(arb.multicallTarget).multicall(arb.calls, arb.refundTo, arb.nftRecipient);
            
            // Refund any leftover mmToken to MM wallet
            uint256 leftover = IERC20(mmWitness.mmToken).balanceOf(address(this));
            if (leftover > 0) {
                IERC20(mmWitness.mmToken).safeTransfer(makerWallet, leftover);
            }
        }
        
        // Payout destination tokens to order.target
        if (!_payout(orderHash, order, order.parameters.dstAsset, order.parameters.minQuantity, minOut)) {
            uint256 balance = _getBalance(order.parameters.dstAsset);
            revert PayoutFailed(abi.encode(order.parameters.dstAsset, balance, order.parameters.minQuantity));
        }
    }
    
    //*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;
    }

    /// @notice Pull tokens from MM wallet via Permit2 with MMWitness
    /// @param mmWallet Address of the market maker wallet
    /// @param mmWitness Witness struct containing mmToken, amount, and orderId
    /// @param nonce Permit2 nonce
    /// @param deadline Permit2 deadline (use order.deadline)
    /// @param signature MM's signature over the witness
    /// @return witnessHash The computed witness hash
    function pullTokensFromMM(
        address mmWallet,
        MMWitness calldata mmWitness,
        uint256 nonce,
        uint256 deadline,
        bytes calldata signature
    ) private returns (bytes32 witnessHash) {
        // Create and hash the MMWitness
        witnessHash = keccak256(
            abi.encode(
                MM_WITNESS_TYPEHASH,
                mmWitness.mmToken,
                mmWitness.amount,
                mmWitness.orderId
            )
        );
        
        PERMIT2.permitWitnessTransferFrom(
            IPermit2.PermitTransferFrom({
                permitted: IPermit2.TokenPermissions({
                    token: mmWitness.mmToken,
                    amount: mmWitness.amount
                }),
                nonce: nonce,
                deadline: deadline
            }),
            IPermit2.SignatureTransferDetails({
                to: address(this),
                requestedAmount: mmWitness.amount
            }),
            mmWallet,
            witnessHash,
            MM_WITNESS_TYPE_STRING,
            signature
        );

        return witnessHash;
    }
    
    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();
        }
    }

    /// @notice Extract output token address from customData[3] (last 20 bytes)
    /// @dev For MM orders with DEX swaps, the output token is encoded in customData[3]
    /// @param customData Array of custom data from the order
    /// @return outputToken The address of the output token from the DEX swap
    function _extractOutputToken(bytes[] calldata customData) internal pure returns (address) {
        require(customData.length >= 4, "Missing customData[3]");
        require(customData[3].length == 32, "customData[3] must be 32 bytes");
        return abi.decode(customData[3], (address));
    }

    /// @notice Get balance of token or native ETH
    /// @param token Token address (address(0) for native ETH)
    /// @return balance The balance of the token or ETH
    function _getBalance(address token) internal view returns (uint256 balance) {
        if (token == address(0)) {
            return address(this).balance;
        }
        
        (bool ok, bytes memory data) = token.staticcall(
            abi.encodeWithSelector(IERC20.balanceOf.selector, address(this))
        );
        
        if (ok && data.length >= 32) {
            return abi.decode(data, (uint256));
        }
        
        return 0;
    }

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

    // MMWitness is the witness struct which is hashed according to the EIP712 standard, 
    // and the hash is verified by the permit2 contract against market maker's signature, 
    // when pulling MM funds in the takeMMOrder function. 
    struct MMWitness {
        address mmToken; // e.g. USDT
        uint256 amount;
        bytes32 orderId; // id of the order the MM intends to fill
    }


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

    /// @notice Emitted when tokens are sent to market maker wallet
    event MMWalletDeposit(
        bytes32 indexed orderUUID,
        address indexed mmWallet,
        address tokenSent,
        uint256 amountSent,
        string orderType,
        address srcAsset,
        address dstAsset
    );


    // 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);
    error InvalidOutputToken(address token);
    error InvalidDestinationMulticallData();
    error InvalidSender(address sender, address orderSender);
    error InvalidFiller(address filler, address orderFiller);
    error InvalidMMWallet();
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 600
  },
  "evmVersion": "cancun",
  "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":"InvalidDestinationMulticallData","type":"error"},{"inputs":[{"internalType":"address","name":"filler","type":"address"},{"internalType":"address","name":"orderFiller","type":"address"}],"name":"InvalidFiller","type":"error"},{"inputs":[],"name":"InvalidMMWallet","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"InvalidOutputToken","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"orderSender","type":"address"}],"name":"InvalidSender","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":true,"internalType":"address","name":"mmWallet","type":"address"},{"indexed":false,"internalType":"address","name":"tokenSent","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountSent","type":"uint256"},{"indexed":false,"internalType":"string","name":"orderType","type":"string"},{"indexed":false,"internalType":"address","name":"srcAsset","type":"address"},{"indexed":false,"internalType":"address","name":"dstAsset","type":"address"}],"name":"MMWalletDeposit","type":"event"},{"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":"MM_WITNESS_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MM_WITNESS_TYPE_STRING","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"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_MM","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"},{"internalType":"address","name":"mmWallet","type":"address"},{"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":"sendMMOrder","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":"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":[{"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"},{"internalType":"address","name":"makerWallet","type":"address"},{"components":[{"internalType":"address","name":"mmToken","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32","name":"orderId","type":"bytes32"}],"internalType":"struct IEIP712Types.MMWitness","name":"mmWitness","type":"tuple"},{"components":[{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"internalType":"struct IEIP712Types.SigPayload","name":"mmPayload","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":"takeMMOrder","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"}]

610100604052348015610010575f5ffd5b506040516131d23803806131d283398101604081905261002f91610070565b60015f556001600160a01b0393841660805291831660a052821660c0521660e0526100c1565b80516001600160a01b038116811461006b575f5ffd5b919050565b5f5f5f5f60808587031215610083575f5ffd5b61008c85610055565b935061009a60208601610055565b92506100a860408601610055565b91506100b660608601610055565b905092959194509250565b60805160a05160c05160e0516130916101415f395f818161080901528181610933015281816109d501528181611256015281816112ea0152818161140001528181611aa701528181611b3501528181611bb10152611c6901525f61115701525f8181611b560152611d0301525f818161166501526120c101526130915ff3fe6080604052600436106100f2575f3560e01c806391ba38ec11610087578063dec9f72f11610057578063dec9f72f146102e1578063efc8aac414610300578063fdea61961461032f578063fe79f61914610362575f5ffd5b806391ba38ec14610270578063b51ed51b1461028f578063bb770835146102ae578063d1eb7cc0146102cd575f5ffd5b806364e0a828116100c257806364e0a828146101b657806369a2aad2146101e95780636e2d09911461021c57806374b9e8381461024f575f5ffd5b80631a5870b7146100fd5780631e4e30fd1461014357806328df07dc146101625780632ec926a714610183575f5ffd5b366100f957005b5f5ffd5b348015610108575f5ffd5b506101307f08167ba6340f5eb62384b818358d2b6daeb04945867570e232d0b2d92a0741f981565b6040519081526020015b60405180910390f35b34801561014e575f5ffd5b5061013061015d36600461240f565b610395565b34801561016d575f5ffd5b5061018161017c366004612478565b6104a3565b005b34801561018e575f5ffd5b506101307f28a6b1c3ac828653bad9f95ff5c3e77405a556137c9a922feb6dfe7732db081b81565b3480156101c1575f5ffd5b506101307f3830969403cefb9f63c82fb7201672c51b177354f1e7dcc024e3d098992aa4b581565b3480156101f4575f5ffd5b506101307f776716c31b7a1fae26c9746a93f9980261d9065bd9b539720624eafe20da3d5e81565b348015610227575f5ffd5b506101307fb15c6f4cb2704b59886404596581f035599143a4de893556943a4865c51863a581565b34801561025a575f5ffd5b506102636107b2565b60405161013a919061254e565b34801561027b575f5ffd5b5061018161028a366004612560565b6107d1565b34801561029a575f5ffd5b506101816102a9366004612560565b610b52565b3480156102b9575f5ffd5b506101816102c83660046125f6565b610cae565b3480156102d8575f5ffd5b50610263610fee565b3480156102ec575f5ffd5b506101306102fb3660046126bd565b61100a565b34801561030b575f5ffd5b5061031f61031a36600461271b565b6110d6565b604051901515815260200161013a565b34801561033a575f5ffd5b506101307f51489d4263e7aff6c512a83666a144c08d740a160db30b26495ddfc5e7f1c21e81565b34801561036d575f5ffd5b506101307f30fdb2c970f3affdeb948b19a7ed10455583a16fe94c184964134c3d830930eb81565b5f5f6103a38360200161100a565b90507f28a6b1c3ac828653bad9f95ff5c3e77405a556137c9a922feb6dfe7732db081b6103d360208501856127ea565b8260e08601356103eb610120880161010089016127ea565b6103fd61014089016101208a016127ea565b61040b6101408a018a612805565b604051610419929190612848565b6040519081900390206104386104336101608c018c612857565b611464565b6040805160208101999099526001600160a01b03978816908901526060880195909552608087019390935290841660a086015290921660c084015260e08301919091526101008201526101200160405160208183030381529060405280519060200120915050919050565b6104ab611548565b6001600160a01b0383166104d257604051634908692960e01b815260040160405180910390fd5b6104fe857f3830969403cefb9f63c82fb7201672c51b177354f1e7dcc024e3d098992aa4b56001611570565b5f6105098686611644565b90505f61051c60408801602089016127ea565b905060608701355f61053160208701876127ea565b6001600160a01b03161461070a5761056961055260408a0160208b016127ea565b61055f60208801886127ea565b60608b013561176d565b61057660208601866127ea565b6001600160a01b03166330be55676105916020880188612857565b6105a160608a0160408b016127ea565b6105b160808b0160608c016127ea565b6040518563ffffffff1660e01b81526004016105d094939291906128d2565b5f604051808303815f875af11580156105eb573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526106129190810190612a52565b506106296106246101608a018a612857565b611860565b91506001600160a01b038216158061064957506001600160a01b0382163b155b15610677576040516381879ccd60e01b81526001600160a01b03831660048201526024015b60405180910390fd5b6040516370a0823160e01b81523060048201526001600160a01b038316906370a0823190602401602060405180830381865afa1580156106b9573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106dd9190612bc0565b90508381101561070a57604051633990cfef60e21b8152600481018590526024810182905260440161066e565b61071e6001600160a01b0383168783611961565b6001600160a01b038616837f451ad264d98909801dc5b0153f5a6a23ceb5aa5e0d3404f99f6e9d4d7d7d23c3848461075a6101408e018e612805565b8e6020015f01602081019061076f91906127ea565b8f602001602001602081019061078591906127ea565b60405161079796959493929190612bd7565b60405180910390a35050506107ab60015f55565b5050505050565b60405180610180016040528061014a8152602001612f1261014a913981565b6107d9611548565b5f6107e48585611644565b90505f6107fd6107f8610160880188612857565b611996565b90506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001661083960408801602089016127ea565b6001600160a01b03161461091c5761087161085a60408801602089016127ea565b61086760208701876127ea565b606089013561176d565b61087e60208501856127ea565b6001600160a01b03166330be55676108996020870187612857565b6108a96060890160408a016127ea565b6108b960808a0160608b016127ea565b6040518563ffffffff1660e01b81526004016108d894939291906128d2565b5f604051808303815f875af11580156108f3573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261091a9190810190612a52565b505b6040516370a0823160e01b81523060048201525f907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610980573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109a49190612bc0565b905081602001518110156109cb5760405163bb2875c360e01b815260040160405180910390fd5b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016610a056040890160208a016127ea565b6001600160a01b031614158015610a1b57508381105b15610a4357604051633990cfef60e21b8152600481018590526024810182905260440161066e565b5f7f776716c31b7a1fae26c9746a93f9980261d9065bd9b539720624eafe20da3d5e610a736101408a018a612805565b604051610a81929190612848565b6040518091039020149050610a998884848785611a38565b837ffa056c6fc7e49102eebc5a584edb89991a093392880d7bf55957c02805dd0cce610ac96101408b018b612805565b8651610add6101208e016101008f016127ea565b8d610120016020810190610af191906127ea565b8e6020015f016020810190610b0691906127ea565b8f6020016020016020810190610b1c91906127ea565b8a8c60400151604051610b3799989796959493929190612c22565b60405180910390a250505050610b4c60015f55565b50505050565b610b5a611548565b610b86847f51489d4263e7aff6c512a83666a144c08d740a160db30b26495ddfc5e7f1c21e6001611570565b5f610b918585611644565b9050610bbd610ba660408701602088016127ea565b610bb360208601866127ea565b606088013561176d565b610bca60208401846127ea565b6001600160a01b03166330be5567610be56020860186612857565b610bf560608801604089016127ea565b610c056080890160608a016127ea565b6040518563ffffffff1660e01b8152600401610c2494939291906128d2565b5f604051808303815f875af1158015610c3f573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052610c669190810190612a52565b50610c878186610c7c60608201604083016127ea565b60a089013586611da7565b610ca45760405163bb2875c360e01b815260040160405180910390fd5b50610b4c60015f55565b610cb6611548565b6001600160a01b038516610cdd57604051634908692960e01b815260040160405180910390fd5b610d08867f3830969403cefb9f63c82fb7201672c51b177354f1e7dcc024e3d098992aa4b55f611570565b5f610d1287610395565b905080856040013514610d455760408051631671c27b60e21b81529086013560048201526024810182905260440161066e565b610d638686863560e08b0135610d5e60208a018a612805565b612035565b50610d7460608801604089016127ea565b6001600160a01b0316610d8a60208701876127ea565b6001600160a01b031614610f40575f610da660208501856127ea565b6001600160a01b031603610dcd5760405163e74b4bd560e01b815260040160405180910390fd5b610df4610ddd60208701876127ea565b610dea60208601866127ea565b876020013561176d565b610e0160208401846127ea565b6001600160a01b03166330be5567610e1c6020860186612857565b610e2c60608801604089016127ea565b610e3c6080890160608a016127ea565b6040518563ffffffff1660e01b8152600401610e5b94939291906128d2565b5f604051808303815f875af1158015610e76573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052610e9d9190810190612a52565b505f610eac60208701876127ea565b6040516370a0823160e01b81523060048201526001600160a01b0391909116906370a0823190602401602060405180830381865afa158015610ef0573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f149190612bc0565b90508015610f3e57610f3e8782610f2e60208a018a6127ea565b6001600160a01b03169190611961565b505b610f608188610f5560608201604083016127ea565b60a08b013586611da7565b610fdc575f610f7d610f7860608a0160408b016127ea565b6121ba565b9050610f8f6060890160408a016127ea565b604080516001600160a01b039092166020830152810182905260a0890135606082015260800160408051601f1981840301815290829052634c0fe4a160e11b825261066e9160040161254e565b50610fe660015f55565b505050505050565b6040518060a0016040528060798152602001612e996079913981565b5f7f30fdb2c970f3affdeb948b19a7ed10455583a16fe94c184964134c3d830930eb61103960208401846127ea565b61104960408501602086016127ea565b60408501356060860135608087013561106860c0890160a08a01612c7f565b6040805160208101989098526001600160a01b0396871690880152949093166060860152608085019190915260a084015260c08301526fffffffffffffffffffffffffffffffff1660e082015261010001604051602081830303815290604052805190602001209050919050565b5f6110df611548565b5f6110ea898961229e565b9050806110f686610395565b146111285761110485610395565b604051631671c27b60e21b815260048101919091526024810182905260440161066e565b611153857f776716c31b7a1fae26c9746a93f9980261d9065bd9b539720624eafe20da3d5e5f611570565b5f5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166357ecfd2860e01b8c8c8c8c60405160240161119e9493929190612cae565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b03199094169390931790925290516111dc9190612cd4565b5f604051808303815f865af19150503d805f8114611215576040519150601f19603f3d011682016040523d82523d5f602084013e61121a565b606091505b50915091508161123f57806040516321f172cd60e21b815260040161066e919061254e565b6040516370a0823160e01b81523060048201525f907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa1580156112a3573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906112c79190612bc0565b90505f6112d760208901896127ea565b6001600160a01b0316146113c75761131c7f000000000000000000000000000000000000000000000000000000000000000061131660208a018a6127ea565b8361176d565b61132960208801886127ea565b6001600160a01b03166330be556761134460208a018a612857565b61135460608c0160408d016127ea565b61136460808d0160608e016127ea565b6040518563ffffffff1660e01b815260040161138394939291906128d2565b5f604051808303815f875af115801561139e573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526113c59190810190612a52565b505b6113e784896113dc60608201604083016127ea565b60a08c01358a611da7565b156113f9576001945050505050611450565b61142684897f0000000000000000000000000000000000000000000000000000000000000000845f611da7565b15611437575f945050505050611450565b60405163bb2875c360e01b815260040160405180910390fd5b61145960015f55565b979650505050505050565b5f81818167ffffffffffffffff811115611480576114806129e4565b6040519080825280602002602001820160405280156114a9578160200160208202803683370190505b5090505f5b82811015611515578585828181106114c8576114c8612cea565b90506020028101906114da9190612805565b6040516114e8929190612848565b604051809103902082828151811061150257611502612cea565b60209081029190910101526001016114ae565b50806040516020016115279190612cfe565b60405160208183030381529060405280519060200120925050505b92915050565b60025f540361156a57604051633ee5aeb560e01b815260040160405180910390fd5b60025f55565b801561159b57428360e00135101561159b57604051630407b05b60e31b815260040160405180910390fd5b5f6115ae610140850161012086016127ea565b6001600160a01b0316141580156115df5750336115d3610140850161012086016127ea565b6001600160a01b031614155b156115fc576040516282b42960e81b815260040160405180910390fd5b8161160b610140850185612805565b604051611619929190612848565b60405180910390201461163f5760405163b968846160e01b815260040160405180910390fd5b505050565b5f61164e83610395565b6040805160a0810182529192506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163137c29fe918190606082019081906116a4908a0160208b016127ea565b6001600160a01b031681526060890135602091820181905291835287358382015260e08901356040938401528251808401909352308352828101919091526116ee908801886127ea565b8560405180610180016040528061014a8152602001612f1261014a913961171860208a018a612805565b6040518863ffffffff1660e01b815260040161173a9796959493929190612d33565b5f604051808303815f87803b158015611751575f5ffd5b505af1158015611763573d5f5f3e3d5ffd5b5050505092915050565b604080513060248201526001600160a01b0384811660448084019190915283518084039091018152606490920183526020820180516001600160e01b0316636eb1769f60e11b17905291515f928392908716916117ca9190612cd4565b5f60405180830381855afa9150503d805f8114611802576040519150601f19603f3d011682016040523d82523d5f602084013e611807565b606091505b50915091505f82801561181c57506020825110155b611826575f61183a565b8180602001905181019061183a9190612bc0565b905083811061184b57505050505050565b610fe66001600160a01b038716865f196122fa565b5f60048210156118b25760405162461bcd60e51b815260206004820152601560248201527f4d697373696e6720637573746f6d446174615b335d0000000000000000000000604482015260640161066e565b828260038181106118c5576118c5612cea565b90506020028101906118d79190612805565b90506020146119285760405162461bcd60e51b815260206004820152601e60248201527f637573746f6d446174615b335d206d7573742062652033322062797465730000604482015260640161066e565b8282600381811061193b5761193b612cea565b905060200281019061194d9190612805565b81019061195a91906127ea565b9392505050565b61196e838383600161234c565b61163f57604051635274afe760e01b81526001600160a01b038416600482015260240161066e565b6040805160a0810182525f80825260208201819052918101829052606081018290526080810191909152600582146119e1576040516368804db160e01b815260040160405180910390fd5b60208335840181013560e090811c8352818501358501820135838301526040808601358601830135908401526060808601358601830135821c9084015260808086013590950190910135901c928101929092525090565b5f81611a64577fb15c6f4cb2704b59886404596581f035599143a4de893556943a4865c51863a5611a86565b7f776716c31b7a1fae26c9746a93f9980261d9065bd9b539720624eafe20da3d5e5b9050611a9486826001611570565b81158015611ae257506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016611ad760408801602089016127ea565b6001600160a01b0316145b15611b30575f611afa60808801356060890135612dd4565b9050611b068186612dd4565b9450611b2e611b1d61014089016101208a016127ea565b82610f2e60408b0160208c016127ea565b505b611b7b7f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000008661176d565b5f82611c59578551634701287760e11b908690611baf611ba36101208c016101008d016127ea565b6001600160a01b031690565b7f00000000000000000000000000000000000000000000000000000000000000005f6040808d015160608e01519151602481019790975263ffffffff958616604488015260648701949094526001600160a01b03909216608486015260a485015260c48401919091521660e48201526101040160408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611cfd565b855163779b432d60e01b908690307f0000000000000000000000000000000000000000000000000000000000000000308b604001518c606001518b604051602001611ca691815260200190565b60408051601f1981840301815290829052611cca9897969594939291602401612df3565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091525b90505f5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031683604051611d399190612cd4565b5f604051808303815f865af19150503d805f8114611d72576040519150601f19603f3d011682016040523d82523d5f602084013e611d77565b606091505b509150915081611d9c578060405163169ecfb160e11b815260040161066e919061254e565b505050505050505050565b5f806001600160a01b038516611e6c57504783811015611dca575f91505061202c565b82811015611df557604051633990cfef60e21b8152600481018490526024810182905260440161066e565b5f611e08610120880161010089016127ea565b6001600160a01b0316826040515f6040518083038185875af1925050503d805f8114611e4f576040519150601f19603f3d011682016040523d82523d5f602084013e611e54565b606091505b5050905080611e6657915061202c9050565b50611f9c565b604080513060248083019190915282518083039091018152604490910182526020810180516001600160e01b03166370a0823160e01b17905290515f9182916001600160a01b03891691611ebf91612cd4565b5f60405180830381855afa9150503d805f8114611ef7576040519150601f19603f3d011682016040523d82523d5f602084013e611efc565b606091505b5091509150818015611f1057506020815110155b611f1f575f935050505061202c565b80806020019051810190611f339190612bc0565b925085831015611f48575f935050505061202c565b84831015611f7357604051633990cfef60e21b8152600481018690526024810184905260440161066e565b611f99611f886101208a016101008b016127ea565b6001600160a01b0389169085611961565b50505b867fcff4c6fa646ccfbe7edf1ab0a8e2f1fe0d66da25a65692c3cb625145a4de2331611fcc610140890189612805565b611fde6101208b016101008c016127ea565b611ff06101408c016101208d016127ea565b61200060408d0160208e016127ea565b8b8d602001604001358960405161201e989796959493929190612e46565b60405180910390a260019150505b95945050505050565b5f7f08167ba6340f5eb62384b818358d2b6daeb04945867570e232d0b2d92a0741f961206460208801886127ea565b604080516020818101949094526001600160a01b039092168282015291880135606082015290870135608082015260a00160408051601f19818403018152828252805160209182012060a084019092529092506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163137c29fe918190606082019081906120fd908d018d6127ea565b6001600160a01b031681526020018b602001358152508152602001888152602001878152506040518060400160405280306001600160a01b031681526020018a602001358152508a856040518060a0016040528060798152602001612e996079913989896040518863ffffffff1660e01b81526004016121839796959493929190612d33565b5f604051808303815f87803b15801561219a575f5ffd5b505af11580156121ac573d5f5f3e3d5ffd5b505050509695505050505050565b5f6001600160a01b0382166121d0575047919050565b604080513060248083019190915282518083039091018152604490910182526020810180516001600160e01b03166370a0823160e01b17905290515f9182916001600160a01b0386169161222391612cd4565b5f60405180830381855afa9150503d805f811461225b576040519150601f19603f3d011682016040523d82523d5f602084013e612260565b606091505b509150915081801561227457506020815110155b15612295578080602001905181019061228d9190612bc0565b949350505050565b505f9392505050565b5f60208210156122f05760405162461bcd60e51b815260206004820152601160248201527f6d65737361676520746f6f2073686f7274000000000000000000000000000000604482015260640161066e565b5001601f19013590565b6123068383835f6123ae565b61163f5761231783835f60016123ae565b61233f57604051635274afe760e01b81526001600160a01b038416600482015260240161066e565b61196e83838360016123ae565b60405163a9059cbb60e01b5f8181526001600160a01b038616600452602485905291602083604481808b5af1925060015f511483166123a2578383151615612396573d5f823e3d81fd5b5f873b113d1516831692505b60405250949350505050565b60405163095ea7b360e01b5f8181526001600160a01b038616600452602485905291602083604481808b5af1925060015f511483166123a2578383151615612396573d5f823e3d81fd5b5f6101808284031215612409575f5ffd5b50919050565b5f6020828403121561241f575f5ffd5b813567ffffffffffffffff811115612435575f5ffd5b61228d848285016123f8565b5f60408284031215612409575f5ffd5b6001600160a01b0381168114612465575f5ffd5b50565b5f60808284031215612409575f5ffd5b5f5f5f5f5f60a0868803121561248c575f5ffd5b853567ffffffffffffffff8111156124a2575f5ffd5b6124ae888289016123f8565b955050602086013567ffffffffffffffff8111156124ca575f5ffd5b6124d688828901612441565b94505060408601356124e781612451565b9250606086013567ffffffffffffffff811115612502575f5ffd5b61250e88828901612468565b95989497509295608001359392505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f61195a6020830184612520565b5f5f5f5f60808587031215612573575f5ffd5b843567ffffffffffffffff811115612589575f5ffd5b612595878288016123f8565b945050602085013567ffffffffffffffff8111156125b1575f5ffd5b6125bd87828801612441565b935050604085013567ffffffffffffffff8111156125d9575f5ffd5b6125e587828801612468565b949793965093946060013593505050565b5f5f5f5f5f5f86880361010081121561260d575f5ffd5b873567ffffffffffffffff811115612623575f5ffd5b61262f8a828b016123f8565b975050602088013561264081612451565b95506060603f1982011215612653575f5ffd5b5060408701935060a087013567ffffffffffffffff811115612673575f5ffd5b61267f89828a01612441565b93505060c087013567ffffffffffffffff81111561269b575f5ffd5b6126a789828a01612468565b9699959850939692959460e09093013593505050565b5f60c08284031280156126ce575f5ffd5b509092915050565b5f5f83601f8401126126e6575f5ffd5b50813567ffffffffffffffff8111156126fd575f5ffd5b602083019150836020828501011115612714575f5ffd5b9250929050565b5f5f5f5f5f5f5f60a0888a031215612731575f5ffd5b873567ffffffffffffffff811115612747575f5ffd5b6127538a828b016126d6565b909850965050602088013567ffffffffffffffff811115612772575f5ffd5b61277e8a828b016126d6565b909650945050604088013567ffffffffffffffff81111561279d575f5ffd5b6127a98a828b016123f8565b935050606088013567ffffffffffffffff8111156127c5575f5ffd5b6127d18a828b01612468565b979a969950949793969295929450505060809091013590565b5f602082840312156127fa575f5ffd5b813561195a81612451565b5f5f8335601e1984360301811261281a575f5ffd5b83018035915067ffffffffffffffff821115612834575f5ffd5b602001915036819003821315612714575f5ffd5b818382375f9101908152919050565b5f5f8335601e1984360301811261286c575f5ffd5b83018035915067ffffffffffffffff821115612886575f5ffd5b6020019150600581901b3603821315612714575f5ffd5b8015158114612465575f5ffd5b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b606080825281018490525f6080600586901b830181019083018783607e1936839003015b898210156129bb57868503607f190184528235818112612914575f5ffd5b8b01803561292181612451565b6001600160a01b03168652602081013561293a8161289d565b1515602087015260408181013590870152606081013536829003601e19018112612962575f5ffd5b0160208101903567ffffffffffffffff81111561297d575f5ffd5b80360382131561298b575f5ffd5b608060608801526129a06080880182846128aa565b965050506020830192506020840193506001820191506128f6565b5050506001600160a01b03861660208501525090506001600160a01b038316604083015261202c565b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff81118282101715612a1b57612a1b6129e4565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715612a4a57612a4a6129e4565b604052919050565b5f60208284031215612a62575f5ffd5b815167ffffffffffffffff811115612a78575f5ffd5b8201601f81018413612a88575f5ffd5b805167ffffffffffffffff811115612aa257612aa26129e4565b8060051b612ab260208201612a21565b91825260208184018101929081019087841115612acd575f5ffd5b6020850192505b8383101561145957825167ffffffffffffffff811115612af2575f5ffd5b85016040818a03601f19011215612b07575f5ffd5b612b0f6129f8565b6020820151612b1d8161289d565b8152604082015167ffffffffffffffff811115612b38575f5ffd5b60208184010192505089601f830112612b4f575f5ffd5b815167ffffffffffffffff811115612b6957612b696129e4565b612b7c601f8201601f1916602001612a21565b8181528b6020838601011115612b90575f5ffd5b8160208501602083015e5f6020838301015280602084015250508084525050602082019150602083019250612ad4565b5f60208284031215612bd0575f5ffd5b5051919050565b6001600160a01b038716815285602082015260a060408201525f612bff60a0830186886128aa565b6001600160a01b0394851660608401529290931660809091015295945050505050565b61010081525f612c3761010083018b8d6128aa565b63ffffffff999099166020830152506001600160a01b03968716604082015294861660608601529285166080850152931660a083015260c082019290925260e0015292915050565b5f60208284031215612c8f575f5ffd5b81356fffffffffffffffffffffffffffffffff8116811461195a575f5ffd5b604081525f612cc16040830186886128aa565b82810360208401526114598185876128aa565b5f82518060208501845e5f920191825250919050565b634e487b7160e01b5f52603260045260245ffd5b81515f90829060208501835b82811015612d28578151845260209384019390910190600101612d0a565b509195945050505050565b612d5181895180516001600160a01b03168252602090810151910152565b6020880151604082015260408801516060820152612d85608082018880516001600160a01b03168252602090810151910152565b6001600160a01b03861660c08201528460e08201526101406101008201525f612db2610140830186612520565b828103610120840152612dc68185876128aa565b9a9950505050505050505050565b8181038181111561154257634e487b7160e01b5f52601160045260245ffd5b88815263ffffffff881660208201528660408201526001600160a01b03861660608201528460808201528360a082015263ffffffff831660c082015261010060e08201525f612dc6610100830184612520565b60e081525f612e5960e083018a8c6128aa565b6001600160a01b039889166020840152968816604083015250938616606085015291909416608083015260a082019390935260c001919091529291505056fe4d4d5769746e657373207769746e657373294d4d5769746e6573732861646472657373206d6d546f6b656e2c75696e7432353620616d6f756e742c62797465733332206f72646572496429546f6b656e5065726d697373696f6e73286164647265737320746f6b656e2c75696e7432353620616d6f756e74295369676e65644f72646572207769746e657373294f72646572506172616d657465727328616464726573732073726341737365742c616464726573732064737441737365742c75696e74323536207372635175616e746974792c75696e74323536206473745175616e746974792c75696e74323536206d696e5175616e746974792c75696e74313238206461726b53616c74295369676e65644f7264657228616464726573732073656e6465722c4f72646572506172616d657465727320706172616d65746572732c75696e7432353620646561646c696e652c61646472657373207461726765742c616464726573732066696c6c65722c737472696e67206f72646572547970652c62797465735b5d20637573746f6d4461746129546f6b656e5065726d697373696f6e73286164647265737320746f6b656e2c75696e7432353620616d6f756e7429a264697066735822122010f98f85d62de66198894721f830263f6a09214cdc51ed4d4a9f5df8d7fe488c64736f6c634300081c0033000000000000000000000000000000000022d473030f116ddee9f6b43ac78ba300000000000000000000000028b5a0e9c621a5badaa536219b3a228c8168cf5d00000000000000000000000081d40f21f12a8f0e3252bccb954d722d4c464b64000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48

Deployed Bytecode

0x6080604052600436106100f2575f3560e01c806391ba38ec11610087578063dec9f72f11610057578063dec9f72f146102e1578063efc8aac414610300578063fdea61961461032f578063fe79f61914610362575f5ffd5b806391ba38ec14610270578063b51ed51b1461028f578063bb770835146102ae578063d1eb7cc0146102cd575f5ffd5b806364e0a828116100c257806364e0a828146101b657806369a2aad2146101e95780636e2d09911461021c57806374b9e8381461024f575f5ffd5b80631a5870b7146100fd5780631e4e30fd1461014357806328df07dc146101625780632ec926a714610183575f5ffd5b366100f957005b5f5ffd5b348015610108575f5ffd5b506101307f08167ba6340f5eb62384b818358d2b6daeb04945867570e232d0b2d92a0741f981565b6040519081526020015b60405180910390f35b34801561014e575f5ffd5b5061013061015d36600461240f565b610395565b34801561016d575f5ffd5b5061018161017c366004612478565b6104a3565b005b34801561018e575f5ffd5b506101307f28a6b1c3ac828653bad9f95ff5c3e77405a556137c9a922feb6dfe7732db081b81565b3480156101c1575f5ffd5b506101307f3830969403cefb9f63c82fb7201672c51b177354f1e7dcc024e3d098992aa4b581565b3480156101f4575f5ffd5b506101307f776716c31b7a1fae26c9746a93f9980261d9065bd9b539720624eafe20da3d5e81565b348015610227575f5ffd5b506101307fb15c6f4cb2704b59886404596581f035599143a4de893556943a4865c51863a581565b34801561025a575f5ffd5b506102636107b2565b60405161013a919061254e565b34801561027b575f5ffd5b5061018161028a366004612560565b6107d1565b34801561029a575f5ffd5b506101816102a9366004612560565b610b52565b3480156102b9575f5ffd5b506101816102c83660046125f6565b610cae565b3480156102d8575f5ffd5b50610263610fee565b3480156102ec575f5ffd5b506101306102fb3660046126bd565b61100a565b34801561030b575f5ffd5b5061031f61031a36600461271b565b6110d6565b604051901515815260200161013a565b34801561033a575f5ffd5b506101307f51489d4263e7aff6c512a83666a144c08d740a160db30b26495ddfc5e7f1c21e81565b34801561036d575f5ffd5b506101307f30fdb2c970f3affdeb948b19a7ed10455583a16fe94c184964134c3d830930eb81565b5f5f6103a38360200161100a565b90507f28a6b1c3ac828653bad9f95ff5c3e77405a556137c9a922feb6dfe7732db081b6103d360208501856127ea565b8260e08601356103eb610120880161010089016127ea565b6103fd61014089016101208a016127ea565b61040b6101408a018a612805565b604051610419929190612848565b6040519081900390206104386104336101608c018c612857565b611464565b6040805160208101999099526001600160a01b03978816908901526060880195909552608087019390935290841660a086015290921660c084015260e08301919091526101008201526101200160405160208183030381529060405280519060200120915050919050565b6104ab611548565b6001600160a01b0383166104d257604051634908692960e01b815260040160405180910390fd5b6104fe857f3830969403cefb9f63c82fb7201672c51b177354f1e7dcc024e3d098992aa4b56001611570565b5f6105098686611644565b90505f61051c60408801602089016127ea565b905060608701355f61053160208701876127ea565b6001600160a01b03161461070a5761056961055260408a0160208b016127ea565b61055f60208801886127ea565b60608b013561176d565b61057660208601866127ea565b6001600160a01b03166330be55676105916020880188612857565b6105a160608a0160408b016127ea565b6105b160808b0160608c016127ea565b6040518563ffffffff1660e01b81526004016105d094939291906128d2565b5f604051808303815f875af11580156105eb573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526106129190810190612a52565b506106296106246101608a018a612857565b611860565b91506001600160a01b038216158061064957506001600160a01b0382163b155b15610677576040516381879ccd60e01b81526001600160a01b03831660048201526024015b60405180910390fd5b6040516370a0823160e01b81523060048201526001600160a01b038316906370a0823190602401602060405180830381865afa1580156106b9573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106dd9190612bc0565b90508381101561070a57604051633990cfef60e21b8152600481018590526024810182905260440161066e565b61071e6001600160a01b0383168783611961565b6001600160a01b038616837f451ad264d98909801dc5b0153f5a6a23ceb5aa5e0d3404f99f6e9d4d7d7d23c3848461075a6101408e018e612805565b8e6020015f01602081019061076f91906127ea565b8f602001602001602081019061078591906127ea565b60405161079796959493929190612bd7565b60405180910390a35050506107ab60015f55565b5050505050565b60405180610180016040528061014a8152602001612f1261014a913981565b6107d9611548565b5f6107e48585611644565b90505f6107fd6107f8610160880188612857565b611996565b90506001600160a01b037f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb481661083960408801602089016127ea565b6001600160a01b03161461091c5761087161085a60408801602089016127ea565b61086760208701876127ea565b606089013561176d565b61087e60208501856127ea565b6001600160a01b03166330be55676108996020870187612857565b6108a96060890160408a016127ea565b6108b960808a0160608b016127ea565b6040518563ffffffff1660e01b81526004016108d894939291906128d2565b5f604051808303815f875af11580156108f3573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261091a9190810190612a52565b505b6040516370a0823160e01b81523060048201525f907f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb486001600160a01b0316906370a0823190602401602060405180830381865afa158015610980573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109a49190612bc0565b905081602001518110156109cb5760405163bb2875c360e01b815260040160405180910390fd5b6001600160a01b037f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4816610a056040890160208a016127ea565b6001600160a01b031614158015610a1b57508381105b15610a4357604051633990cfef60e21b8152600481018590526024810182905260440161066e565b5f7f776716c31b7a1fae26c9746a93f9980261d9065bd9b539720624eafe20da3d5e610a736101408a018a612805565b604051610a81929190612848565b6040518091039020149050610a998884848785611a38565b837ffa056c6fc7e49102eebc5a584edb89991a093392880d7bf55957c02805dd0cce610ac96101408b018b612805565b8651610add6101208e016101008f016127ea565b8d610120016020810190610af191906127ea565b8e6020015f016020810190610b0691906127ea565b8f6020016020016020810190610b1c91906127ea565b8a8c60400151604051610b3799989796959493929190612c22565b60405180910390a250505050610b4c60015f55565b50505050565b610b5a611548565b610b86847f51489d4263e7aff6c512a83666a144c08d740a160db30b26495ddfc5e7f1c21e6001611570565b5f610b918585611644565b9050610bbd610ba660408701602088016127ea565b610bb360208601866127ea565b606088013561176d565b610bca60208401846127ea565b6001600160a01b03166330be5567610be56020860186612857565b610bf560608801604089016127ea565b610c056080890160608a016127ea565b6040518563ffffffff1660e01b8152600401610c2494939291906128d2565b5f604051808303815f875af1158015610c3f573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052610c669190810190612a52565b50610c878186610c7c60608201604083016127ea565b60a089013586611da7565b610ca45760405163bb2875c360e01b815260040160405180910390fd5b50610b4c60015f55565b610cb6611548565b6001600160a01b038516610cdd57604051634908692960e01b815260040160405180910390fd5b610d08867f3830969403cefb9f63c82fb7201672c51b177354f1e7dcc024e3d098992aa4b55f611570565b5f610d1287610395565b905080856040013514610d455760408051631671c27b60e21b81529086013560048201526024810182905260440161066e565b610d638686863560e08b0135610d5e60208a018a612805565b612035565b50610d7460608801604089016127ea565b6001600160a01b0316610d8a60208701876127ea565b6001600160a01b031614610f40575f610da660208501856127ea565b6001600160a01b031603610dcd5760405163e74b4bd560e01b815260040160405180910390fd5b610df4610ddd60208701876127ea565b610dea60208601866127ea565b876020013561176d565b610e0160208401846127ea565b6001600160a01b03166330be5567610e1c6020860186612857565b610e2c60608801604089016127ea565b610e3c6080890160608a016127ea565b6040518563ffffffff1660e01b8152600401610e5b94939291906128d2565b5f604051808303815f875af1158015610e76573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052610e9d9190810190612a52565b505f610eac60208701876127ea565b6040516370a0823160e01b81523060048201526001600160a01b0391909116906370a0823190602401602060405180830381865afa158015610ef0573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610f149190612bc0565b90508015610f3e57610f3e8782610f2e60208a018a6127ea565b6001600160a01b03169190611961565b505b610f608188610f5560608201604083016127ea565b60a08b013586611da7565b610fdc575f610f7d610f7860608a0160408b016127ea565b6121ba565b9050610f8f6060890160408a016127ea565b604080516001600160a01b039092166020830152810182905260a0890135606082015260800160408051601f1981840301815290829052634c0fe4a160e11b825261066e9160040161254e565b50610fe660015f55565b505050505050565b6040518060a0016040528060798152602001612e996079913981565b5f7f30fdb2c970f3affdeb948b19a7ed10455583a16fe94c184964134c3d830930eb61103960208401846127ea565b61104960408501602086016127ea565b60408501356060860135608087013561106860c0890160a08a01612c7f565b6040805160208101989098526001600160a01b0396871690880152949093166060860152608085019190915260a084015260c08301526fffffffffffffffffffffffffffffffff1660e082015261010001604051602081830303815290604052805190602001209050919050565b5f6110df611548565b5f6110ea898961229e565b9050806110f686610395565b146111285761110485610395565b604051631671c27b60e21b815260048101919091526024810182905260440161066e565b611153857f776716c31b7a1fae26c9746a93f9980261d9065bd9b539720624eafe20da3d5e5f611570565b5f5f7f00000000000000000000000081d40f21f12a8f0e3252bccb954d722d4c464b646001600160a01b03166357ecfd2860e01b8c8c8c8c60405160240161119e9493929190612cae565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b03199094169390931790925290516111dc9190612cd4565b5f604051808303815f865af19150503d805f8114611215576040519150601f19603f3d011682016040523d82523d5f602084013e61121a565b606091505b50915091508161123f57806040516321f172cd60e21b815260040161066e919061254e565b6040516370a0823160e01b81523060048201525f907f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb486001600160a01b0316906370a0823190602401602060405180830381865afa1580156112a3573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906112c79190612bc0565b90505f6112d760208901896127ea565b6001600160a01b0316146113c75761131c7f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4861131660208a018a6127ea565b8361176d565b61132960208801886127ea565b6001600160a01b03166330be556761134460208a018a612857565b61135460608c0160408d016127ea565b61136460808d0160608e016127ea565b6040518563ffffffff1660e01b815260040161138394939291906128d2565b5f604051808303815f875af115801561139e573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526113c59190810190612a52565b505b6113e784896113dc60608201604083016127ea565b60a08c01358a611da7565b156113f9576001945050505050611450565b61142684897f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48845f611da7565b15611437575f945050505050611450565b60405163bb2875c360e01b815260040160405180910390fd5b61145960015f55565b979650505050505050565b5f81818167ffffffffffffffff811115611480576114806129e4565b6040519080825280602002602001820160405280156114a9578160200160208202803683370190505b5090505f5b82811015611515578585828181106114c8576114c8612cea565b90506020028101906114da9190612805565b6040516114e8929190612848565b604051809103902082828151811061150257611502612cea565b60209081029190910101526001016114ae565b50806040516020016115279190612cfe565b60405160208183030381529060405280519060200120925050505b92915050565b60025f540361156a57604051633ee5aeb560e01b815260040160405180910390fd5b60025f55565b801561159b57428360e00135101561159b57604051630407b05b60e31b815260040160405180910390fd5b5f6115ae610140850161012086016127ea565b6001600160a01b0316141580156115df5750336115d3610140850161012086016127ea565b6001600160a01b031614155b156115fc576040516282b42960e81b815260040160405180910390fd5b8161160b610140850185612805565b604051611619929190612848565b60405180910390201461163f5760405163b968846160e01b815260040160405180910390fd5b505050565b5f61164e83610395565b6040805160a0810182529192506001600160a01b037f000000000000000000000000000000000022d473030f116ddee9f6b43ac78ba3169163137c29fe918190606082019081906116a4908a0160208b016127ea565b6001600160a01b031681526060890135602091820181905291835287358382015260e08901356040938401528251808401909352308352828101919091526116ee908801886127ea565b8560405180610180016040528061014a8152602001612f1261014a913961171860208a018a612805565b6040518863ffffffff1660e01b815260040161173a9796959493929190612d33565b5f604051808303815f87803b158015611751575f5ffd5b505af1158015611763573d5f5f3e3d5ffd5b5050505092915050565b604080513060248201526001600160a01b0384811660448084019190915283518084039091018152606490920183526020820180516001600160e01b0316636eb1769f60e11b17905291515f928392908716916117ca9190612cd4565b5f60405180830381855afa9150503d805f8114611802576040519150601f19603f3d011682016040523d82523d5f602084013e611807565b606091505b50915091505f82801561181c57506020825110155b611826575f61183a565b8180602001905181019061183a9190612bc0565b905083811061184b57505050505050565b610fe66001600160a01b038716865f196122fa565b5f60048210156118b25760405162461bcd60e51b815260206004820152601560248201527f4d697373696e6720637573746f6d446174615b335d0000000000000000000000604482015260640161066e565b828260038181106118c5576118c5612cea565b90506020028101906118d79190612805565b90506020146119285760405162461bcd60e51b815260206004820152601e60248201527f637573746f6d446174615b335d206d7573742062652033322062797465730000604482015260640161066e565b8282600381811061193b5761193b612cea565b905060200281019061194d9190612805565b81019061195a91906127ea565b9392505050565b61196e838383600161234c565b61163f57604051635274afe760e01b81526001600160a01b038416600482015260240161066e565b6040805160a0810182525f80825260208201819052918101829052606081018290526080810191909152600582146119e1576040516368804db160e01b815260040160405180910390fd5b60208335840181013560e090811c8352818501358501820135838301526040808601358601830135908401526060808601358601830135821c9084015260808086013590950190910135901c928101929092525090565b5f81611a64577fb15c6f4cb2704b59886404596581f035599143a4de893556943a4865c51863a5611a86565b7f776716c31b7a1fae26c9746a93f9980261d9065bd9b539720624eafe20da3d5e5b9050611a9486826001611570565b81158015611ae257506001600160a01b037f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4816611ad760408801602089016127ea565b6001600160a01b0316145b15611b30575f611afa60808801356060890135612dd4565b9050611b068186612dd4565b9450611b2e611b1d61014089016101208a016127ea565b82610f2e60408b0160208c016127ea565b505b611b7b7f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb487f00000000000000000000000028b5a0e9c621a5badaa536219b3a228c8168cf5d8661176d565b5f82611c59578551634701287760e11b908690611baf611ba36101208c016101008d016127ea565b6001600160a01b031690565b7f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb485f6040808d015160608e01519151602481019790975263ffffffff958616604488015260648701949094526001600160a01b03909216608486015260a485015260c48401919091521660e48201526101040160408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611cfd565b855163779b432d60e01b908690307f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48308b604001518c606001518b604051602001611ca691815260200190565b60408051601f1981840301815290829052611cca9897969594939291602401612df3565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091525b90505f5f7f00000000000000000000000028b5a0e9c621a5badaa536219b3a228c8168cf5d6001600160a01b031683604051611d399190612cd4565b5f604051808303815f865af19150503d805f8114611d72576040519150601f19603f3d011682016040523d82523d5f602084013e611d77565b606091505b509150915081611d9c578060405163169ecfb160e11b815260040161066e919061254e565b505050505050505050565b5f806001600160a01b038516611e6c57504783811015611dca575f91505061202c565b82811015611df557604051633990cfef60e21b8152600481018490526024810182905260440161066e565b5f611e08610120880161010089016127ea565b6001600160a01b0316826040515f6040518083038185875af1925050503d805f8114611e4f576040519150601f19603f3d011682016040523d82523d5f602084013e611e54565b606091505b5050905080611e6657915061202c9050565b50611f9c565b604080513060248083019190915282518083039091018152604490910182526020810180516001600160e01b03166370a0823160e01b17905290515f9182916001600160a01b03891691611ebf91612cd4565b5f60405180830381855afa9150503d805f8114611ef7576040519150601f19603f3d011682016040523d82523d5f602084013e611efc565b606091505b5091509150818015611f1057506020815110155b611f1f575f935050505061202c565b80806020019051810190611f339190612bc0565b925085831015611f48575f935050505061202c565b84831015611f7357604051633990cfef60e21b8152600481018690526024810184905260440161066e565b611f99611f886101208a016101008b016127ea565b6001600160a01b0389169085611961565b50505b867fcff4c6fa646ccfbe7edf1ab0a8e2f1fe0d66da25a65692c3cb625145a4de2331611fcc610140890189612805565b611fde6101208b016101008c016127ea565b611ff06101408c016101208d016127ea565b61200060408d0160208e016127ea565b8b8d602001604001358960405161201e989796959493929190612e46565b60405180910390a260019150505b95945050505050565b5f7f08167ba6340f5eb62384b818358d2b6daeb04945867570e232d0b2d92a0741f961206460208801886127ea565b604080516020818101949094526001600160a01b039092168282015291880135606082015290870135608082015260a00160408051601f19818403018152828252805160209182012060a084019092529092506001600160a01b037f000000000000000000000000000000000022d473030f116ddee9f6b43ac78ba3169163137c29fe918190606082019081906120fd908d018d6127ea565b6001600160a01b031681526020018b602001358152508152602001888152602001878152506040518060400160405280306001600160a01b031681526020018a602001358152508a856040518060a0016040528060798152602001612e996079913989896040518863ffffffff1660e01b81526004016121839796959493929190612d33565b5f604051808303815f87803b15801561219a575f5ffd5b505af11580156121ac573d5f5f3e3d5ffd5b505050509695505050505050565b5f6001600160a01b0382166121d0575047919050565b604080513060248083019190915282518083039091018152604490910182526020810180516001600160e01b03166370a0823160e01b17905290515f9182916001600160a01b0386169161222391612cd4565b5f60405180830381855afa9150503d805f811461225b576040519150601f19603f3d011682016040523d82523d5f602084013e612260565b606091505b509150915081801561227457506020815110155b15612295578080602001905181019061228d9190612bc0565b949350505050565b505f9392505050565b5f60208210156122f05760405162461bcd60e51b815260206004820152601160248201527f6d65737361676520746f6f2073686f7274000000000000000000000000000000604482015260640161066e565b5001601f19013590565b6123068383835f6123ae565b61163f5761231783835f60016123ae565b61233f57604051635274afe760e01b81526001600160a01b038416600482015260240161066e565b61196e83838360016123ae565b60405163a9059cbb60e01b5f8181526001600160a01b038616600452602485905291602083604481808b5af1925060015f511483166123a2578383151615612396573d5f823e3d81fd5b5f873b113d1516831692505b60405250949350505050565b60405163095ea7b360e01b5f8181526001600160a01b038616600452602485905291602083604481808b5af1925060015f511483166123a2578383151615612396573d5f823e3d81fd5b5f6101808284031215612409575f5ffd5b50919050565b5f6020828403121561241f575f5ffd5b813567ffffffffffffffff811115612435575f5ffd5b61228d848285016123f8565b5f60408284031215612409575f5ffd5b6001600160a01b0381168114612465575f5ffd5b50565b5f60808284031215612409575f5ffd5b5f5f5f5f5f60a0868803121561248c575f5ffd5b853567ffffffffffffffff8111156124a2575f5ffd5b6124ae888289016123f8565b955050602086013567ffffffffffffffff8111156124ca575f5ffd5b6124d688828901612441565b94505060408601356124e781612451565b9250606086013567ffffffffffffffff811115612502575f5ffd5b61250e88828901612468565b95989497509295608001359392505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f61195a6020830184612520565b5f5f5f5f60808587031215612573575f5ffd5b843567ffffffffffffffff811115612589575f5ffd5b612595878288016123f8565b945050602085013567ffffffffffffffff8111156125b1575f5ffd5b6125bd87828801612441565b935050604085013567ffffffffffffffff8111156125d9575f5ffd5b6125e587828801612468565b949793965093946060013593505050565b5f5f5f5f5f5f86880361010081121561260d575f5ffd5b873567ffffffffffffffff811115612623575f5ffd5b61262f8a828b016123f8565b975050602088013561264081612451565b95506060603f1982011215612653575f5ffd5b5060408701935060a087013567ffffffffffffffff811115612673575f5ffd5b61267f89828a01612441565b93505060c087013567ffffffffffffffff81111561269b575f5ffd5b6126a789828a01612468565b9699959850939692959460e09093013593505050565b5f60c08284031280156126ce575f5ffd5b509092915050565b5f5f83601f8401126126e6575f5ffd5b50813567ffffffffffffffff8111156126fd575f5ffd5b602083019150836020828501011115612714575f5ffd5b9250929050565b5f5f5f5f5f5f5f60a0888a031215612731575f5ffd5b873567ffffffffffffffff811115612747575f5ffd5b6127538a828b016126d6565b909850965050602088013567ffffffffffffffff811115612772575f5ffd5b61277e8a828b016126d6565b909650945050604088013567ffffffffffffffff81111561279d575f5ffd5b6127a98a828b016123f8565b935050606088013567ffffffffffffffff8111156127c5575f5ffd5b6127d18a828b01612468565b979a969950949793969295929450505060809091013590565b5f602082840312156127fa575f5ffd5b813561195a81612451565b5f5f8335601e1984360301811261281a575f5ffd5b83018035915067ffffffffffffffff821115612834575f5ffd5b602001915036819003821315612714575f5ffd5b818382375f9101908152919050565b5f5f8335601e1984360301811261286c575f5ffd5b83018035915067ffffffffffffffff821115612886575f5ffd5b6020019150600581901b3603821315612714575f5ffd5b8015158114612465575f5ffd5b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b606080825281018490525f6080600586901b830181019083018783607e1936839003015b898210156129bb57868503607f190184528235818112612914575f5ffd5b8b01803561292181612451565b6001600160a01b03168652602081013561293a8161289d565b1515602087015260408181013590870152606081013536829003601e19018112612962575f5ffd5b0160208101903567ffffffffffffffff81111561297d575f5ffd5b80360382131561298b575f5ffd5b608060608801526129a06080880182846128aa565b965050506020830192506020840193506001820191506128f6565b5050506001600160a01b03861660208501525090506001600160a01b038316604083015261202c565b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff81118282101715612a1b57612a1b6129e4565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715612a4a57612a4a6129e4565b604052919050565b5f60208284031215612a62575f5ffd5b815167ffffffffffffffff811115612a78575f5ffd5b8201601f81018413612a88575f5ffd5b805167ffffffffffffffff811115612aa257612aa26129e4565b8060051b612ab260208201612a21565b91825260208184018101929081019087841115612acd575f5ffd5b6020850192505b8383101561145957825167ffffffffffffffff811115612af2575f5ffd5b85016040818a03601f19011215612b07575f5ffd5b612b0f6129f8565b6020820151612b1d8161289d565b8152604082015167ffffffffffffffff811115612b38575f5ffd5b60208184010192505089601f830112612b4f575f5ffd5b815167ffffffffffffffff811115612b6957612b696129e4565b612b7c601f8201601f1916602001612a21565b8181528b6020838601011115612b90575f5ffd5b8160208501602083015e5f6020838301015280602084015250508084525050602082019150602083019250612ad4565b5f60208284031215612bd0575f5ffd5b5051919050565b6001600160a01b038716815285602082015260a060408201525f612bff60a0830186886128aa565b6001600160a01b0394851660608401529290931660809091015295945050505050565b61010081525f612c3761010083018b8d6128aa565b63ffffffff999099166020830152506001600160a01b03968716604082015294861660608601529285166080850152931660a083015260c082019290925260e0015292915050565b5f60208284031215612c8f575f5ffd5b81356fffffffffffffffffffffffffffffffff8116811461195a575f5ffd5b604081525f612cc16040830186886128aa565b82810360208401526114598185876128aa565b5f82518060208501845e5f920191825250919050565b634e487b7160e01b5f52603260045260245ffd5b81515f90829060208501835b82811015612d28578151845260209384019390910190600101612d0a565b509195945050505050565b612d5181895180516001600160a01b03168252602090810151910152565b6020880151604082015260408801516060820152612d85608082018880516001600160a01b03168252602090810151910152565b6001600160a01b03861660c08201528460e08201526101406101008201525f612db2610140830186612520565b828103610120840152612dc68185876128aa565b9a9950505050505050505050565b8181038181111561154257634e487b7160e01b5f52601160045260245ffd5b88815263ffffffff881660208201528660408201526001600160a01b03861660608201528460808201528360a082015263ffffffff831660c082015261010060e08201525f612dc6610100830184612520565b60e081525f612e5960e083018a8c6128aa565b6001600160a01b039889166020840152968816604083015250938616606085015291909416608083015260a082019390935260c001919091529291505056fe4d4d5769746e657373207769746e657373294d4d5769746e6573732861646472657373206d6d546f6b656e2c75696e7432353620616d6f756e742c62797465733332206f72646572496429546f6b656e5065726d697373696f6e73286164647265737320746f6b656e2c75696e7432353620616d6f756e74295369676e65644f72646572207769746e657373294f72646572506172616d657465727328616464726573732073726341737365742c616464726573732064737441737365742c75696e74323536207372635175616e746974792c75696e74323536206473745175616e746974792c75696e74323536206d696e5175616e746974792c75696e74313238206461726b53616c74295369676e65644f7264657228616464726573732073656e6465722c4f72646572506172616d657465727320706172616d65746572732c75696e7432353620646561646c696e652c61646472657373207461726765742c616464726573732066696c6c65722c737472696e67206f72646572547970652c62797465735b5d20637573746f6d4461746129546f6b656e5065726d697373696f6e73286164647265737320746f6b656e2c75696e7432353620616d6f756e7429a264697066735822122010f98f85d62de66198894721f830263f6a09214cdc51ed4d4a9f5df8d7fe488c64736f6c634300081c0033

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.