@paraswap/dex-lib 3.9.4 → 3.9.5-gnosis.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/build/config.js +28 -0
  2. package/build/config.js.map +1 -1
  3. package/build/constants.d.ts +2 -1
  4. package/build/constants.js +1 -0
  5. package/build/constants.js.map +1 -1
  6. package/build/dex/aave-v3/aave-v3.js +1 -1
  7. package/build/dex/aave-v3/aave-v3.js.map +1 -1
  8. package/build/dex/aave-v3/config.js +6 -0
  9. package/build/dex/aave-v3/config.js.map +1 -1
  10. package/build/dex/algebra/algebra-pool-v1_9_bidirectional_fee.js +1 -1
  11. package/build/dex/algebra/algebra-pool-v1_9_bidirectional_fee.js.map +1 -1
  12. package/build/dex/balancer-v2/balancer-v2.js +1 -1
  13. package/build/dex/balancer-v2/balancer-v2.js.map +1 -1
  14. package/build/dex/balancer-v2/config.js +4 -0
  15. package/build/dex/balancer-v2/config.js.map +1 -1
  16. package/build/dex/curve-v1/config.js +36 -0
  17. package/build/dex/curve-v1/config.js.map +1 -1
  18. package/build/dex/curve-v1/curve-v1.js +1 -1
  19. package/build/dex/curve-v1/curve-v1.js.map +1 -1
  20. package/build/dex/curve-v1-factory/constants.js +1 -0
  21. package/build/dex/curve-v1-factory/constants.js.map +1 -1
  22. package/build/dex/curve-v1-factory/curve-v1-factory.js +1 -1
  23. package/build/dex/curve-v1-factory/curve-v1-factory.js.map +1 -1
  24. package/build/dex/curve-v1-stable-ng/config.js +28 -0
  25. package/build/dex/curve-v1-stable-ng/config.js.map +1 -1
  26. package/build/dex/generic-rfq/e2e-test-config.js +5 -61
  27. package/build/dex/generic-rfq/e2e-test-config.js.map +1 -1
  28. package/build/dex/uniswap-v2/config.js +14 -0
  29. package/build/dex/uniswap-v2/config.js.map +1 -1
  30. package/build/dex/uniswap-v2/uniswap-v2.js +1 -1
  31. package/build/dex/uniswap-v2/uniswap-v2.js.map +1 -1
  32. package/build/dex/weth/config.js +5 -0
  33. package/build/dex/weth/config.js.map +1 -1
  34. package/build/dex/wusdm/config.js +8 -0
  35. package/build/dex/wusdm/config.js.map +1 -1
  36. package/build/dex/wusdm/wusdm.d.ts +1 -0
  37. package/build/dex/wusdm/wusdm.js +9 -4
  38. package/build/dex/wusdm/wusdm.js.map +1 -1
  39. package/build/executor/WETHBytecodeBuilder.js +1 -0
  40. package/build/executor/WETHBytecodeBuilder.js.map +1 -1
  41. package/build/types.d.ts +1 -1
  42. package/package.json +1 -1
  43. package/src/config.ts +30 -2
  44. package/src/constants.ts +1 -0
  45. package/src/dex/aave-v3/aave-v3-e2e.test.ts +69 -0
  46. package/src/dex/aave-v3/aave-v3.ts +1 -1
  47. package/src/dex/aave-v3/config.ts +7 -0
  48. package/src/dex/algebra/algebra-pool-v1_9_bidirectional_fee.ts +1 -1
  49. package/src/dex/balancer-v2/balancer-v2-e2e.test.ts +22 -250
  50. package/src/dex/balancer-v2/balancer-v2.ts +1 -1
  51. package/src/dex/balancer-v2/config.ts +4 -0
  52. package/src/dex/curve-v1/config.ts +36 -0
  53. package/src/dex/curve-v1/curve-v1-e2e.test.ts +69 -0
  54. package/src/dex/curve-v1/curve-v1.ts +1 -1
  55. package/src/dex/curve-v1-factory/constants.ts +1 -0
  56. package/src/dex/curve-v1-factory/curve-v1-factory.ts +2 -1
  57. package/src/dex/curve-v1-stable-ng/config.ts +28 -0
  58. package/src/dex/curve-v1-stable-ng/curve-v1-stable-ng-e2e.test.ts +20 -0
  59. package/src/dex/generic-rfq/e2e-test-config.ts +5 -61
  60. package/src/dex/generic-rfq/generic-rfq-e2e.test.ts +4 -3
  61. package/src/dex/uniswap-v2/config.ts +16 -0
  62. package/src/dex/uniswap-v2/uniswap-v2-e2e-gnosis.test.ts +194 -0
  63. package/src/dex/uniswap-v2/uniswap-v2.ts +1 -1
  64. package/src/dex/weth/config.ts +5 -0
  65. package/src/dex/wusdm/config.ts +8 -0
  66. package/src/dex/wusdm/wusdm-e2e.test.ts +38 -0
  67. package/src/dex/wusdm/wusdm.ts +11 -4
  68. package/src/executor/WETHBytecodeBuilder.ts +3 -2
  69. package/src/types.ts +1 -1
  70. package/tests/constants-e2e.ts +79 -0
  71. package/tests/smart-tokens.ts +3 -0
  72. package/tests/utils-e2e.ts +6 -2
