@1delta/margin-fetcher 0.0.19 → 0.0.20

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 (67) hide show
  1. package/dist/abis/aave-v2/YLDR.d.ts.map +1 -1
  2. package/dist/abis/aave-v2/YLDR.js +176 -148
  3. package/dist/abis/aave-v3/YLDR.js +29 -29
  4. package/dist/abis/compound-v3/Comet.d.ts +0 -20
  5. package/dist/abis/compound-v3/Comet.d.ts.map +1 -1
  6. package/dist/abis/compound-v3/Comet.js +0 -25
  7. package/dist/lending/fetchLender.js +1 -1
  8. package/dist/lending/user-data/abis.d.ts +20 -20
  9. package/dist/lending/user-data/compound-v3/userCallBuild.d.ts.map +1 -1
  10. package/dist/lending/user-data/compound-v3/userCallBuild.js +1 -7
  11. package/dist/lending/user-data/compound-v3/userCallParse.d.ts +2 -2
  12. package/dist/lending/user-data/compound-v3/userCallParse.d.ts.map +1 -1
  13. package/dist/lending/user-data/compound-v3/userCallParse.js +19 -20
  14. package/dist/lending/user-data/morpho/userCallBuild.d.ts.map +1 -1
  15. package/dist/lending/user-data/morpho/userCallBuild.js +6 -4
  16. package/dist/prices/main-prices/addresses/morpho.d.ts.map +1 -1
  17. package/dist/prices/main-prices/addresses/morpho.js +191 -0
  18. package/dist/prices/main-prices/fetchOracleData.js +4 -2
  19. package/dist/yields/index.d.ts.map +1 -1
  20. package/dist/yields/index.js +13 -1
  21. package/package.json +2 -2
  22. package/src/abis/aave-v2/YLDR.ts +177 -149
  23. package/src/abis/aave-v3/YLDR.ts +45 -45
  24. package/src/abis/compound-v3/Comet.ts +0 -25
  25. package/src/lending/fetchLender.ts +1 -1
  26. package/src/lending/user-data/compound-v3/userCallBuild.ts +1 -8
  27. package/src/lending/user-data/compound-v3/userCallParse.ts +39 -29
  28. package/src/lending/user-data/morpho/userCallBuild.ts +6 -4
  29. package/src/prices/main-prices/addresses/morpho.ts +191 -0
  30. package/src/prices/main-prices/fetchOracleData.ts +4 -2
  31. package/src/yields/index.ts +15 -0
  32. package/test/index.test.ts +101 -97
  33. package/test/mainPriceMB.test.ts +1 -1
  34. package/test/mainPrices.test.ts +2 -2
  35. package/test/morpho.test.ts +1 -1
  36. package/test/morphoPrice.test.ts +1 -1
  37. package/test/yields.test.ts +27 -0
  38. package/tsconfig.json +2 -1
  39. package/dist/abis/aave/AToken.d.ts +0 -526
  40. package/dist/abis/aave/AToken.d.ts.map +0 -1
  41. package/dist/abis/aave/AToken.js +0 -686
  42. package/dist/abis/aave/AavePoolV3.d.ts +0 -819
  43. package/dist/abis/aave/AavePoolV3.d.ts.map +0 -1
  44. package/dist/abis/aave/AavePoolV3.js +0 -1060
  45. package/dist/abis/init/Core.d.ts +0 -523
  46. package/dist/abis/init/Core.d.ts.map +0 -1
  47. package/dist/abis/init/Core.js +0 -681
  48. package/dist/abis/init/InitFlashAggregator.d.ts +0 -624
  49. package/dist/abis/init/InitFlashAggregator.d.ts.map +0 -1
  50. package/dist/abis/init/InitFlashAggregator.js +0 -795
  51. package/dist/abis/init/PosManager.d.ts +0 -802
  52. package/dist/abis/init/PosManager.d.ts.map +0 -1
  53. package/dist/abis/init/PosManager.js +0 -1055
  54. package/dist/abis/uniswap/FeeOnTransferDetector.d.ts +0 -102
  55. package/dist/abis/uniswap/FeeOnTransferDetector.d.ts.map +0 -1
  56. package/dist/abis/uniswap/FeeOnTransferDetector.js +0 -133
  57. package/dist/abis/uniswap/UniswapV2Pair.d.ts +0 -513
  58. package/dist/abis/uniswap/UniswapV2Pair.d.ts.map +0 -1
  59. package/dist/abis/uniswap/UniswapV2Pair.js +0 -659
  60. package/src/abis/aave/AToken.ts +0 -686
  61. package/src/abis/aave/AavePoolV3.ts +0 -1060
  62. package/src/abis/init/Core.ts +0 -681
  63. package/src/abis/init/InitFlashAggregator.ts +0 -795
  64. package/src/abis/init/PosManager.ts +0 -1055
  65. package/src/abis/uniswap/FeeOnTransferDetector.ts +0 -133
  66. package/src/abis/uniswap/UniswapV2Pair.ts +0 -659
  67. /package/test/{userdata.test.ts → userData.test.ts} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"YLDR.d.ts","sourceRoot":"","sources":["../../../src/abis/aave-v2/YLDR.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsM9B,CAAA"}
