@paraswap/dex-lib 3.7.3-idle.2 → 3.7.3-idle.4

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 (57) hide show
  1. package/build/dex/aave-v3-stata/aave-v3-stata.d.ts +1 -2
  2. package/build/dex/aave-v3-stata/aave-v3-stata.js +46 -20
  3. package/build/dex/aave-v3-stata/aave-v3-stata.js.map +1 -1
  4. package/build/dex/aave-v3-stata/tokens.js +3 -3
  5. package/build/dex/aave-v3-stata/tokens.js.map +1 -1
  6. package/build/dex/aave-v3-stata/utils.d.ts +1 -1
  7. package/build/dex/aave-v3-stata/utils.js +3 -3
  8. package/build/dex/aave-v3-stata/utils.js.map +1 -1
  9. package/build/dex/balancer-v2/balancer-v2.js.map +1 -1
  10. package/build/dex/idle-dao/config.d.ts +1 -2
  11. package/build/dex/idle-dao/config.js +1 -283
  12. package/build/dex/idle-dao/config.js.map +1 -1
  13. package/build/dex/idle-dao/idle-dao.d.ts +1 -0
  14. package/build/dex/idle-dao/idle-dao.js +43 -20
  15. package/build/dex/idle-dao/idle-dao.js.map +1 -1
  16. package/build/dex/idle-dao/token_list.d.ts +4 -0
  17. package/build/dex/idle-dao/token_list.js +289 -0
  18. package/build/dex/idle-dao/token_list.js.map +1 -0
  19. package/build/dex/idle-dao/tokens.d.ts +1 -1
  20. package/build/dex/idle-dao/tokens.js +8 -5
  21. package/build/dex/idle-dao/tokens.js.map +1 -1
  22. package/build/dex/idle-dao/utils.d.ts +1 -1
  23. package/build/dex/idle-dao/utils.js +8 -7
  24. package/build/dex/idle-dao/utils.js.map +1 -1
  25. package/build/dex/index.js +2 -0
  26. package/build/dex/index.js.map +1 -1
  27. package/build/dex/pancakeswap-v3/pancakeswap-v3.js +1 -0
  28. package/build/dex/pancakeswap-v3/pancakeswap-v3.js.map +1 -1
  29. package/build/dex/solidly-v3/solidly-v3.js +1 -0
  30. package/build/dex/solidly-v3/solidly-v3.js.map +1 -1
  31. package/build/dex/uniswap-v3/forks/velodrome-slipstream/velodrome-slipstream.js +1 -0
  32. package/build/dex/uniswap-v3/forks/velodrome-slipstream/velodrome-slipstream.js.map +1 -1
  33. package/build/dex/uniswap-v3/uniswap-v3.js +1 -0
  34. package/build/dex/uniswap-v3/uniswap-v3.js.map +1 -1
  35. package/package.json +1 -1
  36. package/src/abi/aavev3stata/Factory.json +128 -0
  37. package/src/abi/aavev3stata/Token.json +735 -0
  38. package/src/dex/aave-v3-stata/aave-v3-stata-e2e.test.ts +355 -0
  39. package/src/dex/aave-v3-stata/aave-v3-stata-integration.test.ts +282 -0
  40. package/src/dex/aave-v3-stata/aave-v3-stata.ts +529 -0
  41. package/src/dex/aave-v3-stata/config.ts +61 -0
  42. package/src/dex/aave-v3-stata/tokens.ts +48 -0
  43. package/src/dex/aave-v3-stata/types.ts +69 -0
  44. package/src/dex/aave-v3-stata/utils.ts +84 -0
  45. package/src/dex/balancer-v2/balancer-v2.ts +0 -1
  46. package/src/dex/idle-dao/config.ts +0 -283
  47. package/src/dex/idle-dao/idle-dao.ts +62 -22
  48. package/src/dex/idle-dao/token_list.ts +287 -0
  49. package/src/dex/idle-dao/tokens.ts +15 -6
  50. package/src/dex/idle-dao/utils.ts +8 -7
  51. package/src/dex/index.ts +2 -0
  52. package/src/dex/pancakeswap-v3/pancakeswap-v3.ts +2 -0
  53. package/src/dex/solidly-v3/solidly-v3.ts +2 -0
  54. package/src/dex/uniswap-v3/forks/velodrome-slipstream/velodrome-slipstream.ts +2 -0
  55. package/src/dex/uniswap-v3/uniswap-v3.ts +2 -0
  56. package/tests/constants-e2e.ts +78 -0
  57. package/src/dex/idle-dao/scripts.ts +0 -553
