@gearbox-protocol/sdk 18.4.0 → 18.4.1-aave.2
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.
- package/dist/cjs/model/index.js +1 -4
- package/dist/cjs/offchain/GearboxAPI.js +0 -7
- package/dist/cjs/offchain/index.js +0 -3
- package/dist/cjs/onchain/accounts/bots/AccountBotsService.js +29 -0
- package/dist/cjs/onchain/accounts/bots/PeripheryCompressorV310Contract.js +2 -1
- package/dist/cjs/onchain/accounts/intents/index.js +1 -0
- package/dist/cjs/onchain/accounts/intents/operations.js +21 -0
- package/dist/cjs/onchain/accounts/intents/plan.js +33 -0
- package/dist/cjs/onchain/accounts/intents/realize.js +44 -0
- package/dist/cjs/onchain/accounts/intents/testing/market.js +1 -0
- package/dist/cjs/onchain/accounts/intents/testing/sdk-mock.js +2 -1
- package/dist/cjs/onchain/accounts/intents/utils/ledger.js +8 -0
- package/dist/cjs/onchain/chain/chains.js +4 -0
- package/dist/cjs/onchain/index.js +16 -0
- package/dist/cjs/onchain/market/ZapperRegister.js +1 -1
- package/dist/cjs/onchain/market/adapters/abi/aave/iAaveHorizonBridge.js +94 -0
- package/dist/cjs/onchain/market/adapters/abi/aave/iAaveOracle.js +20 -0
- package/dist/cjs/onchain/market/adapters/abi/aave/iAaveV3Pool.js +278 -0
- package/dist/cjs/onchain/market/adapters/abi/aave/iPoolAddressesProvider.js +11 -0
- package/dist/cjs/onchain/market/adapters/abi/aave/index.js +9 -0
- package/dist/cjs/onchain/market/adapters/abi/actionAbi.js +1 -0
- package/dist/cjs/onchain/market/adapters/abi/adapters/iAaveHorizonBridgeAdapter.js +224 -0
- package/dist/cjs/onchain/market/adapters/abi/adapters/iAaveV3PoolAdapter.js +177 -0
- package/dist/cjs/onchain/market/adapters/abi/adapters/index.js +4 -0
- package/dist/cjs/onchain/market/adapters/abi/conctructorAbi.js +2 -0
- package/dist/cjs/onchain/market/adapters/abi/index.js +13 -0
- package/dist/cjs/onchain/market/adapters/contracts/AaveHorizonBridgeAdapterContract.js +171 -0
- package/dist/cjs/onchain/market/adapters/contracts/AaveV3PoolAdapterContract.js +199 -0
- package/dist/cjs/onchain/market/adapters/contracts/AbstractAdapter.js +8 -0
- package/dist/cjs/onchain/market/adapters/contracts/index.js +4 -0
- package/dist/cjs/onchain/market/adapters/createAdapter.js +4 -0
- package/dist/cjs/onchain/market/adapters/index.js +16 -0
- package/dist/cjs/onchain/market/adapters/types.js +2 -0
- package/dist/cjs/onchain/market/index.js +16 -0
- package/dist/cjs/onchain/positions/projectAavePosition.js +175 -0
- package/dist/cjs/onchain/preview/preview/loadAdapterReplayState.js +17 -0
- package/dist/cjs/onchain/preview/preview/previewOperation.js +2 -0
- package/dist/cjs/sdk/GearboxSDK.js +0 -9
- package/dist/cjs/sdk/prepare/PrepareApi.js +56 -0
- package/dist/cjs/sdk/preview/PreviewNamespace.js +42 -0
- package/dist/esm/model/index.js +2 -3
- package/dist/esm/offchain/GearboxAPI.js +0 -7
- package/dist/esm/offchain/index.js +1 -3
- package/dist/esm/onchain/accounts/bots/AccountBotsService.js +29 -0
- package/dist/esm/onchain/accounts/bots/PeripheryCompressorV310Contract.js +1 -1
- package/dist/esm/onchain/accounts/intents/index.js +2 -1
- package/dist/esm/onchain/accounts/intents/operations.js +20 -1
- package/dist/esm/onchain/accounts/intents/plan.js +33 -1
- package/dist/esm/onchain/accounts/intents/realize.js +46 -2
- package/dist/esm/onchain/accounts/intents/testing/market.js +1 -0
- package/dist/esm/onchain/accounts/intents/testing/sdk-mock.js +2 -1
- package/dist/esm/onchain/accounts/intents/utils/ledger.js +8 -0
- package/dist/esm/onchain/chain/chains.js +4 -0
- package/dist/esm/onchain/index.js +9 -1
- package/dist/esm/onchain/market/ZapperRegister.js +1 -1
- package/dist/esm/onchain/market/adapters/abi/aave/iAaveHorizonBridge.js +93 -0
- package/dist/esm/onchain/market/adapters/abi/aave/iAaveOracle.js +19 -0
- package/dist/esm/onchain/market/adapters/abi/aave/iAaveV3Pool.js +277 -0
- package/dist/esm/onchain/market/adapters/abi/aave/iPoolAddressesProvider.js +10 -0
- package/dist/esm/onchain/market/adapters/abi/aave/index.js +5 -0
- package/dist/esm/onchain/market/adapters/abi/actionAbi.js +1 -0
- package/dist/esm/onchain/market/adapters/abi/adapters/iAaveHorizonBridgeAdapter.js +223 -0
- package/dist/esm/onchain/market/adapters/abi/adapters/iAaveV3PoolAdapter.js +176 -0
- package/dist/esm/onchain/market/adapters/abi/adapters/index.js +3 -1
- package/dist/esm/onchain/market/adapters/abi/conctructorAbi.js +2 -0
- package/dist/esm/onchain/market/adapters/abi/index.js +8 -1
- package/dist/esm/onchain/market/adapters/contracts/AaveHorizonBridgeAdapterContract.js +170 -0
- package/dist/esm/onchain/market/adapters/contracts/AaveV3PoolAdapterContract.js +198 -0
- package/dist/esm/onchain/market/adapters/contracts/AbstractAdapter.js +8 -0
- package/dist/esm/onchain/market/adapters/contracts/index.js +3 -1
- package/dist/esm/onchain/market/adapters/createAdapter.js +4 -0
- package/dist/esm/onchain/market/adapters/index.js +9 -1
- package/dist/esm/onchain/market/adapters/types.js +2 -0
- package/dist/esm/onchain/market/index.js +9 -1
- package/dist/esm/onchain/positions/projectAavePosition.js +174 -0
- package/dist/esm/onchain/preview/preview/loadAdapterReplayState.js +16 -0
- package/dist/esm/onchain/preview/preview/previewOperation.js +2 -0
- package/dist/esm/sdk/GearboxSDK.js +0 -9
- package/dist/esm/sdk/prepare/PrepareApi.js +57 -1
- package/dist/esm/sdk/preview/PreviewNamespace.js +42 -0
- package/dist/types/model/aave.d.ts +34 -0
- package/dist/types/model/analytics.d.ts +2 -2
- package/dist/types/model/index.d.ts +6 -7
- package/dist/types/model/opportunities.d.ts +1 -1
- package/dist/types/model/positions.d.ts +1 -1
- package/dist/types/model/previews.d.ts +15 -0
- package/dist/types/offchain/AbstractOffchainNamespace.d.ts +1 -1
- package/dist/types/offchain/GearboxAPI.d.ts +0 -6
- package/dist/types/offchain/analytics/OffchainAnalytics.d.ts +1 -1
- package/dist/types/offchain/analytics/types.d.ts +1 -1
- package/dist/types/offchain/index.d.ts +1 -3
- package/dist/types/offchain/opportunities/OffchainOpportunities.d.ts +1 -1
- package/dist/types/offchain/opportunities/types.d.ts +1 -1
- package/dist/types/offchain/positions/OffchainPositions.d.ts +1 -1
- package/dist/types/offchain/positions/types.d.ts +1 -1
- package/dist/types/onchain/accounts/bots/AccountBotsService.d.ts +11 -1
- package/dist/types/onchain/accounts/bots/index.d.ts +2 -2
- package/dist/types/onchain/accounts/bots/types.d.ts +7 -1
- package/dist/types/onchain/accounts/index.d.ts +2 -2
- package/dist/types/onchain/accounts/intents/operations.d.ts +43 -1
- package/dist/types/onchain/accounts/intents/plan.d.ts +26 -1
- package/dist/types/onchain/accounts/intents/testing/market.d.ts +4 -0
- package/dist/types/onchain/accounts/intents/testing/sdk-mock.d.ts +4 -0
- package/dist/types/onchain/accounts/intents/types.d.ts +20 -1
- package/dist/types/onchain/index.d.ts +10 -2
- package/dist/types/onchain/market/adapters/abi/aave/iAaveHorizonBridge.d.ts +83 -0
- package/dist/types/onchain/market/adapters/abi/aave/iAaveOracle.d.ts +22 -0
- package/dist/types/onchain/market/adapters/abi/aave/iAaveV3Pool.d.ts +229 -0
- package/dist/types/onchain/market/adapters/abi/aave/iPoolAddressesProvider.d.ts +11 -0
- package/dist/types/onchain/market/adapters/abi/aave/index.d.ts +5 -0
- package/dist/types/onchain/market/adapters/abi/adapters/iAaveHorizonBridgeAdapter.d.ts +207 -0
- package/dist/types/onchain/market/adapters/abi/adapters/iAaveV3PoolAdapter.d.ts +172 -0
- package/dist/types/onchain/market/adapters/abi/adapters/index.d.ts +3 -1
- package/dist/types/onchain/market/adapters/abi/index.d.ts +8 -1
- package/dist/types/onchain/market/adapters/contracts/AaveHorizonBridgeAdapterContract.d.ts +341 -0
- package/dist/types/onchain/market/adapters/contracts/AaveV3PoolAdapterContract.d.ts +450 -0
- package/dist/types/onchain/market/adapters/contracts/AbstractAdapter.d.ts +8 -0
- package/dist/types/onchain/market/adapters/contracts/index.d.ts +3 -1
- package/dist/types/onchain/market/adapters/index.d.ts +9 -1
- package/dist/types/onchain/market/adapters/types.d.ts +3 -1
- package/dist/types/onchain/market/index.d.ts +9 -1
- package/dist/types/onchain/positions/projectAavePosition.d.ts +45 -0
- package/dist/types/onchain/preview/preview/loadAdapterReplayState.d.ts +13 -0
- package/dist/types/sdk/GearboxSDK.d.ts +1 -8
- package/dist/types/sdk/analytics/AnalyticsNamespace.d.ts +1 -1
- package/dist/types/sdk/analytics/types.d.ts +1 -1
- package/dist/types/sdk/index.d.ts +3 -3
- package/dist/types/sdk/opportunities/OpportunitiesNamespace.d.ts +1 -1
- package/dist/types/sdk/opportunities/types.d.ts +1 -1
- package/dist/types/sdk/positions/PositionsNamespace.d.ts +1 -1
- package/dist/types/sdk/positions/types.d.ts +1 -1
- package/dist/types/sdk/prepare/PrepareApi.d.ts +11 -3
- package/dist/types/sdk/prepare/index.d.ts +2 -2
- package/dist/types/sdk/prepare/types.d.ts +83 -1
- package/dist/types/sdk/preview/PreviewNamespace.d.ts +5 -1
- package/dist/types/sdk/preview/types.d.ts +12 -1
- package/dist/types/sdk/types.d.ts +0 -20
- package/package.json +1 -1
- package/dist/cjs/model/notices.schema.js +0 -25
- package/dist/cjs/offchain/notices/OffchainNotices.js +0 -27
- package/dist/cjs/offchain/notices/index.js +0 -3
- package/dist/esm/model/notices.schema.js +0 -23
- package/dist/esm/offchain/notices/OffchainNotices.js +0 -26
- package/dist/esm/offchain/notices/index.js +0 -1
- package/dist/types/model/notices.d.ts +0 -28
- package/dist/types/model/notices.schema.d.ts +0 -22
- package/dist/types/offchain/notices/OffchainNotices.d.ts +0 -18
- package/dist/types/offchain/notices/index.d.ts +0 -2
- /package/dist/cjs/model/{notices.js → aave.js} +0 -0
- /package/dist/esm/model/{notices.js → aave.js} +0 -0
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
//#region src/onchain/market/adapters/abi/aave/iAaveV3Pool.ts
|
|
3
|
+
const iAaveV3PoolAbi = [
|
|
4
|
+
{
|
|
5
|
+
name: "supply",
|
|
6
|
+
type: "function",
|
|
7
|
+
stateMutability: "nonpayable",
|
|
8
|
+
inputs: [
|
|
9
|
+
{
|
|
10
|
+
type: "address",
|
|
11
|
+
name: "asset"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
type: "uint256",
|
|
15
|
+
name: "amount"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
type: "address",
|
|
19
|
+
name: "onBehalfOf"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
type: "uint16",
|
|
23
|
+
name: "referralCode"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
outputs: []
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: "withdraw",
|
|
30
|
+
type: "function",
|
|
31
|
+
stateMutability: "nonpayable",
|
|
32
|
+
inputs: [
|
|
33
|
+
{
|
|
34
|
+
type: "address",
|
|
35
|
+
name: "asset"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
type: "uint256",
|
|
39
|
+
name: "amount"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
type: "address",
|
|
43
|
+
name: "to"
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
outputs: [{ type: "uint256" }]
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
name: "borrow",
|
|
50
|
+
type: "function",
|
|
51
|
+
stateMutability: "nonpayable",
|
|
52
|
+
inputs: [
|
|
53
|
+
{
|
|
54
|
+
type: "address",
|
|
55
|
+
name: "asset"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
type: "uint256",
|
|
59
|
+
name: "amount"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
type: "uint256",
|
|
63
|
+
name: "interestRateMode"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
type: "uint16",
|
|
67
|
+
name: "referralCode"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
type: "address",
|
|
71
|
+
name: "onBehalfOf"
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
outputs: []
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
name: "repay",
|
|
78
|
+
type: "function",
|
|
79
|
+
stateMutability: "nonpayable",
|
|
80
|
+
inputs: [
|
|
81
|
+
{
|
|
82
|
+
type: "address",
|
|
83
|
+
name: "asset"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
type: "uint256",
|
|
87
|
+
name: "amount"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
type: "uint256",
|
|
91
|
+
name: "interestRateMode"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
type: "address",
|
|
95
|
+
name: "onBehalfOf"
|
|
96
|
+
}
|
|
97
|
+
],
|
|
98
|
+
outputs: [{ type: "uint256" }]
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
name: "getReserveAToken",
|
|
102
|
+
type: "function",
|
|
103
|
+
stateMutability: "view",
|
|
104
|
+
inputs: [{
|
|
105
|
+
type: "address",
|
|
106
|
+
name: "asset"
|
|
107
|
+
}],
|
|
108
|
+
outputs: [{ type: "address" }]
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
name: "ADDRESSES_PROVIDER",
|
|
112
|
+
type: "function",
|
|
113
|
+
stateMutability: "view",
|
|
114
|
+
inputs: [],
|
|
115
|
+
outputs: [{ type: "address" }]
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
name: "getReserveData",
|
|
119
|
+
type: "function",
|
|
120
|
+
stateMutability: "view",
|
|
121
|
+
inputs: [{
|
|
122
|
+
type: "address",
|
|
123
|
+
name: "asset"
|
|
124
|
+
}],
|
|
125
|
+
outputs: [{
|
|
126
|
+
type: "tuple",
|
|
127
|
+
components: [
|
|
128
|
+
{
|
|
129
|
+
type: "tuple",
|
|
130
|
+
name: "configuration",
|
|
131
|
+
components: [{
|
|
132
|
+
type: "uint256",
|
|
133
|
+
name: "data"
|
|
134
|
+
}]
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
type: "uint128",
|
|
138
|
+
name: "liquidityIndex"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
type: "uint128",
|
|
142
|
+
name: "currentLiquidityRate"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
type: "uint128",
|
|
146
|
+
name: "variableBorrowIndex"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
type: "uint128",
|
|
150
|
+
name: "currentVariableBorrowRate"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
type: "uint128",
|
|
154
|
+
name: "currentStableBorrowRate"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
type: "uint40",
|
|
158
|
+
name: "lastUpdateTimestamp"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
type: "uint16",
|
|
162
|
+
name: "id"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
type: "address",
|
|
166
|
+
name: "aTokenAddress"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
type: "address",
|
|
170
|
+
name: "stableDebtTokenAddress"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
type: "address",
|
|
174
|
+
name: "variableDebtTokenAddress"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
type: "address",
|
|
178
|
+
name: "interestRateStrategyAddress"
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
type: "uint128",
|
|
182
|
+
name: "accruedToTreasury"
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
type: "uint128",
|
|
186
|
+
name: "unbacked"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
type: "uint128",
|
|
190
|
+
name: "isolationModeTotalDebt"
|
|
191
|
+
}
|
|
192
|
+
]
|
|
193
|
+
}]
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
name: "getUserAccountData",
|
|
197
|
+
type: "function",
|
|
198
|
+
stateMutability: "view",
|
|
199
|
+
inputs: [{
|
|
200
|
+
type: "address",
|
|
201
|
+
name: "user"
|
|
202
|
+
}],
|
|
203
|
+
outputs: [
|
|
204
|
+
{
|
|
205
|
+
type: "uint256",
|
|
206
|
+
name: "totalCollateralBase"
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
type: "uint256",
|
|
210
|
+
name: "totalDebtBase"
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
type: "uint256",
|
|
214
|
+
name: "availableBorrowsBase"
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
type: "uint256",
|
|
218
|
+
name: "currentLiquidationThreshold"
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
type: "uint256",
|
|
222
|
+
name: "ltv"
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
type: "uint256",
|
|
226
|
+
name: "healthFactor"
|
|
227
|
+
}
|
|
228
|
+
]
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
name: "getUserEMode",
|
|
232
|
+
type: "function",
|
|
233
|
+
stateMutability: "view",
|
|
234
|
+
inputs: [{
|
|
235
|
+
type: "address",
|
|
236
|
+
name: "user"
|
|
237
|
+
}],
|
|
238
|
+
outputs: [{ type: "uint256" }]
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
name: "getEModeCategoryCollateralConfig",
|
|
242
|
+
type: "function",
|
|
243
|
+
stateMutability: "view",
|
|
244
|
+
inputs: [{
|
|
245
|
+
type: "uint8",
|
|
246
|
+
name: "id"
|
|
247
|
+
}],
|
|
248
|
+
outputs: [{
|
|
249
|
+
type: "tuple",
|
|
250
|
+
components: [
|
|
251
|
+
{
|
|
252
|
+
type: "uint16",
|
|
253
|
+
name: "ltv"
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
type: "uint16",
|
|
257
|
+
name: "liquidationThreshold"
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
type: "uint16",
|
|
261
|
+
name: "liquidationBonus"
|
|
262
|
+
}
|
|
263
|
+
]
|
|
264
|
+
}]
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
name: "getEModeCategoryCollateralBitmap",
|
|
268
|
+
type: "function",
|
|
269
|
+
stateMutability: "view",
|
|
270
|
+
inputs: [{
|
|
271
|
+
type: "uint8",
|
|
272
|
+
name: "id"
|
|
273
|
+
}],
|
|
274
|
+
outputs: [{ type: "uint128" }]
|
|
275
|
+
}
|
|
276
|
+
];
|
|
277
|
+
//#endregion
|
|
278
|
+
exports.iAaveV3PoolAbi = iAaveV3PoolAbi;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
//#region src/onchain/market/adapters/abi/aave/iPoolAddressesProvider.ts
|
|
3
|
+
const iPoolAddressesProviderAbi = [{
|
|
4
|
+
name: "getPriceOracle",
|
|
5
|
+
type: "function",
|
|
6
|
+
stateMutability: "view",
|
|
7
|
+
inputs: [],
|
|
8
|
+
outputs: [{ type: "address" }]
|
|
9
|
+
}];
|
|
10
|
+
//#endregion
|
|
11
|
+
exports.iPoolAddressesProviderAbi = iPoolAddressesProviderAbi;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_onchain_market_adapters_abi_aave_iAaveHorizonBridge = require("./iAaveHorizonBridge.js");
|
|
3
|
+
const require_onchain_market_adapters_abi_aave_iAaveOracle = require("./iAaveOracle.js");
|
|
4
|
+
const require_onchain_market_adapters_abi_aave_iAaveV3Pool = require("./iAaveV3Pool.js");
|
|
5
|
+
const require_onchain_market_adapters_abi_aave_iPoolAddressesProvider = require("./iPoolAddressesProvider.js");
|
|
6
|
+
exports.iAaveHorizonBridgeAbi = require_onchain_market_adapters_abi_aave_iAaveHorizonBridge.iAaveHorizonBridgeAbi;
|
|
7
|
+
exports.iAaveOracleAbi = require_onchain_market_adapters_abi_aave_iAaveOracle.iAaveOracleAbi;
|
|
8
|
+
exports.iAaveV3PoolAbi = require_onchain_market_adapters_abi_aave_iAaveV3Pool.iAaveV3PoolAbi;
|
|
9
|
+
exports.iPoolAddressesProviderAbi = require_onchain_market_adapters_abi_aave_iPoolAddressesProvider.iPoolAddressesProviderAbi;
|
|
@@ -8,6 +8,7 @@ let viem = require("viem");
|
|
|
8
8
|
* Based on the actual encodeAbiParameters calls in the adapter implementations
|
|
9
9
|
*/
|
|
10
10
|
const adapterActionSignatures = {
|
|
11
|
+
["AAVE_V3_POOL"]: { 311: "function setAssetStatusBatch((address,bool)[])" },
|
|
11
12
|
["BALANCER_V3_ROUTER"]: {
|
|
12
13
|
310: "function setPoolStatusBatch(address[],bool[])",
|
|
13
14
|
311: "function setPoolStatusBatch((address,uint8)[])"
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
//#region src/onchain/market/adapters/abi/adapters/iAaveHorizonBridgeAdapter.ts
|
|
3
|
+
const iAaveHorizonBridgeAdapterAbi = [
|
|
4
|
+
{
|
|
5
|
+
name: "contractType",
|
|
6
|
+
type: "function",
|
|
7
|
+
stateMutability: "view",
|
|
8
|
+
inputs: [],
|
|
9
|
+
outputs: [{ type: "bytes32" }]
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
name: "creditManager",
|
|
13
|
+
type: "function",
|
|
14
|
+
stateMutability: "view",
|
|
15
|
+
inputs: [],
|
|
16
|
+
outputs: [{ type: "address" }]
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
name: "targetContract",
|
|
20
|
+
type: "function",
|
|
21
|
+
stateMutability: "view",
|
|
22
|
+
inputs: [],
|
|
23
|
+
outputs: [{ type: "address" }]
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: "version",
|
|
27
|
+
type: "function",
|
|
28
|
+
stateMutability: "view",
|
|
29
|
+
inputs: [],
|
|
30
|
+
outputs: [{ type: "uint256" }]
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: "serialize",
|
|
34
|
+
type: "function",
|
|
35
|
+
stateMutability: "view",
|
|
36
|
+
inputs: [],
|
|
37
|
+
outputs: [{
|
|
38
|
+
type: "bytes",
|
|
39
|
+
name: "serializedData"
|
|
40
|
+
}]
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: "bridge",
|
|
44
|
+
type: "function",
|
|
45
|
+
stateMutability: "view",
|
|
46
|
+
inputs: [],
|
|
47
|
+
outputs: [{ type: "address" }]
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
name: "isATokenAllowed",
|
|
51
|
+
type: "function",
|
|
52
|
+
stateMutability: "view",
|
|
53
|
+
inputs: [{
|
|
54
|
+
type: "address",
|
|
55
|
+
name: "token"
|
|
56
|
+
}],
|
|
57
|
+
outputs: [{ type: "bool" }]
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: "isDebtTokenAllowed",
|
|
61
|
+
type: "function",
|
|
62
|
+
stateMutability: "view",
|
|
63
|
+
inputs: [{
|
|
64
|
+
type: "address",
|
|
65
|
+
name: "token"
|
|
66
|
+
}],
|
|
67
|
+
outputs: [{ type: "bool" }]
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: "allowedATokens",
|
|
71
|
+
type: "function",
|
|
72
|
+
stateMutability: "view",
|
|
73
|
+
inputs: [],
|
|
74
|
+
outputs: [{ type: "address[]" }]
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
name: "allowedDebtTokens",
|
|
78
|
+
type: "function",
|
|
79
|
+
stateMutability: "view",
|
|
80
|
+
inputs: [],
|
|
81
|
+
outputs: [{ type: "address[]" }]
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: "openPosition",
|
|
85
|
+
type: "function",
|
|
86
|
+
stateMutability: "nonpayable",
|
|
87
|
+
inputs: [
|
|
88
|
+
{
|
|
89
|
+
type: "address",
|
|
90
|
+
name: "aToken"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
type: "address",
|
|
94
|
+
name: "debtToken"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
type: "uint256",
|
|
98
|
+
name: "aTokenAmount"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
type: "uint256",
|
|
102
|
+
name: "borrowAmount"
|
|
103
|
+
}
|
|
104
|
+
],
|
|
105
|
+
outputs: [{
|
|
106
|
+
type: "bool",
|
|
107
|
+
name: "useSafePrices"
|
|
108
|
+
}]
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
name: "openPositionDiff",
|
|
112
|
+
type: "function",
|
|
113
|
+
stateMutability: "nonpayable",
|
|
114
|
+
inputs: [
|
|
115
|
+
{
|
|
116
|
+
type: "address",
|
|
117
|
+
name: "aToken"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
type: "address",
|
|
121
|
+
name: "debtToken"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
type: "uint256",
|
|
125
|
+
name: "leftoverAmount"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
type: "uint256",
|
|
129
|
+
name: "borrowAmount"
|
|
130
|
+
}
|
|
131
|
+
],
|
|
132
|
+
outputs: [{
|
|
133
|
+
type: "bool",
|
|
134
|
+
name: "useSafePrices"
|
|
135
|
+
}]
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
name: "closePosition",
|
|
139
|
+
type: "function",
|
|
140
|
+
stateMutability: "nonpayable",
|
|
141
|
+
inputs: [
|
|
142
|
+
{
|
|
143
|
+
type: "address",
|
|
144
|
+
name: "aToken"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
type: "address",
|
|
148
|
+
name: "debtToken"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
type: "uint256",
|
|
152
|
+
name: "repayAmount"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
type: "uint256",
|
|
156
|
+
name: "aTokenAmount"
|
|
157
|
+
}
|
|
158
|
+
],
|
|
159
|
+
outputs: [{
|
|
160
|
+
type: "bool",
|
|
161
|
+
name: "useSafePrices"
|
|
162
|
+
}]
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
name: "setATokenStatusBatch",
|
|
166
|
+
type: "function",
|
|
167
|
+
stateMutability: "nonpayable",
|
|
168
|
+
inputs: [{
|
|
169
|
+
type: "tuple[]",
|
|
170
|
+
name: "tokens",
|
|
171
|
+
components: [{
|
|
172
|
+
type: "address",
|
|
173
|
+
name: "token"
|
|
174
|
+
}, {
|
|
175
|
+
type: "bool",
|
|
176
|
+
name: "allowed"
|
|
177
|
+
}]
|
|
178
|
+
}],
|
|
179
|
+
outputs: []
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
name: "setDebtTokenStatusBatch",
|
|
183
|
+
type: "function",
|
|
184
|
+
stateMutability: "nonpayable",
|
|
185
|
+
inputs: [{
|
|
186
|
+
type: "tuple[]",
|
|
187
|
+
name: "tokens",
|
|
188
|
+
components: [{
|
|
189
|
+
type: "address",
|
|
190
|
+
name: "token"
|
|
191
|
+
}, {
|
|
192
|
+
type: "bool",
|
|
193
|
+
name: "allowed"
|
|
194
|
+
}]
|
|
195
|
+
}],
|
|
196
|
+
outputs: []
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
name: "SetATokenStatus",
|
|
200
|
+
type: "event",
|
|
201
|
+
inputs: [{
|
|
202
|
+
type: "address",
|
|
203
|
+
name: "token",
|
|
204
|
+
indexed: true
|
|
205
|
+
}, {
|
|
206
|
+
type: "bool",
|
|
207
|
+
name: "allowed"
|
|
208
|
+
}]
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
name: "SetDebtTokenStatus",
|
|
212
|
+
type: "event",
|
|
213
|
+
inputs: [{
|
|
214
|
+
type: "address",
|
|
215
|
+
name: "token",
|
|
216
|
+
indexed: true
|
|
217
|
+
}, {
|
|
218
|
+
type: "bool",
|
|
219
|
+
name: "allowed"
|
|
220
|
+
}]
|
|
221
|
+
}
|
|
222
|
+
];
|
|
223
|
+
//#endregion
|
|
224
|
+
exports.iAaveHorizonBridgeAdapterAbi = iAaveHorizonBridgeAdapterAbi;
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
//#region src/onchain/market/adapters/abi/adapters/iAaveV3PoolAdapter.ts
|
|
3
|
+
const iAaveV3PoolAdapterAbi = [
|
|
4
|
+
{
|
|
5
|
+
name: "contractType",
|
|
6
|
+
type: "function",
|
|
7
|
+
stateMutability: "view",
|
|
8
|
+
inputs: [],
|
|
9
|
+
outputs: [{ type: "bytes32" }]
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
name: "creditManager",
|
|
13
|
+
type: "function",
|
|
14
|
+
stateMutability: "view",
|
|
15
|
+
inputs: [],
|
|
16
|
+
outputs: [{ type: "address" }]
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
name: "targetContract",
|
|
20
|
+
type: "function",
|
|
21
|
+
stateMutability: "view",
|
|
22
|
+
inputs: [],
|
|
23
|
+
outputs: [{ type: "address" }]
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: "version",
|
|
27
|
+
type: "function",
|
|
28
|
+
stateMutability: "view",
|
|
29
|
+
inputs: [],
|
|
30
|
+
outputs: [{ type: "uint256" }]
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: "serialize",
|
|
34
|
+
type: "function",
|
|
35
|
+
stateMutability: "view",
|
|
36
|
+
inputs: [],
|
|
37
|
+
outputs: [{
|
|
38
|
+
type: "bytes",
|
|
39
|
+
name: "serializedData"
|
|
40
|
+
}]
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: "pool",
|
|
44
|
+
type: "function",
|
|
45
|
+
stateMutability: "view",
|
|
46
|
+
inputs: [],
|
|
47
|
+
outputs: [{ type: "address" }]
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
name: "referralCode",
|
|
51
|
+
type: "function",
|
|
52
|
+
stateMutability: "view",
|
|
53
|
+
inputs: [],
|
|
54
|
+
outputs: [{ type: "uint16" }]
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: "isAssetAllowed",
|
|
58
|
+
type: "function",
|
|
59
|
+
stateMutability: "view",
|
|
60
|
+
inputs: [{
|
|
61
|
+
type: "address",
|
|
62
|
+
name: "asset"
|
|
63
|
+
}],
|
|
64
|
+
outputs: [{ type: "bool" }]
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: "allowedAssets",
|
|
68
|
+
type: "function",
|
|
69
|
+
stateMutability: "view",
|
|
70
|
+
inputs: [],
|
|
71
|
+
outputs: [{ type: "address[]" }]
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
name: "supply",
|
|
75
|
+
type: "function",
|
|
76
|
+
stateMutability: "nonpayable",
|
|
77
|
+
inputs: [
|
|
78
|
+
{
|
|
79
|
+
type: "address",
|
|
80
|
+
name: "asset"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
type: "uint256",
|
|
84
|
+
name: "amount"
|
|
85
|
+
},
|
|
86
|
+
{ type: "address" },
|
|
87
|
+
{ type: "uint16" }
|
|
88
|
+
],
|
|
89
|
+
outputs: [{
|
|
90
|
+
type: "bool",
|
|
91
|
+
name: "useSafePrices"
|
|
92
|
+
}]
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
name: "supplyDiff",
|
|
96
|
+
type: "function",
|
|
97
|
+
stateMutability: "nonpayable",
|
|
98
|
+
inputs: [{
|
|
99
|
+
type: "address",
|
|
100
|
+
name: "asset"
|
|
101
|
+
}, {
|
|
102
|
+
type: "uint256",
|
|
103
|
+
name: "leftoverAmount"
|
|
104
|
+
}],
|
|
105
|
+
outputs: [{
|
|
106
|
+
type: "bool",
|
|
107
|
+
name: "useSafePrices"
|
|
108
|
+
}]
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
name: "withdraw",
|
|
112
|
+
type: "function",
|
|
113
|
+
stateMutability: "nonpayable",
|
|
114
|
+
inputs: [
|
|
115
|
+
{
|
|
116
|
+
type: "address",
|
|
117
|
+
name: "asset"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
type: "uint256",
|
|
121
|
+
name: "amount"
|
|
122
|
+
},
|
|
123
|
+
{ type: "address" }
|
|
124
|
+
],
|
|
125
|
+
outputs: [{
|
|
126
|
+
type: "bool",
|
|
127
|
+
name: "useSafePrices"
|
|
128
|
+
}]
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
name: "withdrawDiff",
|
|
132
|
+
type: "function",
|
|
133
|
+
stateMutability: "nonpayable",
|
|
134
|
+
inputs: [{
|
|
135
|
+
type: "address",
|
|
136
|
+
name: "asset"
|
|
137
|
+
}, {
|
|
138
|
+
type: "uint256",
|
|
139
|
+
name: "leftoverAmount"
|
|
140
|
+
}],
|
|
141
|
+
outputs: [{
|
|
142
|
+
type: "bool",
|
|
143
|
+
name: "useSafePrices"
|
|
144
|
+
}]
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
name: "setAssetStatusBatch",
|
|
148
|
+
type: "function",
|
|
149
|
+
stateMutability: "nonpayable",
|
|
150
|
+
inputs: [{
|
|
151
|
+
type: "tuple[]",
|
|
152
|
+
name: "assets",
|
|
153
|
+
components: [{
|
|
154
|
+
type: "address",
|
|
155
|
+
name: "asset"
|
|
156
|
+
}, {
|
|
157
|
+
type: "bool",
|
|
158
|
+
name: "allowed"
|
|
159
|
+
}]
|
|
160
|
+
}],
|
|
161
|
+
outputs: []
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
name: "SetAssetStatus",
|
|
165
|
+
type: "event",
|
|
166
|
+
inputs: [{
|
|
167
|
+
type: "address",
|
|
168
|
+
name: "asset",
|
|
169
|
+
indexed: true
|
|
170
|
+
}, {
|
|
171
|
+
type: "bool",
|
|
172
|
+
name: "allowed"
|
|
173
|
+
}]
|
|
174
|
+
}
|
|
175
|
+
];
|
|
176
|
+
//#endregion
|
|
177
|
+
exports.iAaveV3PoolAdapterAbi = iAaveV3PoolAdapterAbi;
|