@@ -0,0 +1,194 @@
1
+ import dotenv from 'dotenv';
2
+ dotenv.config();
3
+
4
+ import { testE2E } from '../../../tests/utils-e2e';
5
+ import { Tokens, Holders } from '../../../tests/constants-e2e';
6
+ import { Network, ContractMethod, SwapSide } from '../../constants';
7
+ import { StaticJsonRpcProvider } from '@ethersproject/providers';
8
+ import { generateConfig } from '../../config';
9
+
10
+ describe('UniswapV2 E2E Gnosis', () => {
11
+ const network = Network.GNOSIS;
12
+ const tokens = Tokens[network];
13
+ const holders = Holders[network];
14
+ const provider = new StaticJsonRpcProvider(
15
+ generateConfig(network).privateHttpProvider,
16
+ network,
17
+ );
18
+
19
+ describe('SushiSwap', () => {
20
+ const dexKey = 'SushiSwap';
21
+
22
+ describe('swapExactAmountIn', () => {
23
+ it('SushiSwap ETH -> TOKEN', async () => {
24
+ await testE2E(
25
+ tokens.XDAI,
26
+ tokens.USDC,
27
+ holders.XDAI,
28
+ '700000000000000000',
29
+ SwapSide.SELL,
30
+ dexKey,
31
+ ContractMethod.swapExactAmountIn,
32
+ network,
33
+ provider,
34
+ );
35
+ });
36
+ it('SushiSwap TOKEN -> ETH', async () => {
37
+ await testE2E(
38
+ tokens.WETH,
39
+ tokens.XDAI,
40
+ holders.WETH,
41
+ '700000000000000000',
42
+ SwapSide.SELL,
43
+ dexKey,
44
+ ContractMethod.swapExactAmountIn,
45
+ network,
46
+ provider,
47
+ );
48
+ });
49
+ it('SushiSwap TOKEN -> TOKEN', async () => {
50
+ await testE2E(
51
+ tokens.WETH,
52
+ tokens.USDC,
53
+ holders.WETH,
54
+ '7000000000000000',
55
+ SwapSide.SELL,
56
+ dexKey,
57
+ ContractMethod.swapExactAmountIn,
58
+ network,
59
+ provider,
60
+ );
61
+ });
62
+ });
63
+
64
+ describe('swapExactAmountOut', () => {
65
+ it('SushiSwap ETH -> TOKEN', async () => {
66
+ await testE2E(
67
+ tokens.XDAI,
68
+ tokens.USDC,
69
+ holders.XDAI,
70
+ '700000000',
71
+ SwapSide.BUY,
72
+ dexKey,
73
+ ContractMethod.swapExactAmountOut,
74
+ network,
75
+ provider,
76
+ );
77
+ });
78
+ it('SushiSwap TOKEN -> ETH', async () => {
79
+ await testE2E(
80
+ tokens.USDC,
81
+ tokens.XDAI,
82
+ holders.USDC,
83
+ '7000000000000000000',
84
+ SwapSide.BUY,
85
+ dexKey,
86
+ ContractMethod.swapExactAmountOut,
87
+ network,
88
+ provider,
89
+ );
90
+ });
91
+ it('SushiSwap TOKEN -> TOKEN', async () => {
92
+ await testE2E(
93
+ tokens.USDC,
94
+ tokens.WETH,
95
+ holders.USDC,
96
+ '7000000000000000',
97
+ SwapSide.BUY,
98
+ dexKey,
99
+ ContractMethod.swapExactAmountOut,
100
+ network,
101
+ provider,
102
+ );
103
+ });
104
+ });
105
+ });
106
+
107
+ describe('HoneySwap', () => {
108
+ const dexKey = 'HoneySwap';
109
+
110
+ describe('swapExactAmountIn', () => {
111
+ it('SushiSwap ETH -> TOKEN', async () => {
112
+ await testE2E(
113
+ tokens.XDAI,
114
+ tokens.USDC,
115
+ holders.XDAI,
116
+ '700000000000000000',
117
+ SwapSide.SELL,
118
+ dexKey,
119
+ ContractMethod.swapExactAmountIn,
120
+ network,
121
+ provider,
122
+ );
123
+ });
124
+ it('SushiSwap TOKEN -> ETH', async () => {
125
+ await testE2E(
126
+ tokens.WETH,
127
+ tokens.XDAI,
128
+ holders.WETH,
129
+ '700000000000000000',
130
+ SwapSide.SELL,
131
+ dexKey,
132
+ ContractMethod.swapExactAmountIn,
133
+ network,
134
+ provider,
135
+ );
136
+ });
137
+ it('SushiSwap TOKEN -> TOKEN', async () => {
138
+ await testE2E(
139
+ tokens.WETH,
140
+ tokens.USDC,
141
+ holders.WETH,
142
+ '7000000000000000',
143
+ SwapSide.SELL,
144
+ dexKey,
145
+ ContractMethod.swapExactAmountIn,
146
+ network,
147
+ provider,
148
+ );
149
+ });
150
+ });
151
+
152
+ describe('swapExactAmountOut', () => {
153
+ it('SushiSwap ETH -> TOKEN', async () => {
154
+ await testE2E(
155
+ tokens.XDAI,
156
+ tokens.USDC,
157
+ holders.XDAI,
158
+ '700000000',
159
+ SwapSide.BUY,
160
+ dexKey,
161
+ ContractMethod.swapExactAmountOut,
162
+ network,
163
+ provider,
164
+ );
165
+ });
166
+ it('SushiSwap TOKEN -> ETH', async () => {
167
+ await testE2E(
168
+ tokens.USDC,
169
+ tokens.XDAI,
170
+ holders.USDC,
171
+ '7000000000000000000',
172
+ SwapSide.BUY,
173
+ dexKey,
174
+ ContractMethod.swapExactAmountOut,
175
+ network,
176
+ provider,
177
+ );
178
+ });
179
+ it('SushiSwap TOKEN -> TOKEN', async () => {
180
+ await testE2E(
181
+ tokens.USDC,
182
+ tokens.WETH,
183
+ holders.USDC,
184
+ '700000000000000',
185
+ SwapSide.BUY,
186
+ dexKey,
187
+ ContractMethod.swapExactAmountOut,
188
+ network,
189
+ provider,
190
+ );
191
+ });
192
+ });
193
+ });
194
+ });
@@ -681,7 +681,7 @@ export class UniswapV2
681
681
  }
