Skip to content

Commit 42f84c5

Browse files
committed
feat: move CoW swap adapters to the per-market V3 deployments
The CoW adapter suite was redeployed from cow-swap-adapters@12a8bb5a with one factory per pool: a Core factory shared by Ethereum Core, Base, Arbitrum, Avalanche, Polygon, BNB, Plasma and Gnosis, its own factory on Linea, and a separate factory and adapters for Ethereum Prime. Adapter config is now keyed by market instead of chain, and each market passes its own pool as the flash-loan liquidity provider, so Prime stops borrowing from the Core pool. The new factories verify adapter orders under the EIP-712 name AaveV3AdapterV3Factory, while sdk-flash-loans hardcodes the old AaveV3AdapterFactory, so the EIP-1271 signature is rebuilt with the deployment's name after getOrderPostingSettings. Flash-loan flows on markets with no deployment (EtherFi, V2) fall back to ParaSwap. Each saved order now records its factory, and cancelling an order saved before this change goes to the old factory that created it.
1 parent 32cc548 commit 42f84c5

13 files changed

Lines changed: 207 additions & 85 deletions

File tree

‎src/components/transactions/CancelCowOrder/CancelAdapterOrderActions.tsx‎

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { OrderStatus, SupportedChainId } from '@cowprotocol/cow-sdk';
1+
import { OrderStatus } from '@cowprotocol/cow-sdk';
22
import { Trans } from '@lingui/macro';
33
import { useQueryClient } from '@tanstack/react-query';
44
import { Interface } from 'ethers/lib/utils';
@@ -16,7 +16,7 @@ import { useRootStore } from 'src/store/root';
1616
import { getErrorTextFromError, TxAction } from 'src/ui-config/errorMapping';
1717
import { updateCowOrderStatus } from 'src/utils/swapAdapterHistory';
1818

19-
import { ADAPTER_FACTORY } from '../Swap/constants/cow.constants';
19+
import { LEGACY_ADAPTER_FACTORY } from '../Swap/constants/cow.constants';
2020
import { TxActionsWrapper } from '../TxActionsWrapper';
2121

