@1delta/abis 0.0.14 → 0.0.16

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.
@@ -1,225 +0,0 @@
1
- // Gearbox DataCompressorV3 ABI — multicall-like aggregator for pool and
2
- // credit account data. Collapses per-pool and per-account work into one RPC.
3
- //
4
- // Functions kept:
5
- // - getPoolsV3List() -> PoolData[]
6
- // - getCreditManagersV3List() -> CreditManagerData[]
7
- // - getCreditAccountsByBorrower(address, PriceOnDemand[]) -> CreditAccountData[]
8
- // - getCreditAccountData(address, PriceOnDemand[]) -> CreditAccountData
9
- //
10
- // Source: Sourcify metadata for the deployed DataCompressorV3 at
11
- // 0x104c4e209329524adb0febe8b6481346a6eb75c6 on Ethereum mainnet.
12
- //
13
- // The CM list (collateral tokens, LTs, debt limits, …) is NOT embedded in
14
- // `getPoolsV3List` — it must be fetched via the separate
15
- // `getCreditManagersV3List` call and joined by `cm.pool`.
16
- const PriceOnDemand = {
17
- components: [
18
- { name: 'token', type: 'address' },
19
- { name: 'callData', type: 'bytes' },
20
- ],
21
- name: 'priceUpdates',
22
- type: 'tuple[]',
23
- };
24
- const QuotaInfo = {
25
- components: [
26
- { name: 'token', type: 'address' },
27
- { name: 'rate', type: 'uint16' },
28
- { name: 'quotaIncreaseFee', type: 'uint16' },
29
- { name: 'totalQuoted', type: 'uint96' },
30
- { name: 'limit', type: 'uint96' },
31
- { name: 'isActive', type: 'bool' },
32
- ],
33
- name: 'quotas',
34
- type: 'tuple[]',
35
- };
36
- const LinearModel = {
37
- components: [
38
- { name: 'interestModel', type: 'address' },
39
- { name: 'version', type: 'uint256' },
40
- { name: 'U_1', type: 'uint16' },
41
- { name: 'U_2', type: 'uint16' },
42
- { name: 'R_base', type: 'uint16' },
43
- { name: 'R_slope1', type: 'uint16' },
44
- { name: 'R_slope2', type: 'uint16' },
45
- { name: 'R_slope3', type: 'uint16' },
46
- { name: 'isBorrowingMoreU2Forbidden', type: 'bool' },
47
- ],
48
- name: 'lirm',
49
- type: 'tuple',
50
- };
51
- const CreditAccountDataComponents = [
52
- { name: 'isSuccessful', type: 'bool' },
53
- { name: 'priceFeedsNeeded', type: 'address[]' },
54
- { name: 'addr', type: 'address' },
55
- { name: 'borrower', type: 'address' },
56
- { name: 'creditManager', type: 'address' },
57
- { name: 'cmName', type: 'string' },
58
- { name: 'creditFacade', type: 'address' },
59
- { name: 'underlying', type: 'address' },
60
- { name: 'debt', type: 'uint256' },
61
- { name: 'cumulativeIndexLastUpdate', type: 'uint256' },
62
- { name: 'cumulativeQuotaInterest', type: 'uint128' },
63
- { name: 'accruedInterest', type: 'uint256' },
64
- { name: 'accruedFees', type: 'uint256' },
65
- { name: 'totalDebtUSD', type: 'uint256' },
66
- { name: 'totalValue', type: 'uint256' },
67
- { name: 'totalValueUSD', type: 'uint256' },
68
- { name: 'twvUSD', type: 'uint256' },
69
- { name: 'enabledTokensMask', type: 'uint256' },
70
- { name: 'healthFactor', type: 'uint256' },
71
- { name: 'baseBorrowRate', type: 'uint256' },
72
- { name: 'aggregatedBorrowRate', type: 'uint256' },
73
- {
74
- components: [
75
- { name: 'token', type: 'address' },
76
- { name: 'balance', type: 'uint256' },
77
- { name: 'isForbidden', type: 'bool' },
78
- { name: 'isEnabled', type: 'bool' },
79
- { name: 'isQuoted', type: 'bool' },
80
- { name: 'quota', type: 'uint256' },
81
- { name: 'quotaRate', type: 'uint16' },
82
- { name: 'quotaCumulativeIndexLU', type: 'uint256' },
83
- ],
84
- name: 'balances',
85
- type: 'tuple[]',
86
- },
87
- { name: 'since', type: 'uint64' },
88
- { name: 'cfVersion', type: 'uint256' },
89
- { name: 'expirationDate', type: 'uint40' },
90
- { name: 'activeBots', type: 'address[]' },
91
- ];
92
- export const GearboxDataCompressorV3Abi = [
93
- {
94
- inputs: [],
95
- name: 'getPoolsV3List',
96
- outputs: [
97
- {
98
- components: [
99
- { name: 'addr', type: 'address' },
100
- { name: 'underlying', type: 'address' },
101
- { name: 'dieselToken', type: 'address' },
102
- { name: 'symbol', type: 'string' },
103
- { name: 'name', type: 'string' },
104
- { name: 'baseInterestIndex', type: 'uint256' },
105
- { name: 'availableLiquidity', type: 'uint256' },
106
- { name: 'expectedLiquidity', type: 'uint256' },
107
- { name: 'totalBorrowed', type: 'uint256' },
108
- { name: 'totalDebtLimit', type: 'uint256' },
109
- {
110
- components: [
111
- { name: 'creditManager', type: 'address' },
112
- { name: 'borrowed', type: 'uint256' },
113
- { name: 'limit', type: 'uint256' },
114
- { name: 'availableToBorrow', type: 'uint256' },
115
- ],
116
- name: 'creditManagerDebtParams',
117
- type: 'tuple[]',
118
- },
119
- { name: 'totalAssets', type: 'uint256' },
120
- { name: 'totalSupply', type: 'uint256' },
121
- { name: 'supplyRate', type: 'uint256' },
122
- { name: 'baseInterestRate', type: 'uint256' },
123
- { name: 'dieselRate_RAY', type: 'uint256' },
124
- { name: 'withdrawFee', type: 'uint256' },
125
- { name: 'lastBaseInterestUpdate', type: 'uint256' },
126
- { name: 'baseInterestIndexLU', type: 'uint256' },
127
- { name: 'version', type: 'uint256' },
128
- { name: 'poolQuotaKeeper', type: 'address' },
129
- { name: 'gauge', type: 'address' },
130
- QuotaInfo,
131
- {
132
- components: [
133
- { name: 'zapper', type: 'address' },
134
- { name: 'tokenIn', type: 'address' },
135
- { name: 'tokenOut', type: 'address' },
136
- ],
137
- name: 'zappers',
138
- type: 'tuple[]',
139
- },
140
- LinearModel,
141
- { name: 'isPaused', type: 'bool' },
142
- ],
143
- name: 'result',
144
- type: 'tuple[]',
145
- },
146
- ],
147
- stateMutability: 'view',
148
- type: 'function',
149
- },
150
- {
151
- inputs: [],
152
- name: 'getCreditManagersV3List',
153
- outputs: [
154
- {
155
- components: [
156
- { name: 'addr', type: 'address' },
157
- { name: 'name', type: 'string' },
158
- { name: 'cfVersion', type: 'uint256' },
159
- { name: 'creditFacade', type: 'address' },
160
- { name: 'creditConfigurator', type: 'address' },
161
- { name: 'underlying', type: 'address' },
162
- { name: 'pool', type: 'address' },
163
- { name: 'totalDebt', type: 'uint256' },
164
- { name: 'totalDebtLimit', type: 'uint256' },
165
- { name: 'baseBorrowRate', type: 'uint256' },
166
- { name: 'minDebt', type: 'uint256' },
167
- { name: 'maxDebt', type: 'uint256' },
168
- { name: 'availableToBorrow', type: 'uint256' },
169
- { name: 'collateralTokens', type: 'address[]' },
170
- {
171
- components: [
172
- { name: 'targetContract', type: 'address' },
173
- { name: 'adapter', type: 'address' },
174
- ],
175
- name: 'adapters',
176
- type: 'tuple[]',
177
- },
178
- { name: 'liquidationThresholds', type: 'uint256[]' },
179
- { name: 'isDegenMode', type: 'bool' },
180
- { name: 'degenNFT', type: 'address' },
181
- { name: 'forbiddenTokenMask', type: 'uint256' },
182
- { name: 'maxEnabledTokensLength', type: 'uint8' },
183
- { name: 'feeInterest', type: 'uint16' },
184
- { name: 'feeLiquidation', type: 'uint16' },
185
- { name: 'liquidationDiscount', type: 'uint16' },
186
- { name: 'feeLiquidationExpired', type: 'uint16' },
187
- { name: 'liquidationDiscountExpired', type: 'uint16' },
188
- QuotaInfo,
189
- LinearModel,
190
- { name: 'isPaused', type: 'bool' },
191
- ],
192
- name: 'result',
193
- type: 'tuple[]',
194
- },
195
- ],
196
- stateMutability: 'view',
197
- type: 'function',
198
- },
199
- {
200
- inputs: [{ name: 'borrower', type: 'address' }, PriceOnDemand],
201
- name: 'getCreditAccountsByBorrower',
202
- outputs: [
203
- {
204
- components: CreditAccountDataComponents,
205
- name: 'result',
206
- type: 'tuple[]',
207
- },
208
- ],
209
- stateMutability: 'nonpayable',
210
- type: 'function',
211
- },
212
- {
213
- inputs: [{ name: '_creditAccount', type: 'address' }, PriceOnDemand],
214
- name: 'getCreditAccountData',
215
- outputs: [
216
- {
217
- components: CreditAccountDataComponents,
218
- name: 'result',
219
- type: 'tuple',
220
- },
221
- ],
222
- stateMutability: 'nonpayable',
223
- type: 'function',
224
- },
225
- ];