@@ -0,0 +1,287 @@
1
+ import { Network } from '../../constants';
2
+ import { IdleToken } from './types';
3
+
4
+ export const TOKEN_LISTS: { [network: number]: IdleToken[] } = {
5
+ [Network.MAINNET]: [
6
+ {
7
+ blockNumber: 0,
8
+ idleDecimals: 18,
9
+ cdoAddress: '0x34dCd573C5dE4672C8248cd12A99f875Ca112Ad8',
10
+ idleAddress: '0x2688fc68c4eac90d9e5e1b94776cf14eade8d877',
11
+ address: '0xae7ab96520de3a18e5e111b5eaab095312d7fe84',
12
+ decimals: 18,
13
+ idleSymbol: 'AA_wstETH',
14
+ tokenType: 'AA',
15
+ },
16
+ {
17
+ blockNumber: 0,
18
+ idleDecimals: 18,
19
+ cdoAddress: '0x34dCd573C5dE4672C8248cd12A99f875Ca112Ad8',
20
+ idleAddress: '0x3a52fa30c33caf05faee0f9c5dfe5fd5fe8b3978',
21
+ address: '0xae7ab96520de3a18e5e111b5eaab095312d7fe84',
22
+ decimals: 18,
23
+ idleSymbol: 'BB_wstETH',
24
+ tokenType: 'BB',
25
+ },
26
+ {
27
+ blockNumber: 0,
28
+ idleDecimals: 18,
29
+ cdoAddress: '0x8E0A8A5c1e5B3ac0670Ea5a613bB15724D51Fc37',
30
+ idleAddress: '0xdf17c739b666b259da3416d01f0310a6e429f592',
31
+ address: '0xae7ab96520de3a18e5e111b5eaab095312d7fe84',
32
+ decimals: 18,
33
+ idleSymbol: 'AA_iETHv2',
34
+ tokenType: 'AA',
35
+ },
36
+ {
37
+ blockNumber: 0,
38
+ idleDecimals: 18,
39
+ cdoAddress: '0x8E0A8A5c1e5B3ac0670Ea5a613bB15724D51Fc37',
40
+ idleAddress: '0x990b3af34ddb502715e1070ce6778d8eb3c8ea82',
41
+ address: '0xae7ab96520de3a18e5e111b5eaab095312d7fe84',
42
+ decimals: 18,
43
+ idleSymbol: 'BB_iETHv2',
44
+ tokenType: 'BB',
45
+ },
46
+ {
47
+ blockNumber: 0,
48
+ idleDecimals: 18,
49
+ cdoAddress: '0x1329E8DB9Ed7a44726572D44729427F132Fa290D',
50
+ idleAddress: '0x9cacd44cfdf22731bc99facf3531c809d56bd4a2',
51
+ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
52
+ decimals: 6,
53
+ idleSymbol: 'AA_idle_cpPOR-USDC',
54
+ tokenType: 'AA',
55
+ },
56
+ {
57
+ blockNumber: 0,
58
+ idleDecimals: 18,
59
+ cdoAddress: '0x1329E8DB9Ed7a44726572D44729427F132Fa290D',
60
+ idleAddress: '0xf85fd280b301c0a6232d515001da8b6c8503d714',
61
+ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
62
+ decimals: 6,
63
+ idleSymbol: 'BB_idle_cpPOR-USDC',
64
+ tokenType: 'BB',
65
+ },
66
+ {
67
+ blockNumber: 0,
68
+ idleDecimals: 18,
69
+ cdoAddress: '0xc4574C60a455655864aB80fa7638561A756C5E61',
70
+ idleAddress: '0x0a6f2449c09769950cfb76f905ad11c341541f70',
71
+ address: '0xdac17f958d2ee523a2206206994597c13d831ec7',
72
+ decimals: 6,
73
+ idleSymbol: 'AA_idle_cpFAS-USDT',
74
+ tokenType: 'AA',
75
+ },
76
+ {
77
+ blockNumber: 0,
78
+ idleDecimals: 18,
79
+ cdoAddress: '0xc4574C60a455655864aB80fa7638561A756C5E61',
80
+ idleAddress: '0x3eb6318b8d9f362a0e1d99f6032edb1c4c602500',
81
+ address: '0xdac17f958d2ee523a2206206994597c13d831ec7',
82
+ decimals: 6,
83
+ idleSymbol: 'BB_idle_cpFAS-USDT',
84
+ tokenType: 'BB',
85
+ },
86
+ {
87
+ blockNumber: 0,
88
+ idleDecimals: 18,
89
+ cdoAddress: '0xE7C6A4525492395d65e736C3593aC933F33ee46e',
90
+ idleAddress: '0xdca1dae87f5c733c84e0593984967ed756579bee',
91
+ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
92
+ decimals: 6,
93
+ idleSymbol: 'AA_idle_cpFASA-USDC',
94
+ tokenType: 'AA',
95
+ },
96
+ {
97
+ blockNumber: 0,
98
+ idleDecimals: 18,
99
+ cdoAddress: '0xE7C6A4525492395d65e736C3593aC933F33ee46e',
100
+ idleAddress: '0xbcc845bb731632ebe8ac0bfacde056170aaaaa06',
101
+ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
102
+ decimals: 6,
103
+ idleSymbol: 'BB_idle_cpFASA-USDC',
104
+ tokenType: 'BB',
105
+ },
106
+ {
107
+ blockNumber: 0,
108
+ idleDecimals: 18,
109
+ cdoAddress: '0x5dcA0B3Ed7594A6613c1A2acd367d56E1f74F92D',
110
+ idleAddress: '0x43ed68703006add5f99ce36b5182392362369c1c',
111
+ address: '0x6b175474e89094c44da98b954eedeac495271d0f',
112
+ decimals: 18,
113
+ idleSymbol: 'AA_idle_cpPOR-USDC',
114
+ tokenType: 'AA',
115
+ },
116
+ {
117
+ blockNumber: 0,
118
+ idleDecimals: 18,
119
+ cdoAddress: '0x5dcA0B3Ed7594A6613c1A2acd367d56E1f74F92D',
120
+ idleAddress: '0x38d36353d07cfb92650822d9c31fb4ada1c73d6e',
121
+ address: '0x6b175474e89094c44da98b954eedeac495271d0f',
122
+ decimals: 18,
123
+ idleSymbol: 'BB_idle_cpPOR-USDC',
124
+ tokenType: 'BB',
125
+ },
126
+ {
127
+ blockNumber: 0,
128
+ idleDecimals: 18,
129
+ cdoAddress: '0xF87ec7e1Ee467d7d78862089B92dd40497cBa5B8',
130
+ idleAddress: '0xaef4fcc4e5f2dc270760063446d4116d24704ad1',
131
+ address: '0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0',
132
+ decimals: 18,
133
+ idleSymbol: 'AA_stMATIC',
134
+ tokenType: 'AA',
135
+ },
136
+ {
137
+ blockNumber: 0,
138
+ idleDecimals: 18,
139
+ cdoAddress: '0xF87ec7e1Ee467d7d78862089B92dd40497cBa5B8',
140
+ idleAddress: '0x077212c69a66261cf7bd1fd3b5c5db7cffa948ee',
141
+ address: '0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0',
142
+ decimals: 18,
143
+ idleSymbol: 'BB_stMATIC',
144
+ tokenType: 'BB',
145
+ },
146
+ {
147
+ blockNumber: 0,
148
+ idleDecimals: 18,
149
+ cdoAddress: '0x87E53bE99975DA318056af5c4933469a6B513768',
150
+ idleAddress: '0x2b0e31b8ee653d2077db86dea3acf3f34ae9d5d2',
151
+ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
152
+ decimals: 6,
153
+ idleSymbol: 'AA_steakUSDC',
154
+ tokenType: 'AA',
155
+ },
156
+ {
157
+ blockNumber: 0,
158
+ idleDecimals: 18,
159
+ cdoAddress: '0x87E53bE99975DA318056af5c4933469a6B513768',
160
+ idleAddress: '0x7b713b1cb6eafd4061064581579ffccf7df21545',
161
+ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
162
+ decimals: 6,
163
+ idleSymbol: 'BB_steakUSDC',
164
+ tokenType: 'BB',
165
+ },
166
+ {
167
+ blockNumber: 0,
168
+ idleDecimals: 18,
169
+ cdoAddress: '0xA8d747Ef758469e05CF505D708b2514a1aB9Cc08',
170
+ idleAddress: '0x454bb3cb427b21e1c052a080e21a57753cd6969e',
171
+ address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
172
+ decimals: 18,
173
+ idleSymbol: 'AA_Re7WETH',
174
+ tokenType: 'AA',
175
+ },
176
+ {
177
+ blockNumber: 0,
178
+ idleDecimals: 18,
179
+ cdoAddress: '0xA8d747Ef758469e05CF505D708b2514a1aB9Cc08',
180
+ idleAddress: '0x20aa3cd83044d2903181f7ef5c2b498a017d1c4a',
181
+ address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
182
+ decimals: 18,
183
+ idleSymbol: 'BB_Re7WETH',
184
+ tokenType: 'BB',
185
+ },
186
+ {
187
+ blockNumber: 0,
188
+ idleDecimals: 18,
189
+ cdoAddress: '0xD071EA5D2575E155E4e9c2234968D1E11B8a920E',
190
+ idleAddress: '0xb9d321b26095195610707597aab416925c598aab',
191
+ address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
192
+ decimals: 18,
193
+ idleSymbol: 'AA_Re7WETH',
194
+ tokenType: 'AA',
195
+ },
196
+ {
197
+ blockNumber: 0,
198
+ idleDecimals: 18,
199
+ cdoAddress: '0xD071EA5D2575E155E4e9c2234968D1E11B8a920E',
200
+ idleAddress: '0xf529f10fe24367d3a123faf0e9d5f6d80980b46f',
201
+ address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
202
+ decimals: 18,
203
+ idleSymbol: 'BB_Re7WETH',
204
+ tokenType: 'BB',
205
+ },
206
+ {
207
+ blockNumber: 0,
208
+ idleDecimals: 18,
209
+ cdoAddress: '0x9e0c5ee5e4B187Cf18B23745FCF2b6aE66a9B52f',
210
+ idleAddress: '0x28d8a22c6689ac1e2ddc43ca6f85c520457351c1',
211
+ address: '0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0',
212
+ decimals: 18,
213
+ idleSymbol: 'AA_ampr-LP-ETH',
214
+ tokenType: 'AA',
215
+ },
216
+ {
217
+ blockNumber: 0,
218
+ idleDecimals: 18,
219
+ cdoAddress: '0x9e0c5ee5e4B187Cf18B23745FCF2b6aE66a9B52f',
220
+ idleAddress: '0xefc4f43737fd336fa8a8254454ced1e421804b16',
221
+ address: '0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0',
222
+ decimals: 18,
223
+ idleSymbol: 'BB_ampr-LP-ETH',
224
+ tokenType: 'BB',
225
+ },
226
+ {
227
+ blockNumber: 0,
228
+ idleDecimals: 18,
229
+ cdoAddress: '0x1EB1b47D0d8BCD9D761f52D26FCD90bBa225344C',
230
+ idleAddress: '0xf3188697bd35df73e4293d04a07ebaaf1ffc4018',
231
+ address: '0x4c9edd5852cd905f086c759e8383e09bff1e68b3',
232
+ decimals: 18,
233
+ idleSymbol: 'AA_sUSDe',
234
+ tokenType: 'AA',
235
+ },
236
+ {
237
+ blockNumber: 0,
238
+ idleDecimals: 18,
239
+ cdoAddress: '0x1EB1b47D0d8BCD9D761f52D26FCD90bBa225344C',
240
+ idleAddress: '0xb8d0be502a8f12cc5213733285b430a43d07349d',
241
+ address: '0x4c9edd5852cd905f086c759e8383e09bff1e68b3',
242
+ decimals: 18,
243
+ idleSymbol: 'BB_sUSDe',
244
+ tokenType: 'BB',
245
+ },
246
+ {
247
+ blockNumber: 0,
248
+ idleDecimals: 18,
249
+ cdoAddress: '0xbc48967C34d129a2ef25DD4dc693Cc7364d02eb9',
250
+ idleAddress: '0x0f09a04ad551dd941b589625bd2360fc962ff9f7',
251
+ address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
252
+ decimals: 18,
253
+ idleSymbol: 'AA_dWETHV3',
254
+ tokenType: 'AA',
255
+ },
256
+ {
257
+ blockNumber: 0,
258
+ idleDecimals: 18,
259
+ cdoAddress: '0xbc48967C34d129a2ef25DD4dc693Cc7364d02eb9',
260
+ idleAddress: '0x1223ddeee77f8f379ea7a49e7650ff1ec1e2de8a',
261
+ address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
262
+ decimals: 18,
263
+ idleSymbol: 'BB_dWETHV3',
264
+ tokenType: 'BB',
265
+ },
266
+ {
267
+ blockNumber: 0,
268
+ idleDecimals: 18,
269
+ cdoAddress: '0xdd4D030A4337CE492B55bc5169F6A9568242C0Bc',
270
+ idleAddress: '0x450c055a00226f1eba09e8d9627034565b7c4c8a',
271
+ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
272
+ decimals: 6,
273
+ idleSymbol: 'AA_dUSDCV3',
274
+ tokenType: 'AA',
275
+ },
276
+ {
277
+ blockNumber: 0,
278
+ idleDecimals: 18,
279
+ cdoAddress: '0xdd4D030A4337CE492B55bc5169F6A9568242C0Bc',
280
+ idleAddress: '0x2a84a042db06222c486bcb815e961f26599d0df6',
281
+ address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',
282
+ decimals: 6,
283
+ idleSymbol: 'BB_dUSDCV3',
284
+ tokenType: 'BB',
285
+ },
286
+ ],
287
+ };
@@ -6,13 +6,18 @@ import { IDexHelper } from '../../dex-helper';
6
6
  import CDO_ABI from '../../abi/idle-dao/idle-cdo.json';
