@defisaver/positions-sdk 2.1.42 → 2.1.43-dev-stats-test-dev

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 (114) hide show
  1. package/.mocharc.json +4 -4
  2. package/.nvmrc +1 -1
  3. package/README.md +64 -64
  4. package/cjs/aaveV3/index.js +13 -0
  5. package/cjs/aaveV3/merit.js +1 -0
  6. package/cjs/aaveV3/merkl.js +1 -0
  7. package/cjs/helpers/morphoBlueHelpers/index.js +66 -66
  8. package/cjs/savings/morphoVaults/index.js +17 -17
  9. package/esm/aaveV3/index.js +13 -0
  10. package/esm/aaveV3/merit.js +1 -0
  11. package/esm/aaveV3/merkl.js +1 -0
  12. package/esm/helpers/morphoBlueHelpers/index.js +66 -66
  13. package/esm/savings/morphoVaults/index.js +17 -17
  14. package/package.json +48 -48
  15. package/src/aaveV2/index.ts +240 -240
  16. package/src/aaveV3/index.ts +634 -625
  17. package/src/aaveV3/merit.ts +98 -97
  18. package/src/aaveV3/merkl.ts +75 -74
  19. package/src/claiming/aaveV3.ts +154 -154
  20. package/src/claiming/compV3.ts +22 -22
  21. package/src/claiming/ethena.ts +61 -61
  22. package/src/claiming/index.ts +12 -12
  23. package/src/claiming/king.ts +66 -66
  24. package/src/claiming/morphoBlue.ts +118 -118
  25. package/src/claiming/spark.ts +225 -225
  26. package/src/compoundV2/index.ts +244 -244
  27. package/src/compoundV3/index.ts +274 -274
  28. package/src/config/contracts.ts +1295 -1295
  29. package/src/constants/index.ts +10 -10
  30. package/src/contracts.ts +171 -171
  31. package/src/curveUsd/index.ts +254 -254
  32. package/src/eulerV2/index.ts +324 -324
  33. package/src/exchange/index.ts +25 -25
  34. package/src/fluid/index.ts +1800 -1800
  35. package/src/helpers/aaveHelpers/index.ts +187 -187
  36. package/src/helpers/compoundHelpers/index.ts +283 -283
  37. package/src/helpers/curveUsdHelpers/index.ts +40 -40
  38. package/src/helpers/eulerHelpers/index.ts +222 -222
  39. package/src/helpers/fluidHelpers/index.ts +326 -326
  40. package/src/helpers/index.ts +10 -10
  41. package/src/helpers/liquityV2Helpers/index.ts +82 -82
  42. package/src/helpers/llamaLendHelpers/index.ts +53 -53
  43. package/src/helpers/makerHelpers/index.ts +52 -52
  44. package/src/helpers/morphoBlueHelpers/index.ts +396 -396
  45. package/src/helpers/sparkHelpers/index.ts +158 -158
  46. package/src/index.ts +49 -49
  47. package/src/liquity/index.ts +159 -159
  48. package/src/liquityV2/index.ts +703 -703
  49. package/src/llamaLend/index.ts +305 -305
  50. package/src/maker/index.ts +223 -223
  51. package/src/markets/aave/index.ts +118 -118
  52. package/src/markets/aave/marketAssets.ts +54 -54
  53. package/src/markets/compound/index.ts +243 -243
  54. package/src/markets/compound/marketsAssets.ts +97 -97
  55. package/src/markets/curveUsd/index.ts +69 -69
  56. package/src/markets/euler/index.ts +26 -26
  57. package/src/markets/fluid/index.ts +2900 -2900
  58. package/src/markets/index.ts +25 -25
  59. package/src/markets/liquityV2/index.ts +102 -102
  60. package/src/markets/llamaLend/contractAddresses.ts +141 -141
  61. package/src/markets/llamaLend/index.ts +235 -235
  62. package/src/markets/morphoBlue/index.ts +971 -971
  63. package/src/markets/spark/index.ts +29 -29
  64. package/src/markets/spark/marketAssets.ts +12 -12
  65. package/src/moneymarket/moneymarketCommonService.ts +85 -85
  66. package/src/morphoBlue/index.ts +274 -274
  67. package/src/portfolio/index.ts +598 -598
  68. package/src/savings/index.ts +95 -95
  69. package/src/savings/makerDsr/index.ts +53 -53
  70. package/src/savings/makerDsr/options.ts +9 -9
  71. package/src/savings/morphoVaults/index.ts +80 -80
  72. package/src/savings/morphoVaults/options.ts +193 -193
  73. package/src/savings/skyOptions/index.ts +95 -95
  74. package/src/savings/skyOptions/options.ts +10 -10
  75. package/src/savings/sparkSavingsVaults/index.ts +60 -60
  76. package/src/savings/sparkSavingsVaults/options.ts +35 -35
  77. package/src/savings/yearnV3Vaults/index.ts +61 -61
  78. package/src/savings/yearnV3Vaults/options.ts +55 -55
  79. package/src/savings/yearnVaults/index.ts +73 -73
  80. package/src/savings/yearnVaults/options.ts +32 -32
  81. package/src/services/priceService.ts +278 -278
  82. package/src/services/utils.ts +115 -115
  83. package/src/services/viem.ts +34 -34
  84. package/src/setup.ts +8 -8
  85. package/src/spark/index.ts +458 -458
  86. package/src/staking/eligibility.ts +53 -53
  87. package/src/staking/index.ts +1 -1
  88. package/src/staking/staking.ts +186 -186
  89. package/src/types/aave.ts +196 -196
  90. package/src/types/claiming.ts +114 -114
  91. package/src/types/common.ts +107 -107
  92. package/src/types/compound.ts +144 -144
  93. package/src/types/curveUsd.ts +123 -123
  94. package/src/types/euler.ts +175 -175
  95. package/src/types/fluid.ts +483 -483
  96. package/src/types/index.ts +14 -14
  97. package/src/types/liquity.ts +30 -30
  98. package/src/types/liquityV2.ts +126 -126
  99. package/src/types/llamaLend.ts +159 -159
  100. package/src/types/maker.ts +63 -63
  101. package/src/types/merit.ts +1 -1
  102. package/src/types/merkl.ts +70 -70
  103. package/src/types/morphoBlue.ts +200 -200
  104. package/src/types/portfolio.ts +60 -60
  105. package/src/types/savings/index.ts +23 -23
  106. package/src/types/savings/makerDsr.ts +13 -13
  107. package/src/types/savings/morphoVaults.ts +32 -32
  108. package/src/types/savings/sky.ts +14 -14
  109. package/src/types/savings/sparkSavingsVaults.ts +15 -15
  110. package/src/types/savings/yearnV3Vaults.ts +17 -17
  111. package/src/types/savings/yearnVaults.ts +14 -14
  112. package/src/types/spark.ts +134 -134
  113. package/src/umbrella/index.ts +69 -69
  114. package/src/umbrella/umbrellaUtils.ts +29 -29