1
+ {"version":3,"file":"YLDR.d.ts","sourceRoot":"","sources":["../../../src/abis/aave-v2/YLDR.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkO9B,CAAA"}
@@ -1,199 +1,227 @@
1
1
  export const YLDRProtocolDataProviderAbi = [
2
2
  {
3
- "type": "constructor",
4
- "inputs": [
5
- {
6
- "type": "address",
7
- "name": "addressesProvider",
8
- "internalType": "contract ILendingPoolAddressesProvider"
9
- }
10
- ]
3
+ type: 'constructor',
4
+ inputs: [
5
+ {
6
+ type: 'address',
7
+ name: 'addressesProvider',
8
+ internalType: 'contract ILendingPoolAddressesProvider',
9
+ },
10
+ ],
11
11
  },
12
12
  {
13
- "type": "function",
14
- "stateMutability": "view",
15
- "outputs": [
16
- {
17
- "type": "address",
18
- "name": "",
19
- "internalType": "contract ILendingPoolAddressesProvider"
20
- }
13
+ type: 'function',
14
+ stateMutability: 'view',
15
+ outputs: [
16
+ {
17
+ type: 'address',
18
+ name: '',
19
+ internalType: 'contract ILendingPoolAddressesProvider',
20
+ },
21
21
  ],
22
- "name": "ADDRESSES_PROVIDER",
23
- "inputs": []
22
+ name: 'ADDRESSES_PROVIDER',
23
+ inputs: [],
24
24
  },
25
25
  {
26
- "type": "function",
27
- "stateMutability": "view",
28
- "outputs": [
29
- {
30
- "type": "tuple[]",
31
- "name": "",
32
- "internalType": "struct AaveProtocolDataProvider.TokenData[]",
33
- "components": [
26
+ type: 'function',
27
+ stateMutability: 'view',
28
+ outputs: [
29
+ {
30
+ type: 'tuple[]',
31
+ name: '',
32
+ internalType: 'struct AaveProtocolDataProvider.TokenData[]',
33
+ components: [
34
34
  {
35
- "type": "string"
35
+ type: 'string',
36
36
  },
37
37
  {
38
- "type": "address"
39
- }
40
- ]
41
- }
38
+ type: 'address',
39
+ },
40
+ ],
41
+ },
42
42
  ],
43
- "name": "getAllATokens",
44
- "inputs": []
43
+ name: 'getAllATokens',
44
+ inputs: [],
45
45
  },
46
46
  {
47
- "type": "function",
48
- "stateMutability": "view",
49
- "outputs": [
50
- {
51
- "type": "tuple[]",
52
- "name": "",
53
- "internalType": "struct AaveProtocolDataProvider.TokenData[]",
54
- "components": [
47
+ type: 'function',
48
+ stateMutability: 'view',
49
+ outputs: [
50
+ {
51
+ type: 'tuple[]',
52
+ name: '',
53
+ internalType: 'struct AaveProtocolDataProvider.TokenData[]',
54
+ components: [
55
55
  {
56
- "type": "string"
56
+ type: 'string',
57
57
  },
58
58
  {
59
- "type": "address"
60
- }
61
- ]
62
- }
59
+ type: 'address',
60
+ },
61
+ ],
62
+ },
63
63
  ],
64
- "name": "getAllReservesTokens",
65
- "inputs": []
64
+ name: 'getAllReservesTokens',
65
+ inputs: [],
66
66
  },
67
- { "inputs": [{ "internalType": "address", "name": "asset", "type": "address" }], "name": "getReserveConfigurationData", "outputs": [{ "internalType": "uint256", "name": "decimals", "type": "uint256" }, { "internalType": "uint256", "name": "ltv", "type": "uint256" }, { "internalType": "uint256", "name": "liquidationThreshold", "type": "uint256" }, { "internalType": "uint256", "name": "liquidationBonus", "type": "uint256" }, { "internalType": "uint256", "name": "reserveFactor", "type": "uint256" }, { "internalType": "bool", "name": "usageAsCollateralEnabled", "type": "bool" }, { "internalType": "bool", "name": "borrowingEnabled", "type": "bool" }, { "internalType": "bool", "name": "isActive", "type": "bool" }, { "internalType": "bool", "name": "isFrozen", "type": "bool" }], "stateMutability": "view", "type": "function" },
68
67
  {
69
- "inputs": [{
70
- "internalType": "address",
71
- "name": "asset",
72
- "type": "address"
73
- }],
74
- "name": "getReserveData",
75
- "outputs": [{
76
- "internalType": "uint256",
77
- "name": "accruedToTreasuryScaled",
78
- "type": "uint256"
79
- },
80
- {
81
- "internalType": "uint256",
82
- "name": "totalYToken",
83
- "type": "uint256"
84
- }, {
85
- "internalType": "uint256",
86
- "name": "totalVariableDebt",
87
- "type": "uint256"
88
- },
89
- {
90
- "internalType": "uint256",
91
- "name": "liquidityRate",
92
- "type": "uint256"
93
- }, {
94
- "internalType": "uint256",
95
- "name": "variableBorrowRate",
96
- "type": "uint256"
97
- },
98
- {
99
- "internalType": "uint256",
100
- "name": "liquidityIndex",
101
- "type": "uint256"
102
- }, { "internalType": "uint256", "name": "variableBorrowIndex", "type": "uint256" },
103
- { "internalType": "uint40", "name": "lastUpdateTimestamp", "type": "uint40" }],
104
- "stateMutability": "view", "type": "function"
68
+ inputs: [{ internalType: 'address', name: 'asset', type: 'address' }],
69
+ name: 'getReserveConfigurationData',
70
+ outputs: [
71
+ { internalType: 'uint256', name: 'decimals', type: 'uint256' },
72
+ { internalType: 'uint256', name: 'ltv', type: 'uint256' },
73
+ {
74
+ internalType: 'uint256',
75
+ name: 'liquidationThreshold',
76
+ type: 'uint256',
77
+ },
78
+ { internalType: 'uint256', name: 'liquidationBonus', type: 'uint256' },
79
+ { internalType: 'uint256', name: 'reserveFactor', type: 'uint256' },
80
+ { internalType: 'bool', name: 'usageAsCollateralEnabled', type: 'bool' },
81
+ { internalType: 'bool', name: 'borrowingEnabled', type: 'bool' },
82
+ { internalType: 'bool', name: 'isActive', type: 'bool' },
83
+ { internalType: 'bool', name: 'isFrozen', type: 'bool' },
84
+ ],
85
+ stateMutability: 'view',
86
+ type: 'function',
105
87
  },
106
88
  {
107
- "type": "function",
108
- "stateMutability": "view",
109
- "outputs": [
89
+ inputs: [
110
90
  {
111
- "type": "address",
112
- "name": "aTokenAddress",
113
- "internalType": "address"
91
+ internalType: 'address',
92
+ name: 'asset',
93
+ type: 'address',
114
94
  },
95
+ ],
96
+ name: 'getReserveData',
97
+ outputs: [
115
98
  {
116
- "type": "address",
117
- "name": "stableDebtTokenAddress",
118
- "internalType": "address"
99
+ internalType: 'uint256',
100
+ name: 'accruedToTreasuryScaled',
101
+ type: 'uint256',
119
102
  },
120
103
  {
121
- "type": "address",
122
- "name": "variableDebtTokenAddress",
123
- "internalType": "address"
124
- }
104
+ internalType: 'uint256',
105
+ name: 'totalYToken',
106
+ type: 'uint256',
107
+ },
108
+ {
109
+ internalType: 'uint256',
110
+ name: 'totalVariableDebt',
111
+ type: 'uint256',
112
+ },
113
+ {
114
+ internalType: 'uint256',
115
+ name: 'liquidityRate',
116
+ type: 'uint256',
117
+ },
118
+ {
119
+ internalType: 'uint256',
120
+ name: 'variableBorrowRate',
121
+ type: 'uint256',
122
+ },
123
+ {
124
+ internalType: 'uint256',
125
+ name: 'liquidityIndex',
126
+ type: 'uint256',
127
+ },
128
+ { internalType: 'uint256', name: 'variableBorrowIndex', type: 'uint256' },
129
+ { internalType: 'uint40', name: 'lastUpdateTimestamp', type: 'uint40' },
130
+ ],
131
+ stateMutability: 'view',
132
+ type: 'function',
133
+ },
134
+ {
135
+ type: 'function',
136
+ stateMutability: 'view',
137
+ outputs: [
138
+ {
139
+ type: 'address',
140
+ name: 'aTokenAddress',
141
+ internalType: 'address',
142
+ },
143
+ {
144
+ type: 'address',
145
+ name: 'stableDebtTokenAddress',
146
+ internalType: 'address',
147
+ },
148
+ {
149
+ type: 'address',
150
+ name: 'variableDebtTokenAddress',
151
+ internalType: 'address',
152
+ },
153
+ ],
154
+ name: 'getReserveTokensAddresses',
155
+ inputs: [
156
+ {
157
+ type: 'address',
158
+ name: 'asset',
159
+ internalType: 'address',
160
+ },
125
161
  ],
126
- "name": "getReserveTokensAddresses",
127
- "inputs": [
128
- {
129
- "type": "address",
130
- "name": "asset",
131
- "internalType": "address"
132
- }
133
- ]
134
162
  },
135
163
  {
136
- "type": "function",
137
- "stateMutability": "view",
138
- "outputs": [
164
+ type: 'function',
165
+ stateMutability: 'view',
166
+ outputs: [
139
167
  {
140
- "type": "uint256",
141
- "name": "currentATokenBalance",
142
- "internalType": "uint256"
168
+ type: 'uint256',
169
+ name: 'currentATokenBalance',
170
+ internalType: 'uint256',
143
171
  },
144
172
  {
145
- "type": "uint256",
146
- "name": "currentStableDebt",
147
- "internalType": "uint256"
173
+ type: 'uint256',
174
+ name: 'currentStableDebt',
175
+ internalType: 'uint256',
148
176
  },
149
177
  {
150
- "type": "uint256",
151
- "name": "currentVariableDebt",
152
- "internalType": "uint256"
178
+ type: 'uint256',
179
+ name: 'currentVariableDebt',
180
+ internalType: 'uint256',
153
181
  },
154
182
  {
155
- "type": "uint256",
156
- "name": "principalStableDebt",
157
- "internalType": "uint256"
183
+ type: 'uint256',
184
+ name: 'principalStableDebt',
185
+ internalType: 'uint256',
158
186
  },
159
187
  {
160
- "type": "uint256",
161
- "name": "scaledVariableDebt",
162
- "internalType": "uint256"
188
+ type: 'uint256',
189
+ name: 'scaledVariableDebt',
190
+ internalType: 'uint256',
163
191
  },
164
192
  {
165
- "type": "uint256",
166
- "name": "stableBorrowRate",
167
- "internalType": "uint256"
193
+ type: 'uint256',
194
+ name: 'stableBorrowRate',
195
+ internalType: 'uint256',
168
196
  },
169
197
  {
170
- "type": "uint256",
171
- "name": "liquidityRate",
172
- "internalType": "uint256"
198
+ type: 'uint256',
199
+ name: 'liquidityRate',
200
+ internalType: 'uint256',
173
201
  },
174
202
  {
175
- "type": "uint40",
176
- "name": "stableRateLastUpdated",
177
- "internalType": "uint40"
203
+ type: 'uint40',
204
+ name: 'stableRateLastUpdated',
205
+ internalType: 'uint40',
178
206
  },
179
207
  {
180
- "type": "bool",
181
- "name": "usageAsCollateralEnabled",
182
- "internalType": "bool"
183
- }
208
+ type: 'bool',
209
+ name: 'usageAsCollateralEnabled',
210
+ internalType: 'bool',
211
+ },
184
212
  ],
185
- "name": "getUserReserveData",
186
- "inputs": [
213
+ name: 'getUserReserveData',
214
+ inputs: [
187
215
  {
188
- "type": "address",
189
- "name": "asset",
190
- "internalType": "address"
216
+ type: 'address',
217
+ name: 'asset',
218
+ internalType: 'address',
191
219
  },
192
220
  {
193
- "type": "address",
194
- "name": "user",
195
- "internalType": "address"
196
- }
197
- ]
198
- }
221
+ type: 'address',
222
+ name: 'user',
223
+ internalType: 'address',
224
+ },
225
+ ],
226
+ },
199
227
  ];
