@eulerxyz/euler-v2-sdk 1.1.0 → 1.1.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/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/sdk/buildSDK.d.ts +8 -0
- package/dist/src/sdk/buildSDK.d.ts.map +1 -1
- package/dist/src/sdk/buildSDK.js +20 -1
- package/dist/src/sdk/buildSDK.js.map +1 -1
- package/dist/src/sdk/sdk.d.ts +3 -0
- package/dist/src/sdk/sdk.d.ts.map +1 -1
- package/dist/src/sdk/sdk.js +2 -0
- package/dist/src/sdk/sdk.js.map +1 -1
- package/dist/src/services/executionService/abis/swapVerifierAbi.d.ts +130 -0
- package/dist/src/services/executionService/abis/swapVerifierAbi.d.ts.map +1 -1
- package/dist/src/services/executionService/abis/swapVerifierAbi.js +69 -0
- package/dist/src/services/executionService/abis/swapVerifierAbi.js.map +1 -1
- package/dist/src/services/executionService/executionService.d.ts +2 -1
- package/dist/src/services/executionService/executionService.d.ts.map +1 -1
- package/dist/src/services/executionService/executionService.js.map +1 -1
- package/dist/src/services/executionService/simulate.d.ts +2 -0
- package/dist/src/services/executionService/simulate.d.ts.map +1 -1
- package/dist/src/services/executionService/simulate.js +9 -1
- package/dist/src/services/executionService/simulate.js.map +1 -1
- package/dist/src/services/positionMigrationService/connectors/aave/aaveConnector.d.ts +81 -0
- package/dist/src/services/positionMigrationService/connectors/aave/aaveConnector.d.ts.map +1 -0
- package/dist/src/services/positionMigrationService/connectors/aave/aaveConnector.js +1291 -0
- package/dist/src/services/positionMigrationService/connectors/aave/aaveConnector.js.map +1 -0
- package/dist/src/services/positionMigrationService/connectors/aave/aaveConnectorTypes.d.ts +84 -0
- package/dist/src/services/positionMigrationService/connectors/aave/aaveConnectorTypes.d.ts.map +1 -0
- package/dist/src/services/positionMigrationService/connectors/aave/aaveConnectorTypes.js +2 -0
- package/dist/src/services/positionMigrationService/connectors/aave/aaveConnectorTypes.js.map +1 -0
- package/dist/src/services/positionMigrationService/connectors/aave/abis/aaveV3Abi.d.ts +370 -0
- package/dist/src/services/positionMigrationService/connectors/aave/abis/aaveV3Abi.d.ts.map +1 -0
- package/dist/src/services/positionMigrationService/connectors/aave/abis/aaveV3Abi.js +243 -0
- package/dist/src/services/positionMigrationService/connectors/aave/abis/aaveV3Abi.js.map +1 -0
- package/dist/src/services/positionMigrationService/connectors/aave/index.d.ts +4 -0
- package/dist/src/services/positionMigrationService/connectors/aave/index.d.ts.map +1 -0
- package/dist/src/services/positionMigrationService/connectors/aave/index.js +3 -0
- package/dist/src/services/positionMigrationService/connectors/aave/index.js.map +1 -0
- package/dist/src/services/positionMigrationService/connectors/index.d.ts +4 -0
- package/dist/src/services/positionMigrationService/connectors/index.d.ts.map +1 -0
- package/dist/src/services/positionMigrationService/connectors/index.js +4 -0
- package/dist/src/services/positionMigrationService/connectors/index.js.map +1 -0
- package/dist/src/services/positionMigrationService/connectors/metamorpho/abis/metamorphoAbi.d.ts +166 -0
- package/dist/src/services/positionMigrationService/connectors/metamorpho/abis/metamorphoAbi.d.ts.map +1 -0
- package/dist/src/services/positionMigrationService/connectors/metamorpho/abis/metamorphoAbi.js +108 -0
- package/dist/src/services/positionMigrationService/connectors/metamorpho/abis/metamorphoAbi.js.map +1 -0
- package/dist/src/services/positionMigrationService/connectors/metamorpho/index.d.ts +4 -0
- package/dist/src/services/positionMigrationService/connectors/metamorpho/index.d.ts.map +1 -0
- package/dist/src/services/positionMigrationService/connectors/metamorpho/index.js +3 -0
- package/dist/src/services/positionMigrationService/connectors/metamorpho/index.js.map +1 -0
- package/dist/src/services/positionMigrationService/connectors/metamorpho/metamorphoConnector.d.ts +56 -0
- package/dist/src/services/positionMigrationService/connectors/metamorpho/metamorphoConnector.d.ts.map +1 -0
- package/dist/src/services/positionMigrationService/connectors/metamorpho/metamorphoConnector.js +426 -0
- package/dist/src/services/positionMigrationService/connectors/metamorpho/metamorphoConnector.js.map +1 -0
- package/dist/src/services/positionMigrationService/connectors/metamorpho/metamorphoConnectorTypes.d.ts +46 -0
- package/dist/src/services/positionMigrationService/connectors/metamorpho/metamorphoConnectorTypes.d.ts.map +1 -0
- package/dist/src/services/positionMigrationService/connectors/metamorpho/metamorphoConnectorTypes.js +2 -0
- package/dist/src/services/positionMigrationService/connectors/metamorpho/metamorphoConnectorTypes.js.map +1 -0
- package/dist/src/services/positionMigrationService/connectors/morpho/abis/morphoBlueAbi.d.ts +269 -0
- package/dist/src/services/positionMigrationService/connectors/morpho/abis/morphoBlueAbi.d.ts.map +1 -0
- package/dist/src/services/positionMigrationService/connectors/morpho/abis/morphoBlueAbi.js +172 -0
- package/dist/src/services/positionMigrationService/connectors/morpho/abis/morphoBlueAbi.js.map +1 -0
- package/dist/src/services/positionMigrationService/connectors/morpho/index.d.ts +4 -0
- package/dist/src/services/positionMigrationService/connectors/morpho/index.d.ts.map +1 -0
- package/dist/src/services/positionMigrationService/connectors/morpho/index.js +3 -0
- package/dist/src/services/positionMigrationService/connectors/morpho/index.js.map +1 -0
- package/dist/src/services/positionMigrationService/connectors/morpho/morphoConnector.d.ts +57 -0
- package/dist/src/services/positionMigrationService/connectors/morpho/morphoConnector.d.ts.map +1 -0
- package/dist/src/services/positionMigrationService/connectors/morpho/morphoConnector.js +856 -0
- package/dist/src/services/positionMigrationService/connectors/morpho/morphoConnector.js.map +1 -0
- package/dist/src/services/positionMigrationService/connectors/morpho/morphoConnectorTypes.d.ts +61 -0
- package/dist/src/services/positionMigrationService/connectors/morpho/morphoConnectorTypes.d.ts.map +1 -0
- package/dist/src/services/positionMigrationService/connectors/morpho/morphoConnectorTypes.js +2 -0
- package/dist/src/services/positionMigrationService/connectors/morpho/morphoConnectorTypes.js.map +1 -0
- package/dist/src/services/positionMigrationService/connectors/shared.d.ts +83 -0
- package/dist/src/services/positionMigrationService/connectors/shared.d.ts.map +1 -0
- package/dist/src/services/positionMigrationService/connectors/shared.js +214 -0
- package/dist/src/services/positionMigrationService/connectors/shared.js.map +1 -0
- package/dist/src/services/positionMigrationService/index.d.ts +4 -0
- package/dist/src/services/positionMigrationService/index.d.ts.map +1 -0
- package/dist/src/services/positionMigrationService/index.js +3 -0
- package/dist/src/services/positionMigrationService/index.js.map +1 -0
- package/dist/src/services/positionMigrationService/positionMigrationService.d.ts +30 -0
- package/dist/src/services/positionMigrationService/positionMigrationService.d.ts.map +1 -0
- package/dist/src/services/positionMigrationService/positionMigrationService.js +420 -0
- package/dist/src/services/positionMigrationService/positionMigrationService.js.map +1 -0
- package/dist/src/services/positionMigrationService/positionMigrationServiceTypes.d.ts +235 -0
- package/dist/src/services/positionMigrationService/positionMigrationServiceTypes.d.ts.map +1 -0
- package/dist/src/services/positionMigrationService/positionMigrationServiceTypes.js +2 -0
- package/dist/src/services/positionMigrationService/positionMigrationServiceTypes.js.map +1 -0
- package/dist/src/services/swapService/swapVerification.d.ts +1 -1
- package/dist/src/services/swapService/swapVerification.d.ts.map +1 -1
- package/dist/src/utils/oracle.d.ts.map +1 -1
- package/dist/src/utils/oracle.js +6 -2
- package/dist/src/utils/oracle.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
export const aaveV3PoolAbi = [
|
|
2
|
+
{
|
|
3
|
+
type: "function",
|
|
4
|
+
name: "borrow",
|
|
5
|
+
inputs: [
|
|
6
|
+
{ name: "asset", type: "address", internalType: "address" },
|
|
7
|
+
{ name: "amount", type: "uint256", internalType: "uint256" },
|
|
8
|
+
{
|
|
9
|
+
name: "interestRateMode",
|
|
10
|
+
type: "uint256",
|
|
11
|
+
internalType: "uint256",
|
|
12
|
+
},
|
|
13
|
+
{ name: "referralCode", type: "uint16", internalType: "uint16" },
|
|
14
|
+
{ name: "onBehalfOf", type: "address", internalType: "address" },
|
|
15
|
+
],
|
|
16
|
+
outputs: [],
|
|
17
|
+
stateMutability: "nonpayable",
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
type: "function",
|
|
21
|
+
name: "getReserveData",
|
|
22
|
+
inputs: [{ name: "asset", type: "address", internalType: "address" }],
|
|
23
|
+
outputs: [
|
|
24
|
+
{
|
|
25
|
+
name: "",
|
|
26
|
+
type: "tuple",
|
|
27
|
+
internalType: "struct DataTypes.ReserveData",
|
|
28
|
+
components: [
|
|
29
|
+
{
|
|
30
|
+
name: "configuration",
|
|
31
|
+
type: "tuple",
|
|
32
|
+
internalType: "struct DataTypes.ReserveConfigurationMap",
|
|
33
|
+
components: [
|
|
34
|
+
{ name: "data", type: "uint256", internalType: "uint256" },
|
|
35
|
+
],
|
|
36
|
+
},
|
|
37
|
+
{ name: "liquidityIndex", type: "uint128", internalType: "uint128" },
|
|
38
|
+
{
|
|
39
|
+
name: "currentLiquidityRate",
|
|
40
|
+
type: "uint128",
|
|
41
|
+
internalType: "uint128",
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
name: "variableBorrowIndex",
|
|
45
|
+
type: "uint128",
|
|
46
|
+
internalType: "uint128",
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
name: "currentVariableBorrowRate",
|
|
50
|
+
type: "uint128",
|
|
51
|
+
internalType: "uint128",
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
name: "currentStableBorrowRate",
|
|
55
|
+
type: "uint128",
|
|
56
|
+
internalType: "uint128",
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: "lastUpdateTimestamp",
|
|
60
|
+
type: "uint40",
|
|
61
|
+
internalType: "uint40",
|
|
62
|
+
},
|
|
63
|
+
{ name: "id", type: "uint16", internalType: "uint16" },
|
|
64
|
+
{
|
|
65
|
+
name: "aTokenAddress",
|
|
66
|
+
type: "address",
|
|
67
|
+
internalType: "address",
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: "stableDebtTokenAddress",
|
|
71
|
+
type: "address",
|
|
72
|
+
internalType: "address",
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
name: "variableDebtTokenAddress",
|
|
76
|
+
type: "address",
|
|
77
|
+
internalType: "address",
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: "interestRateStrategyAddress",
|
|
81
|
+
type: "address",
|
|
82
|
+
internalType: "address",
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
name: "accruedToTreasury",
|
|
86
|
+
type: "uint128",
|
|
87
|
+
internalType: "uint128",
|
|
88
|
+
},
|
|
89
|
+
{ name: "unbacked", type: "uint128", internalType: "uint128" },
|
|
90
|
+
{
|
|
91
|
+
name: "isolationModeTotalDebt",
|
|
92
|
+
type: "uint128",
|
|
93
|
+
internalType: "uint128",
|
|
94
|
+
},
|
|
95
|
+
],
|
|
96
|
+
},
|
|
97
|
+
],
|
|
98
|
+
stateMutability: "view",
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
type: "function",
|
|
102
|
+
name: "repay",
|
|
103
|
+
inputs: [
|
|
104
|
+
{ name: "asset", type: "address", internalType: "address" },
|
|
105
|
+
{ name: "amount", type: "uint256", internalType: "uint256" },
|
|
106
|
+
{
|
|
107
|
+
name: "interestRateMode",
|
|
108
|
+
type: "uint256",
|
|
109
|
+
internalType: "uint256",
|
|
110
|
+
},
|
|
111
|
+
{ name: "onBehalfOf", type: "address", internalType: "address" },
|
|
112
|
+
],
|
|
113
|
+
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
|
|
114
|
+
stateMutability: "nonpayable",
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
type: "function",
|
|
118
|
+
name: "supply",
|
|
119
|
+
inputs: [
|
|
120
|
+
{ name: "asset", type: "address", internalType: "address" },
|
|
121
|
+
{ name: "amount", type: "uint256", internalType: "uint256" },
|
|
122
|
+
{ name: "onBehalfOf", type: "address", internalType: "address" },
|
|
123
|
+
{ name: "referralCode", type: "uint16", internalType: "uint16" },
|
|
124
|
+
],
|
|
125
|
+
outputs: [],
|
|
126
|
+
stateMutability: "nonpayable",
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
type: "function",
|
|
130
|
+
name: "withdraw",
|
|
131
|
+
inputs: [
|
|
132
|
+
{ name: "asset", type: "address", internalType: "address" },
|
|
133
|
+
{ name: "amount", type: "uint256", internalType: "uint256" },
|
|
134
|
+
{ name: "to", type: "address", internalType: "address" },
|
|
135
|
+
],
|
|
136
|
+
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
|
|
137
|
+
stateMutability: "nonpayable",
|
|
138
|
+
},
|
|
139
|
+
];
|
|
140
|
+
export const aaveATokenAbi = [
|
|
141
|
+
{
|
|
142
|
+
type: "function",
|
|
143
|
+
name: "allowance",
|
|
144
|
+
inputs: [
|
|
145
|
+
{ name: "owner", type: "address", internalType: "address" },
|
|
146
|
+
{ name: "spender", type: "address", internalType: "address" },
|
|
147
|
+
],
|
|
148
|
+
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
|
|
149
|
+
stateMutability: "view",
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
type: "function",
|
|
153
|
+
name: "balanceOf",
|
|
154
|
+
inputs: [{ name: "account", type: "address", internalType: "address" }],
|
|
155
|
+
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
|
|
156
|
+
stateMutability: "view",
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
type: "function",
|
|
160
|
+
name: "name",
|
|
161
|
+
inputs: [],
|
|
162
|
+
outputs: [{ name: "", type: "string", internalType: "string" }],
|
|
163
|
+
stateMutability: "view",
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
type: "function",
|
|
167
|
+
name: "totalSupply",
|
|
168
|
+
inputs: [],
|
|
169
|
+
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
|
|
170
|
+
stateMutability: "view",
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
type: "function",
|
|
174
|
+
name: "nonces",
|
|
175
|
+
inputs: [{ name: "owner", type: "address", internalType: "address" }],
|
|
176
|
+
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
|
|
177
|
+
stateMutability: "view",
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
type: "function",
|
|
181
|
+
name: "permit",
|
|
182
|
+
inputs: [
|
|
183
|
+
{ name: "owner", type: "address", internalType: "address" },
|
|
184
|
+
{ name: "spender", type: "address", internalType: "address" },
|
|
185
|
+
{ name: "value", type: "uint256", internalType: "uint256" },
|
|
186
|
+
{ name: "deadline", type: "uint256", internalType: "uint256" },
|
|
187
|
+
{ name: "v", type: "uint8", internalType: "uint8" },
|
|
188
|
+
{ name: "r", type: "bytes32", internalType: "bytes32" },
|
|
189
|
+
{ name: "s", type: "bytes32", internalType: "bytes32" },
|
|
190
|
+
],
|
|
191
|
+
outputs: [],
|
|
192
|
+
stateMutability: "nonpayable",
|
|
193
|
+
},
|
|
194
|
+
];
|
|
195
|
+
export const aaveDebtTokenAbi = [
|
|
196
|
+
{
|
|
197
|
+
type: "function",
|
|
198
|
+
name: "balanceOf",
|
|
199
|
+
inputs: [{ name: "account", type: "address", internalType: "address" }],
|
|
200
|
+
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
|
|
201
|
+
stateMutability: "view",
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
type: "function",
|
|
205
|
+
name: "borrowAllowance",
|
|
206
|
+
inputs: [
|
|
207
|
+
{ name: "fromUser", type: "address", internalType: "address" },
|
|
208
|
+
{ name: "toUser", type: "address", internalType: "address" },
|
|
209
|
+
],
|
|
210
|
+
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
|
|
211
|
+
stateMutability: "view",
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
type: "function",
|
|
215
|
+
name: "delegationWithSig",
|
|
216
|
+
inputs: [
|
|
217
|
+
{ name: "delegator", type: "address", internalType: "address" },
|
|
218
|
+
{ name: "delegatee", type: "address", internalType: "address" },
|
|
219
|
+
{ name: "value", type: "uint256", internalType: "uint256" },
|
|
220
|
+
{ name: "deadline", type: "uint256", internalType: "uint256" },
|
|
221
|
+
{ name: "v", type: "uint8", internalType: "uint8" },
|
|
222
|
+
{ name: "r", type: "bytes32", internalType: "bytes32" },
|
|
223
|
+
{ name: "s", type: "bytes32", internalType: "bytes32" },
|
|
224
|
+
],
|
|
225
|
+
outputs: [],
|
|
226
|
+
stateMutability: "nonpayable",
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
type: "function",
|
|
230
|
+
name: "name",
|
|
231
|
+
inputs: [],
|
|
232
|
+
outputs: [{ name: "", type: "string", internalType: "string" }],
|
|
233
|
+
stateMutability: "view",
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
type: "function",
|
|
237
|
+
name: "nonces",
|
|
238
|
+
inputs: [{ name: "owner", type: "address", internalType: "address" }],
|
|
239
|
+
outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
|
|
240
|
+
stateMutability: "view",
|
|
241
|
+
},
|
|
242
|
+
];
|
|
243
|
+
//# sourceMappingURL=aaveV3Abi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aaveV3Abi.js","sourceRoot":"","sources":["../../../../../../../src/services/positionMigrationService/connectors/aave/abis/aaveV3Abi.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,aAAa,GAAG;IAC5B;QACC,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,QAAQ;QACd,MAAM,EAAE;YACP,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE;YAC3D,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE;YAC5D;gBACC,IAAI,EAAE,kBAAkB;gBACxB,IAAI,EAAE,SAAS;gBACf,YAAY,EAAE,SAAS;aACvB;YACD,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,QAAQ,EAAE,YA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,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE,CAAC;QACrE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE,CAAC;QACjE,eAAe,EAAE,MAAM;KACvB;CACQ,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { aaveATokenAbi, aaveDebtTokenAbi, aaveV3PoolAbi } from "./abis/aaveV3Abi.js";
|
|
2
|
+
export { AAVE_CONNECTOR_ID, AAVE_DELEGATION_TYPES, AAVE_PERMIT_TYPES, AAVE_PROTOCOL, AavePositionMigrationConnector, getAavePositionId, splitAaveSignature, } from "./aaveConnector.js";
|
|
3
|
+
export type { AaveDelegationTypedDataMessage, AaveDelegationTypedDataRequest, AaveMigrationAuthorizationRequest, AaveMigrationConnectorConfig, AaveMarketDeploymentConfig, AaveMigrationPosition, AaveMigrationTargetExtraData, AavePermitTypedDataMessage, AavePermitTypedDataRequest, AavePositionRaw, AavePositionRef, AaveMigrationTargetRaw, AaveReserveData, AaveReserveTokens, AaveSignature, } from "./aaveConnectorTypes.js";
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/services/positionMigrationService/connectors/aave/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACrF,OAAO,EACN,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,8BAA8B,EAC9B,iBAAiB,EACjB,kBAAkB,GAClB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EACX,8BAA8B,EAC9B,8BAA8B,EAC9B,iCAAiC,EACjC,4BAA4B,EAC5B,0BAA0B,EAC1B,qBAAqB,EACrB,4BAA4B,EAC5B,0BAA0B,EAC1B,0BAA0B,EAC1B,eAAe,EACf,eAAe,EACf,sBAAsB,EACtB,eAAe,EACf,iBAAiB,EACjB,aAAa,GACb,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { aaveATokenAbi, aaveDebtTokenAbi, aaveV3PoolAbi } from "./abis/aaveV3Abi.js";
|
|
2
|
+
export { AAVE_CONNECTOR_ID, AAVE_DELEGATION_TYPES, AAVE_PERMIT_TYPES, AAVE_PROTOCOL, AavePositionMigrationConnector, getAavePositionId, splitAaveSignature, } from "./aaveConnector.js";
|
|
3
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/services/positionMigrationService/connectors/aave/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACrF,OAAO,EACN,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,8BAA8B,EAC9B,iBAAiB,EACjB,kBAAkB,GAClB,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/services/positionMigrationService/connectors/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/services/positionMigrationService/connectors/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC"}
|
package/dist/src/services/positionMigrationService/connectors/metamorpho/abis/metamorphoAbi.d.ts
ADDED
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Minimal ABI shared by MetaMorpho v1/v1.1 and Morpho Vaults V2 — the
|
|
3
|
+
* ERC-4626 + ERC-2612 surface used for position reads, permits and redeems.
|
|
4
|
+
* `eip712Domain` (EIP-5267) is only implemented by v1/v1.1 (OZ ERC20Permit).
|
|
5
|
+
*/
|
|
6
|
+
export declare const metamorphoAbi: readonly [{
|
|
7
|
+
readonly type: "function";
|
|
8
|
+
readonly name: "asset";
|
|
9
|
+
readonly stateMutability: "view";
|
|
10
|
+
readonly inputs: readonly [];
|
|
11
|
+
readonly outputs: readonly [{
|
|
12
|
+
readonly name: "";
|
|
13
|
+
readonly type: "address";
|
|
14
|
+
}];
|
|
15
|
+
}, {
|
|
16
|
+
readonly type: "function";
|
|
17
|
+
readonly name: "name";
|
|
18
|
+
readonly stateMutability: "view";
|
|
19
|
+
readonly inputs: readonly [];
|
|
20
|
+
readonly outputs: readonly [{
|
|
21
|
+
readonly name: "";
|
|
22
|
+
readonly type: "string";
|
|
23
|
+
}];
|
|
24
|
+
}, {
|
|
25
|
+
readonly type: "function";
|
|
26
|
+
readonly name: "symbol";
|
|
27
|
+
readonly stateMutability: "view";
|
|
28
|
+
readonly inputs: readonly [];
|
|
29
|
+
readonly outputs: readonly [{
|
|
30
|
+
readonly name: "";
|
|
31
|
+
readonly type: "string";
|
|
32
|
+
}];
|
|
33
|
+
}, {
|
|
34
|
+
readonly type: "function";
|
|
35
|
+
readonly name: "decimals";
|
|
36
|
+
readonly stateMutability: "view";
|
|
37
|
+
readonly inputs: readonly [];
|
|
38
|
+
readonly outputs: readonly [{
|
|
39
|
+
readonly name: "";
|
|
40
|
+
readonly type: "uint8";
|
|
41
|
+
}];
|
|
42
|
+
}, {
|
|
43
|
+
readonly type: "function";
|
|
44
|
+
readonly name: "balanceOf";
|
|
45
|
+
readonly stateMutability: "view";
|
|
46
|
+
readonly inputs: readonly [{
|
|
47
|
+
readonly name: "account";
|
|
48
|
+
readonly type: "address";
|
|
49
|
+
}];
|
|
50
|
+
readonly outputs: readonly [{
|
|
51
|
+
readonly name: "";
|
|
52
|
+
readonly type: "uint256";
|
|
53
|
+
}];
|
|
54
|
+
}, {
|
|
55
|
+
readonly type: "function";
|
|
56
|
+
readonly name: "convertToAssets";
|
|
57
|
+
readonly stateMutability: "view";
|
|
58
|
+
readonly inputs: readonly [{
|
|
59
|
+
readonly name: "shares";
|
|
60
|
+
readonly type: "uint256";
|
|
61
|
+
}];
|
|
62
|
+
readonly outputs: readonly [{
|
|
63
|
+
readonly name: "";
|
|
64
|
+
readonly type: "uint256";
|
|
65
|
+
}];
|
|
66
|
+
}, {
|
|
67
|
+
readonly type: "function";
|
|
68
|
+
readonly name: "allowance";
|
|
69
|
+
readonly stateMutability: "view";
|
|
70
|
+
readonly inputs: readonly [{
|
|
71
|
+
readonly name: "owner";
|
|
72
|
+
readonly type: "address";
|
|
73
|
+
}, {
|
|
74
|
+
readonly name: "spender";
|
|
75
|
+
readonly type: "address";
|
|
76
|
+
}];
|
|
77
|
+
readonly outputs: readonly [{
|
|
78
|
+
readonly name: "";
|
|
79
|
+
readonly type: "uint256";
|
|
80
|
+
}];
|
|
81
|
+
}, {
|
|
82
|
+
readonly type: "function";
|
|
83
|
+
readonly name: "nonces";
|
|
84
|
+
readonly stateMutability: "view";
|
|
85
|
+
readonly inputs: readonly [{
|
|
86
|
+
readonly name: "owner";
|
|
87
|
+
readonly type: "address";
|
|
88
|
+
}];
|
|
89
|
+
readonly outputs: readonly [{
|
|
90
|
+
readonly name: "";
|
|
91
|
+
readonly type: "uint256";
|
|
92
|
+
}];
|
|
93
|
+
}, {
|
|
94
|
+
readonly type: "function";
|
|
95
|
+
readonly name: "redeem";
|
|
96
|
+
readonly stateMutability: "nonpayable";
|
|
97
|
+
readonly inputs: readonly [{
|
|
98
|
+
readonly name: "shares";
|
|
99
|
+
readonly type: "uint256";
|
|
100
|
+
}, {
|
|
101
|
+
readonly name: "receiver";
|
|
102
|
+
readonly type: "address";
|
|
103
|
+
}, {
|
|
104
|
+
readonly name: "owner";
|
|
105
|
+
readonly type: "address";
|
|
106
|
+
}];
|
|
107
|
+
readonly outputs: readonly [{
|
|
108
|
+
readonly name: "assets";
|
|
109
|
+
readonly type: "uint256";
|
|
110
|
+
}];
|
|
111
|
+
}, {
|
|
112
|
+
readonly type: "function";
|
|
113
|
+
readonly name: "permit";
|
|
114
|
+
readonly stateMutability: "nonpayable";
|
|
115
|
+
readonly inputs: readonly [{
|
|
116
|
+
readonly name: "owner";
|
|
117
|
+
readonly type: "address";
|
|
118
|
+
}, {
|
|
119
|
+
readonly name: "spender";
|
|
120
|
+
readonly type: "address";
|
|
121
|
+
}, {
|
|
122
|
+
readonly name: "value";
|
|
123
|
+
readonly type: "uint256";
|
|
124
|
+
}, {
|
|
125
|
+
readonly name: "deadline";
|
|
126
|
+
readonly type: "uint256";
|
|
127
|
+
}, {
|
|
128
|
+
readonly name: "v";
|
|
129
|
+
readonly type: "uint8";
|
|
130
|
+
}, {
|
|
131
|
+
readonly name: "r";
|
|
132
|
+
readonly type: "bytes32";
|
|
133
|
+
}, {
|
|
134
|
+
readonly name: "s";
|
|
135
|
+
readonly type: "bytes32";
|
|
136
|
+
}];
|
|
137
|
+
readonly outputs: readonly [];
|
|
138
|
+
}, {
|
|
139
|
+
readonly type: "function";
|
|
140
|
+
readonly name: "eip712Domain";
|
|
141
|
+
readonly stateMutability: "view";
|
|
142
|
+
readonly inputs: readonly [];
|
|
143
|
+
readonly outputs: readonly [{
|
|
144
|
+
readonly name: "fields";
|
|
145
|
+
readonly type: "bytes1";
|
|
146
|
+
}, {
|
|
147
|
+
readonly name: "name";
|
|
148
|
+
readonly type: "string";
|
|
149
|
+
}, {
|
|
150
|
+
readonly name: "version";
|
|
151
|
+
readonly type: "string";
|
|
152
|
+
}, {
|
|
153
|
+
readonly name: "chainId";
|
|
154
|
+
readonly type: "uint256";
|
|
155
|
+
}, {
|
|
156
|
+
readonly name: "verifyingContract";
|
|
157
|
+
readonly type: "address";
|
|
158
|
+
}, {
|
|
159
|
+
readonly name: "salt";
|
|
160
|
+
readonly type: "bytes32";
|
|
161
|
+
}, {
|
|
162
|
+
readonly name: "extensions";
|
|
163
|
+
readonly type: "uint256[]";
|
|
164
|
+
}];
|
|
165
|
+
}];
|
|
166
|
+
//# sourceMappingURL=metamorphoAbi.d.ts.map
|
package/dist/src/services/positionMigrationService/connectors/metamorpho/abis/metamorphoAbi.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metamorphoAbi.d.ts","sourceRoot":"","sources":["../../../../../../../src/services/positionMigrationService/connectors/metamorpho/abis/metamorphoAbi.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqGhB,CAAC"}
|
package/dist/src/services/positionMigrationService/connectors/metamorpho/abis/metamorphoAbi.js
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Minimal ABI shared by MetaMorpho v1/v1.1 and Morpho Vaults V2 — the
|
|
3
|
+
* ERC-4626 + ERC-2612 surface used for position reads, permits and redeems.
|
|
4
|
+
* `eip712Domain` (EIP-5267) is only implemented by v1/v1.1 (OZ ERC20Permit).
|
|
5
|
+
*/
|
|
6
|
+
export const metamorphoAbi = [
|
|
7
|
+
{
|
|
8
|
+
type: "function",
|
|
9
|
+
name: "asset",
|
|
10
|
+
stateMutability: "view",
|
|
11
|
+
inputs: [],
|
|
12
|
+
outputs: [{ name: "", type: "address" }],
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
type: "function",
|
|
16
|
+
name: "name",
|
|
17
|
+
stateMutability: "view",
|
|
18
|
+
inputs: [],
|
|
19
|
+
outputs: [{ name: "", type: "string" }],
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
type: "function",
|
|
23
|
+
name: "symbol",
|
|
24
|
+
stateMutability: "view",
|
|
25
|
+
inputs: [],
|
|
26
|
+
outputs: [{ name: "", type: "string" }],
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
type: "function",
|
|
30
|
+
name: "decimals",
|
|
31
|
+
stateMutability: "view",
|
|
32
|
+
inputs: [],
|
|
33
|
+
outputs: [{ name: "", type: "uint8" }],
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
type: "function",
|
|
37
|
+
name: "balanceOf",
|
|
38
|
+
stateMutability: "view",
|
|
39
|
+
inputs: [{ name: "account", type: "address" }],
|
|
40
|
+
outputs: [{ name: "", type: "uint256" }],
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
type: "function",
|
|
44
|
+
name: "convertToAssets",
|
|
45
|
+
stateMutability: "view",
|
|
46
|
+
inputs: [{ name: "shares", type: "uint256" }],
|
|
47
|
+
outputs: [{ name: "", type: "uint256" }],
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
type: "function",
|
|
51
|
+
name: "allowance",
|
|
52
|
+
stateMutability: "view",
|
|
53
|
+
inputs: [
|
|
54
|
+
{ name: "owner", type: "address" },
|
|
55
|
+
{ name: "spender", type: "address" },
|
|
56
|
+
],
|
|
57
|
+
outputs: [{ name: "", type: "uint256" }],
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
type: "function",
|
|
61
|
+
name: "nonces",
|
|
62
|
+
stateMutability: "view",
|
|
63
|
+
inputs: [{ name: "owner", type: "address" }],
|
|
64
|
+
outputs: [{ name: "", type: "uint256" }],
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
type: "function",
|
|
68
|
+
name: "redeem",
|
|
69
|
+
stateMutability: "nonpayable",
|
|
70
|
+
inputs: [
|
|
71
|
+
{ name: "shares", type: "uint256" },
|
|
72
|
+
{ name: "receiver", type: "address" },
|
|
73
|
+
{ name: "owner", type: "address" },
|
|
74
|
+
],
|
|
75
|
+
outputs: [{ name: "assets", type: "uint256" }],
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
type: "function",
|
|
79
|
+
name: "permit",
|
|
80
|
+
stateMutability: "nonpayable",
|
|
81
|
+
inputs: [
|
|
82
|
+
{ name: "owner", type: "address" },
|
|
83
|
+
{ name: "spender", type: "address" },
|
|
84
|
+
{ name: "value", type: "uint256" },
|
|
85
|
+
{ name: "deadline", type: "uint256" },
|
|
86
|
+
{ name: "v", type: "uint8" },
|
|
87
|
+
{ name: "r", type: "bytes32" },
|
|
88
|
+
{ name: "s", type: "bytes32" },
|
|
89
|
+
],
|
|
90
|
+
outputs: [],
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
type: "function",
|
|
94
|
+
name: "eip712Domain",
|
|
95
|
+
stateMutability: "view",
|
|
96
|
+
inputs: [],
|
|
97
|
+
outputs: [
|
|
98
|
+
{ name: "fields", type: "bytes1" },
|
|
99
|
+
{ name: "name", type: "string" },
|
|
100
|
+
{ name: "version", type: "string" },
|
|
101
|
+
{ name: "chainId", type: "uint256" },
|
|
102
|
+
{ name: "verifyingContract", type: "address" },
|
|
103
|
+
{ name: "salt", type: "bytes32" },
|
|
104
|
+
{ name: "extensions", type: "uint256[]" },
|
|
105
|
+
],
|
|
106
|
+
},
|
|
107
|
+
];
|
|
108
|
+
//# sourceMappingURL=metamorphoAbi.js.map
|
package/dist/src/services/positionMigrationService/connectors/metamorpho/abis/metamorphoAbi.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metamorphoAbi.js","sourceRoot":"","sources":["../../../../../../../src/services/positionMigrationService/connectors/metamorpho/abis/metamorphoAbi.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC5B;QACC,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,OAAO;QACb,eAA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EAAE;YACrC,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE;YAC5B,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE;YAC9B,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE;SAC9B;QACD,OAAO,EAAE,EAAE;KACX;IACD;QACC,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,cAAc;QACpB,eAAe,EAAE,MAAM;QACvB,MAAM,EAAE,EAAE;QACV,OAAO,EAAE;YACR,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE;YAClC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE;YAChC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE;YACnC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE;YACpC,EAAE,IAAI,EAAE,mBAAmB,EAAE,IAAI,EAAE,SAAS,EAAE;YAC9C,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE;YACjC,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,WAAW,EAAE;SACzC;KACD;CACQ,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { metamorphoAbi } from "./abis/metamorphoAbi.js";
|
|
2
|
+
export { getMetamorphoAllowanceSlotIndex, getMetamorphoPositionId, METAMORPHO_CONNECTOR_ID, METAMORPHO_PERMIT_TYPES, METAMORPHO_PROTOCOL, METAMORPHO_V1_ALLOWANCE_SLOT_INDEX, METAMORPHO_V2_ALLOWANCE_SLOT_INDEX, MetamorphoPositionMigrationConnector, } from "./metamorphoConnector.js";
|
|
3
|
+
export type { MetamorphoMigrationAuthorizationRequest, MetamorphoMigrationConnectorConfig, MetamorphoMigrationPosition, MetamorphoPermitTypedDataMessage, MetamorphoPermitTypedDataRequest, MetamorphoPositionRaw, MetamorphoPositionRef, MetamorphoVaultVersion, } from "./metamorphoConnectorTypes.js";
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/services/positionMigrationService/connectors/metamorpho/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EACN,+BAA+B,EAC/B,uBAAuB,EACvB,uBAAuB,EACvB,uBAAuB,EACvB,mBAAmB,EACnB,kCAAkC,EAClC,kCAAkC,EAClC,oCAAoC,GACpC,MAAM,0BAA0B,CAAC;AAClC,YAAY,EACX,uCAAuC,EACvC,kCAAkC,EAClC,2BAA2B,EAC3B,gCAAgC,EAChC,gCAAgC,EAChC,qBAAqB,EACrB,qBAAqB,EACrB,sBAAsB,GACtB,MAAM,+BAA+B,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { metamorphoAbi } from "./abis/metamorphoAbi.js";
|
|
2
|
+
export { getMetamorphoAllowanceSlotIndex, getMetamorphoPositionId, METAMORPHO_CONNECTOR_ID, METAMORPHO_PERMIT_TYPES, METAMORPHO_PROTOCOL, METAMORPHO_V1_ALLOWANCE_SLOT_INDEX, METAMORPHO_V2_ALLOWANCE_SLOT_INDEX, MetamorphoPositionMigrationConnector, } from "./metamorphoConnector.js";
|
|
3
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/services/positionMigrationService/connectors/metamorpho/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EACN,+BAA+B,EAC/B,uBAAuB,EACvB,uBAAuB,EACvB,uBAAuB,EACvB,mBAAmB,EACnB,kCAAkC,EAClC,kCAAkC,EAClC,oCAAoC,GACpC,MAAM,0BAA0B,CAAC"}
|
package/dist/src/services/positionMigrationService/connectors/metamorpho/metamorphoConnector.d.ts
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { IDeploymentService } from "../../../deploymentService/index.js";
|
|
2
|
+
import { type EVCBatchItem, type IExecutionService } from "../../../executionService/index.js";
|
|
3
|
+
import type { IProviderService } from "../../../providerService/index.js";
|
|
4
|
+
import type { BuildConnectorMigrationBatchArgs, GetMigrationAuthorizationArgs, GetMigrationPositionArgs, ListMigrationPositionsArgs, PositionMigrationConnector } from "../../positionMigrationServiceTypes.js";
|
|
5
|
+
import type { MetamorphoMigrationConnectorConfig, MetamorphoMigrationPosition, MetamorphoPermitTypedDataRequest, MetamorphoPositionRef, MetamorphoVaultVersion } from "./metamorphoConnectorTypes.js";
|
|
6
|
+
export declare const METAMORPHO_CONNECTOR_ID = "metamorpho";
|
|
7
|
+
export declare const METAMORPHO_PROTOCOL = "Morpho Vaults";
|
|
8
|
+
/** OZ ERC-20 `_allowances` mapping slot — MetaMorpho v1 and v1.1. */
|
|
9
|
+
export declare const METAMORPHO_V1_ALLOWANCE_SLOT_INDEX = 1n;
|
|
10
|
+
/** VaultV2 allowance mapping slot. */
|
|
11
|
+
export declare const METAMORPHO_V2_ALLOWANCE_SLOT_INDEX = 13n;
|
|
12
|
+
export declare const METAMORPHO_PERMIT_TYPES: {
|
|
13
|
+
readonly Permit: readonly [{
|
|
14
|
+
readonly name: "owner";
|
|
15
|
+
readonly type: "address";
|
|
16
|
+
}, {
|
|
17
|
+
readonly name: "spender";
|
|
18
|
+
readonly type: "address";
|
|
19
|
+
}, {
|
|
20
|
+
readonly name: "value";
|
|
21
|
+
readonly type: "uint256";
|
|
22
|
+
}, {
|
|
23
|
+
readonly name: "nonce";
|
|
24
|
+
readonly type: "uint256";
|
|
25
|
+
}, {
|
|
26
|
+
readonly name: "deadline";
|
|
27
|
+
readonly type: "uint256";
|
|
28
|
+
}];
|
|
29
|
+
};
|
|
30
|
+
export declare function getMetamorphoAllowanceSlotIndex(version: MetamorphoVaultVersion): bigint;
|
|
31
|
+
export declare function getMetamorphoPositionId(positionRef: MetamorphoPositionRef): string;
|
|
32
|
+
export declare class MetamorphoPositionMigrationConnector implements PositionMigrationConnector<MetamorphoPositionRef, MetamorphoMigrationPosition> {
|
|
33
|
+
private readonly deploymentService;
|
|
34
|
+
private readonly providerService;
|
|
35
|
+
readonly id = "metamorpho";
|
|
36
|
+
readonly protocol = "Morpho Vaults";
|
|
37
|
+
readonly name = "Morpho Vaults";
|
|
38
|
+
constructor(deploymentService: IDeploymentService, providerService: IProviderService, _executionService: IExecutionService, _config?: MetamorphoMigrationConnectorConfig);
|
|
39
|
+
listPositions(args: ListMigrationPositionsArgs<MetamorphoPositionRef>): Promise<MetamorphoMigrationPosition[]>;
|
|
40
|
+
getPosition(args: GetMigrationPositionArgs<MetamorphoPositionRef>): Promise<MetamorphoMigrationPosition>;
|
|
41
|
+
getAuthorization(args: GetMigrationAuthorizationArgs<MetamorphoMigrationPosition>): Promise<MetamorphoPermitTypedDataRequest | undefined>;
|
|
42
|
+
buildMigrationBatch(args: BuildConnectorMigrationBatchArgs<MetamorphoMigrationPosition>): Promise<EVCBatchItem[]>;
|
|
43
|
+
private buildSharePermitRequest;
|
|
44
|
+
/**
|
|
45
|
+
* MetaMorpho v1/v1.1 are OZ ERC20Permit — the domain must be read via
|
|
46
|
+
* EIP-5267 `eip712Domain()` because v1.1 vaults may carry an empty domain
|
|
47
|
+
* name that differs from `name()` (the token name is settable post-deploy,
|
|
48
|
+
* the EIP-712 domain is fixed at construction). Vaults V2 does not
|
|
49
|
+
* implement `eip712Domain()` and uses a minimal
|
|
50
|
+
* `EIP712Domain(uint256 chainId,address verifyingContract)` domain.
|
|
51
|
+
*/
|
|
52
|
+
private resolvePermitDomain;
|
|
53
|
+
private encodeSharePermitItem;
|
|
54
|
+
private hasShareAllowance;
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=metamorphoConnector.d.ts.map
|