7
7
  import { AbiItem } from 'web3-utils';
8
8
 
9
- const poolsByTokenAddress: { [address: string]: IdleToken[] } = {};
9
+ const poolsByTokenAddress: {
10
+ [network: number]: { [address: string]: IdleToken[] };
11
+ } = {};
10
12
 
11
13
  const TokensByAddress: { [network: number]: { [address: string]: IdleToken } } =
12
14
  {};
13
15
 
14
- export const getPoolsByTokenAddress = (address: string): IdleToken[] => {
15
- return poolsByTokenAddress[address] || [];
16
+ export const getPoolsByTokenAddress = (
17
+ network: number,
18
+ address: string,
19
+ ): IdleToken[] => {
20
+ return poolsByTokenAddress[network]?.[address] || [];
16
21
  };
17
22
 
18
23
  // return null if the pair does not exists otherwise return the idleToken
@@ -70,8 +75,12 @@ export function setTokensOnNetwork(
70
75
  TokensByAddress[network] = {};
71
76
  }
72
77
 
73
- if (poolsByTokenAddress[token.address] === undefined) {
74
- poolsByTokenAddress[token.address] = [];
78
+ if (poolsByTokenAddress[network] === undefined) {
79
+ poolsByTokenAddress[network] = {};
80
+ }
81
+
82
+ if (poolsByTokenAddress[network][token.address] === undefined) {
83
+ poolsByTokenAddress[network][token.address] = [];
75
84
  }
76
85
 
77
86
  const tokenWithContract: IdleToken = {
@@ -83,7 +92,7 @@ export function setTokensOnNetwork(
83
92
  };
84
93
  TokensByAddress[network][token.idleAddress] = tokenWithContract;
85
94
  TokensByAddress[network][token.address] = tokenWithContract;
86
- poolsByTokenAddress[token.address].push(token);
95
+ poolsByTokenAddress[network][token.address].push(token);
87
96
  }
88
97
 
89
98
  return TokensByAddress[network];
@@ -1,4 +1,4 @@
1
- import { endpoints, TOKEN_LISTS } from './config';
1
+ import { endpoints } from './config';
2
2
  import { BytesLike } from 'ethers';
3
3
  import BigNumber from 'bignumber.js';
4
4
  import { Interface } from '@ethersproject/abi';
@@ -12,15 +12,16 @@ import { IdleToken, TrancheToken } from './types';
12
12
  import axios from 'axios';
13
13
  import { Network } from '../../constants';
14
14
  import { IDexHelper } from '../../dex-helper';
15
+ import { TOKEN_LISTS } from './token_list';
15
16
 
16
17
  export const BNify = (s: any): BigNumber =>
17
18
  new BigNumber(typeof s === 'object' ? s : String(s));
18
19
 
19
20
  async function _getIdleTokenSymbols(
20
- blockNumber: number,
21
21
  idleTokens: string[],
22
22
  erc20Interface: Interface,
23
23
  multiWrapper: MultiWrapper,
24
+ blockNumber?: number,
24
25
  ): Promise<any> {
25
26
  let calls: MultiCallParams<any>[] = [];
26
27
 
@@ -47,10 +48,10 @@ async function _getIdleTokenSymbols(
47
48
  }
48
49
 
49
50
  async function _getIdleTokenDecimals(
50
- blockNumber: number,
51
51
  underlyingTokens: string[],
52
52
  erc20Interface: Interface,
53
53
  multiWrapper: MultiWrapper,
54
+ blockNumber?: number,
54
55
  ): Promise<any> {
55
56
  let calls: MultiCallParams<any>[] = [];
56
57
 
@@ -96,17 +97,17 @@ const getDataWithAuth = async (
96
97
  export const fetchTokenList_api = async (
97
98
  network: Network,
98
99
  dexHelper: IDexHelper,
99
- blockNumber: number,
100
100
  cdoInterface: Interface,
101
101
  erc20Interface: Interface,
102
102
  multiWrapper: MultiWrapper,
103
103
  token: string,
104
+ blockNumber?: number,
104
105
  ): Promise<IdleToken[]> => {
105
106
  const data = await getDataWithAuth(endpoints[network], token);
106
107
 
107
108
  // Fetch tokenslist from static file
108
109
  if (!data) {
109
- return TOKEN_LISTS;
110
+ return TOKEN_LISTS[network];
110
111
  }
111
112
 
112
113
  const deployedContract = data
@@ -179,19 +180,19 @@ export const fetchTokenList_api = async (
179
180
  );
180
181
 
181
182
  const idleTokenSymbolsList = await _getIdleTokenSymbols(
182
- blockNumber,
183
183
  results
184
184
  .filter(result => !!result.tokenType)
185
185
  .map(result => result.idleAddress),
186
186
  erc20Interface,
187
187
  multiWrapper,
188
+ blockNumber,
188
189
  );
189
190
 
190
191
  const idleTokenDecimals = await _getIdleTokenDecimals(
191
- blockNumber,
192
192
  results.filter(result => !result.tokenType).map(result => result.address),
193
193
  erc20Interface,
194
194
  multiWrapper,
195
+ blockNumber,
195
196
  );
196
197
 
197
198
  const output: IdleToken[] = [];
package/src/dex/index.ts CHANGED
@@ -87,6 +87,7 @@ import { PharaohV1 } from './solidly/forks-override/pharaohV1';
87
87
  import { EtherFi } from './etherfi';
88
88
  import { Spark } from './spark/spark';
89
89
  import { VelodromeSlipstream } from './uniswap-v3/forks/velodrome-slipstream/velodrome-slipstream';
90
+ import { AaveV3Stata } from './aave-v3-stata/aave-v3-stata';
90
91
 
91
92
  const LegacyDexes = [
92
93
  CurveV2,
@@ -170,6 +171,7 @@ const Dexes = [
170
171
  Swell,
171
172
  PharaohV1,
172
173
  Spark,
174
+ AaveV3Stata,
173
175
  ];
174
176
 
175
177
  export type LegacyDexConstructor = new (dexHelper: IDexHelper) => IDexTxBuilder<
@@ -170,6 +170,8 @@ export class PancakeswapV3
170
170
  );
171
171
  };
172
172
 
173
+ void cleanExpiredNotExistingPoolsKeys();
174
+
173
175
  this.intervalTask = setInterval(
174
176
  cleanExpiredNotExistingPoolsKeys.bind(this),
175
177
  PANCAKESWAPV3_CLEAN_NOT_EXISTING_POOL_INTERVAL_MS,
@@ -166,6 +166,8 @@ export class SolidlyV3
166
166
  );
167
167
  };
168
168
 
169
+ void cleanExpiredNotExistingPoolsKeys();
170
+
169
171
  this.intervalTask = setInterval(
170
172
  cleanExpiredNotExistingPoolsKeys.bind(this),
171
173
  UNISWAPV3_CLEAN_NOT_EXISTING_POOL_INTERVAL_MS,
@@ -81,6 +81,8 @@ export class VelodromeSlipstream extends UniswapV3 {
81
81
  );
82
82
  };
83
83
 
84
+ void cleanExpiredNotExistingPoolsKeys();
85
+
84
86
  this.intervalTask = setInterval(
85
87
  cleanExpiredNotExistingPoolsKeys.bind(this),
86
88
  UNISWAPV3_CLEAN_NOT_EXISTING_POOL_INTERVAL_MS,
@@ -210,6 +210,8 @@ export class UniswapV3
210
210
  );
211
211
  };
212
212
 
213
+ void cleanExpiredNotExistingPoolsKeys();
214
+
213
215
  this.intervalTask = setInterval(
214
216
  cleanExpiredNotExistingPoolsKeys.bind(this),
215
217
  UNISWAPV3_CLEAN_NOT_EXISTING_POOL_INTERVAL_MS,
@@ -491,6 +491,14 @@ export const Tokens: {
491
491
  address: '0xcd5fe23c85820f7b72d0926fc9b05b43e359b7ee',
492
492
  decimals: 18,
493
493
  },
494
+ stataUSDT: {
495
+ address: '0x862c57d48becb45583aeba3f489696d22466ca1b',
496
+ decimals: 6,
497
+ },
498
+ aaveUSDT: {
499
+ address: '0x23878914efe38d27c4d67ab83ed1b93a74d4086a',
500
+ decimals: 6,
501
+ },
494
502
  },
495
503
  [Network.POLYGON]: {
496
504
  jGBP: {
@@ -501,6 +509,7 @@ export const Tokens: {
501
509
  address: '0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063',
502
510
  decimals: 18,
503
511
  },
512
+ // native bridged wormhole
504
513
  USDCe: {
505
514
  address: '0x2791bca1f2de4661ed88a30c99a7a9449aa84174',
506
515
  decimals: 6,
@@ -511,10 +520,24 @@ export const Tokens: {
511
520
  address: '0xdf7837de1f2fa4631d716cf2502f8b230f1dcc32',
512
521
  decimals: 2,
513
522
  },
523
+ // wormhole
514
524
  USDC: {
515
525
  address: '0x576Cf361711cd940CD9C397BB98C4C896cBd38De',
516
526
  decimals: 6,
517
527
  },
528
+ // circle issued usdc
529
+ USDCn: {
530
+ address: '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359',
531
+ decimals: 6,
532
+ },
533
+ stataUSDCn: {
534
+ address: '0x2dCa80061632f3F87c9cA28364d1d0c30cD79a19',
535
+ decimals: 6,
536
+ },
537
+ aaveUSDCn: {
538
+ address: '0xa4d94019934d8333ef880abffbf2fdd611c762bd',
539
+ decimals: 6,
540
+ },
518
541
  POPS: {
519
542
  address: '0xa92A1576D11dB45c53be71d59245ac97ce0d8147',
520
543
  decimals: 18,
@@ -884,6 +907,14 @@ export const Tokens: {
884
907
  address: '0x0022228a2cc5E7eF0274A7Baa600d44da5aB5776',
885
908
  decimals: 18,
886
909
  },
910
+ stataUSDT: {
911
+ address: '0x0471d185cc7be61e154277cab2396cd397663da6',
912
+ decimals: 18,
913
+ },
914
+ aaveUSDT: {
915
+ address: '0xa9251ca9de909cb71783723713b21e4233fbf1b1',
916
+ decimals: 18,
917
+ },
887
918
  },
888
919
  [Network.AVALANCHE]: {
889
920
  LINKe: {
@@ -1047,6 +1078,14 @@ export const Tokens: {
1047
1078
  address: '0x027dbcA046ca156De9622cD1e2D907d375e53aa7',
1048
1079
  decimals: 9,
1049
1080
  },
1081
+ stataUSDT: {
1082
+ address: '0x5525ee69bc1e354b356864187de486fab5ad67d7',
1083
+ decimals: 6,
1084
+ },
1085
+ aaveUSDT: {
1086
+ address: '0x6ab707aca953edaefbc4fd23ba73294241490620',
1087
+ decimals: 6,
1088
+ },
1050
1089
  },
1051
1090
  [Network.ARBITRUM]: {
1052
1091
  SEN: {
@@ -1193,6 +1232,14 @@ export const Tokens: {
1193
1232
  address: '0x0c880f6761f1af8d9aa9c466984b80dab9a8c9e8',
1194
1233
  decimals: 18,
1195
1234
  },
1235
+ stataUSDT: {
1236
+ address: '0xb165a74407fe1e519d6bcbdec1ed3202b35a4140',
1237
+ decimals: 6,
1238
+ },
1239
+ aaveUSDT: {
1240
+ address: '0x6ab707aca953edaefbc4fd23ba73294241490620',
1241
+ decimals: 6,
1242
+ },
1196
1243
  },
1197
1244
  [Network.OPTIMISM]: {
1198
1245
  DAI: {
@@ -1294,6 +1341,14 @@ export const Tokens: {
1294
1341
  address: '0x6806411765Af15Bddd26f8f544A34cC40cb9838B',
1295
1342
  decimals: 18,
1296
1343
  },
1344
+ stataUSDT: {
1345
+ address: '0x035c93db04e5aaea54e6cd0261c492a3e0638b37',
1346
+ decimals: 6,
1347
+ },
1348
+ aaveUSDT: {
1349
+ address: '0x6ab707aca953edaefbc4fd23ba73294241490620',
1350
+ decimals: 6,
1351
+ },
1297
1352
  },
1298
1353
  [Network.ZKEVM]: {
1299
1354
  ETH: {
@@ -1398,6 +1453,14 @@ export const Tokens: {
1398
1453
  address: '0x940181a94A35A4569E4529A3CDfB74e38FD98631',
1399
1454
  decimals: 18,
1400
1455
  },
1456
+ stataUSDC: {
1457
+ address: '0x4ea71a20e655794051d1ee8b6e4a3269b13ccacc',
1458
+ decimals: 6,
1459
+ },
1460
+ aaveUSDC: {
1461
+ address: '0x4e65fe4dba92790696d040ac24aa414708f5c0ab',
1462
+ decimals: 6,
1463
+ },
1401
1464
  },
1402
1465
  };
1403
1466
 
@@ -1503,6 +1566,8 @@ export const Holders: {
1503
1566
  BNT: '0xf727e20e081aAE428E7c6bE07b156bB21ab587a7',
1504
1567
  USDe: '0x74e6c48e667d698a4cf90665b6960a5bae39e603',
1505
1568
  eETH: '0x0f1DfeF1a40557d279d0de6E49aB306891A638b8',
1569
+ stataUSDT: '0x6803364AceD5181877abC11E865FB27cB654a426',
1570
+ aaveUSDT: '0x32c98a981Fe7C333Bd4e8E7630E8e0CF5ce20987',
1506
1571
  weETH: '0x267ed5f71EE47D3E45Bb1569Aa37889a2d10f91e',
1507
1572
  },
1508
1573
  [Network.POLYGON]: {
@@ -1544,8 +1609,11 @@ export const Holders: {
1544
1609
  stEUR: '0xA9DdD91249DFdd450E81E1c56Ab60E1A62651701',
1545
1610
  USDA: '0x741383AbD73891b40822A069f14d6fc5b5685020',
1546
1611
  stUSD: '0xA9DdD91249DFdd450E81E1c56Ab60E1A62651701',
1612
+ stataUSDCn: '0xFAB1420c84fF5E058B8AD12604D24247e268f362',
1613
+ aaveUSDCn: '0xEBA9C3C1B41A846431F970aCA5Eee10f55969B76',
1547
1614
  crvUSD: '0xB498de532C68dc3cd93D54187E082E5D789a9e47',
1548
1615
  USDCe: '0xA67EFB69A4f58F568aAB1b9d51110102985835b0',
1616
+ USDCn: '0x4B6f17856215eab57c29ebfA18B0a0F74A3627bb',
1549
1617
  },
1550
1618
  [Network.FANTOM]: {
1551
1619
  DAI: '0x370f4b2dcf75c94d8d4450b493661a9c6170d0b5',
@@ -1598,6 +1666,8 @@ export const Holders: {
1598
1666
  EURA: '0x4A5362ef534FFB27510E4E4C9A215BB5436377C2',
1599
1667
  USDA: '0x230c1f68aBE6033Cba3Fe0D2C0D7097e9923C3bC',
1600
1668
  stUSD: '0x0022228a2cc5E7eF0274A7Baa600d44da5aB5776',
1669
+ stataUSDT: '', // no holders yet
1670
+ aaveUSDT: '0x5DE3c5BE52D7aDbdC3aEFe2eA061A2ECE0C7d766',
1601
1671
  },
1602
1672
  [Network.AVALANCHE]: {
1603
1673
  LINKe: '0x9efa0A617C0552F1558c95993aA8b8A68b3e709C',
@@ -1634,6 +1704,8 @@ export const Holders: {
1634
1704
  BTCb: '0x2446bEb3905CfFbd2c5eB18F1f9c2996B05257c4',
1635
1705
  AMPL: '0xfcaA5ea7F8eb0631BcA72C345025C0A5a6D93f0E',
1636
1706
  PHAR: '0x654296D56532f62B7d91d335791d3c364a9385b5',
1707
+ stataUSDT: '', // no holders yet
1708
+ aaveUSDT: '0xB2d3ad6e99D2A043EF77e3812461Ad2D4Ae3da8B',
1637
1709
  },
1638
1710
  [Network.ARBITRUM]: {
1639
1711
  SEN: '0x76d39045d856caf9bfae12ba611ca4a94449a4f1',
@@ -1670,6 +1742,8 @@ export const Holders: {
1670
1742
  stEUR: '0xE588611e7A2392507879E3be80531654b85C16aA',
1671
1743
  USDA: '0xa86ff337db9107b54862d30d1a598f8be847b05e',
1672
1744
  stUSD: '0xa9ddd91249dfdd450e81e1c56ab60e1a62651701',
1745
+ stataUSDT: '0x403D37c861fb54b8F37a3A1870aBce335954840B',
1746
+ aaveUSDT: '0xAfa788fab589fe61C23DF76905558f4734444D67',
1673
1747
  crvUSD: '0x9755e99bdb99495d3d31d953785d993c6df8552e',
1674
1748
  },
1675
1749
  [Network.OPTIMISM]: {
@@ -1697,6 +1771,8 @@ export const Holders: {
1697
1771
  crvUSD: '0x528e7aF33043Da06ca3DD407626a71DbBD3173D6',
1698
1772
  LUSD: '0xf0a9abb11958a071e168f2ee5bcbacf1abbde9cf',
1699
1773
  GRAI: '0x92b051204816DC4fbA7AC1A68a2cf319A9a387CB',
1774
+ stataUSDT: '0xd55263b84685Ced7e10a77607C7fFD763D495B6e',
1775
+ aaveUSDT: '0x1Fd458C52fEb7Bb35097ebd9566DB6C269341FDD',
1700
1776
  tBTC: '0xf7b4531e52211CC44379102F719cad29411dB053',
1701
1777
  PSTAKE: '0xc45398444B83183b2018e0224B3D332b42D492Af',
1702
1778
  },
@@ -1726,6 +1802,8 @@ export const Holders: {
1726
1802
  AERO: '0x807877258b55bfefabdd469da1c72731c5070839',
1727
1803
  tBTC: '0x9f1920d0cbb63ed03376a1e09fd2851d601234c8',
1728
1804
  DOG: '0xbe3ab8a87730684ef1e476064c2e43c3e982f8e8',
1805
+ stataUSDC: '0x88Cac91ADDE2208039A227B373C2A692C0700547',
1806
+ aaveUSDC: '0x5DE3c5BE52D7aDbdC3aEFe2eA061A2ECE0C7d766',
1729
1807
  USDM: '0x492EC4591c55962C5739A8dC98F0B401897Db038',
1730
1808
  crvUSD: '0xBbAbDB1385deA5285113581A7024d6DC04131101',
1731
1809
  cbETH: '0x50e011dD1e2b4906F1534623cD134B30422bb11E',