@@ -1,46 +1,46 @@
1
1
  export const YLDRAbi = [
2
2
  {
3
- "inputs": [
3
+ inputs: [
4
4
  {
5
- "internalType": "address",
6
- "name": "asset",
7
- "type": "address"
5
+ internalType: 'address',
6
+ name: 'asset',
7
+ type: 'address',
8
8
  },
9
9
  {
10
- "internalType": "address",
11
- "name": "user",
12
- "type": "address"
13
- }
10
+ internalType: 'address',
11
+ name: 'user',
12
+ type: 'address',
13
+ },
14
14
  ],
15
- "name": "getUserReserveData",
16
- "outputs": [
15
+ name: 'getUserReserveData',
16
+ outputs: [
17
17
  {
18
- "internalType": "uint256",
19
- "name": "currentYTokenBalance",
20
- "type": "uint256"
18
+ internalType: 'uint256',
19
+ name: 'currentYTokenBalance',
20
+ type: 'uint256',
21
21
  },
22
22
  {
23
- "internalType": "uint256",
24
- "name": "currentVariableDebt",
25
- "type": "uint256"
23
+ internalType: 'uint256',
24
+ name: 'currentVariableDebt',
25
+ type: 'uint256',
26
26
  },
27
27
  {
28
- "internalType": "uint256",
29
- "name": "scaledVariableDebt",
30
- "type": "uint256"
28
+ internalType: 'uint256',
29
+ name: 'scaledVariableDebt',
30
+ type: 'uint256',
31
31
  },
32
32
  {
33
- "internalType": "uint256",
34
- "name": "liquidityRate",
35
- "type": "uint256"
33
+ internalType: 'uint256',
34
+ name: 'liquidityRate',
35
+ type: 'uint256',
36
36
  },
37
37
  {
38
- "internalType": "bool",
39
- "name": "usageAsCollateralEnabled",
40
- "type": "bool"
41
- }
38
+ internalType: 'bool',
39
+ name: 'usageAsCollateralEnabled',
40
+ type: 'bool',
41
+ },
42
42
  ],
43
- "stateMutability": "view",
44
- "type": "function"
45
- }
43
+ stateMutability: 'view',
44
+ type: 'function',
45
+ },
46
46
  ];