682
682
 
683
683
  getAdapters(side: SwapSide): { name: string; index: number }[] | null {
684
- return this.adapters[side];
684
+ return this.adapters?.[side] ?? null;
685
685
  }
686
686
 
687
687
  async getTopPoolsForToken(
@@ -46,6 +46,11 @@ export const WethConfig: DexConfigMap<DexParams> = {
46
46
  poolGasCost: WethGasCost,
47
47
  },
48
48
  },
49
+ Wxdai: {
50
+ [Network.GNOSIS]: {
51
+ poolGasCost: WethGasCost,
52
+ },
53
+ },
49
54
  };
50
55
 
51
56
  export const Adapters: {
@@ -25,4 +25,12 @@ export const WUSDMConfig: DexConfigMap<WusdmParams> = {
25
25
  USDMAddress: '0x59D9356E565Ab3A36dD77763Fc0d87fEaf85508C',
26
26
  },
27
27
  },
28
+ // not really wUSDM, but works in the same way
29
+ // might give 1wei difference on BUY
30
+ sDAI: {
31
+ [Network.GNOSIS]: {
32
+ wUSDMAddress: '0xaf204776c7245bF4147c2612BF6e5972Ee483701', // sDAI
33
+ USDMAddress: '0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d', // WXDAI
34
+ },
35
+ },
28
36
  };
@@ -163,4 +163,42 @@ describe('MountainProtocol E2E', () => {
163
163
  tokenBAmount,
164
164
  );
165
165
  });