2222
interface CancelAdapterOrderActionsProps {
@@ -59,11 +59,8 @@ export const CancelAdapterOrderActions = ({
5959

6060
const adapterInterface = new Interface(ADAPTER_ABI);
6161

62-
const factoryAddress = ADAPTER_FACTORY[cowOrder.chainId as SupportedChainId];
63-
64-
if (!factoryAddress) {
65-
throw new Error('Factory address not found for this chain');
66-
}
62+
// Entries saved before the factory was recorded all came from the legacy factory.
63+
const factoryAddress = cowSwapOrder.adapterFactoryAddress ?? LEGACY_ADAPTER_FACTORY;
6764

6865
const data = adapterInterface.encodeFunctionData('cancelInstance', [
6966
cowSwapOrder.adapterInstanceAddress,

‎src/components/transactions/Swap/actions/CollateralSwap/CollateralSwapActionsViaCoWAdapters.tsx‎

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,19 @@ import { saveCowOrderToUserHistory } from 'src/utils/swapAdapterHistory';
1313
import { useShallow } from 'zustand/react/shallow';
1414

1515
import { TrackAnalyticsHandlers } from '../../analytics/useTrackAnalytics';
16-
import { COW_PARTNER_FEE } from '../../constants/cow.constants';
16+
import { COW_PARTNER_FEE, getCowAdapterDeployment } from '../../constants/cow.constants';
1717
import { APP_CODE_PER_SWAP_TYPE } from '../../constants/shared.constants';
1818
import {
1919
addOrderTypeToAppData,
2020
getCowFlashLoanSdk,
2121
getCowTradingSdkByChainIdAndAppCode,
2222
overrideSmartSlippageOnAppData,
2323
} from '../../helpers/cow';
24-
import { calculateInstanceAddress, getHooksGasLimit } from '../../helpers/cow/adapters.helpers';
24+
import {
25+
calculateInstanceAddress,
26+
getHooksGasLimit,
27+
withAdapterOrderSignature,
28+
} from '../../helpers/cow/adapters.helpers';
2529
import { useCollateralsAmount } from '../../hooks/useCollateralsAmount';
2630
import { useSwapGasEstimation } from '../../hooks/useSwapGasEstimation';
2731
import {
@@ -180,7 +184,7 @@ export const CollateralSwapActionsViaCowAdapters = ({
180184
state.chainId,
181185
APP_CODE_PER_SWAP_TYPE[state.swapType]
182186
);
183-
const flashLoanSdk = await getCowFlashLoanSdk(state.chainId);
187+
const flashLoanSdk = await getCowFlashLoanSdk(state.chainId, currentMarket);
184188

185189
const collateralPermit = signatureParams
186190
? {
@@ -244,6 +248,15 @@ export const CollateralSwapActionsViaCowAdapters = ({
244248
}
245249
);
246250

251+
orderPostParams.swapSettings.additionalParams = withAdapterOrderSignature(
252+
orderPostParams.swapSettings.additionalParams,
253+
{
254+
chainId: state.chainId,
255+
market: currentMarket,
256+
instanceAddress: orderPostParams.instanceAddress,
257+
}
258+
);
259+
247260
orderPostParams.swapSettings.appData = addOrderTypeToAppData(
248261
state.orderType,
249262
orderPostParams.swapSettings.appData
@@ -304,6 +317,7 @@ export const CollateralSwapActionsViaCowAdapters = ({
304317
decimals: state.buyAmountToken.decimals,
305318
},
306319
adapterInstanceAddress: instanceAddress,
320+
adapterFactoryAddress: getCowAdapterDeployment(currentMarket)?.factory,
307321
usedAdapter: true, // CollateralSwap via adapters always uses adapter (flashloan)
308322
srcAmount: state.sellAmountBigInt.toString(),
309323
destAmount: state.buyAmountBigInt.toString(),

‎src/components/transactions/Swap/actions/DebtSwap/DebtSwapActionsViaCoW.tsx‎

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { zeroAddress } from 'viem';
1414
import { useShallow } from 'zustand/react/shallow';
1515

1616
import { TrackAnalyticsHandlers } from '../../analytics/useTrackAnalytics';
17-
import { COW_PARTNER_FEE } from '../../constants/cow.constants';
17+
import { COW_PARTNER_FEE, getCowAdapterDeployment } from '../../constants/cow.constants';
1818
import { APP_CODE_PER_SWAP_TYPE } from '../../constants/shared.constants';
1919
import {
2020
addOrderTypeToAppData,
@@ -26,6 +26,7 @@ import {
2626
accountForDustProtection,
2727
calculateInstanceAddress,
2828
getHooksGasLimit,
29+
withAdapterOrderSignature,
2930
} from '../../helpers/cow/adapters.helpers';
3031
import { useCollateralsAmount } from '../../hooks/useCollateralsAmount';
3132
import { useSwapGasEstimation } from '../../hooks/useSwapGasEstimation';
@@ -195,7 +196,7 @@ export const DebtSwapActionsViaCoW = ({
195196
state.chainId,
196197
APP_CODE_PER_SWAP_TYPE[state.swapType]
197198
);
198-
const flashLoanSdk = await getCowFlashLoanSdk(state.chainId);
199+
const flashLoanSdk = await getCowFlashLoanSdk(state.chainId, currentMarket);
199200

200201
const sellAmountWithMarginForDustProtection = accountForDustProtection(
201202
state.sellAmountBigInt.toString(),
@@ -291,6 +292,15 @@ export const DebtSwapActionsViaCoW = ({
291292
return;
292293
}
293294

295+
orderPostParams.swapSettings.additionalParams = withAdapterOrderSignature(
296+
orderPostParams.swapSettings.additionalParams,
297+
{
298+
chainId: state.chainId,
299+
market: currentMarket,
300+
instanceAddress: orderPostParams.instanceAddress,
301+
}
302+
);
303+
294304
orderPostParams.swapSettings.appData = addOrderTypeToAppData(
295305
state.orderType,
296306
orderPostParams.swapSettings.appData
@@ -331,6 +341,7 @@ export const DebtSwapActionsViaCoW = ({
331341
decimals: state.buyAmountToken.decimals,
332342
},
333343
adapterInstanceAddress: instanceAddress,
344+
adapterFactoryAddress: getCowAdapterDeployment(currentMarket)?.factory,
334345
usedAdapter: true, // DebtSwap always uses adapter
335346
srcAmount: state.sellAmountBigInt.toString(),
336347
destAmount: state.buyAmountBigInt.toString(),

‎src/components/transactions/Swap/actions/RepayWithCollateral/RepayWithCollateralActionsViaCoW.tsx‎

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { saveCowOrderToUserHistory } from 'src/utils/swapAdapterHistory';
1313
import { useShallow } from 'zustand/react/shallow';
1414

1515
import { TrackAnalyticsHandlers } from '../../analytics/useTrackAnalytics';
16-
import { COW_PARTNER_FEE } from '../../constants/cow.constants';
16+
import { COW_PARTNER_FEE, getCowAdapterDeployment } from '../../constants/cow.constants';
1717
import { APP_CODE_PER_SWAP_TYPE } from '../../constants/shared.constants';
1818
import {
1919
addOrderTypeToAppData,
@@ -25,6 +25,7 @@ import {
2525
accountForDustProtection,
2626
calculateInstanceAddress,
2727
getHooksGasLimit,
28+
withAdapterOrderSignature,
2829
} from '../../helpers/cow/adapters.helpers';
2930
import { useCollateralsAmount } from '../../hooks/useCollateralsAmount';
3031
import { useSwapGasEstimation } from '../../hooks/useSwapGasEstimation';
@@ -193,7 +194,7 @@ export const RepayWithCollateralActionsViaCoW = ({
193194
state.chainId,
194195
APP_CODE_PER_SWAP_TYPE[state.swapType]
195196
);
196-
const flashLoanSdk = await getCowFlashLoanSdk(state.chainId);
197+
const flashLoanSdk = await getCowFlashLoanSdk(state.chainId, currentMarket);
197198

198199
const sellAmountWithMarginForDustProtection = accountForDustProtection(
199200
state.sellAmountBigInt.toString(),
@@ -269,6 +270,15 @@ export const RepayWithCollateralActionsViaCoW = ({
269270
}
270271
);
271272

273+
orderPostParams.swapSettings.additionalParams = withAdapterOrderSignature(
274+
orderPostParams.swapSettings.additionalParams,
275+
{
276+
chainId: state.chainId,
277+
market: currentMarket,
278+
instanceAddress: orderPostParams.instanceAddress,
279+
}
280+
);
281+
272282
orderPostParams.swapSettings.appData = addOrderTypeToAppData(
273283
state.orderType,
274284
orderPostParams.swapSettings.appData
@@ -329,6 +339,7 @@ export const RepayWithCollateralActionsViaCoW = ({
329339
decimals: state.buyAmountToken.decimals,
330340
},
331341
adapterInstanceAddress: instanceAddress,
342+
adapterFactoryAddress: getCowAdapterDeployment(currentMarket)?.factory,
332343
usedAdapter: true, // RepayWithCollateral always uses adapter
333344
srcAmount: state.sellAmountBigInt.toString(),
334345
destAmount: state.buyAmountBigInt.toString(),

‎src/components/transactions/Swap/constants/cow.constants.ts‎

Lines changed: 47 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -6,66 +6,59 @@ import { marketsData } from 'src/utils/marketsAndNetworksConfig';
66
import { getAssetGroup } from '../helpers/shared/assetCorrelation.helpers';
77
import { OrderType, SwapType } from '../types';
88

9-
export const HOOK_ADAPTER_PER_TYPE: Record<AaveFlashLoanType, Record<SupportedChainId, string>> = {
10-
[AaveFlashLoanType.CollateralSwap]: {
11-
[SupportedChainId.MAINNET]: '0x029d584E847373B6373b01dfaD1a0C9BfB916382',
12-
[SupportedChainId.GNOSIS_CHAIN]: '0x029d584E847373B6373b01dfaD1a0C9BfB916382',
13-
[SupportedChainId.ARBITRUM_ONE]: '0x029d584E847373B6373b01dfaD1a0C9BfB916382',
14-
[SupportedChainId.AVALANCHE]: '0x029d584E847373B6373b01dfaD1a0C9BfB916382',
15-
[SupportedChainId.BNB]: '0x029d584E847373B6373b01dfaD1a0C9BfB916382',
16-
[SupportedChainId.POLYGON]: '0x029d584E847373B6373b01dfaD1a0C9BfB916382',
17-
[SupportedChainId.BASE]: '0x029d584E847373B6373b01dfaD1a0C9BfB916382',
18-
[SupportedChainId.LINEA]: '0x029d584E847373B6373b01dfaD1a0C9BfB916382',
19-
[SupportedChainId.PLASMA]: '0x029d584E847373B6373b01dfaD1a0C9BfB916382',
20-
[SupportedChainId.SEPOLIA]: '',
21-
[SupportedChainId.INK]: '',
22-
[SupportedChainId.SOLANA]: '',
23-
},
24-
[AaveFlashLoanType.DebtSwap]: {
25-
[SupportedChainId.MAINNET]: '0x73e7aF13Ef172F13d8FEfEbfD90C7A6530096344',
26-
[SupportedChainId.GNOSIS_CHAIN]: '0x73e7aF13Ef172F13d8FEfEbfD90C7A6530096344',
27-
[SupportedChainId.ARBITRUM_ONE]: '0x73e7aF13Ef172F13d8FEfEbfD90C7A6530096344',
28-
[SupportedChainId.AVALANCHE]: '0x73e7aF13Ef172F13d8FEfEbfD90C7A6530096344',
29-
[SupportedChainId.BNB]: '0x73e7aF13Ef172F13d8FEfEbfD90C7A6530096344',
30-
[SupportedChainId.POLYGON]: '0x73e7aF13Ef172F13d8FEfEbfD90C7A6530096344',
31-
[SupportedChainId.BASE]: '0x73e7aF13Ef172F13d8FEfEbfD90C7A6530096344',
32-
[SupportedChainId.LINEA]: '0x73e7aF13Ef172F13d8FEfEbfD90C7A6530096344',
33-
[SupportedChainId.PLASMA]: '0x73e7aF13Ef172F13d8FEfEbfD90C7A6530096344',
34-
[SupportedChainId.SEPOLIA]: '',
35-
[SupportedChainId.INK]: '',
36-
[SupportedChainId.SOLANA]: '',
9+
export type CowAdapterDeployment = {
10+
factory: string;
11+
// EIP-712 domain name the factory verifies adapter order signatures against.
12+
factoryEip712Name: string;
13+
adapters: Record<AaveFlashLoanType, string>;
14+
};
15+
16+
const AAVE_V3_CORE_DEPLOYMENT: CowAdapterDeployment = {
17+
factory: '0xD2CC30cB0e77B80a34b879ccB6da67799e4ecD83',
18+
factoryEip712Name: 'AaveV3AdapterV3Factory',
19+
adapters: {
20+
[AaveFlashLoanType.CollateralSwap]: '0xa1138627412212e53C208e220696f14b0185a82c',
21+
[AaveFlashLoanType.DebtSwap]: '0xC898f87b572018ED25F501FFD620894a32dCa1AC',
22+
[AaveFlashLoanType.RepayCollateral]: '0x4AE46995af9ED4f4EdFC6FF1523b114EE4D7053a',
3723
},
38-
[AaveFlashLoanType.RepayCollateral]: {
39-
[SupportedChainId.MAINNET]: '0xAc27F3f86e78B14721d07C4f9CE999285f9AAa06',
40-
[SupportedChainId.GNOSIS_CHAIN]: '0xAc27F3f86e78B14721d07C4f9CE999285f9AAa06',
41-
[SupportedChainId.ARBITRUM_ONE]: '0xAc27F3f86e78B14721d07C4f9CE999285f9AAa06',
42-
[SupportedChainId.AVALANCHE]: '0xAc27F3f86e78B14721d07C4f9CE999285f9AAa06',
43-
[SupportedChainId.BNB]: '0xAc27F3f86e78B14721d07C4f9CE999285f9AAa06',
44-
[SupportedChainId.POLYGON]: '0xAc27F3f86e78B14721d07C4f9CE999285f9AAa06',
45-
[SupportedChainId.BASE]: '0xAc27F3f86e78B14721d07C4f9CE999285f9AAa06',
46-
[SupportedChainId.LINEA]: '0xAc27F3f86e78B14721d07C4f9CE999285f9AAa06',
47-
[SupportedChainId.PLASMA]: '0xAc27F3f86e78B14721d07C4f9CE999285f9AAa06',
48-
[SupportedChainId.SEPOLIA]: '',
49-
[SupportedChainId.INK]: '',
50-
[SupportedChainId.SOLANA]: '',
24+
};
25+
26+
const AAVE_V3_LINEA_DEPLOYMENT: CowAdapterDeployment = {
27+
...AAVE_V3_CORE_DEPLOYMENT,
28+
factory: '0x3171FC716942a40DEDe8dD0B7885dd9f44eca176',
29+
};
30+
31+
// Prime gets its own factory because a factory is bound to a single pool.
32+
const AAVE_V3_PRIME_DEPLOYMENT: CowAdapterDeployment = {
33+
factory: '0xFdFA036213C375808135744E865767FD90897F0A',
34+
factoryEip712Name: 'AaveV3AdapterV3Factory',
35+
adapters: {
36+
[AaveFlashLoanType.CollateralSwap]: '0xdf36e299a5326dd284E3E7b5AD891b4262e32f0a',
37+
[AaveFlashLoanType.DebtSwap]: '0xC654F2E06448f1E0912B0b0Da5B32a98e4c32919',
38+
[AaveFlashLoanType.RepayCollateral]: '0xF04f7527C082be4F3802f26cC769d40da9a84e66',
5139
},
5240
};
5341

54-
export const ADAPTER_FACTORY: Record<SupportedChainId, string> = {
55-
[SupportedChainId.MAINNET]: '0xdeCC46a4b09162F5369c5C80383AAa9159bCf192',
56-
[SupportedChainId.GNOSIS_CHAIN]: '0xdeCC46a4b09162F5369c5C80383AAa9159bCf192',
57-
[SupportedChainId.ARBITRUM_ONE]: '0xdeCC46a4b09162F5369c5C80383AAa9159bCf192',
58-
[SupportedChainId.AVALANCHE]: '0xdeCC46a4b09162F5369c5C80383AAa9159bCf192',
59-
[SupportedChainId.BNB]: '0xdeCC46a4b09162F5369c5C80383AAa9159bCf192',
60-
[SupportedChainId.POLYGON]: '0xdeCC46a4b09162F5369c5C80383AAa9159bCf192',
61-
[SupportedChainId.BASE]: '0xdeCC46a4b09162F5369c5C80383AAa9159bCf192',
62-
[SupportedChainId.LINEA]: '0xdeCC46a4b09162F5369c5C80383AAa9159bCf192',
63-
[SupportedChainId.PLASMA]: '0xdeCC46a4b09162F5369c5C80383AAa9159bCf192',
64-
[SupportedChainId.SEPOLIA]: '',
65-
[SupportedChainId.INK]: '',
66-
[SupportedChainId.SOLANA]: '',
42+
// Markets without an entry have no CoW adapters, so their flash-loan flows go through ParaSwap.
43+
const COW_ADAPTER_DEPLOYMENTS: Partial<Record<CustomMarket, CowAdapterDeployment>> = {
44+
[CustomMarket.proto_mainnet_v3]: AAVE_V3_CORE_DEPLOYMENT,
45+
[CustomMarket.proto_lido_v3]: AAVE_V3_PRIME_DEPLOYMENT,
46+
[CustomMarket.proto_base_v3]: AAVE_V3_CORE_DEPLOYMENT,
47+
[CustomMarket.proto_arbitrum_v3]: AAVE_V3_CORE_DEPLOYMENT,
48+
[CustomMarket.proto_avalanche_v3]: AAVE_V3_CORE_DEPLOYMENT,
49+
[CustomMarket.proto_polygon_v3]: AAVE_V3_CORE_DEPLOYMENT,
50+
[CustomMarket.proto_bnb_v3]: AAVE_V3_CORE_DEPLOYMENT,
51+
[CustomMarket.proto_plasma_v3]: AAVE_V3_CORE_DEPLOYMENT,
52+
[CustomMarket.proto_gnosis_v3]: AAVE_V3_CORE_DEPLOYMENT,
53+
[CustomMarket.proto_linea_v3]: AAVE_V3_LINEA_DEPLOYMENT,
6754
};
6855

56+
export const getCowAdapterDeployment = (market: CustomMarket): CowAdapterDeployment | undefined =>
57+
COW_ADAPTER_DEPLOYMENTS[market];
58+
59+
// Orders placed before these deployments can only be cancelled on the factory that created them.
60+
export const LEGACY_ADAPTER_FACTORY = '0xdeCC46a4b09162F5369c5C80383AAa9159bCf192';
61+
6962
export const DUST_PROTECTION_MULTIPLIER = 1.0003; // 3 BPS
7063

7164
export const COW_UNSUPPORTED_ASSETS: Partial<

‎src/components/transactions/Swap/helpers/cow/adapters.helpers.ts‎

Lines changed: 56 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,25 @@ import {
55
LimitTradeParameters,
66
OrderKind,
77
OrderSigningUtils,
8+
PostTradeAdditionalParams,
89
SupportedChainId,
910
} from '@cowprotocol/cow-sdk';
1011
import {
1112
AaveCollateralSwapSdk,
1213
AaveFlashLoanType,
14+
ADAPTER_DOMAIN_VERSION,
15+
ADAPTER_SIGNATURE_TYPES,
1316
EncodedOrder,
1417
FlashLoanHookAmounts,
1518
HASH_ZERO,
1619
} from '@cowprotocol/sdk-flash-loans';
1720
import { CustomMarket } from 'src/ui-config/marketsConfig';
1821

19-
import { COW_PARTNER_FEE, DUST_PROTECTION_MULTIPLIER } from '../../constants/cow.constants';
22+
import {
23+
COW_PARTNER_FEE,
24+
DUST_PROTECTION_MULTIPLIER,
25+
getCowAdapterDeployment,
26+
} from '../../constants/cow.constants';
2027
import { isCowProtocolRates, OrderType, SwapProvider, SwapState, SwapType } from '../../types';
2128
import { getCowFlashLoanSdk } from './env.helpers';
2229

@@ -54,7 +61,7 @@ export const calculateInstanceAddress = async ({
5461
)
5562
return;
5663

57-
const flashLoanSdk = await getCowFlashLoanSdk(state.chainId);
64+
const flashLoanSdk = await getCowFlashLoanSdk(state.chainId, market);
5865
const {
5966
sellAmountWithMarginForDustProtection,
6067
buyAmountWithMarginForDustProtection,
@@ -141,6 +148,53 @@ export const calculateInstanceAddress = async ({
141148
);
142149
};
143150

151+
/**
152+
* The SDK signs adapter orders under a hardcoded EIP-712 domain name that the current factories
153+
* no longer use, so the signature is rebuilt against the market's factory.
154+
*/
155+
export const withAdapterOrderSignature = (
156+
additionalParams: PostTradeAdditionalParams | undefined,
157+
{
158+
chainId,
159+
market,
160+
instanceAddress,
161+
}: { chainId: number; market: CustomMarket; instanceAddress: string }
162+
): PostTradeAdditionalParams => {
163+
const deployment = getCowAdapterDeployment(market);
164+
if (!deployment) {
165+
throw new Error(`CoW adapters are not deployed for market ${market}`);
166+
}
167+
168+
const customEIP1271Signature: PostTradeAdditionalParams['customEIP1271Signature'] = async (
169+
orderToSign,
170+
signer
171+
) => {
172+
const encodedOrder = OrderSigningUtils.encodeUnsignedOrder(orderToSign);
173+
const ecdsaSignature = await signer.signTypedData(
174+
{
175+
name: deployment.factoryEip712Name,
176+
version: ADAPTER_DOMAIN_VERSION,
177+
chainId,
178+
verifyingContract: deployment.factory,
179+
},
180+
ADAPTER_SIGNATURE_TYPES,
181+
{
182+
instance: instanceAddress,
183+
sellToken: encodedOrder.sellToken,
184+
buyToken: encodedOrder.buyToken,
185+
sellAmount: encodedOrder.sellAmount,
186+
buyAmount: encodedOrder.buyAmount,
187+
kind: encodedOrder.kind,
188+
validTo: encodedOrder.validTo,
189+
appData: encodedOrder.appData,
190+
}
191+
);
192+
return OrderSigningUtils.getEip1271Signature(orderToSign, ecdsaSignature);
193+
};
194+
195+
return { ...additionalParams, customEIP1271Signature };
196+
};
197+
144198
export const getHooksGasLimit = (
145199
collateralsAmount: number
146200
): {

0 commit comments

Comments
 (0)