@@ -1,244 +1,244 @@
1
- import { ZERO_ADDRESS } from '../../constants';
2
- import { getConfigContractAddress } from '../../contracts';
3
- import {
4
- CompoundBulkerOptions,
5
- CompoundMarketData,
6
- CompoundVersions,
7
- CompoundVersionType,
8
- } from '../../types';
9
- import { NetworkNumber } from '../../types/common';
10
- import {
11
- compoundV2CollateralAssets,
12
- v3ETHCollAssets,
13
- v3USDbCCollAssets,
14
- v3USDCCollAssets,
15
- v3USDCeCollAssets,
16
- v3USDSCollAssets,
17
- v3USDTCollAssets,
18
- v3wstETHCollAssets,
19
- } from './marketsAssets';
20
-
21
- export {
22
- compoundV2CollateralAssets,
23
- v3ETHCollAssets,
24
- v3USDbCCollAssets,
25
- v3USDCCollAssets,
26
- v3USDCeCollAssets,
27
- v3USDTCollAssets,
28
- };
29
-
30
- const EMPTY_BULKER_OPTIONS: CompoundBulkerOptions = { supply: '', withdraw: '' };
31
-
32
- const STANDARD_BULKER_OPTIONS: CompoundBulkerOptions = {
33
- supply: '0x414354494f4e5f535550504c595f4e41544956455f544f4b454e000000000000',
34
- withdraw: '0x414354494f4e5f57495448445241575f4e41544956455f544f4b454e00000000',
35
- };
36
-
37
- const BULKER_OPTIONS: Record<NetworkNumber, Record<CompoundVersions, CompoundBulkerOptions>> = {
38
- [NetworkNumber.Eth]: {
39
- [CompoundVersions.CompoundV3USDC]: { supply: 2, withdraw: 5 },
40
- [CompoundVersions.CompoundV3ETH]: STANDARD_BULKER_OPTIONS,
41
- [CompoundVersions.CompoundV3USDT]: STANDARD_BULKER_OPTIONS,
42
- [CompoundVersions.CompoundV3wstETH]: STANDARD_BULKER_OPTIONS,
43
- [CompoundVersions.CompoundV3USDS]: STANDARD_BULKER_OPTIONS,
44
-
45
- // Non-existing markets, keeping it because of typescript
46
- [CompoundVersions.CompoundV2]: EMPTY_BULKER_OPTIONS,
47
- [CompoundVersions.CompoundV3USDCe]: EMPTY_BULKER_OPTIONS,
48
- [CompoundVersions.CompoundV3USDbC]: EMPTY_BULKER_OPTIONS,
49
- },
50
- [NetworkNumber.Arb]: {
51
- [CompoundVersions.CompoundV3USDC]: STANDARD_BULKER_OPTIONS,
52
- [CompoundVersions.CompoundV3USDCe]: STANDARD_BULKER_OPTIONS,
53
- [CompoundVersions.CompoundV3ETH]: STANDARD_BULKER_OPTIONS,
54
- [CompoundVersions.CompoundV3USDT]: STANDARD_BULKER_OPTIONS,
55
-
56
- // Non-existing markets, keeping it because of typescript
57
- [CompoundVersions.CompoundV2]: EMPTY_BULKER_OPTIONS,
58
- [CompoundVersions.CompoundV3USDbC]: EMPTY_BULKER_OPTIONS,
59
- [CompoundVersions.CompoundV3wstETH]: EMPTY_BULKER_OPTIONS,
60
- [CompoundVersions.CompoundV3USDS]: EMPTY_BULKER_OPTIONS,
61
- },
62
- [NetworkNumber.Base]: {
63
- [CompoundVersions.CompoundV3ETH]: STANDARD_BULKER_OPTIONS,
64
- [CompoundVersions.CompoundV3USDbC]: STANDARD_BULKER_OPTIONS,
65
- [CompoundVersions.CompoundV3USDC]: STANDARD_BULKER_OPTIONS,
66
- [CompoundVersions.CompoundV3USDS]: STANDARD_BULKER_OPTIONS,
67
-
68
- // Non-existing markets, keeping it because of typescript
69
- [CompoundVersions.CompoundV2]: EMPTY_BULKER_OPTIONS,
70
- [CompoundVersions.CompoundV3USDCe]: EMPTY_BULKER_OPTIONS,
71
- [CompoundVersions.CompoundV3USDT]: EMPTY_BULKER_OPTIONS,
72
- [CompoundVersions.CompoundV3wstETH]: EMPTY_BULKER_OPTIONS,
73
- },
74
- [NetworkNumber.Opt]: {
75
- [CompoundVersions.CompoundV3USDC]: STANDARD_BULKER_OPTIONS,
76
- [CompoundVersions.CompoundV3USDT]: STANDARD_BULKER_OPTIONS,
77
- // Non-existing markets, keeping it because of typescript
78
- [CompoundVersions.CompoundV3ETH]: EMPTY_BULKER_OPTIONS,
79
- [CompoundVersions.CompoundV3USDbC]: EMPTY_BULKER_OPTIONS,
80
- [CompoundVersions.CompoundV2]: EMPTY_BULKER_OPTIONS,
81
- [CompoundVersions.CompoundV3USDCe]: EMPTY_BULKER_OPTIONS,
82
- [CompoundVersions.CompoundV3wstETH]: EMPTY_BULKER_OPTIONS,
83
- [CompoundVersions.CompoundV3USDS]: EMPTY_BULKER_OPTIONS,
84
- },
85
- [NetworkNumber.Linea]: {
86
- // Non-existing markets, keeping it because of typescript
87
- [CompoundVersions.CompoundV3USDC]: EMPTY_BULKER_OPTIONS,
88
- [CompoundVersions.CompoundV3USDT]: EMPTY_BULKER_OPTIONS,
89
- [CompoundVersions.CompoundV3ETH]: EMPTY_BULKER_OPTIONS,
90
- [CompoundVersions.CompoundV3USDbC]: EMPTY_BULKER_OPTIONS,
91
- [CompoundVersions.CompoundV2]: EMPTY_BULKER_OPTIONS,
92
- [CompoundVersions.CompoundV3USDCe]: EMPTY_BULKER_OPTIONS,
93
- [CompoundVersions.CompoundV3wstETH]: EMPTY_BULKER_OPTIONS,
94
- [CompoundVersions.CompoundV3USDS]: EMPTY_BULKER_OPTIONS,
95
- },
96
- [NetworkNumber.Plasma]: {
97
- // Non-existing markets, keeping it because of typescript
98
- [CompoundVersions.CompoundV3USDC]: EMPTY_BULKER_OPTIONS,
99
- [CompoundVersions.CompoundV3USDT]: EMPTY_BULKER_OPTIONS,
100
- [CompoundVersions.CompoundV3ETH]: EMPTY_BULKER_OPTIONS,
101
- [CompoundVersions.CompoundV3USDbC]: EMPTY_BULKER_OPTIONS,
102
- [CompoundVersions.CompoundV2]: EMPTY_BULKER_OPTIONS,
103
- [CompoundVersions.CompoundV3USDCe]: EMPTY_BULKER_OPTIONS,
104
- [CompoundVersions.CompoundV3wstETH]: EMPTY_BULKER_OPTIONS,
105
- [CompoundVersions.CompoundV3USDS]: EMPTY_BULKER_OPTIONS,
106
- },
107
- };
108
-
109
- export const COMPOUND_V2: CompoundMarketData = {
110
- chainIds: [NetworkNumber.Eth],
111
- label: 'Compound V2',
112
- shortLabel: CompoundVersionType.V2,
113
- value: CompoundVersions.CompoundV2,
114
- baseAsset: '',
115
- collAssets: compoundV2CollateralAssets.map(a => a.underlyingAsset),
116
- baseMarket: '',
117
- baseMarketAddress: ZERO_ADDRESS,
118
- secondLabel: '',
119
- bulkerName: '',
120
- bulkerAddress: ZERO_ADDRESS,
121
- bulkerOptions: BULKER_OPTIONS[NetworkNumber.Eth][CompoundVersions.CompoundV2],
122
- // icon: SvgAdapter(protocolIcons.compound),
123
- };
124
-
125
- export const COMPOUND_V3_USDC = (networkId: NetworkNumber): CompoundMarketData => ({
126
- chainIds: [NetworkNumber.Eth, NetworkNumber.Arb, NetworkNumber.Base, NetworkNumber.Opt],
127
- label: 'Compound V3 - USDC',
128
- shortLabel: CompoundVersionType.V3,
129
- value: CompoundVersions.CompoundV3USDC,
130
- baseAsset: 'USDC',
131
- collAssets: networkId ? v3USDCCollAssets[networkId] : [],
132
- baseMarket: 'cUSDCv3',
133
- baseMarketAddress: getConfigContractAddress('cUSDCv3', networkId),
134
- secondLabel: 'Market',
135
- bulkerName: networkId === NetworkNumber.Eth ? 'CompV3BulkerMainnetUSDC' : 'CompV3BulkerL2',
136
- bulkerAddress: getConfigContractAddress(networkId === NetworkNumber.Eth ? 'CompV3BulkerMainnetUSDC' : 'CompV3BulkerL2', networkId),
137
- bulkerOptions: BULKER_OPTIONS[networkId][CompoundVersions.CompoundV3USDC],
138
- // icon: SvgAdapter(protocolIcons.compoundv3),
139
- });
140
-
141
- export const COMPOUND_V3_USDCe = (networkId: NetworkNumber): CompoundMarketData => ({
142
- chainIds: [NetworkNumber.Arb],
143
- label: 'Compound V3 - USDC.e',
144
- shortLabel: CompoundVersionType.V3,
145
- value: CompoundVersions.CompoundV3USDCe,
146
- baseAsset: 'USDC.e',
147
- collAssets: networkId ? v3USDCeCollAssets[networkId] : [],
148
- baseMarket: 'cUSDCev3',
149
- baseMarketAddress: getConfigContractAddress('cUSDCev3', networkId),
150
- secondLabel: 'Market',
151
- bulkerName: 'CompV3BulkerL2',
152
- bulkerAddress: getConfigContractAddress('CompV3BulkerL2', networkId),
153
- bulkerOptions: BULKER_OPTIONS[networkId][CompoundVersions.CompoundV3USDCe],
154
- // icon: SvgAdapter(protocolIcons.compoundv3),
155
- });
156
-
157
- export const COMPOUND_V3_ETH = (networkId: NetworkNumber): CompoundMarketData => ({
158
- chainIds: [NetworkNumber.Eth, NetworkNumber.Base, NetworkNumber.Arb, NetworkNumber.Opt],
159
- label: 'Compound V3 - ETH',
160
- shortLabel: CompoundVersionType.V3,
161
- value: CompoundVersions.CompoundV3ETH,
162
- baseAsset: 'ETH',
163
- collAssets: networkId ? v3ETHCollAssets[networkId] : [],
164
- baseMarket: 'cETHv3',
165
- baseMarketAddress: getConfigContractAddress('cETHv3', networkId),
166
- secondLabel: 'Market',
167
- bulkerName: networkId === NetworkNumber.Eth ? 'CompV3BulkerMainnetETH' : 'CompV3BulkerL2',
168
- bulkerAddress: getConfigContractAddress(networkId === NetworkNumber.Eth ? 'CompV3BulkerMainnetETH' : 'CompV3BulkerL2', networkId),
169
- bulkerOptions: BULKER_OPTIONS[networkId][CompoundVersions.CompoundV3ETH],
170
- // icon: SvgAdapter(protocolIcons.compoundv3),
171
- });
172
-
173
- export const COMPOUND_V3_USDBC = (networkId: NetworkNumber): CompoundMarketData => ({
174
- chainIds: [NetworkNumber.Base],
175
- label: 'Compound V3 - USDbC',
176
- shortLabel: CompoundVersionType.V3,
177
- value: CompoundVersions.CompoundV3USDbC,
178
- baseAsset: 'USDbC',
179
- collAssets: networkId ? v3USDbCCollAssets[networkId] : [],
180
- baseMarket: 'cUSDbCv3',
181
- baseMarketAddress: getConfigContractAddress('cUSDbCv3', networkId),
182
- secondLabel: 'Market',
183
- bulkerName: 'CompV3BulkerL2',
184
- bulkerAddress: getConfigContractAddress('CompV3BulkerL2', networkId),
185
- bulkerOptions: BULKER_OPTIONS[networkId][CompoundVersions.CompoundV3USDbC],
186
- // icon: SvgAdapter(protocolIcons.compoundv3),
187
- });
188
-
189
- export const COMPOUND_V3_USDT = (networkId: NetworkNumber): CompoundMarketData => ({
190
- chainIds: [NetworkNumber.Eth, NetworkNumber.Arb, NetworkNumber.Opt],
191
- label: 'Compound V3 - USDT',
192
- shortLabel: CompoundVersionType.V3,
193
- value: CompoundVersions.CompoundV3USDT,
194
- baseAsset: 'USDT',
195
- collAssets: networkId ? v3USDTCollAssets[networkId] : [],
196
- baseMarket: 'cUSDTv3',
197
- baseMarketAddress: getConfigContractAddress('cUSDTv3', networkId),
198
- secondLabel: 'Market',
199
- bulkerName: networkId === NetworkNumber.Eth ? 'CompV3BulkerMainnetETH' : 'CompV3BulkerL2',
200
- bulkerAddress: getConfigContractAddress(networkId === NetworkNumber.Eth ? 'CompV3BulkerMainnetETH' : 'CompV3BulkerL2', networkId),
201
- bulkerOptions: BULKER_OPTIONS[networkId][CompoundVersions.CompoundV3USDT],
202
- // icon: SvgAdapter(protocolIcons.compoundv3),
203
- });
204
-
205
- export const COMPOUND_V3_WSTETH = (networkId: NetworkNumber): CompoundMarketData => ({
206
- chainIds: [NetworkNumber.Eth],
207
- label: 'Compound V3 - wstETH',
208
- shortLabel: CompoundVersionType.V3,
209
- value: CompoundVersions.CompoundV3wstETH,
210
- baseAsset: 'wstETH',
211
- collAssets: networkId ? v3wstETHCollAssets[networkId] : [],
212
- baseMarket: 'cWstETHv3',
213
- baseMarketAddress: getConfigContractAddress('cWstETHv3', networkId),
214
- secondLabel: 'Market',
215
- bulkerName: networkId === NetworkNumber.Eth ? 'CompV3BulkerMainnetETH' : 'CompV3BulkerL2',
216
- bulkerAddress: getConfigContractAddress(networkId === NetworkNumber.Eth ? 'CompV3BulkerMainnetETH' : 'CompV3BulkerL2', networkId),
217
- bulkerOptions: BULKER_OPTIONS[networkId][CompoundVersions.CompoundV3wstETH],
218
- });
219
-
220
- export const COMPOUND_V3_USDS = (networkId: NetworkNumber): CompoundMarketData => ({
221
- chainIds: [NetworkNumber.Eth, NetworkNumber.Base],
222
- label: 'Compound V3 - USDS',
223
- shortLabel: CompoundVersionType.V3,
224
- value: CompoundVersions.CompoundV3USDS,
225
- baseAsset: 'USDS',
226
- collAssets: networkId ? v3USDSCollAssets[networkId] : [],
227
- baseMarket: 'cUSDSv3',
228
- baseMarketAddress: getConfigContractAddress('cUSDSv3', networkId),
229
- secondLabel: 'Market',
230
- bulkerName: networkId === NetworkNumber.Eth ? 'CompV3BulkerMainnetETH' : 'CompV3BulkerL2',
231
- bulkerAddress: getConfigContractAddress(networkId === NetworkNumber.Eth ? 'CompV3BulkerMainnetETH' : 'CompV3BulkerL2', networkId),
232
- bulkerOptions: BULKER_OPTIONS[networkId][CompoundVersions.CompoundV3USDS],
233
- });
234
-
235
- export const CompoundMarkets = (networkId: NetworkNumber) => ({
236
- [CompoundVersions.CompoundV2]: COMPOUND_V2,
237
- [CompoundVersions.CompoundV3ETH]: COMPOUND_V3_ETH(networkId),
238
- [CompoundVersions.CompoundV3USDC]: COMPOUND_V3_USDC(networkId),
239
- [CompoundVersions.CompoundV3USDbC]: COMPOUND_V3_USDBC(networkId),
240
- [CompoundVersions.CompoundV3USDCe]: COMPOUND_V3_USDCe(networkId),
241
- [CompoundVersions.CompoundV3USDT]: COMPOUND_V3_USDT(networkId),
242
- [CompoundVersions.CompoundV3wstETH]: COMPOUND_V3_WSTETH(networkId),
243
- [CompoundVersions.CompoundV3USDS]: COMPOUND_V3_USDS(networkId),
1
+ import { ZERO_ADDRESS } from '../../constants';
2
+ import { getConfigContractAddress } from '../../contracts';
3
+ import {
4
+ CompoundBulkerOptions,
5
+ CompoundMarketData,
6
+ CompoundVersions,
7
+ CompoundVersionType,
8
+ } from '../../types';
9
+ import { NetworkNumber } from '../../types/common';
10
+ import {
11
+ compoundV2CollateralAssets,
12
+ v3ETHCollAssets,
13
+ v3USDbCCollAssets,
14
+ v3USDCCollAssets,
15
+ v3USDCeCollAssets,
16
+ v3USDSCollAssets,
17
+ v3USDTCollAssets,
18
+ v3wstETHCollAssets,
19
+ } from './marketsAssets';
20
+
21
+ export {
22
+ compoundV2CollateralAssets,
23
+ v3ETHCollAssets,
24
+ v3USDbCCollAssets,
25
+ v3USDCCollAssets,
26
+ v3USDCeCollAssets,
27
+ v3USDTCollAssets,
28
+ };
29
+
30
+ const EMPTY_BULKER_OPTIONS: CompoundBulkerOptions = { supply: '', withdraw: '' };
31
+
32
+ const STANDARD_BULKER_OPTIONS: CompoundBulkerOptions = {
33
+ supply: '0x414354494f4e5f535550504c595f4e41544956455f544f4b454e000000000000',
34
+ withdraw: '0x414354494f4e5f57495448445241575f4e41544956455f544f4b454e00000000',
35
+ };
36
+
37
+ const BULKER_OPTIONS: Record<NetworkNumber, Record<CompoundVersions, CompoundBulkerOptions>> = {
38
+ [NetworkNumber.Eth]: {
39
+ [CompoundVersions.CompoundV3USDC]: { supply: 2, withdraw: 5 },
40
+ [CompoundVersions.CompoundV3ETH]: STANDARD_BULKER_OPTIONS,
41
+ [CompoundVersions.CompoundV3USDT]: STANDARD_BULKER_OPTIONS,
42
+ [CompoundVersions.CompoundV3wstETH]: STANDARD_BULKER_OPTIONS,
43
+ [CompoundVersions.CompoundV3USDS]: STANDARD_BULKER_OPTIONS,
44
+
45
+ // Non-existing markets, keeping it because of typescript
46
+ [CompoundVersions.CompoundV2]: EMPTY_BULKER_OPTIONS,
47
+ [CompoundVersions.CompoundV3USDCe]: EMPTY_BULKER_OPTIONS,
48
+ [CompoundVersions.CompoundV3USDbC]: EMPTY_BULKER_OPTIONS,
49
+ },
50
+ [NetworkNumber.Arb]: {
51
+ [CompoundVersions.CompoundV3USDC]: STANDARD_BULKER_OPTIONS,
52
+ [CompoundVersions.CompoundV3USDCe]: STANDARD_BULKER_OPTIONS,
53
+ [CompoundVersions.CompoundV3ETH]: STANDARD_BULKER_OPTIONS,
54
+ [CompoundVersions.CompoundV3USDT]: STANDARD_BULKER_OPTIONS,
55
+
56
+ // Non-existing markets, keeping it because of typescript
57
+ [CompoundVersions.CompoundV2]: EMPTY_BULKER_OPTIONS,
58
+ [CompoundVersions.CompoundV3USDbC]: EMPTY_BULKER_OPTIONS,
59
+ [CompoundVersions.CompoundV3wstETH]: EMPTY_BULKER_OPTIONS,
60
+ [CompoundVersions.CompoundV3USDS]: EMPTY_BULKER_OPTIONS,
61
+ },
62
+ [NetworkNumber.Base]: {
63
+ [CompoundVersions.CompoundV3ETH]: STANDARD_BULKER_OPTIONS,
64
+ [CompoundVersions.CompoundV3USDbC]: STANDARD_BULKER_OPTIONS,
65
+ [CompoundVersions.CompoundV3USDC]: STANDARD_BULKER_OPTIONS,
66
+ [CompoundVersions.CompoundV3USDS]: STANDARD_BULKER_OPTIONS,
67
+
68
+ // Non-existing markets, keeping it because of typescript
69
+ [CompoundVersions.CompoundV2]: EMPTY_BULKER_OPTIONS,
70
+ [CompoundVersions.CompoundV3USDCe]: EMPTY_BULKER_OPTIONS,
71
+ [CompoundVersions.CompoundV3USDT]: EMPTY_BULKER_OPTIONS,
72
+ [CompoundVersions.CompoundV3wstETH]: EMPTY_BULKER_OPTIONS,
73
+ },
74
+ [NetworkNumber.Opt]: {
75
+ [CompoundVersions.CompoundV3USDC]: STANDARD_BULKER_OPTIONS,
76
+ [CompoundVersions.CompoundV3USDT]: STANDARD_BULKER_OPTIONS,
77
+ // Non-existing markets, keeping it because of typescript
78
+ [CompoundVersions.CompoundV3ETH]: EMPTY_BULKER_OPTIONS,
79
+ [CompoundVersions.CompoundV3USDbC]: EMPTY_BULKER_OPTIONS,
80
+ [CompoundVersions.CompoundV2]: EMPTY_BULKER_OPTIONS,
81
+ [CompoundVersions.CompoundV3USDCe]: EMPTY_BULKER_OPTIONS,
82
+ [CompoundVersions.CompoundV3wstETH]: EMPTY_BULKER_OPTIONS,
83
+ [CompoundVersions.CompoundV3USDS]: EMPTY_BULKER_OPTIONS,
84
+ },
85
+ [NetworkNumber.Linea]: {
86
+ // Non-existing markets, keeping it because of typescript
87
+ [CompoundVersions.CompoundV3USDC]: EMPTY_BULKER_OPTIONS,
88
+ [CompoundVersions.CompoundV3USDT]: EMPTY_BULKER_OPTIONS,
89
+ [CompoundVersions.CompoundV3ETH]: EMPTY_BULKER_OPTIONS,
90
+ [CompoundVersions.CompoundV3USDbC]: EMPTY_BULKER_OPTIONS,
91
+ [CompoundVersions.CompoundV2]: EMPTY_BULKER_OPTIONS,
92
+ [CompoundVersions.CompoundV3USDCe]: EMPTY_BULKER_OPTIONS,
93
+ [CompoundVersions.CompoundV3wstETH]: EMPTY_BULKER_OPTIONS,
94
+ [CompoundVersions.CompoundV3USDS]: EMPTY_BULKER_OPTIONS,
95
+ },
96
+ [NetworkNumber.Plasma]: {
97
+ // Non-existing markets, keeping it because of typescript
98
+ [CompoundVersions.CompoundV3USDC]: EMPTY_BULKER_OPTIONS,
99
+ [CompoundVersions.CompoundV3USDT]: EMPTY_BULKER_OPTIONS,
100
+ [CompoundVersions.CompoundV3ETH]: EMPTY_BULKER_OPTIONS,
101
+ [CompoundVersions.CompoundV3USDbC]: EMPTY_BULKER_OPTIONS,
102
+ [CompoundVersions.CompoundV2]: EMPTY_BULKER_OPTIONS,
103
+ [CompoundVersions.CompoundV3USDCe]: EMPTY_BULKER_OPTIONS,
104
+ [CompoundVersions.CompoundV3wstETH]: EMPTY_BULKER_OPTIONS,
105
+ [CompoundVersions.CompoundV3USDS]: EMPTY_BULKER_OPTIONS,
106
+ },
107
+ };
108
+
109
+ export const COMPOUND_V2: CompoundMarketData = {
110
+ chainIds: [NetworkNumber.Eth],
111
+ label: 'Compound V2',
112
+ shortLabel: CompoundVersionType.V2,
113
+ value: CompoundVersions.CompoundV2,
114
+ baseAsset: '',
115
+ collAssets: compoundV2CollateralAssets.map(a => a.underlyingAsset),
116
+ baseMarket: '',
117
+ baseMarketAddress: ZERO_ADDRESS,
118
+ secondLabel: '',
119
+ bulkerName: '',
120
+ bulkerAddress: ZERO_ADDRESS,
121
+ bulkerOptions: BULKER_OPTIONS[NetworkNumber.Eth][CompoundVersions.CompoundV2],
122
+ // icon: SvgAdapter(protocolIcons.compound),
123
+ };
124
+
125
+ export const COMPOUND_V3_USDC = (networkId: NetworkNumber): CompoundMarketData => ({
126
+ chainIds: [NetworkNumber.Eth, NetworkNumber.Arb, NetworkNumber.Base, NetworkNumber.Opt],
127
+ label: 'Compound V3 - USDC',
128
+ shortLabel: CompoundVersionType.V3,
129
+ value: CompoundVersions.CompoundV3USDC,
130
+ baseAsset: 'USDC',
131
+ collAssets: networkId ? v3USDCCollAssets[networkId] : [],
132
+ baseMarket: 'cUSDCv3',
133
+ baseMarketAddress: getConfigContractAddress('cUSDCv3', networkId),
134
+ secondLabel: 'Market',
135
+ bulkerName: networkId === NetworkNumber.Eth ? 'CompV3BulkerMainnetUSDC' : 'CompV3BulkerL2',
136
+ bulkerAddress: getConfigContractAddress(networkId === NetworkNumber.Eth ? 'CompV3BulkerMainnetUSDC' : 'CompV3BulkerL2', networkId),
137
+ bulkerOptions: BULKER_OPTIONS[networkId][CompoundVersions.CompoundV3USDC],
138
+ // icon: SvgAdapter(protocolIcons.compoundv3),
139
+ });
140
+
141
+ export const COMPOUND_V3_USDCe = (networkId: NetworkNumber): CompoundMarketData => ({
142
+ chainIds: [NetworkNumber.Arb],
143
+ label: 'Compound V3 - USDC.e',
144
+ shortLabel: CompoundVersionType.V3,
145
+ value: CompoundVersions.CompoundV3USDCe,
146
+ baseAsset: 'USDC.e',
147
+ collAssets: networkId ? v3USDCeCollAssets[networkId] : [],
148
+ baseMarket: 'cUSDCev3',
149
+ baseMarketAddress: getConfigContractAddress('cUSDCev3', networkId),
150
+ secondLabel: 'Market',
151
+ bulkerName: 'CompV3BulkerL2',
152
+ bulkerAddress: getConfigContractAddress('CompV3BulkerL2', networkId),
153
+ bulkerOptions: BULKER_OPTIONS[networkId][CompoundVersions.CompoundV3USDCe],
154
+ // icon: SvgAdapter(protocolIcons.compoundv3),
155
+ });
156
+
157
+ export const COMPOUND_V3_ETH = (networkId: NetworkNumber): CompoundMarketData => ({
158
+ chainIds: [NetworkNumber.Eth, NetworkNumber.Base, NetworkNumber.Arb, NetworkNumber.Opt],
159
+ label: 'Compound V3 - ETH',
160
+ shortLabel: CompoundVersionType.V3,
161
+ value: CompoundVersions.CompoundV3ETH,
162
+ baseAsset: 'ETH',
163
+ collAssets: networkId ? v3ETHCollAssets[networkId] : [],
164
+ baseMarket: 'cETHv3',
165
+ baseMarketAddress: getConfigContractAddress('cETHv3', networkId),
166
+ secondLabel: 'Market',
167
+ bulkerName: networkId === NetworkNumber.Eth ? 'CompV3BulkerMainnetETH' : 'CompV3BulkerL2',
168
+ bulkerAddress: getConfigContractAddress(networkId === NetworkNumber.Eth ? 'CompV3BulkerMainnetETH' : 'CompV3BulkerL2', networkId),
169
+ bulkerOptions: BULKER_OPTIONS[networkId][CompoundVersions.CompoundV3ETH],
170
+ // icon: SvgAdapter(protocolIcons.compoundv3),
171
+ });
172
+
173
+ export const COMPOUND_V3_USDBC = (networkId: NetworkNumber): CompoundMarketData => ({
174
+ chainIds: [NetworkNumber.Base],
175
+ label: 'Compound V3 - USDbC',
176
+ shortLabel: CompoundVersionType.V3,
177
+ value: CompoundVersions.CompoundV3USDbC,
178
+ baseAsset: 'USDbC',
179
+ collAssets: networkId ? v3USDbCCollAssets[networkId] : [],
180
+ baseMarket: 'cUSDbCv3',
181
+ baseMarketAddress: getConfigContractAddress('cUSDbCv3', networkId),
182
+ secondLabel: 'Market',
183
+ bulkerName: 'CompV3BulkerL2',
184
+ bulkerAddress: getConfigContractAddress('CompV3BulkerL2', networkId),
185
+ bulkerOptions: BULKER_OPTIONS[networkId][CompoundVersions.CompoundV3USDbC],
186
+ // icon: SvgAdapter(protocolIcons.compoundv3),
187
+ });
188
+
189
+ export const COMPOUND_V3_USDT = (networkId: NetworkNumber): CompoundMarketData => ({
190
+ chainIds: [NetworkNumber.Eth, NetworkNumber.Arb, NetworkNumber.Opt],
191
+ label: 'Compound V3 - USDT',
192
+ shortLabel: CompoundVersionType.V3,
193
+ value: CompoundVersions.CompoundV3USDT,
194
+ baseAsset: 'USDT',
195
+ collAssets: networkId ? v3USDTCollAssets[networkId] : [],
196
+ baseMarket: 'cUSDTv3',
197
+ baseMarketAddress: getConfigContractAddress('cUSDTv3', networkId),
198
+ secondLabel: 'Market',
199
+ bulkerName: networkId === NetworkNumber.Eth ? 'CompV3BulkerMainnetETH' : 'CompV3BulkerL2',
200
+ bulkerAddress: getConfigContractAddress(networkId === NetworkNumber.Eth ? 'CompV3BulkerMainnetETH' : 'CompV3BulkerL2', networkId),
201
+ bulkerOptions: BULKER_OPTIONS[networkId][CompoundVersions.CompoundV3USDT],
202
+ // icon: SvgAdapter(protocolIcons.compoundv3),
203
+ });
204
+
205
+ export const COMPOUND_V3_WSTETH = (networkId: NetworkNumber): CompoundMarketData => ({
206
+ chainIds: [NetworkNumber.Eth],
207
+ label: 'Compound V3 - wstETH',
208
+ shortLabel: CompoundVersionType.V3,
209
+ value: CompoundVersions.CompoundV3wstETH,
210
+ baseAsset: 'wstETH',
211
+ collAssets: networkId ? v3wstETHCollAssets[networkId] : [],
212
+ baseMarket: 'cWstETHv3',
213
+ baseMarketAddress: getConfigContractAddress('cWstETHv3', networkId),
214
+ secondLabel: 'Market',
215
+ bulkerName: networkId === NetworkNumber.Eth ? 'CompV3BulkerMainnetETH' : 'CompV3BulkerL2',
216
+ bulkerAddress: getConfigContractAddress(networkId === NetworkNumber.Eth ? 'CompV3BulkerMainnetETH' : 'CompV3BulkerL2', networkId),
217
+ bulkerOptions: BULKER_OPTIONS[networkId][CompoundVersions.CompoundV3wstETH],
218
+ });
219
+
220
+ export const COMPOUND_V3_USDS = (networkId: NetworkNumber): CompoundMarketData => ({
221
+ chainIds: [NetworkNumber.Eth, NetworkNumber.Base],
222
+ label: 'Compound V3 - USDS',
223
+ shortLabel: CompoundVersionType.V3,
224
+ value: CompoundVersions.CompoundV3USDS,
225
+ baseAsset: 'USDS',
226
+ collAssets: networkId ? v3USDSCollAssets[networkId] : [],
227
+ baseMarket: 'cUSDSv3',
228
+ baseMarketAddress: getConfigContractAddress('cUSDSv3', networkId),
229
+ secondLabel: 'Market',
230
+ bulkerName: networkId === NetworkNumber.Eth ? 'CompV3BulkerMainnetETH' : 'CompV3BulkerL2',
231
+ bulkerAddress: getConfigContractAddress(networkId === NetworkNumber.Eth ? 'CompV3BulkerMainnetETH' : 'CompV3BulkerL2', networkId),
232
+ bulkerOptions: BULKER_OPTIONS[networkId][CompoundVersions.CompoundV3USDS],
233
+ });
234
+
235
+ export const CompoundMarkets = (networkId: NetworkNumber) => ({
236
+ [CompoundVersions.CompoundV2]: COMPOUND_V2,
237
+ [CompoundVersions.CompoundV3ETH]: COMPOUND_V3_ETH(networkId),
238
+ [CompoundVersions.CompoundV3USDC]: COMPOUND_V3_USDC(networkId),
239
+ [CompoundVersions.CompoundV3USDbC]: COMPOUND_V3_USDBC(networkId),
240
+ [CompoundVersions.CompoundV3USDCe]: COMPOUND_V3_USDCe(networkId),
241
+ [CompoundVersions.CompoundV3USDT]: COMPOUND_V3_USDT(networkId),
242
+ [CompoundVersions.CompoundV3wstETH]: COMPOUND_V3_WSTETH(networkId),
243
+ [CompoundVersions.CompoundV3USDS]: COMPOUND_V3_USDS(networkId),
244
244
  }) as const;