166
+
167
+ describe('Gnosis', () => {
168
+ const network = Network.GNOSIS;
169
+
170
+ const tokenASymbol: string = 'sDAI';
171
+ const tokenBSymbol: string = 'WXDAI';
172
+
173
+ const tokenAAmount: string = '500000000000000000';
174
+ const tokenBAmount: string = '500000000000000000';
175
+
176
+ testForNetwork(
177
+ network,
178
+ 'sDAI',
179
+ tokenASymbol,
180
+ tokenBSymbol,
181
+ tokenAAmount,
182
+ tokenBAmount,
183
+ );
184
+ });
185
+
186
+ describe('Gnosis with Native', () => {
187
+ const network = Network.GNOSIS;
188
+
189
+ const tokenASymbol: string = 'sDAI';
190
+ const tokenBSymbol: string = 'XDAI';
191
+
192
+ const tokenAAmount: string = '500000000000000000';
193
+ const tokenBAmount: string = '500000000000000000';
194
+
195
+ testForNetwork(
196
+ network,
197
+ 'sDAI',
198
+ tokenASymbol,
199
+ tokenBSymbol,
200
+ tokenAAmount,
201
+ tokenBAmount,
202
+ );
203
+ });
166
204
  });
@@ -38,6 +38,7 @@ export class WUSDM
38
38
  {
39
39
  readonly hasConstantPriceLargeAmounts = true;
40
40
  readonly isFeeOnTransferSupported = false;
41
+ readonly needWrapNative: boolean = true;
41
42
 
42
43
  public static dexKeysWithNetwork: { key: string; networks: Network[] }[] =
43
44
  getDexKeysWithNetwork(WUSDMConfig);
@@ -89,7 +90,10 @@ export class WUSDM
89
90
  side: SwapSide,
90
91
  blockNumber: number,
91
92
  ): Promise<string[]> {
92
- return this.isAppropriatePair(srcToken, destToken)
93
+ const _srcToken = this.dexHelper.config.wrapETH(srcToken);
94
+ const _destToken = this.dexHelper.config.wrapETH(destToken);
95
+
96
+ return this.isAppropriatePair(_srcToken, _destToken)
93
97
  ? [`${this.dexKey}_${this.wUSDMAddress}`]
94
98
  : [];
95
99
  }
@@ -121,13 +125,16 @@ export class WUSDM
121
125
  blockNumber: number,
122
126
  limitPools?: string[],