@@ -989,26 +989,6 @@ export declare const CometAbi: readonly [{
989
989
  readonly outputs: readonly [];
990
990
  readonly stateMutability: "nonpayable";
991
991
  readonly type: "function";
992
- }, {
993
- readonly anonymous: false;
994
- readonly inputs: readonly [{
995
- readonly indexed: true;
996
- readonly internalType: "address";
997
- readonly name: "owner";
998
- readonly type: "address";
999
- }, {
1000
- readonly indexed: true;
1001
- readonly internalType: "address";
1002
- readonly name: "spender";
1003
- readonly type: "address";
1004
- }, {
1005
- readonly indexed: false;
1006
- readonly internalType: "uint256";
1007
- readonly name: "amount";
1008
- readonly type: "uint256";
1009
- }];
1010
- readonly name: "Approval";
1011
- readonly type: "event";
1012
992
  }, {
1013
993
  readonly inputs: readonly [{
1014
994
  readonly internalType: "address";
@@ -1 +1 @@
1
- {"version":3,"file":"Comet.d.ts","sourceRoot":"","sources":["../../../src/abis/compound-v3/Comet.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2wDX,CAAA"}
@@ -1292,31 +1292,6 @@ export const CometAbi = [
1292
1292
  "stateMutability": "nonpayable",
1293
1293
  "type": "function"
1294
1294
  },
1295
- {
1296
- "anonymous": false,
1297
- "inputs": [
1298
- {
1299
- "indexed": true,
1300
- "internalType": "address",
1301
- "name": "owner",
1302
- "type": "address"
1303
- },
1304
- {
1305
- "indexed": true,
1306
- "internalType": "address",
1307
- "name": "spender",
1308
- "type": "address"
1309
- },
1310
- {
1311
- "indexed": false,
1312
- "internalType": "uint256",
1313
- "name": "amount",
1314
- "type": "uint256"
1315
- }
1316
- ],
1317
- "name": "Approval",
1318
- "type": "event"
1319
- },
1320
1295
  {
1321
1296
  "inputs": [
1322
1297
  {
@@ -2,7 +2,7 @@
2
2
  import { ProtocolDataProviderAbi } from '../abis/aave-v2/ProtocolDataProvider';
3
3
  import { IncentivesControllerAbi } from '../abis/lendle/IncentivesController';
4
4
  import { RewarderAbi } from '../abis/aurelius/Rewarder';
5
- import { UniswapV2PairAbi } from '../abis/uniswap/UniswapV2Pair';
5
+ import { UniswapV2PairAbi } from '../abis/oracle/UniswapV2Pair';
6
6
  // aave v3 style
7
7
  import { AavePoolV3UpgradedAbi } from '../abis/aave/AavePoolV3Upgraded';
8
8
  import { AaveV3ProtocolDataProviderAbi } from '../abis/aave/AaveV3ProtocolDataProvider';
@@ -8581,26 +8581,6 @@ export declare const getAbi: (lender: Lender) => readonly [{
8581
8581
  readonly outputs: readonly [];
8582
8582
  readonly stateMutability: "nonpayable";
8583
8583
  readonly type: "function";
8584
- } | {
8585
- readonly anonymous: false;
8586
- readonly inputs: readonly [{
8587
- readonly indexed: true;
8588
- readonly internalType: "address";
8589
- readonly name: "owner";
8590
- readonly type: "address";
8591
- }, {
8592
- readonly indexed: true;
8593
- readonly internalType: "address";
8594
- readonly name: "spender";
8595
- readonly type: "address";
8596
- }, {
8597
- readonly indexed: false;
8598
- readonly internalType: "uint256";
8599
- readonly name: "amount";
8600
- readonly type: "uint256";
8601
- }];
8602
- readonly name: "Approval";
8603
- readonly type: "event";
8604
8584
  } | {
8605
8585
  readonly inputs: readonly [{
8606
8586
  readonly internalType: "address";
@@ -8844,6 +8824,26 @@ export declare const getAbi: (lender: Lender) => readonly [{
8844
8824
  }];
8845
8825
  readonly stateMutability: "view";
8846
8826
  readonly type: "function";
8827
+ } | {
8828
+ readonly anonymous: false;
8829
+ readonly inputs: readonly [{
8830
+ readonly indexed: true;
8831
+ readonly internalType: "address";
8832
+ readonly name: "owner";
8833
+ readonly type: "address";
8834
+ }, {
8835
+ readonly indexed: true;
8836
+ readonly internalType: "address";
8837
+ readonly name: "spender";
8838
+ readonly type: "address";
8839
+ }, {
8840
+ readonly indexed: false;
8841
+ readonly internalType: "uint256";
8842
+ readonly name: "amount";
8843
+ readonly type: "uint256";
8844
+ }];
8845
+ readonly name: "Approval";
8846
+ readonly type: "event";
8847
8847
  } | {
8848
8848
  readonly inputs: readonly [{
8849
8849
  readonly internalType: "address";
@@ -1 +1 @@
1
- {"version":3,"file":"userCallBuild.d.ts","sourceRoot":"","sources":["../../../../src/lending/user-data/compound-v3/userCallBuild.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAA;AAI/C,eAAO,MAAM,uBAAuB,GAAI,SAAS,MAAM,EAAE,QAAQ,MAAM,EAAE,SAAS,MAAM,KAAG,IAAI,EA+C9F,CAAA"}
1
+ {"version":3,"file":"userCallBuild.d.ts","sourceRoot":"","sources":["../../../../src/lending/user-data/compound-v3/userCallBuild.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAA;AAI/C,eAAO,MAAM,uBAAuB,GAAI,SAAS,MAAM,EAAE,QAAQ,MAAM,EAAE,SAAS,MAAM,KAAG,IAAI,EAwC9F,CAAA"}
@@ -1,15 +1,10 @@
1
- import { getComposerAddress, getLenderAssets } from "../../../utils";
1
+ import { getLenderAssets } from "../../../utils";
2
2
  import { getCompoundV3BaseAsset, getCompoundV3CometAddress, getCompoundV3CometRewardsAddress } from "./addresses";
3
3
  export const buildCompoundV3UserCall = (chainId, lender, account) => {
4
4
  const baseAsset = getCompoundV3BaseAsset(lender, chainId).baseAsset;
5
5
  const cometContractAddress = getCompoundV3CometAddress(chainId, lender);
6
6
  const assets = getLenderAssets(chainId, lender);
7
7
  const assetsNoBase = assets.filter(a => a !== baseAsset);
8
- const allowedCall = {
9
- address: cometContractAddress,
10
- name: 'isAllowed',
11
- params: [account, getComposerAddress(chainId)],
12
- };
13
8
  const baseCalls = [
14
9
  {
15
10
  address: cometContractAddress,
@@ -37,7 +32,6 @@ export const buildCompoundV3UserCall = (chainId, lender, account) => {
37
32
  const calls = [
38
33
  ...callsNonBase,
39
34
  ...baseCalls,
40
- allowedCall,
41
35
  callEarnedBalances
42
36
  ];
43
37
  return calls;
@@ -1,5 +1,5 @@
1
- import { Lender } from "@1delta/asset-registry";
2
- import { CompoundV3UserReserveResponse } from "../types";
1
+ import { Lender } from '@1delta/asset-registry';
2
+ import { CompoundV3UserReserveResponse } from '../types';
3
3
  export declare const getCompoundV3UserDataConverter: (lender: Lender, chainId: string, account: string, prices: {
4
4
  [asset: string]: number;
5
5
  }, pricesHist: {
@@ -1 +1 @@
1
- {"version":3,"file":"userCallParse.d.ts","sourceRoot":"","sources":["../../../../src/lending/user-data/compound-v3/userCallParse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAC/C,OAAO,EAAE,6BAA6B,EAAE,MAAM,UAAU,CAAA;AAOxD,eAAO,MAAM,8BAA8B,GACzC,QAAQ,MAAM,EACd,SAAS,MAAM,EACf,SAAS,MAAM,EACf,QAAQ;IAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,EACnC,YAAY;IAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,EACvC,YAAY,GAAG,KACd,CAAC,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,6BAA6B,GAAG,SAAS,EAAE,MAAM,CA8GrE,CAAA"}
1
+ {"version":3,"file":"userCallParse.d.ts","sourceRoot":"","sources":["../../../../src/lending/user-data/compound-v3/userCallParse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAC/C,OAAO,EAAE,6BAA6B,EAAE,MAAM,UAAU,CAAA;AAYxD,eAAO,MAAM,8BAA8B,GACzC,QAAQ,MAAM,EACd,SAAS,MAAM,EACf,SAAS,MAAM,EACf,QAAQ;IAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,EACnC,YAAY;IAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,EACvC,YAAY,GAAG,KACd,CAAC,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,6BAA6B,GAAG,SAAS,EAAE,MAAM,CAmHrE,CAAA"}