Source Code
Overview
ETH Balance
0 ETH
ETH Value
$0.00
Cross-Chain Transactions
Loading...
Loading
Contract Name:
InterChainRouterV4_2
Compiler Version
v0.8.28+commit.7893614a
Optimization Enabled:
Yes with 600 runs
Other Settings:
cancun EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// 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_2 is IEIP712Types, ReentrancyGuard {
using SafeERC20 for IERC20;
IPermit2 immutable PERMIT2;
ITokenMessenger immutable TOKEN_MESSENGER;
IMessageTransmitter immutable MESSAGE_TRANSMITTER;
address immutable USDC_ADDRESS;
address immutable WRAPPED_GAS_TOKEN;
address immutable GAS_TOKEN; // For some chains like CELO and Polygon, native asset is erc20.
// 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 non-USDC token
bytes32 public constant TYPE_MM = keccak256("MARKETMAKER"); // X1->Y2 cross-chain swap using market maker deposit and withdrawal, might involve dex swaps too.
bytes32 public constant TYPE_GZ = keccak256("GASZIP"); // X1->Y2 cross-chain swap wit gas.zip as intermediate step using native token as intermediate token. Might involve dex swap on both sides.
constructor(
address _permit2,
address _tokenMessenger,
address _messageTransmitter,
address _usdcAddress,
address _wrappedGasToken,
address _gasToken
) {
PERMIT2 = IPermit2(_permit2);
TOKEN_MESSENGER = ITokenMessenger(_tokenMessenger);
MESSAGE_TRANSMITTER = IMessageTransmitter(_messageTransmitter);
USDC_ADDRESS = _usdcAddress;
WRAPPED_GAS_TOKEN = _wrappedGasToken;
GAS_TOKEN = _gasToken;
}
/// @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));
}
}
/// @notice Send tokens via GasZip bridge for cross-chain swap using native token
/// @dev Pulls tokens via Permit2, optionally swaps to native, unwraps if needed, sends ETH + calldata to GasZip wallet
/// @param order The signed order details
/// @param payload Permit2 signature payload
/// @param arb Optional multicall data for DEX swap to native token
/// @param minOut Minimum output amount after swap (MEV protection)
function sendGZOrder(
SignedOrder calldata order,
SigPayload calldata payload,
MulticallData calldata arb,
uint256 minOut
) external nonReentrant {
// Verify order requirements: filler, deadline, type
_assertOrderRequirements(order, TYPE_GZ, true);
// Pull tokens from user via Permit2
bytes32 orderHash = pullTokens(order, payload);
// Parse GasZip parameters from customData
GasZipParams memory gzParams = _cacheGasZipParams(order.customData);
// Determine if we need to swap to native token
address srcToken = order.parameters.srcAsset;
uint256 nativeAmount;
if (srcToken == WRAPPED_GAS_TOKEN) {
// Unwrap WETH to native ETH
nativeAmount = order.parameters.srcQuantity;
IWETH(WRAPPED_GAS_TOKEN).withdraw(nativeAmount);
} else if (srcToken == GAS_TOKEN) {
// Already native token (for chains like CELO/Polygon where native is ERC20)
nativeAmount = order.parameters.srcQuantity;
// Transfer to this contract if it's an ERC20 native token
// (already done via pullTokens)
} else {
// Need to swap to wrapped native via DEX, then unwrap
if (arb.multicallTarget == address(0)) revert InvalidSourceMulticallData();
// Approve and execute DEX swap
_reApprove(srcToken, arb.multicallTarget, order.parameters.srcQuantity);
IMulticall(arb.multicallTarget).multicall(arb.calls, arb.refundTo, arb.nftRecipient);
// Get wrapped native balance after swap
uint256 wrappedBalance = IERC20(WRAPPED_GAS_TOKEN).balanceOf(address(this));
// MEV protection on swap output
if (wrappedBalance < minOut) revert MEVprotect(minOut, wrappedBalance);
// Unwrap to native ETH
IWETH(WRAPPED_GAS_TOKEN).withdraw(wrappedBalance);
nativeAmount = wrappedBalance;
}
// Final MEV protection check against minimum bridge amount
if (nativeAmount < gzParams.minBridgeAmount) {
revert MEVprotect(gzParams.minBridgeAmount, nativeAmount);
}
// Send native ETH + calldata to GasZip wallet
(bool success, ) = gzParams.gasZipDepositAddress.call{value: nativeAmount}(gzParams.gasZipCallData);
if (!success) revert PayoutFailed(abi.encode(gzParams.gasZipDepositAddress, nativeAmount, 0));
// Emit GasZip deposit event
emit GasZipDeposit(
orderHash,
gzParams.gasZipDepositAddress,
nativeAmount,
gzParams.gasZipCallData
);
}
/// @notice Receive and complete a GasZip order on destination chain
/// @dev Receives native ETH from filler, optionally swaps to destination token, pays out to order.target
/// @param order The signed order details
/// @param arb Optional multicall data for DEX swap from native to dstAsset
/// @param minOut Minimum output amount for MEV protection
function takeGZOrder(
SignedOrder calldata order,
MulticallData calldata arb,
uint256 minOut
) external payable nonReentrant {
// Verify order requirements (no time check as order may have been sent earlier)
_assertOrderRequirements(order, TYPE_GZ, false);
// Compute order hash for event
bytes32 orderHash = hashOrder(order);
// Parse GasZip parameters from customData to check if destination swap is needed
GasZipParams memory gzParams = _cacheGasZipParams(order.customData);
// Get amount of native ETH received
uint256 nativeReceived = msg.value;
// Check if we need to swap from native to destination token
if (gzParams.needsDstSwap && order.parameters.dstAsset != address(0)) {
// Need to swap native ETH to destination token via DEX
if (arb.multicallTarget == address(0)) revert InvalidDestinationMulticallData();
// Wrap native ETH to WETH for DEX swap
IWETH(WRAPPED_GAS_TOKEN).deposit{value: nativeReceived}();
// Approve and execute DEX swap
_reApprove(WRAPPED_GAS_TOKEN, arb.multicallTarget, nativeReceived);
IMulticall(arb.multicallTarget).multicall(arb.calls, arb.refundTo, arb.nftRecipient);
// Payout destination tokens to order.target with MEV protection
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));
}
} else {
// No swap needed, pay out native ETH directly (dstAsset should be address(0) for ETH)
if (!_payout(orderHash, order, address(0), order.parameters.minQuantity, minOut)) {
revert PayoutFailed(abi.encode(address(0), nativeReceived, 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
}
}
/// @notice Parse GasZip parameters from customData array
/// @dev CustomData format:
/// [0]: destination chainId (uint32, shifted left 224 bits)
/// [1]: minimum bridge amount (uint256) - MEV protection
/// [2]: needs_src_swap flag (uint256)
/// [3]: src_swap_target (native token address after swap)
/// [4]: bridge_token_out (native token on destination)
/// [5]: bridged_amount_estimate (uint256)
/// [6]: needs_dst_swap flag (uint256)
/// [7]: dst_swap_target (final token address)
/// [8]: gaszip_deposit_address (address as uint256)
/// [9]: gaszip_calldata_length (uint256)
/// [10+]: gaszip_calldata chunks (bytes32[] with zero padding)
/// @param customData Array of custom data from the order
/// @return params Parsed GasZip parameters
function _cacheGasZipParams(bytes[] calldata customData) internal pure returns (GasZipParams memory params) {
// Require at least 10 elements for base GasZip parameters
require(customData.length >= 10, "Invalid GasZip params length");
// Parse fixed fields [0-9]
params.destinationChainId = uint32(uint256(bytes32(customData[0])) >> 224);
params.minBridgeAmount = abi.decode(customData[1], (uint256));
params.needsSrcSwap = abi.decode(customData[2], (uint256)) != 0;
params.srcSwapTarget = abi.decode(customData[3], (address));
params.bridgeTokenOut = abi.decode(customData[4], (address));
params.bridgedAmountEstimate = abi.decode(customData[5], (uint256));
params.needsDstSwap = abi.decode(customData[6], (uint256)) != 0;
params.dstSwapTarget = abi.decode(customData[7], (address));
params.gasZipDepositAddress = abi.decode(customData[8], (address));
uint256 calldataLength = abi.decode(customData[9], (uint256));
// Parse dynamic calldata from [10+]
if (calldataLength > 0) {
params.gasZipCallData = new bytes(calldataLength);
uint256 remainingLength = calldataLength;
uint256 offset = 0;
// Reconstruct calldata from chunks
for (uint256 i = 10; i < customData.length && remainingLength > 0; i++) {
bytes32 chunk = bytes32(customData[i]);
uint256 chunkSize = remainingLength > 32 ? 32 : remainingLength;
// Copy chunk data
for (uint256 j = 0; j < chunkSize; j++) {
params.gasZipCallData[offset + j] = chunk[j];
}
offset += chunkSize;
remainingLength -= chunkSize;
}
}
}
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);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)
pragma solidity >=0.4.16;
import {IERC165} from "../utils/introspection/IERC165.sol";// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (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
}
// GasZip STRUCT
struct GasZipParams {
uint32 destinationChainId; // offset 0x00
uint256 minBridgeAmount; // offset 0x20 - MEV protection
bool needsSrcSwap; // offset 0x40
address srcSwapTarget; // offset 0x60
address bridgeTokenOut; // offset 0x80
uint256 bridgedAmountEstimate; // offset 0xA0
bool needsDstSwap; // offset 0xC0
address dstSwapTarget; // offset 0xE0
address gasZipDepositAddress; // offset 0x100
bytes gasZipCallData; // offset 0x120 (dynamic)
}
//Msg. transmitter
interface IMessageTransmitter {
function receiveMessage(bytes calldata message, bytes calldata attestation) external returns (bool);
}
// WETH Interface
interface IWETH {
function withdraw(uint256 amount) external;
function deposit() external payable;
}
// 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
);
event GasZipDeposit(
bytes32 indexed orderUUID,
address indexed gasZipWallet,
uint256 amountSent,
bytes gasZipCallData
);
// 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 InvalidSourceMulticallData();
error InvalidDestinationMulticallData();
error InvalidSender(address sender, address orderSender);
error InvalidFiller(address filler, address orderFiller);
error InvalidMMWallet();
}{
"optimizer": {
"enabled": true,
"runs": 600
},
"evmVersion": "cancun",
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"metadata": {
"useLiteralContent": true
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
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"},{"internalType":"address","name":"_wrappedGasToken","type":"address"},{"internalType":"address","name":"_gasToken","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":"InvalidSourceMulticallData","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":"gasZipWallet","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountSent","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"gasZipCallData","type":"bytes"}],"name":"GasZipDeposit","type":"event"},{"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_GZ","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"},{"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":"sendGZOrder","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"},{"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"},{"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":"takeGZOrder","outputs":[],"stateMutability":"payable","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"}]Contract Creation Code
610140604052348015610010575f5ffd5b50604051613f99380380613f9983398101604081905261002f9161007d565b60015f556001600160a01b0395861660805293851660a05291841660c052831660e05282166101005216610120526100ed565b80516001600160a01b0381168114610078575f5ffd5b919050565b5f5f5f5f5f5f60c08789031215610092575f5ffd5b61009b87610062565b95506100a960208801610062565b94506100b760408801610062565b93506100c560608801610062565b92506100d360808801610062565b91506100e160a08801610062565b90509295509295509295565b60805160a05160c05160e0516101005161012051613df56101a45f395f61102601525f81816109250152818161099601528181610f6c01528181610fc00152818161116f015261122301525f8181610bb801528181610ce201528181610d8401528181611a8d01528181611b2101528181611c3101528181612a9001528181612b1e01528181612b9a0152612c5201525f61198e01525f8181612b3f0152612cec01525f8181611e910152612e1c0152613df55ff3fe608060405260043610610140575f3560e01c806391ba38ec116100bb578063d1eb7cc011610071578063efc8aac411610057578063efc8aac4146103b3578063fdea6196146103e2578063fe79f61914610415575f5ffd5b8063d1eb7cc014610380578063dec9f72f14610394575f5ffd5b8063a25d7895116100a1578063a25d789514610323578063b51ed51b14610342578063bb77083514610361575f5ffd5b806391ba38ec146102d15780639a1bb488146102f0575f5ffd5b80634fda5b5e1161011057806369a2aad2116100f657806369a2aad21461024a5780636e2d09911461027d57806374b9e838146102b0575f5ffd5b80634fda5b5e1461020457806364e0a82814610217575f5ffd5b80631a5870b71461014b5780631e4e30fd1461019157806328df07dc146101b05780632ec926a7146101d1575f5ffd5b3661014757005b5f5ffd5b348015610156575f5ffd5b5061017e7f08167ba6340f5eb62384b818358d2b6daeb04945867570e232d0b2d92a0741f981565b6040519081526020015b60405180910390f35b34801561019c575f5ffd5b5061017e6101ab366004613086565b610448565b3480156101bb575f5ffd5b506101cf6101ca3660046130ef565b610556565b005b3480156101dc575f5ffd5b5061017e7f28a6b1c3ac828653bad9f95ff5c3e77405a556137c9a922feb6dfe7732db081b81565b6101cf610212366004613197565b610865565b348015610222575f5ffd5b5061017e7f3830969403cefb9f63c82fb7201672c51b177354f1e7dcc024e3d098992aa4b581565b348015610255575f5ffd5b5061017e7f776716c31b7a1fae26c9746a93f9980261d9065bd9b539720624eafe20da3d5e81565b348015610288575f5ffd5b5061017e7fb15c6f4cb2704b59886404596581f035599143a4de893556943a4865c51863a581565b3480156102bb575f5ffd5b506102c4610b61565b6040516101889190613233565b3480156102dc575f5ffd5b506101cf6102eb366004613245565b610b80565b3480156102fb575f5ffd5b5061017e7fa33de090a57570bfccadabcfcc5bea4375b29f69a09e4258e3f4f05d1e781ce581565b34801561032e575f5ffd5b506101cf61033d366004613245565b610f01565b34801561034d575f5ffd5b506101cf61035c366004613245565b6113b0565b34801561036c575f5ffd5b506101cf61037b3660046132db565b61150c565b34801561038b575f5ffd5b506102c4611825565b34801561039f575f5ffd5b5061017e6103ae3660046133a2565b611841565b3480156103be575f5ffd5b506103d26103cd366004613400565b61190d565b6040519015158152602001610188565b3480156103ed575f5ffd5b5061017e7f51489d4263e7aff6c512a83666a144c08d740a160db30b26495ddfc5e7f1c21e81565b348015610420575f5ffd5b5061017e7f30fdb2c970f3affdeb948b19a7ed10455583a16fe94c184964134c3d830930eb81565b5f5f61045683602001611841565b90507f28a6b1c3ac828653bad9f95ff5c3e77405a556137c9a922feb6dfe7732db081b61048660208501856134cf565b8260e086013561049e610120880161010089016134cf565b6104b061014089016101208a016134cf565b6104be6101408a018a6134ea565b6040516104cc92919061352d565b6040519081900390206104eb6104e66101608c018c61353c565b611c95565b6040805160208101999099526001600160a01b03978816908901526060880195909552608087019390935290841660a086015290921660c084015260e08301919091526101008201526101200160405160208183030381529060405280519060200120915050919050565b61055e611d79565b6001600160a01b03831661058557604051634908692960e01b815260040160405180910390fd5b6105b1857f3830969403cefb9f63c82fb7201672c51b177354f1e7dcc024e3d098992aa4b56001611da1565b5f6105bc8686611e70565b90505f6105cf60408801602089016134cf565b905060608701355f6105e460208701876134cf565b6001600160a01b0316146107bd5761061c61060560408a0160208b016134cf565b61061260208801886134cf565b60608b0135611f99565b61062960208601866134cf565b6001600160a01b03166330be5567610644602088018861353c565b61065460608a0160408b016134cf565b61066460808b0160608c016134cf565b6040518563ffffffff1660e01b815260040161068394939291906135b7565b5f604051808303815f875af115801561069e573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526106c59190810190613737565b506106dc6106d76101608a018a61353c565b61208c565b91506001600160a01b03821615806106fc57506001600160a01b0382163b155b1561072a576040516381879ccd60e01b81526001600160a01b03831660048201526024015b60405180910390fd5b6040516370a0823160e01b81523060048201526001600160a01b038316906370a0823190602401602060405180830381865afa15801561076c573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061079091906138a5565b9050838110156107bd57604051633990cfef60e21b81526004810185905260248101829052604401610721565b6107d16001600160a01b038316878361218d565b6001600160a01b038616837f451ad264d98909801dc5b0153f5a6a23ceb5aa5e0d3404f99f6e9d4d7d7d23c3848461080d6101408e018e6134ea565b8e6020015f01602081019061082291906134cf565b8f602001602001602081019061083891906134cf565b60405161084a969594939291906138bc565b60405180910390a350505061085e60015f55565b5050505050565b61086d611d79565b610898837fa33de090a57570bfccadabcfcc5bea4375b29f69a09e4258e3f4f05d1e781ce55f611da1565b5f6108a284610448565b90505f6108bb6108b661016087018761353c565b6121c2565b60c0810151909150349080156108e957505f6108dd60608801604089016134cf565b6001600160a01b031614155b15610b19575f6108fc60208701876134cf565b6001600160a01b0316036109235760405163e74b4bd560e01b815260040160405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004015f604051808303818588803b15801561097c575f5ffd5b505af115801561098e573d5f5f3e3d5ffd5b506109cd93507f000000000000000000000000000000000000000000000000000000000000000092506109c791505060208801886134cf565b83611f99565b6109da60208601866134cf565b6001600160a01b03166330be55676109f5602088018861353c565b610a0560608a0160408b016134cf565b610a1560808b0160608c016134cf565b6040518563ffffffff1660e01b8152600401610a3494939291906135b7565b5f604051808303815f875af1158015610a4f573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052610a769190810190613737565b50610a978387610a8c60608201604083016134cf565b60a08a01358861260d565b610b14575f610ab4610aaf6060890160408a016134cf565b61289b565b9050610ac660608801604089016134cf565b604080516001600160a01b039092166020830152810182905260a088013560608201526080015b60408051601f1981840301815290829052634c0fe4a160e11b825261072191600401613233565b610b50565b610b2a83875f60a08201358861260d565b610b5057604080515f602082015290810182905260a08701356060820152608001610aed565b505050610b5c60015f55565b505050565b60405180610180016040528061014a8152602001613c7661014a913981565b610b88611d79565b5f610b938585611e70565b90505f610bac610ba761016088018861353c565b61297f565b90506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016610be860408801602089016134cf565b6001600160a01b031614610ccb57610c20610c0960408801602089016134cf565b610c1660208701876134cf565b6060890135611f99565b610c2d60208501856134cf565b6001600160a01b03166330be5567610c48602087018761353c565b610c586060890160408a016134cf565b610c6860808a0160608b016134cf565b6040518563ffffffff1660e01b8152600401610c8794939291906135b7565b5f604051808303815f875af1158015610ca2573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052610cc99190810190613737565b505b6040516370a0823160e01b81523060048201525f907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610d2f573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d5391906138a5565b90508160200151811015610d7a5760405163bb2875c360e01b815260040160405180910390fd5b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016610db46040890160208a016134cf565b6001600160a01b031614158015610dca57508381105b15610df257604051633990cfef60e21b81526004810185905260248101829052604401610721565b5f7f776716c31b7a1fae26c9746a93f9980261d9065bd9b539720624eafe20da3d5e610e226101408a018a6134ea565b604051610e3092919061352d565b6040518091039020149050610e488884848785612a21565b837ffa056c6fc7e49102eebc5a584edb89991a093392880d7bf55957c02805dd0cce610e786101408b018b6134ea565b8651610e8c6101208e016101008f016134cf565b8d610120016020810190610ea091906134cf565b8e6020015f016020810190610eb591906134cf565b8f6020016020016020810190610ecb91906134cf565b8a8c60400151604051610ee699989796959493929190613907565b60405180910390a250505050610efb60015f55565b50505050565b610f09611d79565b610f35847fa33de090a57570bfccadabcfcc5bea4375b29f69a09e4258e3f4f05d1e781ce56001611da1565b5f610f408585611e70565b90505f610f546108b661016088018861353c565b90505f610f6760408801602089016134cf565b90505f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316036110245750604051632e1a7d4d60e01b8152606088013560048201819052907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d906024015f604051808303815f87803b158015611009575f5ffd5b505af115801561101b573d5f5f3e3d5ffd5b50505050611286565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b03160361106857506060870135611286565b5f61107660208801886134cf565b6001600160a01b03160361109d576040516311f9be1b60e21b815260040160405180910390fd5b6110ae8261061260208901896134cf565b6110bb60208701876134cf565b6001600160a01b03166330be55676110d6602089018961353c565b6110e660608b0160408c016134cf565b6110f660808c0160608d016134cf565b6040518563ffffffff1660e01b815260040161111594939291906135b7565b5f604051808303815f875af1158015611130573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526111579190810190613737565b506040516370a0823160e01b81523060048201525f907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa1580156111bc573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906111e091906138a5565b90508581101561120d57604051633990cfef60e21b81526004810187905260248101829052604401610721565b604051632e1a7d4d60e01b8152600481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d906024015f604051808303815f87803b15801561126c575f5ffd5b505af115801561127e573d5f5f3e3d5ffd5b509293505050505b82602001518110156112bb576020830151604051633990cfef60e21b8152600481019190915260248101829052604401610721565b5f8361010001516001600160a01b0316828561012001516040516112df9190613964565b5f6040518083038185875af1925050503d805f8114611319576040519150601f19603f3d011682016040523d82523d5f602084013e61131e565b606091505b505090508061135457610100840151604080516001600160a01b03909216602083015281018390525f6060820152608001610aed565b8361010001516001600160a01b0316857f6870405109e48eddfc9fe0c59b6938057856200238dd36ec67fab8fe9d6854828487610120015160405161139a92919061397a565b60405180910390a35050505050610efb60015f55565b6113b8611d79565b6113e4847f51489d4263e7aff6c512a83666a144c08d740a160db30b26495ddfc5e7f1c21e6001611da1565b5f6113ef8585611e70565b905061141b61140460408701602088016134cf565b61141160208601866134cf565b6060880135611f99565b61142860208401846134cf565b6001600160a01b03166330be5567611443602086018661353c565b61145360608801604089016134cf565b6114636080890160608a016134cf565b6040518563ffffffff1660e01b815260040161148294939291906135b7565b5f604051808303815f875af115801561149d573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526114c49190810190613737565b506114e581866114da60608201604083016134cf565b60a08901358661260d565b6115025760405163bb2875c360e01b815260040160405180910390fd5b50610efb60015f55565b611514611d79565b6001600160a01b03851661153b57604051634908692960e01b815260040160405180910390fd5b611566867f3830969403cefb9f63c82fb7201672c51b177354f1e7dcc024e3d098992aa4b55f611da1565b5f61157087610448565b9050808560400135146115a35760408051631671c27b60e21b815290860135600482015260248101829052604401610721565b6115c18686863560e08b01356115bc60208a018a6134ea565b612d90565b506115d260608801604089016134cf565b6001600160a01b03166115e860208701876134cf565b6001600160a01b03161461179e575f61160460208501856134cf565b6001600160a01b03160361162b5760405163e74b4bd560e01b815260040160405180910390fd5b61165261163b60208701876134cf565b61164860208601866134cf565b8760200135611f99565b61165f60208401846134cf565b6001600160a01b03166330be556761167a602086018661353c565b61168a60608801604089016134cf565b61169a6080890160608a016134cf565b6040518563ffffffff1660e01b81526004016116b994939291906135b7565b5f604051808303815f875af11580156116d4573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526116fb9190810190613737565b505f61170a60208701876134cf565b6040516370a0823160e01b81523060048201526001600160a01b0391909116906370a0823190602401602060405180830381865afa15801561174e573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061177291906138a5565b9050801561179c5761179c878261178c60208a018a6134cf565b6001600160a01b0316919061218d565b505b6117be81886117b360608201604083016134cf565b60a08b01358661260d565b611813575f6117d6610aaf60608a0160408b016134cf565b90506117e86060890160408a016134cf565b604080516001600160a01b039092166020830152810182905260a08901356060820152608001610aed565b5061181d60015f55565b505050505050565b6040518060a0016040528060798152602001613bfd6079913981565b5f7f30fdb2c970f3affdeb948b19a7ed10455583a16fe94c184964134c3d830930eb61187060208401846134cf565b61188060408501602086016134cf565b60408501356060860135608087013561189f60c0890160a08a01613992565b6040805160208101989098526001600160a01b0396871690880152949093166060860152608085019190915260a084015260c08301526fffffffffffffffffffffffffffffffff1660e082015261010001604051602081830303815290604052805190602001209050919050565b5f611916611d79565b5f6119218989612f15565b90508061192d86610448565b1461195f5761193b85610448565b604051631671c27b60e21b8152600481019190915260248101829052604401610721565b61198a857f776716c31b7a1fae26c9746a93f9980261d9065bd9b539720624eafe20da3d5e5f611da1565b5f5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166357ecfd2860e01b8c8c8c8c6040516024016119d594939291906139c1565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b0319909416939093179092529051611a139190613964565b5f604051808303815f865af19150503d805f8114611a4c576040519150601f19603f3d011682016040523d82523d5f602084013e611a51565b606091505b509150915081611a7657806040516321f172cd60e21b81526004016107219190613233565b6040516370a0823160e01b81523060048201525f907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015611ada573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611afe91906138a5565b90505f611b0e60208901896134cf565b6001600160a01b031614611bf857611b4d7f00000000000000000000000000000000000000000000000000000000000000006109c760208a018a6134cf565b611b5a60208801886134cf565b6001600160a01b03166330be5567611b7560208a018a61353c565b611b8560608c0160408d016134cf565b611b9560808d0160608e016134cf565b6040518563ffffffff1660e01b8152600401611bb494939291906135b7565b5f604051808303815f875af1158015611bcf573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052611bf69190810190613737565b505b611c188489611c0d60608201604083016134cf565b60a08c01358a61260d565b15611c2a576001945050505050611c81565b611c5784897f0000000000000000000000000000000000000000000000000000000000000000845f61260d565b15611c68575f945050505050611c81565b60405163bb2875c360e01b815260040160405180910390fd5b611c8a60015f55565b979650505050505050565b5f81818167ffffffffffffffff811115611cb157611cb16136c9565b604051908082528060200260200182016040528015611cda578160200160208202803683370190505b5090505f5b82811015611d4657858582818110611cf957611cf96139e7565b9050602002810190611d0b91906134ea565b604051611d1992919061352d565b6040518091039020828281518110611d3357611d336139e7565b6020908102919091010152600101611cdf565b5080604051602001611d5891906139fb565b60405160208183030381529060405280519060200120925050505b92915050565b60025f5403611d9b57604051633ee5aeb560e01b815260040160405180910390fd5b60025f55565b8015611dcc57428360e001351015611dcc57604051630407b05b60e31b815260040160405180910390fd5b5f611ddf610140850161012086016134cf565b6001600160a01b031614158015611e10575033611e04610140850161012086016134cf565b6001600160a01b031614155b15611e2d576040516282b42960e81b815260040160405180910390fd5b81611e3c6101408501856134ea565b604051611e4a92919061352d565b604051809103902014610b5c5760405163b968846160e01b815260040160405180910390fd5b5f611e7a83610448565b6040805160a0810182529192506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163137c29fe91819060608201908190611ed0908a0160208b016134cf565b6001600160a01b031681526060890135602091820181905291835287358382015260e0890135604093840152825180840190935230835282810191909152611f1a908801886134cf565b8560405180610180016040528061014a8152602001613c7661014a9139611f4460208a018a6134ea565b6040518863ffffffff1660e01b8152600401611f669796959493929190613a30565b5f604051808303815f87803b158015611f7d575f5ffd5b505af1158015611f8f573d5f5f3e3d5ffd5b5050505092915050565b604080513060248201526001600160a01b0384811660448084019190915283518084039091018152606490920183526020820180516001600160e01b0316636eb1769f60e11b17905291515f92839290871691611ff69190613964565b5f60405180830381855afa9150503d805f811461202e576040519150601f19603f3d011682016040523d82523d5f602084013e612033565b606091505b50915091505f82801561204857506020825110155b612052575f612066565b8180602001905181019061206691906138a5565b905083811061207757505050505050565b61181d6001600160a01b038716865f19612f71565b5f60048210156120de5760405162461bcd60e51b815260206004820152601560248201527f4d697373696e6720637573746f6d446174615b335d00000000000000000000006044820152606401610721565b828260038181106120f1576120f16139e7565b905060200281019061210391906134ea565b90506020146121545760405162461bcd60e51b815260206004820152601e60248201527f637573746f6d446174615b335d206d75737420626520333220627974657300006044820152606401610721565b82826003818110612167576121676139e7565b905060200281019061217991906134ea565b81019061218691906134cf565b9392505050565b61219a8383836001612fc3565b610b5c57604051635274afe760e01b81526001600160a01b0384166004820152602401610721565b60408051610140810182525f8082526020820181905291810182905260608082018390526080820183905260a0820183905260c0820183905260e08201839052610100820192909252610120810191909152600a8210156122655760405162461bcd60e51b815260206004820152601c60248201527f496e76616c6964204761735a697020706172616d73206c656e677468000000006044820152606401610721565b60e083835f818110612279576122796139e7565b905060200281019061228b91906134ea565b61229491613ad1565b63ffffffff911c168152828260018181106122b1576122b16139e7565b90506020028101906122c391906134ea565b8101906122d09190613aee565b6020820152828260028181106122e8576122e86139e7565b90506020028101906122fa91906134ea565b8101906123079190613aee565b1515604082015282826003818110612321576123216139e7565b905060200281019061233391906134ea565b81019061234091906134cf565b6001600160a01b0316606082015282826004818110612361576123616139e7565b905060200281019061237391906134ea565b81019061238091906134cf565b6001600160a01b03166080820152828260058181106123a1576123a16139e7565b90506020028101906123b391906134ea565b8101906123c09190613aee565b60a0820152828260068181106123d8576123d86139e7565b90506020028101906123ea91906134ea565b8101906123f79190613aee565b151560c082015282826007818110612411576124116139e7565b905060200281019061242391906134ea565b81019061243091906134cf565b6001600160a01b031660e082015282826008818110612451576124516139e7565b905060200281019061246391906134ea565b81019061247091906134cf565b6001600160a01b03166101008201525f83836009818110612493576124936139e7565b90506020028101906124a591906134ea565b8101906124b29190613aee565b90508015612606578067ffffffffffffffff8111156124d3576124d36136c9565b6040519080825280601f01601f1916602001820160405280156124fd576020820181803683370190505b50610120830152805f600a5b858110801561251757505f83115b15611f8f575f87878381811061252f5761252f6139e7565b905060200281019061254191906134ea565b61254a91613ad1565b90505f6020851161255b578461255e565b60205b90505f5b818110156125d85782816020811061257c5761257c6139e7565b1a60f81b88610120015182876125929190613b19565b815181106125a2576125a26139e7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690815f1a905350600101612562565b506125e38185613b19565b93506125ef8186613b2c565b9450505080806125fe90613b3f565b915050612509565b5092915050565b5f806001600160a01b0385166126d257504783811015612630575f915050612892565b8281101561265b57604051633990cfef60e21b81526004810184905260248101829052604401610721565b5f61266e610120880161010089016134cf565b6001600160a01b0316826040515f6040518083038185875af1925050503d805f81146126b5576040519150601f19603f3d011682016040523d82523d5f602084013e6126ba565b606091505b50509050806126cc5791506128929050565b50612802565b604080513060248083019190915282518083039091018152604490910182526020810180516001600160e01b03166370a0823160e01b17905290515f9182916001600160a01b0389169161272591613964565b5f60405180830381855afa9150503d805f811461275d576040519150601f19603f3d011682016040523d82523d5f602084013e612762565b606091505b509150915081801561277657506020815110155b612785575f9350505050612892565b8080602001905181019061279991906138a5565b9250858310156127ae575f9350505050612892565b848310156127d957604051633990cfef60e21b81526004810186905260248101849052604401610721565b6127ff6127ee6101208a016101008b016134cf565b6001600160a01b038916908561218d565b50505b867fcff4c6fa646ccfbe7edf1ab0a8e2f1fe0d66da25a65692c3cb625145a4de23316128326101408901896134ea565b6128446101208b016101008c016134cf565b6128566101408c016101208d016134cf565b61286660408d0160208e016134cf565b8b8d6020016040013589604051612884989796959493929190613b57565b60405180910390a260019150505b95945050505050565b5f6001600160a01b0382166128b1575047919050565b604080513060248083019190915282518083039091018152604490910182526020810180516001600160e01b03166370a0823160e01b17905290515f9182916001600160a01b0386169161290491613964565b5f60405180830381855afa9150503d805f811461293c576040519150601f19603f3d011682016040523d82523d5f602084013e612941565b606091505b509150915081801561295557506020815110155b15612976578080602001905181019061296e91906138a5565b949350505050565b505f9392505050565b6040805160a0810182525f80825260208201819052918101829052606081018290526080810191909152600582146129ca576040516368804db160e01b815260040160405180910390fd5b60208335840181013560e090811c8352818501358501820135838301526040808601358601830135908401526060808601358601830135821c9084015260808086013590950190910135901c928101929092525090565b5f81612a4d577fb15c6f4cb2704b59886404596581f035599143a4de893556943a4865c51863a5612a6f565b7f776716c31b7a1fae26c9746a93f9980261d9065bd9b539720624eafe20da3d5e5b9050612a7d86826001611da1565b81158015612acb57506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016612ac060408801602089016134cf565b6001600160a01b0316145b15612b19575f612ae360808801356060890135613b2c565b9050612aef8186613b2c565b9450612b17612b0661014089016101208a016134cf565b8261178c60408b0160208c016134cf565b505b612b647f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000086611f99565b5f82612c42578551634701287760e11b908690612b98612b8c6101208c016101008d016134cf565b6001600160a01b031690565b7f00000000000000000000000000000000000000000000000000000000000000005f6040808d015160608e01519151602481019790975263ffffffff958616604488015260648701949094526001600160a01b03909216608486015260a485015260c48401919091521660e48201526101040160408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612ce6565b855163779b432d60e01b908690307f0000000000000000000000000000000000000000000000000000000000000000308b604001518c606001518b604051602001612c8f91815260200190565b60408051601f1981840301815290829052612cb39897969594939291602401613ba9565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091525b90505f5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031683604051612d229190613964565b5f604051808303815f865af19150503d805f8114612d5b576040519150601f19603f3d011682016040523d82523d5f602084013e612d60565b606091505b509150915081612d85578060405163169ecfb160e11b81526004016107219190613233565b505050505050505050565b5f7f08167ba6340f5eb62384b818358d2b6daeb04945867570e232d0b2d92a0741f9612dbf60208801886134cf565b604080516020818101949094526001600160a01b039092168282015291880135606082015290870135608082015260a00160408051601f19818403018152828252805160209182012060a084019092529092506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163137c29fe91819060608201908190612e58908d018d6134cf565b6001600160a01b031681526020018b602001358152508152602001888152602001878152506040518060400160405280306001600160a01b031681526020018a602001358152508a856040518060a0016040528060798152602001613bfd6079913989896040518863ffffffff1660e01b8152600401612ede9796959493929190613a30565b5f604051808303815f87803b158015612ef5575f5ffd5b505af1158015612f07573d5f5f3e3d5ffd5b505050509695505050505050565b5f6020821015612f675760405162461bcd60e51b815260206004820152601160248201527f6d65737361676520746f6f2073686f72740000000000000000000000000000006044820152606401610721565b5001601f19013590565b612f7d8383835f613025565b610b5c57612f8e83835f6001613025565b612fb657604051635274afe760e01b81526001600160a01b0384166004820152602401610721565b61219a8383836001613025565b60405163a9059cbb60e01b5f8181526001600160a01b038616600452602485905291602083604481808b5af1925060015f5114831661301957838315161561300d573d5f823e3d81fd5b5f873b113d1516831692505b60405250949350505050565b60405163095ea7b360e01b5f8181526001600160a01b038616600452602485905291602083604481808b5af1925060015f5114831661301957838315161561300d573d5f823e3d81fd5b5f6101808284031215613080575f5ffd5b50919050565b5f60208284031215613096575f5ffd5b813567ffffffffffffffff8111156130ac575f5ffd5b61296e8482850161306f565b5f60408284031215613080575f5ffd5b6001600160a01b03811681146130dc575f5ffd5b50565b5f60808284031215613080575f5ffd5b5f5f5f5f5f60a08688031215613103575f5ffd5b853567ffffffffffffffff811115613119575f5ffd5b6131258882890161306f565b955050602086013567ffffffffffffffff811115613141575f5ffd5b61314d888289016130b8565b945050604086013561315e816130c8565b9250606086013567ffffffffffffffff811115613179575f5ffd5b613185888289016130df565b95989497509295608001359392505050565b5f5f5f606084860312156131a9575f5ffd5b833567ffffffffffffffff8111156131bf575f5ffd5b6131cb8682870161306f565b935050602084013567ffffffffffffffff8111156131e7575f5ffd5b6131f3868287016130df565b93969395505050506040919091013590565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6121866020830184613205565b5f5f5f5f60808587031215613258575f5ffd5b843567ffffffffffffffff81111561326e575f5ffd5b61327a8782880161306f565b945050602085013567ffffffffffffffff811115613296575f5ffd5b6132a2878288016130b8565b935050604085013567ffffffffffffffff8111156132be575f5ffd5b6132ca878288016130df565b949793965093946060013593505050565b5f5f5f5f5f5f8688036101008112156132f2575f5ffd5b873567ffffffffffffffff811115613308575f5ffd5b6133148a828b0161306f565b9750506020880135613325816130c8565b95506060603f1982011215613338575f5ffd5b5060408701935060a087013567ffffffffffffffff811115613358575f5ffd5b61336489828a016130b8565b93505060c087013567ffffffffffffffff811115613380575f5ffd5b61338c89828a016130df565b9699959850939692959460e09093013593505050565b5f60c08284031280156133b3575f5ffd5b509092915050565b5f5f83601f8401126133cb575f5ffd5b50813567ffffffffffffffff8111156133e2575f5ffd5b6020830191508360208285010111156133f9575f5ffd5b9250929050565b5f5f5f5f5f5f5f60a0888a031215613416575f5ffd5b873567ffffffffffffffff81111561342c575f5ffd5b6134388a828b016133bb565b909850965050602088013567ffffffffffffffff811115613457575f5ffd5b6134638a828b016133bb565b909650945050604088013567ffffffffffffffff811115613482575f5ffd5b61348e8a828b0161306f565b935050606088013567ffffffffffffffff8111156134aa575f5ffd5b6134b68a828b016130df565b979a969950949793969295929450505060809091013590565b5f602082840312156134df575f5ffd5b8135612186816130c8565b5f5f8335601e198436030181126134ff575f5ffd5b83018035915067ffffffffffffffff821115613519575f5ffd5b6020019150368190038213156133f9575f5ffd5b818382375f9101908152919050565b5f5f8335601e19843603018112613551575f5ffd5b83018035915067ffffffffffffffff82111561356b575f5ffd5b6020019150600581901b36038213156133f9575f5ffd5b80151581146130dc575f5ffd5b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b606080825281018490525f6080600586901b830181019083018783607e1936839003015b898210156136a057868503607f1901845282358181126135f9575f5ffd5b8b018035613606816130c8565b6001600160a01b03168652602081013561361f81613582565b1515602087015260408181013590870152606081013536829003601e19018112613647575f5ffd5b0160208101903567ffffffffffffffff811115613662575f5ffd5b803603821315613670575f5ffd5b6080606088015261368560808801828461358f565b965050506020830192506020840193506001820191506135db565b5050506001600160a01b03861660208501525090506001600160a01b0383166040830152612892565b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff81118282101715613700576137006136c9565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561372f5761372f6136c9565b604052919050565b5f60208284031215613747575f5ffd5b815167ffffffffffffffff81111561375d575f5ffd5b8201601f8101841361376d575f5ffd5b805167ffffffffffffffff811115613787576137876136c9565b8060051b61379760208201613706565b918252602081840181019290810190878411156137b2575f5ffd5b6020850192505b83831015611c8a57825167ffffffffffffffff8111156137d7575f5ffd5b85016040818a03601f190112156137ec575f5ffd5b6137f46136dd565b602082015161380281613582565b8152604082015167ffffffffffffffff81111561381d575f5ffd5b60208184010192505089601f830112613834575f5ffd5b815167ffffffffffffffff81111561384e5761384e6136c9565b613861601f8201601f1916602001613706565b8181528b6020838601011115613875575f5ffd5b8160208501602083015e5f60208383010152806020840152505080845250506020820191506020830192506137b9565b5f602082840312156138b5575f5ffd5b5051919050565b6001600160a01b038716815285602082015260a060408201525f6138e460a08301868861358f565b6001600160a01b0394851660608401529290931660809091015295945050505050565b61010081525f61391c61010083018b8d61358f565b63ffffffff999099166020830152506001600160a01b03968716604082015294861660608601529285166080850152931660a083015260c082019290925260e0015292915050565b5f82518060208501845e5f920191825250919050565b828152604060208201525f61296e6040830184613205565b5f602082840312156139a2575f5ffd5b81356fffffffffffffffffffffffffffffffff81168114612186575f5ffd5b604081525f6139d460408301868861358f565b8281036020840152611c8a81858761358f565b634e487b7160e01b5f52603260045260245ffd5b81515f90829060208501835b82811015613a25578151845260209384019390910190600101613a07565b509195945050505050565b613a4e81895180516001600160a01b03168252602090810151910152565b6020880151604082015260408801516060820152613a82608082018880516001600160a01b03168252602090810151910152565b6001600160a01b03861660c08201528460e08201526101406101008201525f613aaf610140830186613205565b828103610120840152613ac381858761358f565b9a9950505050505050505050565b80356020831015611d73575f19602084900360031b1b1692915050565b5f60208284031215613afe575f5ffd5b5035919050565b634e487b7160e01b5f52601160045260245ffd5b80820180821115611d7357611d73613b05565b81810381811115611d7357611d73613b05565b5f60018201613b5057613b50613b05565b5060010190565b60e081525f613b6a60e083018a8c61358f565b6001600160a01b039889166020840152968816604083015250938616606085015291909416608083015260a082019390935260c0019190915292915050565b88815263ffffffff881660208201528660408201526001600160a01b03861660608201528460808201528360a082015263ffffffff831660c082015261010060e08201525f613ac361010083018461320556fe4d4d5769746e657373207769746e657373294d4d5769746e6573732861646472657373206d6d546f6b656e2c75696e7432353620616d6f756e742c62797465733332206f72646572496429546f6b656e5065726d697373696f6e73286164647265737320746f6b656e2c75696e7432353620616d6f756e74295369676e65644f72646572207769746e657373294f72646572506172616d657465727328616464726573732073726341737365742c616464726573732064737441737365742c75696e74323536207372635175616e746974792c75696e74323536206473745175616e746974792c75696e74323536206d696e5175616e746974792c75696e74313238206461726b53616c74295369676e65644f7264657228616464726573732073656e6465722c4f72646572506172616d657465727320706172616d65746572732c75696e7432353620646561646c696e652c61646472657373207461726765742c616464726573732066696c6c65722c737472696e67206f72646572547970652c62797465735b5d20637573746f6d4461746129546f6b656e5065726d697373696f6e73286164647265737320746f6b656e2c75696e7432353620616d6f756e7429a2646970667358221220e54654ffbe2e067e75ee75f5f1510cb6c1394dac8b9e6d35ecfa75e2511b9f2d64736f6c634300081c0033000000000000000000000000000000000022d473030f116ddee9f6b43ac78ba3000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ee7d8bcfb72bc1880d0cf19822eb0a2e6577ab620000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x608060405260043610610140575f3560e01c806391ba38ec116100bb578063d1eb7cc011610071578063efc8aac411610057578063efc8aac4146103b3578063fdea6196146103e2578063fe79f61914610415575f5ffd5b8063d1eb7cc014610380578063dec9f72f14610394575f5ffd5b8063a25d7895116100a1578063a25d789514610323578063b51ed51b14610342578063bb77083514610361575f5ffd5b806391ba38ec146102d15780639a1bb488146102f0575f5ffd5b80634fda5b5e1161011057806369a2aad2116100f657806369a2aad21461024a5780636e2d09911461027d57806374b9e838146102b0575f5ffd5b80634fda5b5e1461020457806364e0a82814610217575f5ffd5b80631a5870b71461014b5780631e4e30fd1461019157806328df07dc146101b05780632ec926a7146101d1575f5ffd5b3661014757005b5f5ffd5b348015610156575f5ffd5b5061017e7f08167ba6340f5eb62384b818358d2b6daeb04945867570e232d0b2d92a0741f981565b6040519081526020015b60405180910390f35b34801561019c575f5ffd5b5061017e6101ab366004613086565b610448565b3480156101bb575f5ffd5b506101cf6101ca3660046130ef565b610556565b005b3480156101dc575f5ffd5b5061017e7f28a6b1c3ac828653bad9f95ff5c3e77405a556137c9a922feb6dfe7732db081b81565b6101cf610212366004613197565b610865565b348015610222575f5ffd5b5061017e7f3830969403cefb9f63c82fb7201672c51b177354f1e7dcc024e3d098992aa4b581565b348015610255575f5ffd5b5061017e7f776716c31b7a1fae26c9746a93f9980261d9065bd9b539720624eafe20da3d5e81565b348015610288575f5ffd5b5061017e7fb15c6f4cb2704b59886404596581f035599143a4de893556943a4865c51863a581565b3480156102bb575f5ffd5b506102c4610b61565b6040516101889190613233565b3480156102dc575f5ffd5b506101cf6102eb366004613245565b610b80565b3480156102fb575f5ffd5b5061017e7fa33de090a57570bfccadabcfcc5bea4375b29f69a09e4258e3f4f05d1e781ce581565b34801561032e575f5ffd5b506101cf61033d366004613245565b610f01565b34801561034d575f5ffd5b506101cf61035c366004613245565b6113b0565b34801561036c575f5ffd5b506101cf61037b3660046132db565b61150c565b34801561038b575f5ffd5b506102c4611825565b34801561039f575f5ffd5b5061017e6103ae3660046133a2565b611841565b3480156103be575f5ffd5b506103d26103cd366004613400565b61190d565b6040519015158152602001610188565b3480156103ed575f5ffd5b5061017e7f51489d4263e7aff6c512a83666a144c08d740a160db30b26495ddfc5e7f1c21e81565b348015610420575f5ffd5b5061017e7f30fdb2c970f3affdeb948b19a7ed10455583a16fe94c184964134c3d830930eb81565b5f5f61045683602001611841565b90507f28a6b1c3ac828653bad9f95ff5c3e77405a556137c9a922feb6dfe7732db081b61048660208501856134cf565b8260e086013561049e610120880161010089016134cf565b6104b061014089016101208a016134cf565b6104be6101408a018a6134ea565b6040516104cc92919061352d565b6040519081900390206104eb6104e66101608c018c61353c565b611c95565b6040805160208101999099526001600160a01b03978816908901526060880195909552608087019390935290841660a086015290921660c084015260e08301919091526101008201526101200160405160208183030381529060405280519060200120915050919050565b61055e611d79565b6001600160a01b03831661058557604051634908692960e01b815260040160405180910390fd5b6105b1857f3830969403cefb9f63c82fb7201672c51b177354f1e7dcc024e3d098992aa4b56001611da1565b5f6105bc8686611e70565b90505f6105cf60408801602089016134cf565b905060608701355f6105e460208701876134cf565b6001600160a01b0316146107bd5761061c61060560408a0160208b016134cf565b61061260208801886134cf565b60608b0135611f99565b61062960208601866134cf565b6001600160a01b03166330be5567610644602088018861353c565b61065460608a0160408b016134cf565b61066460808b0160608c016134cf565b6040518563ffffffff1660e01b815260040161068394939291906135b7565b5f604051808303815f875af115801561069e573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526106c59190810190613737565b506106dc6106d76101608a018a61353c565b61208c565b91506001600160a01b03821615806106fc57506001600160a01b0382163b155b1561072a576040516381879ccd60e01b81526001600160a01b03831660048201526024015b60405180910390fd5b6040516370a0823160e01b81523060048201526001600160a01b038316906370a0823190602401602060405180830381865afa15801561076c573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061079091906138a5565b9050838110156107bd57604051633990cfef60e21b81526004810185905260248101829052604401610721565b6107d16001600160a01b038316878361218d565b6001600160a01b038616837f451ad264d98909801dc5b0153f5a6a23ceb5aa5e0d3404f99f6e9d4d7d7d23c3848461080d6101408e018e6134ea565b8e6020015f01602081019061082291906134cf565b8f602001602001602081019061083891906134cf565b60405161084a969594939291906138bc565b60405180910390a350505061085e60015f55565b5050505050565b61086d611d79565b610898837fa33de090a57570bfccadabcfcc5bea4375b29f69a09e4258e3f4f05d1e781ce55f611da1565b5f6108a284610448565b90505f6108bb6108b661016087018761353c565b6121c2565b60c0810151909150349080156108e957505f6108dd60608801604089016134cf565b6001600160a01b031614155b15610b19575f6108fc60208701876134cf565b6001600160a01b0316036109235760405163e74b4bd560e01b815260040160405180910390fd5b7f000000000000000000000000ee7d8bcfb72bc1880d0cf19822eb0a2e6577ab626001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004015f604051808303818588803b15801561097c575f5ffd5b505af115801561098e573d5f5f3e3d5ffd5b506109cd93507f000000000000000000000000ee7d8bcfb72bc1880d0cf19822eb0a2e6577ab6292506109c791505060208801886134cf565b83611f99565b6109da60208601866134cf565b6001600160a01b03166330be55676109f5602088018861353c565b610a0560608a0160408b016134cf565b610a1560808b0160608c016134cf565b6040518563ffffffff1660e01b8152600401610a3494939291906135b7565b5f604051808303815f875af1158015610a4f573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052610a769190810190613737565b50610a978387610a8c60608201604083016134cf565b60a08a01358861260d565b610b14575f610ab4610aaf6060890160408a016134cf565b61289b565b9050610ac660608801604089016134cf565b604080516001600160a01b039092166020830152810182905260a088013560608201526080015b60408051601f1981840301815290829052634c0fe4a160e11b825261072191600401613233565b610b50565b610b2a83875f60a08201358861260d565b610b5057604080515f602082015290810182905260a08701356060820152608001610aed565b505050610b5c60015f55565b505050565b60405180610180016040528061014a8152602001613c7661014a913981565b610b88611d79565b5f610b938585611e70565b90505f610bac610ba761016088018861353c565b61297f565b90506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016610be860408801602089016134cf565b6001600160a01b031614610ccb57610c20610c0960408801602089016134cf565b610c1660208701876134cf565b6060890135611f99565b610c2d60208501856134cf565b6001600160a01b03166330be5567610c48602087018761353c565b610c586060890160408a016134cf565b610c6860808a0160608b016134cf565b6040518563ffffffff1660e01b8152600401610c8794939291906135b7565b5f604051808303815f875af1158015610ca2573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052610cc99190810190613737565b505b6040516370a0823160e01b81523060048201525f907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610d2f573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d5391906138a5565b90508160200151811015610d7a5760405163bb2875c360e01b815260040160405180910390fd5b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016610db46040890160208a016134cf565b6001600160a01b031614158015610dca57508381105b15610df257604051633990cfef60e21b81526004810185905260248101829052604401610721565b5f7f776716c31b7a1fae26c9746a93f9980261d9065bd9b539720624eafe20da3d5e610e226101408a018a6134ea565b604051610e3092919061352d565b6040518091039020149050610e488884848785612a21565b837ffa056c6fc7e49102eebc5a584edb89991a093392880d7bf55957c02805dd0cce610e786101408b018b6134ea565b8651610e8c6101208e016101008f016134cf565b8d610120016020810190610ea091906134cf565b8e6020015f016020810190610eb591906134cf565b8f6020016020016020810190610ecb91906134cf565b8a8c60400151604051610ee699989796959493929190613907565b60405180910390a250505050610efb60015f55565b50505050565b610f09611d79565b610f35847fa33de090a57570bfccadabcfcc5bea4375b29f69a09e4258e3f4f05d1e781ce56001611da1565b5f610f408585611e70565b90505f610f546108b661016088018861353c565b90505f610f6760408801602089016134cf565b90505f7f000000000000000000000000ee7d8bcfb72bc1880d0cf19822eb0a2e6577ab626001600160a01b0316826001600160a01b0316036110245750604051632e1a7d4d60e01b8152606088013560048201819052907f000000000000000000000000ee7d8bcfb72bc1880d0cf19822eb0a2e6577ab626001600160a01b031690632e1a7d4d906024015f604051808303815f87803b158015611009575f5ffd5b505af115801561101b573d5f5f3e3d5ffd5b50505050611286565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b03160361106857506060870135611286565b5f61107660208801886134cf565b6001600160a01b03160361109d576040516311f9be1b60e21b815260040160405180910390fd5b6110ae8261061260208901896134cf565b6110bb60208701876134cf565b6001600160a01b03166330be55676110d6602089018961353c565b6110e660608b0160408c016134cf565b6110f660808c0160608d016134cf565b6040518563ffffffff1660e01b815260040161111594939291906135b7565b5f604051808303815f875af1158015611130573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526111579190810190613737565b506040516370a0823160e01b81523060048201525f907f000000000000000000000000ee7d8bcfb72bc1880d0cf19822eb0a2e6577ab626001600160a01b0316906370a0823190602401602060405180830381865afa1580156111bc573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906111e091906138a5565b90508581101561120d57604051633990cfef60e21b81526004810187905260248101829052604401610721565b604051632e1a7d4d60e01b8152600481018290527f000000000000000000000000ee7d8bcfb72bc1880d0cf19822eb0a2e6577ab626001600160a01b031690632e1a7d4d906024015f604051808303815f87803b15801561126c575f5ffd5b505af115801561127e573d5f5f3e3d5ffd5b509293505050505b82602001518110156112bb576020830151604051633990cfef60e21b8152600481019190915260248101829052604401610721565b5f8361010001516001600160a01b0316828561012001516040516112df9190613964565b5f6040518083038185875af1925050503d805f8114611319576040519150601f19603f3d011682016040523d82523d5f602084013e61131e565b606091505b505090508061135457610100840151604080516001600160a01b03909216602083015281018390525f6060820152608001610aed565b8361010001516001600160a01b0316857f6870405109e48eddfc9fe0c59b6938057856200238dd36ec67fab8fe9d6854828487610120015160405161139a92919061397a565b60405180910390a35050505050610efb60015f55565b6113b8611d79565b6113e4847f51489d4263e7aff6c512a83666a144c08d740a160db30b26495ddfc5e7f1c21e6001611da1565b5f6113ef8585611e70565b905061141b61140460408701602088016134cf565b61141160208601866134cf565b6060880135611f99565b61142860208401846134cf565b6001600160a01b03166330be5567611443602086018661353c565b61145360608801604089016134cf565b6114636080890160608a016134cf565b6040518563ffffffff1660e01b815260040161148294939291906135b7565b5f604051808303815f875af115801561149d573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526114c49190810190613737565b506114e581866114da60608201604083016134cf565b60a08901358661260d565b6115025760405163bb2875c360e01b815260040160405180910390fd5b50610efb60015f55565b611514611d79565b6001600160a01b03851661153b57604051634908692960e01b815260040160405180910390fd5b611566867f3830969403cefb9f63c82fb7201672c51b177354f1e7dcc024e3d098992aa4b55f611da1565b5f61157087610448565b9050808560400135146115a35760408051631671c27b60e21b815290860135600482015260248101829052604401610721565b6115c18686863560e08b01356115bc60208a018a6134ea565b612d90565b506115d260608801604089016134cf565b6001600160a01b03166115e860208701876134cf565b6001600160a01b03161461179e575f61160460208501856134cf565b6001600160a01b03160361162b5760405163e74b4bd560e01b815260040160405180910390fd5b61165261163b60208701876134cf565b61164860208601866134cf565b8760200135611f99565b61165f60208401846134cf565b6001600160a01b03166330be556761167a602086018661353c565b61168a60608801604089016134cf565b61169a6080890160608a016134cf565b6040518563ffffffff1660e01b81526004016116b994939291906135b7565b5f604051808303815f875af11580156116d4573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f191682016040526116fb9190810190613737565b505f61170a60208701876134cf565b6040516370a0823160e01b81523060048201526001600160a01b0391909116906370a0823190602401602060405180830381865afa15801561174e573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061177291906138a5565b9050801561179c5761179c878261178c60208a018a6134cf565b6001600160a01b0316919061218d565b505b6117be81886117b360608201604083016134cf565b60a08b01358661260d565b611813575f6117d6610aaf60608a0160408b016134cf565b90506117e86060890160408a016134cf565b604080516001600160a01b039092166020830152810182905260a08901356060820152608001610aed565b5061181d60015f55565b505050505050565b6040518060a0016040528060798152602001613bfd6079913981565b5f7f30fdb2c970f3affdeb948b19a7ed10455583a16fe94c184964134c3d830930eb61187060208401846134cf565b61188060408501602086016134cf565b60408501356060860135608087013561189f60c0890160a08a01613992565b6040805160208101989098526001600160a01b0396871690880152949093166060860152608085019190915260a084015260c08301526fffffffffffffffffffffffffffffffff1660e082015261010001604051602081830303815290604052805190602001209050919050565b5f611916611d79565b5f6119218989612f15565b90508061192d86610448565b1461195f5761193b85610448565b604051631671c27b60e21b8152600481019190915260248101829052604401610721565b61198a857f776716c31b7a1fae26c9746a93f9980261d9065bd9b539720624eafe20da3d5e5f611da1565b5f5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166357ecfd2860e01b8c8c8c8c6040516024016119d594939291906139c1565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b0319909416939093179092529051611a139190613964565b5f604051808303815f865af19150503d805f8114611a4c576040519150601f19603f3d011682016040523d82523d5f602084013e611a51565b606091505b509150915081611a7657806040516321f172cd60e21b81526004016107219190613233565b6040516370a0823160e01b81523060048201525f907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015611ada573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611afe91906138a5565b90505f611b0e60208901896134cf565b6001600160a01b031614611bf857611b4d7f00000000000000000000000000000000000000000000000000000000000000006109c760208a018a6134cf565b611b5a60208801886134cf565b6001600160a01b03166330be5567611b7560208a018a61353c565b611b8560608c0160408d016134cf565b611b9560808d0160608e016134cf565b6040518563ffffffff1660e01b8152600401611bb494939291906135b7565b5f604051808303815f875af1158015611bcf573d5f5f3e3d5ffd5b505050506040513d5f823e601f3d908101601f19168201604052611bf69190810190613737565b505b611c188489611c0d60608201604083016134cf565b60a08c01358a61260d565b15611c2a576001945050505050611c81565b611c5784897f0000000000000000000000000000000000000000000000000000000000000000845f61260d565b15611c68575f945050505050611c81565b60405163bb2875c360e01b815260040160405180910390fd5b611c8a60015f55565b979650505050505050565b5f81818167ffffffffffffffff811115611cb157611cb16136c9565b604051908082528060200260200182016040528015611cda578160200160208202803683370190505b5090505f5b82811015611d4657858582818110611cf957611cf96139e7565b9050602002810190611d0b91906134ea565b604051611d1992919061352d565b6040518091039020828281518110611d3357611d336139e7565b6020908102919091010152600101611cdf565b5080604051602001611d5891906139fb565b60405160208183030381529060405280519060200120925050505b92915050565b60025f5403611d9b57604051633ee5aeb560e01b815260040160405180910390fd5b60025f55565b8015611dcc57428360e001351015611dcc57604051630407b05b60e31b815260040160405180910390fd5b5f611ddf610140850161012086016134cf565b6001600160a01b031614158015611e10575033611e04610140850161012086016134cf565b6001600160a01b031614155b15611e2d576040516282b42960e81b815260040160405180910390fd5b81611e3c6101408501856134ea565b604051611e4a92919061352d565b604051809103902014610b5c5760405163b968846160e01b815260040160405180910390fd5b5f611e7a83610448565b6040805160a0810182529192506001600160a01b037f000000000000000000000000000000000022d473030f116ddee9f6b43ac78ba3169163137c29fe91819060608201908190611ed0908a0160208b016134cf565b6001600160a01b031681526060890135602091820181905291835287358382015260e0890135604093840152825180840190935230835282810191909152611f1a908801886134cf565b8560405180610180016040528061014a8152602001613c7661014a9139611f4460208a018a6134ea565b6040518863ffffffff1660e01b8152600401611f669796959493929190613a30565b5f604051808303815f87803b158015611f7d575f5ffd5b505af1158015611f8f573d5f5f3e3d5ffd5b5050505092915050565b604080513060248201526001600160a01b0384811660448084019190915283518084039091018152606490920183526020820180516001600160e01b0316636eb1769f60e11b17905291515f92839290871691611ff69190613964565b5f60405180830381855afa9150503d805f811461202e576040519150601f19603f3d011682016040523d82523d5f602084013e612033565b606091505b50915091505f82801561204857506020825110155b612052575f612066565b8180602001905181019061206691906138a5565b905083811061207757505050505050565b61181d6001600160a01b038716865f19612f71565b5f60048210156120de5760405162461bcd60e51b815260206004820152601560248201527f4d697373696e6720637573746f6d446174615b335d00000000000000000000006044820152606401610721565b828260038181106120f1576120f16139e7565b905060200281019061210391906134ea565b90506020146121545760405162461bcd60e51b815260206004820152601e60248201527f637573746f6d446174615b335d206d75737420626520333220627974657300006044820152606401610721565b82826003818110612167576121676139e7565b905060200281019061217991906134ea565b81019061218691906134cf565b9392505050565b61219a8383836001612fc3565b610b5c57604051635274afe760e01b81526001600160a01b0384166004820152602401610721565b60408051610140810182525f8082526020820181905291810182905260608082018390526080820183905260a0820183905260c0820183905260e08201839052610100820192909252610120810191909152600a8210156122655760405162461bcd60e51b815260206004820152601c60248201527f496e76616c6964204761735a697020706172616d73206c656e677468000000006044820152606401610721565b60e083835f818110612279576122796139e7565b905060200281019061228b91906134ea565b61229491613ad1565b63ffffffff911c168152828260018181106122b1576122b16139e7565b90506020028101906122c391906134ea565b8101906122d09190613aee565b6020820152828260028181106122e8576122e86139e7565b90506020028101906122fa91906134ea565b8101906123079190613aee565b1515604082015282826003818110612321576123216139e7565b905060200281019061233391906134ea565b81019061234091906134cf565b6001600160a01b0316606082015282826004818110612361576123616139e7565b905060200281019061237391906134ea565b81019061238091906134cf565b6001600160a01b03166080820152828260058181106123a1576123a16139e7565b90506020028101906123b391906134ea565b8101906123c09190613aee565b60a0820152828260068181106123d8576123d86139e7565b90506020028101906123ea91906134ea565b8101906123f79190613aee565b151560c082015282826007818110612411576124116139e7565b905060200281019061242391906134ea565b81019061243091906134cf565b6001600160a01b031660e082015282826008818110612451576124516139e7565b905060200281019061246391906134ea565b81019061247091906134cf565b6001600160a01b03166101008201525f83836009818110612493576124936139e7565b90506020028101906124a591906134ea565b8101906124b29190613aee565b90508015612606578067ffffffffffffffff8111156124d3576124d36136c9565b6040519080825280601f01601f1916602001820160405280156124fd576020820181803683370190505b50610120830152805f600a5b858110801561251757505f83115b15611f8f575f87878381811061252f5761252f6139e7565b905060200281019061254191906134ea565b61254a91613ad1565b90505f6020851161255b578461255e565b60205b90505f5b818110156125d85782816020811061257c5761257c6139e7565b1a60f81b88610120015182876125929190613b19565b815181106125a2576125a26139e7565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690815f1a905350600101612562565b506125e38185613b19565b93506125ef8186613b2c565b9450505080806125fe90613b3f565b915050612509565b5092915050565b5f806001600160a01b0385166126d257504783811015612630575f915050612892565b8281101561265b57604051633990cfef60e21b81526004810184905260248101829052604401610721565b5f61266e610120880161010089016134cf565b6001600160a01b0316826040515f6040518083038185875af1925050503d805f81146126b5576040519150601f19603f3d011682016040523d82523d5f602084013e6126ba565b606091505b50509050806126cc5791506128929050565b50612802565b604080513060248083019190915282518083039091018152604490910182526020810180516001600160e01b03166370a0823160e01b17905290515f9182916001600160a01b0389169161272591613964565b5f60405180830381855afa9150503d805f811461275d576040519150601f19603f3d011682016040523d82523d5f602084013e612762565b606091505b509150915081801561277657506020815110155b612785575f9350505050612892565b8080602001905181019061279991906138a5565b9250858310156127ae575f9350505050612892565b848310156127d957604051633990cfef60e21b81526004810186905260248101849052604401610721565b6127ff6127ee6101208a016101008b016134cf565b6001600160a01b038916908561218d565b50505b867fcff4c6fa646ccfbe7edf1ab0a8e2f1fe0d66da25a65692c3cb625145a4de23316128326101408901896134ea565b6128446101208b016101008c016134cf565b6128566101408c016101208d016134cf565b61286660408d0160208e016134cf565b8b8d6020016040013589604051612884989796959493929190613b57565b60405180910390a260019150505b95945050505050565b5f6001600160a01b0382166128b1575047919050565b604080513060248083019190915282518083039091018152604490910182526020810180516001600160e01b03166370a0823160e01b17905290515f9182916001600160a01b0386169161290491613964565b5f60405180830381855afa9150503d805f811461293c576040519150601f19603f3d011682016040523d82523d5f602084013e612941565b606091505b509150915081801561295557506020815110155b15612976578080602001905181019061296e91906138a5565b949350505050565b505f9392505050565b6040805160a0810182525f80825260208201819052918101829052606081018290526080810191909152600582146129ca576040516368804db160e01b815260040160405180910390fd5b60208335840181013560e090811c8352818501358501820135838301526040808601358601830135908401526060808601358601830135821c9084015260808086013590950190910135901c928101929092525090565b5f81612a4d577fb15c6f4cb2704b59886404596581f035599143a4de893556943a4865c51863a5612a6f565b7f776716c31b7a1fae26c9746a93f9980261d9065bd9b539720624eafe20da3d5e5b9050612a7d86826001611da1565b81158015612acb57506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016612ac060408801602089016134cf565b6001600160a01b0316145b15612b19575f612ae360808801356060890135613b2c565b9050612aef8186613b2c565b9450612b17612b0661014089016101208a016134cf565b8261178c60408b0160208c016134cf565b505b612b647f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000086611f99565b5f82612c42578551634701287760e11b908690612b98612b8c6101208c016101008d016134cf565b6001600160a01b031690565b7f00000000000000000000000000000000000000000000000000000000000000005f6040808d015160608e01519151602481019790975263ffffffff958616604488015260648701949094526001600160a01b03909216608486015260a485015260c48401919091521660e48201526101040160408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612ce6565b855163779b432d60e01b908690307f0000000000000000000000000000000000000000000000000000000000000000308b604001518c606001518b604051602001612c8f91815260200190565b60408051601f1981840301815290829052612cb39897969594939291602401613ba9565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091525b90505f5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031683604051612d229190613964565b5f604051808303815f865af19150503d805f8114612d5b576040519150601f19603f3d011682016040523d82523d5f602084013e612d60565b606091505b509150915081612d85578060405163169ecfb160e11b81526004016107219190613233565b505050505050505050565b5f7f08167ba6340f5eb62384b818358d2b6daeb04945867570e232d0b2d92a0741f9612dbf60208801886134cf565b604080516020818101949094526001600160a01b039092168282015291880135606082015290870135608082015260a00160408051601f19818403018152828252805160209182012060a084019092529092506001600160a01b037f000000000000000000000000000000000022d473030f116ddee9f6b43ac78ba3169163137c29fe91819060608201908190612e58908d018d6134cf565b6001600160a01b031681526020018b602001358152508152602001888152602001878152506040518060400160405280306001600160a01b031681526020018a602001358152508a856040518060a0016040528060798152602001613bfd6079913989896040518863ffffffff1660e01b8152600401612ede9796959493929190613a30565b5f604051808303815f87803b158015612ef5575f5ffd5b505af1158015612f07573d5f5f3e3d5ffd5b505050509695505050505050565b5f6020821015612f675760405162461bcd60e51b815260206004820152601160248201527f6d65737361676520746f6f2073686f72740000000000000000000000000000006044820152606401610721565b5001601f19013590565b612f7d8383835f613025565b610b5c57612f8e83835f6001613025565b612fb657604051635274afe760e01b81526001600160a01b0384166004820152602401610721565b61219a8383836001613025565b60405163a9059cbb60e01b5f8181526001600160a01b038616600452602485905291602083604481808b5af1925060015f5114831661301957838315161561300d573d5f823e3d81fd5b5f873b113d1516831692505b60405250949350505050565b60405163095ea7b360e01b5f8181526001600160a01b038616600452602485905291602083604481808b5af1925060015f5114831661301957838315161561300d573d5f823e3d81fd5b5f6101808284031215613080575f5ffd5b50919050565b5f60208284031215613096575f5ffd5b813567ffffffffffffffff8111156130ac575f5ffd5b61296e8482850161306f565b5f60408284031215613080575f5ffd5b6001600160a01b03811681146130dc575f5ffd5b50565b5f60808284031215613080575f5ffd5b5f5f5f5f5f60a08688031215613103575f5ffd5b853567ffffffffffffffff811115613119575f5ffd5b6131258882890161306f565b955050602086013567ffffffffffffffff811115613141575f5ffd5b61314d888289016130b8565b945050604086013561315e816130c8565b9250606086013567ffffffffffffffff811115613179575f5ffd5b613185888289016130df565b95989497509295608001359392505050565b5f5f5f606084860312156131a9575f5ffd5b833567ffffffffffffffff8111156131bf575f5ffd5b6131cb8682870161306f565b935050602084013567ffffffffffffffff8111156131e7575f5ffd5b6131f3868287016130df565b93969395505050506040919091013590565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6121866020830184613205565b5f5f5f5f60808587031215613258575f5ffd5b843567ffffffffffffffff81111561326e575f5ffd5b61327a8782880161306f565b945050602085013567ffffffffffffffff811115613296575f5ffd5b6132a2878288016130b8565b935050604085013567ffffffffffffffff8111156132be575f5ffd5b6132ca878288016130df565b949793965093946060013593505050565b5f5f5f5f5f5f8688036101008112156132f2575f5ffd5b873567ffffffffffffffff811115613308575f5ffd5b6133148a828b0161306f565b9750506020880135613325816130c8565b95506060603f1982011215613338575f5ffd5b5060408701935060a087013567ffffffffffffffff811115613358575f5ffd5b61336489828a016130b8565b93505060c087013567ffffffffffffffff811115613380575f5ffd5b61338c89828a016130df565b9699959850939692959460e09093013593505050565b5f60c08284031280156133b3575f5ffd5b509092915050565b5f5f83601f8401126133cb575f5ffd5b50813567ffffffffffffffff8111156133e2575f5ffd5b6020830191508360208285010111156133f9575f5ffd5b9250929050565b5f5f5f5f5f5f5f60a0888a031215613416575f5ffd5b873567ffffffffffffffff81111561342c575f5ffd5b6134388a828b016133bb565b909850965050602088013567ffffffffffffffff811115613457575f5ffd5b6134638a828b016133bb565b909650945050604088013567ffffffffffffffff811115613482575f5ffd5b61348e8a828b0161306f565b935050606088013567ffffffffffffffff8111156134aa575f5ffd5b6134b68a828b016130df565b979a969950949793969295929450505060809091013590565b5f602082840312156134df575f5ffd5b8135612186816130c8565b5f5f8335601e198436030181126134ff575f5ffd5b83018035915067ffffffffffffffff821115613519575f5ffd5b6020019150368190038213156133f9575f5ffd5b818382375f9101908152919050565b5f5f8335601e19843603018112613551575f5ffd5b83018035915067ffffffffffffffff82111561356b575f5ffd5b6020019150600581901b36038213156133f9575f5ffd5b80151581146130dc575f5ffd5b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b606080825281018490525f6080600586901b830181019083018783607e1936839003015b898210156136a057868503607f1901845282358181126135f9575f5ffd5b8b018035613606816130c8565b6001600160a01b03168652602081013561361f81613582565b1515602087015260408181013590870152606081013536829003601e19018112613647575f5ffd5b0160208101903567ffffffffffffffff811115613662575f5ffd5b803603821315613670575f5ffd5b6080606088015261368560808801828461358f565b965050506020830192506020840193506001820191506135db565b5050506001600160a01b03861660208501525090506001600160a01b0383166040830152612892565b634e487b7160e01b5f52604160045260245ffd5b6040805190810167ffffffffffffffff81118282101715613700576137006136c9565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561372f5761372f6136c9565b604052919050565b5f60208284031215613747575f5ffd5b815167ffffffffffffffff81111561375d575f5ffd5b8201601f8101841361376d575f5ffd5b805167ffffffffffffffff811115613787576137876136c9565b8060051b61379760208201613706565b918252602081840181019290810190878411156137b2575f5ffd5b6020850192505b83831015611c8a57825167ffffffffffffffff8111156137d7575f5ffd5b85016040818a03601f190112156137ec575f5ffd5b6137f46136dd565b602082015161380281613582565b8152604082015167ffffffffffffffff81111561381d575f5ffd5b60208184010192505089601f830112613834575f5ffd5b815167ffffffffffffffff81111561384e5761384e6136c9565b613861601f8201601f1916602001613706565b8181528b6020838601011115613875575f5ffd5b8160208501602083015e5f60208383010152806020840152505080845250506020820191506020830192506137b9565b5f602082840312156138b5575f5ffd5b5051919050565b6001600160a01b038716815285602082015260a060408201525f6138e460a08301868861358f565b6001600160a01b0394851660608401529290931660809091015295945050505050565b61010081525f61391c61010083018b8d61358f565b63ffffffff999099166020830152506001600160a01b03968716604082015294861660608601529285166080850152931660a083015260c082019290925260e0015292915050565b5f82518060208501845e5f920191825250919050565b828152604060208201525f61296e6040830184613205565b5f602082840312156139a2575f5ffd5b81356fffffffffffffffffffffffffffffffff81168114612186575f5ffd5b604081525f6139d460408301868861358f565b8281036020840152611c8a81858761358f565b634e487b7160e01b5f52603260045260245ffd5b81515f90829060208501835b82811015613a25578151845260209384019390910190600101613a07565b509195945050505050565b613a4e81895180516001600160a01b03168252602090810151910152565b6020880151604082015260408801516060820152613a82608082018880516001600160a01b03168252602090810151910152565b6001600160a01b03861660c08201528460e08201526101406101008201525f613aaf610140830186613205565b828103610120840152613ac381858761358f565b9a9950505050505050505050565b80356020831015611d73575f19602084900360031b1b1692915050565b5f60208284031215613afe575f5ffd5b5035919050565b634e487b7160e01b5f52601160045260245ffd5b80820180821115611d7357611d73613b05565b81810381811115611d7357611d73613b05565b5f60018201613b5057613b50613b05565b5060010190565b60e081525f613b6a60e083018a8c61358f565b6001600160a01b039889166020840152968816604083015250938616606085015291909416608083015260a082019390935260c0019190915292915050565b88815263ffffffff881660208201528660408201526001600160a01b03861660608201528460808201528360a082015263ffffffff831660c082015261010060e08201525f613ac361010083018461320556fe4d4d5769746e657373207769746e657373294d4d5769746e6573732861646472657373206d6d546f6b656e2c75696e7432353620616d6f756e742c62797465733332206f72646572496429546f6b656e5065726d697373696f6e73286164647265737320746f6b656e2c75696e7432353620616d6f756e74295369676e65644f72646572207769746e657373294f72646572506172616d657465727328616464726573732073726341737365742c616464726573732064737441737365742c75696e74323536207372635175616e746974792c75696e74323536206473745175616e746974792c75696e74323536206d696e5175616e746974792c75696e74313238206461726b53616c74295369676e65644f7264657228616464726573732073656e6465722c4f72646572506172616d657465727320706172616d65746572732c75696e7432353620646561646c696e652c61646472657373207461726765742c616464726573732066696c6c65722c737472696e67206f72646572547970652c62797465735b5d20637573746f6d4461746129546f6b656e5065726d697373696f6e73286164647265737320746f6b656e2c75696e7432353620616d6f756e7429a2646970667358221220e54654ffbe2e067e75ee75f5f1510cb6c1394dac8b9e6d35ecfa75e2511b9f2d64736f6c634300081c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000022d473030f116ddee9f6b43ac78ba3000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ee7d8bcfb72bc1880d0cf19822eb0a2e6577ab620000000000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _permit2 (address): 0x000000000022D473030F116dDEE9F6B43aC78BA3
Arg [1] : _tokenMessenger (address): 0x0000000000000000000000000000000000000000
Arg [2] : _messageTransmitter (address): 0x0000000000000000000000000000000000000000
Arg [3] : _usdcAddress (address): 0x0000000000000000000000000000000000000000
Arg [4] : _wrappedGasToken (address): 0xEE7D8BCFb72bC1880D0Cf19822eB0A2e6577aB62
Arg [5] : _gasToken (address): 0x0000000000000000000000000000000000000000
-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 000000000000000000000000000000000022d473030f116ddee9f6b43ac78ba3
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [4] : 000000000000000000000000ee7d8bcfb72bc1880d0cf19822eb0a2e6577ab62
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
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.