123
127
  ): Promise<null | ExchangePrices<WUSDMData>> {
124
- if (!this.isAppropriatePair(srcToken, destToken)) return null;
128
+ const _srcToken = this.dexHelper.config.wrapETH(srcToken);
129
+ const _destToken = this.dexHelper.config.wrapETH(destToken);
130
+
131
+ if (!this.isAppropriatePair(_srcToken, _destToken)) return null;
125
132
  const state = this.eventPool.getState(blockNumber);
126
133
  if (!state) return null;
127
134
 
128
- const isSrcAsset = this.isUSDM(srcToken.address);
135
+ const isSrcAsset = this.isUSDM(_srcToken.address);
129
136
 
130
- const isWrap = this.isWrap(srcToken, destToken, side);
137
+ const isWrap = this.isWrap(_srcToken, _destToken, side);
131
138
 
132
139
  let calcFunction: Function;
133
140
 
@@ -1,9 +1,9 @@
1
1
  import { DexExchangeBuildParam } from '../types';
2
- import { OptimalRate, SwapSide } from '@paraswap/core';
2
+ import { OptimalRate } from '@paraswap/core';
3
3
  import { isETHAddress } from '../utils';
4
4
  import { DepositWithdrawReturn } from '../dex/weth/types';
5
5
  import { WethConfig } from '../dex/weth/config';
6
- import { Executors, Flag, SpecialDex } from './types';
6
+ import { Executors } from './types';
7
7
  import { ExecutorBytecodeBuilder } from './ExecutorBytecodeBuilder';
8
8
  import { Network } from '../constants';
9
9
 
@@ -15,6 +15,7 @@ const SUPPORTED_NETWORKS = [
15
15
  Network.POLYGON,
16
16
  Network.OPTIMISM,
17
17
  Network.ZKEVM,
18
+ Network.GNOSIS,
18
19
  ];
19
20
  const SUPPORTED_EXCHANGES = Object.keys(WethConfig);
20
21
 
package/src/types.ts CHANGED
@@ -294,7 +294,7 @@ export type Config = {
294
294
  wrappedNativeTokenAddress: Address;
295
295
  hasEIP1559: boolean;
296
296
  augustusAddress: Address;
297
- augustusV6Address?: Address;
297
+ augustusV6Address: Address;
298
298
  augustusRFQAddress: Address;
299
299
  tokenTransferProxyAddress: Address;
300
300
  multicallV2Address: Address;
@@ -7,6 +7,7 @@ import {
7
7
  allowedFn,
8
8
  _balancesFn,
9
9
  _allowancesFn,
10
+ balanceAndBlacklistStatesFn,
10
11
  } from '../tests/smart-tokens';
11
12
  import { Address } from '../src/types';
12
13
  import { ETHER_ADDRESS, Network } from '../src/constants';
@@ -1177,6 +1178,12 @@ export const Tokens: {
1177
1178
  address: '0xaf88d065e77c8cC2239327C5EDb3A432268e5831',
1178
1179
  decimals: 6,
1179
1180
  symbol: 'USDC',
1181
+ addBalance: balanceAndBlacklistStatesFn,
1182
+ addAllowance: allowedFn,
1183
+ },
1184
+ SUSHI: {
1185
+ address: '0xd4d42F0b6DEF4CE0383636770eF773390d85c61A',
1186
+ decimals: 18,
1180
1187
  },
1181
1188
  crvUSD: {
1182
1189
  address: '0x498bf2b1e120fed3ad3d42ea2165e9b73f99c1e5',
@@ -1319,6 +1326,8 @@ export const Tokens: {
1319
1326
  WETH: {
1320
1327
  address: '0x4200000000000000000000000000000000000006',
1321
1328
  decimals: 18,
1329
+ addBalance: balanceOfFn,
1330
+ addAllowance: allowanceFn,
1322
1331
  },
1323
1332
  ETH: { address: ETHER_ADDRESS, decimals: 18 },
1324
1333
  USDCe: {
@@ -1450,6 +1459,60 @@ export const Tokens: {
1450
1459
  decimals: 6,
1451
1460
  },
1452
1461
  },
1462
+ [Network.GNOSIS]: {
1463
+ XDAI: {
1464
+ address: ETHER_ADDRESS,
1465
+ decimals: 18,
1466
+ },
1467
+ WETH: {
1468
+ address: '0x6A023CCd1ff6F2045C3309768eAd9E68F978f6e1',
1469
+ decimals: 18,
1470
+ },
1471
+ WBTC: {
1472
+ address: '0x8e5bBbb09Ed1ebdE8674Cda39A0c169401db4252',
1473
+ decimals: 8,
1474
+ },
1475
+ USDC: {
1476
+ address: '0xDDAfbb505ad214D7b80b1f830fcCc89B60fb7A83',
1477
+ decimals: 6,
1478
+ },
1479
+ USDT: {
1480
+ address: '0x4ECaBa5870353805a9F068101A40E0f32ed605C6',
1481
+ decimals: 6,
1482
+ },
1483
+ WXDAI: {
1484
+ address: '0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d',
1485
+ decimals: 18,
1486
+ },
1487
+ aGnoWETH: {
1488
+ address: '0xa818f1b57c201e092c4a2017a91815034326efd1',
1489
+ decimals: 18,
1490
+ },
1491
+ aGnowstETH: {
1492
+ address: '0x23e4e76d01b2002be436ce8d6044b0aa2f68b68a',
1493
+ decimals: 18,
1494
+ },
1495
+ aGnoUSDC: {
1496
+ address: '0xc6b7aca6de8a6044e0e32d0c841a89244a10d284',
1497
+ decimals: 6,
1498
+ },
1499
+ wstETH: {
1500
+ address: '0x6C76971f98945AE98dD7d4DFcA8711ebea946eA6',
1501
+ decimals: 18,
1502
+ },
1503
+ aGnoWXDAI: {
1504
+ address: '0xd0dd6cef72143e22cced4867eb0d5f2328715533',
1505
+ decimals: 18,
1506
+ },
1507
+ sDAI: {
1508
+ address: '0xaf204776c7245bF4147c2612BF6e5972Ee483701',
1509
+ decimals: 18,
1510
+ },
1511
+ crvUSD: {
1512
+ address: '0xaBEf652195F98A91E490f047A5006B71c85f058d',
1513
+ decimals: 18,
1514
+ },
1515
+ },
1453
1516
  [Network.BASE]: {
1454
1517
  wstETH: {
1455
1518
  address: `0xc1cba3fcea344f92d9239c08c0568f6f2f0ee452`,
@@ -1887,6 +1950,20 @@ export const Holders: {
1887
1950
  WBTC: '0x99b31498b0a1dae01fc3433e3cb60f095340935c',
1888
1951
  USDC: '0x99b31498b0a1dae01fc3433e3cb60f095340935c',
1889
1952
  },
1953
+ [Network.GNOSIS]: {
1954
+ XDAI: '0x9fc062032d4F2Fe7dAA601bd8B06C45F9c8f17Be',
1955
+ WXDAI: '0xBA12222222228d8Ba445958a75a0704d566BF2C8',
1956
+ WETH: '0x800e12aF6c96790EDDdc5B3f3302899e27B2A918',
1957
+ USDT: '0x1098503a90c3224F0e6BE7c124a337888C0BA564',
1958
+ WBTC: '0x8e5bBbb09Ed1ebdE8674Cda39A0c169401db4252',
1959
+ USDC: '0xd4A39d219ADB43aB00739DC5D876D98Fdf0121Bf',
1960
+ aGnoWXDAI: '0x458cD345B4C05e8DF39d0A07220feb4Ec19F5e6f',
1961
+ aGnoUSDC: '0x458cD345B4C05e8DF39d0A07220feb4Ec19F5e6f',
1962
+ wstETH: '0x458cD345B4C05e8DF39d0A07220feb4Ec19F5e6f',
1963
+ aGnowstETH: '0x458cD345B4C05e8DF39d0A07220feb4Ec19F5e6f',
1964
+ sDAI: '0x79f08F2e75A8C99428DE4A2e6456c07C99E55da5',
1965
+ crvUSD: '0xE4A982fa1f1E8AD1AF238A7b1226b13b56bf5CcD',
1966
+ },
1890
1967
  [Network.BASE]: {
1891
1968
  WETH: '0x4bb6b2efe7036020ba6f02a05602546c9f25bf28',
1892
1969
  PRIME: '0xe3879b7359695f802d6FD56Bb76fD82C362Dafd6',
@@ -1938,6 +2015,7 @@ export const NativeTokenSymbols: { [network: number]: string } = {
1938
2015
  [Network.ARBITRUM]: 'ETH',
1939
2016
  [Network.OPTIMISM]: 'ETH',
1940
2017
  [Network.BASE]: 'ETH',
2018
+ [Network.GNOSIS]: 'XDAI',
1941
2019
  };
1942
2020
 
1943
2021
  export const WrappedNativeTokenSymbols: { [network: number]: string } = {
@@ -1949,4 +2027,5 @@ export const WrappedNativeTokenSymbols: { [network: number]: string } = {
1949
2027
  [Network.ARBITRUM]: 'WETH',
1950
2028
  [Network.OPTIMISM]: 'WETH',
1951
2029
  [Network.BASE]: 'WETH',
2030
+ [Network.GNOSIS]: 'WXDAI',
1952
2031
  };
@@ -43,6 +43,9 @@ const constructAddBAllowanceFn = (varName: string): AddAllowanceFn => {
43
43
 
44
44
  export const balanceOfFn = constructAddBalanceFn('balanceOf');
45
45
  export const balancesFn = constructAddBalanceFn('balances');
46
+ export const balanceAndBlacklistStatesFn = constructAddBalanceFn(
47
+ 'balanceAndBlacklistStates',
48
+ );
46
49
  export const _balancesFn = constructAddBalanceFn('_balances');
47
50
  export const allowanceFn = constructAddBAllowanceFn('allowance');
48
51
  export const _allowancesFn = constructAddBAllowanceFn('_allowances');
@@ -777,7 +777,9 @@ export async function newTestE2E({
777
777
  .addBalance(senderAddress, twiceAmount.toString())
778
778
  .addAllowance(
779
779
  senderAddress,
780
- config.tokenTransferProxyAddress,
780
+ priceRoute.version === ParaSwapVersion.V5
781
+ ? config.tokenTransferProxyAddress
782
+ : config.augustusV6Address,
781
783
  amount.toString(),
782
784
  );
783
785
  } else {
@@ -785,7 +787,9 @@ export async function newTestE2E({
785
787
  .addBalance(senderAddress, MAX_UINT)
786
788
  .addAllowance(
787
789
  senderAddress,
788
- config.tokenTransferProxyAddress,
790
+ priceRoute.version === ParaSwapVersion.V5
791
+ ? config.tokenTransferProxyAddress
792
+ : config.augustusV6Address,
789
793
  (BigInt(MAX_UINT) / 8n).toString(),
790
794
  );
791
795
  }