@gearbox-protocol/sdk 14.11.10 → 14.11.11
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/abi/compressors/subcompressors/withdrawal/mellowWithdrawalSubcompressor.js +83 -0
- package/dist/cjs/abi/compressors/subcompressors/withdrawal/midasWithdrawalSubcompressor.js +83 -0
- package/dist/cjs/abi/compressors/subcompressors/withdrawal/securitizeRedemptionSubcompressor.js +83 -0
- package/dist/cjs/abi/compressors/withdrawalCompressor.js +172 -0
- package/dist/cjs/abi/router/midasWorker.js +4 -4
- package/dist/cjs/plugins/adapters/abi/actionAbi.js +0 -6
- package/dist/cjs/plugins/adapters/contracts/MidasGatewayAdapterContract.js +19 -29
- package/dist/esm/abi/compressors/subcompressors/withdrawal/mellowWithdrawalSubcompressor.js +83 -0
- package/dist/esm/abi/compressors/subcompressors/withdrawal/midasWithdrawalSubcompressor.js +83 -0
- package/dist/esm/abi/compressors/subcompressors/withdrawal/securitizeRedemptionSubcompressor.js +83 -0
- package/dist/esm/abi/compressors/withdrawalCompressor.js +172 -0
- package/dist/esm/abi/router/midasWorker.js +4 -4
- package/dist/esm/plugins/adapters/abi/actionAbi.js +0 -6
- package/dist/esm/plugins/adapters/contracts/MidasGatewayAdapterContract.js +19 -29
- package/dist/types/abi/compressors/subcompressors/withdrawal/mellowWithdrawalSubcompressor.d.ts +117 -0
- package/dist/types/abi/compressors/subcompressors/withdrawal/midasWithdrawalSubcompressor.d.ts +117 -0
- package/dist/types/abi/compressors/subcompressors/withdrawal/securitizeRedemptionSubcompressor.d.ts +117 -0
- package/dist/types/abi/compressors/withdrawalCompressor.d.ts +234 -0
- package/dist/types/abi/router/midasWorker.d.ts +4 -4
- package/dist/types/permissionless/bindings/compressors/withdrawal-compressor.d.ts +234 -0
- package/dist/types/plugins/adapters/contracts/MidasGatewayAdapterContract.d.ts +4 -10
- package/package.json +1 -1
|
@@ -103,6 +103,80 @@ const mellowWithdrawalSubcompressorAbi = [
|
|
|
103
103
|
],
|
|
104
104
|
stateMutability: "view"
|
|
105
105
|
},
|
|
106
|
+
{
|
|
107
|
+
type: "function",
|
|
108
|
+
name: "getExternalAccountCurrentWithdrawals",
|
|
109
|
+
inputs: [
|
|
110
|
+
{ name: "", type: "address", internalType: "address" },
|
|
111
|
+
{ name: "", type: "address", internalType: "address" }
|
|
112
|
+
],
|
|
113
|
+
outputs: [
|
|
114
|
+
{
|
|
115
|
+
name: "claimableWithdrawals",
|
|
116
|
+
type: "tuple[]",
|
|
117
|
+
internalType: "struct ClaimableWithdrawal[]",
|
|
118
|
+
components: [
|
|
119
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
120
|
+
{
|
|
121
|
+
name: "withdrawalPhantomToken",
|
|
122
|
+
type: "address",
|
|
123
|
+
internalType: "address"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
name: "withdrawalTokenSpent",
|
|
127
|
+
type: "uint256",
|
|
128
|
+
internalType: "uint256"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
name: "outputs",
|
|
132
|
+
type: "tuple[]",
|
|
133
|
+
internalType: "struct WithdrawalOutput[]",
|
|
134
|
+
components: [
|
|
135
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
136
|
+
{ name: "isDelayed", type: "bool", internalType: "bool" },
|
|
137
|
+
{ name: "amount", type: "uint256", internalType: "uint256" }
|
|
138
|
+
]
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
name: "claimCalls",
|
|
142
|
+
type: "tuple[]",
|
|
143
|
+
internalType: "struct MultiCall[]",
|
|
144
|
+
components: [
|
|
145
|
+
{ name: "target", type: "address", internalType: "address" },
|
|
146
|
+
{ name: "callData", type: "bytes", internalType: "bytes" }
|
|
147
|
+
]
|
|
148
|
+
},
|
|
149
|
+
{ name: "extraData", type: "bytes", internalType: "bytes" }
|
|
150
|
+
]
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
name: "pendingWithdrawals",
|
|
154
|
+
type: "tuple[]",
|
|
155
|
+
internalType: "struct PendingWithdrawal[]",
|
|
156
|
+
components: [
|
|
157
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
158
|
+
{
|
|
159
|
+
name: "withdrawalPhantomToken",
|
|
160
|
+
type: "address",
|
|
161
|
+
internalType: "address"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
name: "expectedOutputs",
|
|
165
|
+
type: "tuple[]",
|
|
166
|
+
internalType: "struct WithdrawalOutput[]",
|
|
167
|
+
components: [
|
|
168
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
169
|
+
{ name: "isDelayed", type: "bool", internalType: "bool" },
|
|
170
|
+
{ name: "amount", type: "uint256", internalType: "uint256" }
|
|
171
|
+
]
|
|
172
|
+
},
|
|
173
|
+
{ name: "claimableAt", type: "uint256", internalType: "uint256" },
|
|
174
|
+
{ name: "extraData", type: "bytes", internalType: "bytes" }
|
|
175
|
+
]
|
|
176
|
+
}
|
|
177
|
+
],
|
|
178
|
+
stateMutability: "pure"
|
|
179
|
+
},
|
|
106
180
|
{
|
|
107
181
|
type: "function",
|
|
108
182
|
name: "getWithdrawableAssets",
|
|
@@ -219,6 +293,15 @@ const mellowWithdrawalSubcompressorAbi = [
|
|
|
219
293
|
],
|
|
220
294
|
stateMutability: "view"
|
|
221
295
|
},
|
|
296
|
+
{
|
|
297
|
+
type: "function",
|
|
298
|
+
name: "getWithdrawalStatus",
|
|
299
|
+
inputs: [{ name: "", type: "address", internalType: "address" }],
|
|
300
|
+
outputs: [
|
|
301
|
+
{ name: "", type: "uint8", internalType: "enum WithdrawalStatus" }
|
|
302
|
+
],
|
|
303
|
+
stateMutability: "pure"
|
|
304
|
+
},
|
|
222
305
|
{
|
|
223
306
|
type: "function",
|
|
224
307
|
name: "version",
|
|
@@ -103,6 +103,80 @@ const midasWithdrawalSubcompressorAbi = [
|
|
|
103
103
|
],
|
|
104
104
|
stateMutability: "view"
|
|
105
105
|
},
|
|
106
|
+
{
|
|
107
|
+
type: "function",
|
|
108
|
+
name: "getExternalAccountCurrentWithdrawals",
|
|
109
|
+
inputs: [
|
|
110
|
+
{ name: "account", type: "address", internalType: "address" },
|
|
111
|
+
{ name: "token", type: "address", internalType: "address" }
|
|
112
|
+
],
|
|
113
|
+
outputs: [
|
|
114
|
+
{
|
|
115
|
+
name: "",
|
|
116
|
+
type: "tuple[]",
|
|
117
|
+
internalType: "struct ClaimableWithdrawal[]",
|
|
118
|
+
components: [
|
|
119
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
120
|
+
{
|
|
121
|
+
name: "withdrawalPhantomToken",
|
|
122
|
+
type: "address",
|
|
123
|
+
internalType: "address"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
name: "withdrawalTokenSpent",
|
|
127
|
+
type: "uint256",
|
|
128
|
+
internalType: "uint256"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
name: "outputs",
|
|
132
|
+
type: "tuple[]",
|
|
133
|
+
internalType: "struct WithdrawalOutput[]",
|
|
134
|
+
components: [
|
|
135
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
136
|
+
{ name: "isDelayed", type: "bool", internalType: "bool" },
|
|
137
|
+
{ name: "amount", type: "uint256", internalType: "uint256" }
|
|
138
|
+
]
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
name: "claimCalls",
|
|
142
|
+
type: "tuple[]",
|
|
143
|
+
internalType: "struct MultiCall[]",
|
|
144
|
+
components: [
|
|
145
|
+
{ name: "target", type: "address", internalType: "address" },
|
|
146
|
+
{ name: "callData", type: "bytes", internalType: "bytes" }
|
|
147
|
+
]
|
|
148
|
+
},
|
|
149
|
+
{ name: "extraData", type: "bytes", internalType: "bytes" }
|
|
150
|
+
]
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
name: "",
|
|
154
|
+
type: "tuple[]",
|
|
155
|
+
internalType: "struct PendingWithdrawal[]",
|
|
156
|
+
components: [
|
|
157
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
158
|
+
{
|
|
159
|
+
name: "withdrawalPhantomToken",
|
|
160
|
+
type: "address",
|
|
161
|
+
internalType: "address"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
name: "expectedOutputs",
|
|
165
|
+
type: "tuple[]",
|
|
166
|
+
internalType: "struct WithdrawalOutput[]",
|
|
167
|
+
components: [
|
|
168
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
169
|
+
{ name: "isDelayed", type: "bool", internalType: "bool" },
|
|
170
|
+
{ name: "amount", type: "uint256", internalType: "uint256" }
|
|
171
|
+
]
|
|
172
|
+
},
|
|
173
|
+
{ name: "claimableAt", type: "uint256", internalType: "uint256" },
|
|
174
|
+
{ name: "extraData", type: "bytes", internalType: "bytes" }
|
|
175
|
+
]
|
|
176
|
+
}
|
|
177
|
+
],
|
|
178
|
+
stateMutability: "view"
|
|
179
|
+
},
|
|
106
180
|
{
|
|
107
181
|
type: "function",
|
|
108
182
|
name: "getWithdrawableAssets",
|
|
@@ -219,6 +293,15 @@ const midasWithdrawalSubcompressorAbi = [
|
|
|
219
293
|
],
|
|
220
294
|
stateMutability: "view"
|
|
221
295
|
},
|
|
296
|
+
{
|
|
297
|
+
type: "function",
|
|
298
|
+
name: "getWithdrawalStatus",
|
|
299
|
+
inputs: [{ name: "redeemer", type: "address", internalType: "address" }],
|
|
300
|
+
outputs: [
|
|
301
|
+
{ name: "", type: "uint8", internalType: "enum WithdrawalStatus" }
|
|
302
|
+
],
|
|
303
|
+
stateMutability: "view"
|
|
304
|
+
},
|
|
222
305
|
{
|
|
223
306
|
type: "function",
|
|
224
307
|
name: "version",
|
package/dist/cjs/abi/compressors/subcompressors/withdrawal/securitizeRedemptionSubcompressor.js
CHANGED
|
@@ -103,6 +103,80 @@ const securitizeRedemptionSubcompressorAbi = [
|
|
|
103
103
|
],
|
|
104
104
|
stateMutability: "view"
|
|
105
105
|
},
|
|
106
|
+
{
|
|
107
|
+
type: "function",
|
|
108
|
+
name: "getExternalAccountCurrentWithdrawals",
|
|
109
|
+
inputs: [
|
|
110
|
+
{ name: "account", type: "address", internalType: "address" },
|
|
111
|
+
{ name: "token", type: "address", internalType: "address" }
|
|
112
|
+
],
|
|
113
|
+
outputs: [
|
|
114
|
+
{
|
|
115
|
+
name: "",
|
|
116
|
+
type: "tuple[]",
|
|
117
|
+
internalType: "struct ClaimableWithdrawal[]",
|
|
118
|
+
components: [
|
|
119
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
120
|
+
{
|
|
121
|
+
name: "withdrawalPhantomToken",
|
|
122
|
+
type: "address",
|
|
123
|
+
internalType: "address"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
name: "withdrawalTokenSpent",
|
|
127
|
+
type: "uint256",
|
|
128
|
+
internalType: "uint256"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
name: "outputs",
|
|
132
|
+
type: "tuple[]",
|
|
133
|
+
internalType: "struct WithdrawalOutput[]",
|
|
134
|
+
components: [
|
|
135
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
136
|
+
{ name: "isDelayed", type: "bool", internalType: "bool" },
|
|
137
|
+
{ name: "amount", type: "uint256", internalType: "uint256" }
|
|
138
|
+
]
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
name: "claimCalls",
|
|
142
|
+
type: "tuple[]",
|
|
143
|
+
internalType: "struct MultiCall[]",
|
|
144
|
+
components: [
|
|
145
|
+
{ name: "target", type: "address", internalType: "address" },
|
|
146
|
+
{ name: "callData", type: "bytes", internalType: "bytes" }
|
|
147
|
+
]
|
|
148
|
+
},
|
|
149
|
+
{ name: "extraData", type: "bytes", internalType: "bytes" }
|
|
150
|
+
]
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
name: "",
|
|
154
|
+
type: "tuple[]",
|
|
155
|
+
internalType: "struct PendingWithdrawal[]",
|
|
156
|
+
components: [
|
|
157
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
158
|
+
{
|
|
159
|
+
name: "withdrawalPhantomToken",
|
|
160
|
+
type: "address",
|
|
161
|
+
internalType: "address"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
name: "expectedOutputs",
|
|
165
|
+
type: "tuple[]",
|
|
166
|
+
internalType: "struct WithdrawalOutput[]",
|
|
167
|
+
components: [
|
|
168
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
169
|
+
{ name: "isDelayed", type: "bool", internalType: "bool" },
|
|
170
|
+
{ name: "amount", type: "uint256", internalType: "uint256" }
|
|
171
|
+
]
|
|
172
|
+
},
|
|
173
|
+
{ name: "claimableAt", type: "uint256", internalType: "uint256" },
|
|
174
|
+
{ name: "extraData", type: "bytes", internalType: "bytes" }
|
|
175
|
+
]
|
|
176
|
+
}
|
|
177
|
+
],
|
|
178
|
+
stateMutability: "view"
|
|
179
|
+
},
|
|
106
180
|
{
|
|
107
181
|
type: "function",
|
|
108
182
|
name: "getWithdrawableAssets",
|
|
@@ -219,6 +293,15 @@ const securitizeRedemptionSubcompressorAbi = [
|
|
|
219
293
|
],
|
|
220
294
|
stateMutability: "view"
|
|
221
295
|
},
|
|
296
|
+
{
|
|
297
|
+
type: "function",
|
|
298
|
+
name: "getWithdrawalStatus",
|
|
299
|
+
inputs: [{ name: "redeemer", type: "address", internalType: "address" }],
|
|
300
|
+
outputs: [
|
|
301
|
+
{ name: "", type: "uint8", internalType: "enum WithdrawalStatus" }
|
|
302
|
+
],
|
|
303
|
+
stateMutability: "view"
|
|
304
|
+
},
|
|
222
305
|
{
|
|
223
306
|
type: "function",
|
|
224
307
|
name: "version",
|
|
@@ -127,6 +127,158 @@ const withdrawalCompressorAbi = [
|
|
|
127
127
|
],
|
|
128
128
|
stateMutability: "view"
|
|
129
129
|
},
|
|
130
|
+
{
|
|
131
|
+
type: "function",
|
|
132
|
+
name: "getExternalAccountCurrentWithdrawals",
|
|
133
|
+
inputs: [
|
|
134
|
+
{
|
|
135
|
+
name: "withdrawalTokens",
|
|
136
|
+
type: "address[]",
|
|
137
|
+
internalType: "address[]"
|
|
138
|
+
},
|
|
139
|
+
{ name: "account", type: "address", internalType: "address" }
|
|
140
|
+
],
|
|
141
|
+
outputs: [
|
|
142
|
+
{
|
|
143
|
+
name: "",
|
|
144
|
+
type: "tuple[]",
|
|
145
|
+
internalType: "struct ClaimableWithdrawal[]",
|
|
146
|
+
components: [
|
|
147
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
148
|
+
{
|
|
149
|
+
name: "withdrawalPhantomToken",
|
|
150
|
+
type: "address",
|
|
151
|
+
internalType: "address"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
name: "withdrawalTokenSpent",
|
|
155
|
+
type: "uint256",
|
|
156
|
+
internalType: "uint256"
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
name: "outputs",
|
|
160
|
+
type: "tuple[]",
|
|
161
|
+
internalType: "struct WithdrawalOutput[]",
|
|
162
|
+
components: [
|
|
163
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
164
|
+
{ name: "isDelayed", type: "bool", internalType: "bool" },
|
|
165
|
+
{ name: "amount", type: "uint256", internalType: "uint256" }
|
|
166
|
+
]
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
name: "claimCalls",
|
|
170
|
+
type: "tuple[]",
|
|
171
|
+
internalType: "struct MultiCall[]",
|
|
172
|
+
components: [
|
|
173
|
+
{ name: "target", type: "address", internalType: "address" },
|
|
174
|
+
{ name: "callData", type: "bytes", internalType: "bytes" }
|
|
175
|
+
]
|
|
176
|
+
},
|
|
177
|
+
{ name: "extraData", type: "bytes", internalType: "bytes" }
|
|
178
|
+
]
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
name: "",
|
|
182
|
+
type: "tuple[]",
|
|
183
|
+
internalType: "struct PendingWithdrawal[]",
|
|
184
|
+
components: [
|
|
185
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
186
|
+
{
|
|
187
|
+
name: "withdrawalPhantomToken",
|
|
188
|
+
type: "address",
|
|
189
|
+
internalType: "address"
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
name: "expectedOutputs",
|
|
193
|
+
type: "tuple[]",
|
|
194
|
+
internalType: "struct WithdrawalOutput[]",
|
|
195
|
+
components: [
|
|
196
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
197
|
+
{ name: "isDelayed", type: "bool", internalType: "bool" },
|
|
198
|
+
{ name: "amount", type: "uint256", internalType: "uint256" }
|
|
199
|
+
]
|
|
200
|
+
},
|
|
201
|
+
{ name: "claimableAt", type: "uint256", internalType: "uint256" },
|
|
202
|
+
{ name: "extraData", type: "bytes", internalType: "bytes" }
|
|
203
|
+
]
|
|
204
|
+
}
|
|
205
|
+
],
|
|
206
|
+
stateMutability: "view"
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
type: "function",
|
|
210
|
+
name: "getExternalAccountCurrentWithdrawals",
|
|
211
|
+
inputs: [
|
|
212
|
+
{ name: "withdrawalToken", type: "address", internalType: "address" },
|
|
213
|
+
{ name: "account", type: "address", internalType: "address" }
|
|
214
|
+
],
|
|
215
|
+
outputs: [
|
|
216
|
+
{
|
|
217
|
+
name: "",
|
|
218
|
+
type: "tuple[]",
|
|
219
|
+
internalType: "struct ClaimableWithdrawal[]",
|
|
220
|
+
components: [
|
|
221
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
222
|
+
{
|
|
223
|
+
name: "withdrawalPhantomToken",
|
|
224
|
+
type: "address",
|
|
225
|
+
internalType: "address"
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
name: "withdrawalTokenSpent",
|
|
229
|
+
type: "uint256",
|
|
230
|
+
internalType: "uint256"
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
name: "outputs",
|
|
234
|
+
type: "tuple[]",
|
|
235
|
+
internalType: "struct WithdrawalOutput[]",
|
|
236
|
+
components: [
|
|
237
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
238
|
+
{ name: "isDelayed", type: "bool", internalType: "bool" },
|
|
239
|
+
{ name: "amount", type: "uint256", internalType: "uint256" }
|
|
240
|
+
]
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
name: "claimCalls",
|
|
244
|
+
type: "tuple[]",
|
|
245
|
+
internalType: "struct MultiCall[]",
|
|
246
|
+
components: [
|
|
247
|
+
{ name: "target", type: "address", internalType: "address" },
|
|
248
|
+
{ name: "callData", type: "bytes", internalType: "bytes" }
|
|
249
|
+
]
|
|
250
|
+
},
|
|
251
|
+
{ name: "extraData", type: "bytes", internalType: "bytes" }
|
|
252
|
+
]
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
name: "",
|
|
256
|
+
type: "tuple[]",
|
|
257
|
+
internalType: "struct PendingWithdrawal[]",
|
|
258
|
+
components: [
|
|
259
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
260
|
+
{
|
|
261
|
+
name: "withdrawalPhantomToken",
|
|
262
|
+
type: "address",
|
|
263
|
+
internalType: "address"
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
name: "expectedOutputs",
|
|
267
|
+
type: "tuple[]",
|
|
268
|
+
internalType: "struct WithdrawalOutput[]",
|
|
269
|
+
components: [
|
|
270
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
271
|
+
{ name: "isDelayed", type: "bool", internalType: "bool" },
|
|
272
|
+
{ name: "amount", type: "uint256", internalType: "uint256" }
|
|
273
|
+
]
|
|
274
|
+
},
|
|
275
|
+
{ name: "claimableAt", type: "uint256", internalType: "uint256" },
|
|
276
|
+
{ name: "extraData", type: "bytes", internalType: "bytes" }
|
|
277
|
+
]
|
|
278
|
+
}
|
|
279
|
+
],
|
|
280
|
+
stateMutability: "view"
|
|
281
|
+
},
|
|
130
282
|
{
|
|
131
283
|
type: "function",
|
|
132
284
|
name: "getWithdrawableAssets",
|
|
@@ -283,6 +435,26 @@ const withdrawalCompressorAbi = [
|
|
|
283
435
|
],
|
|
284
436
|
stateMutability: "view"
|
|
285
437
|
},
|
|
438
|
+
{
|
|
439
|
+
type: "function",
|
|
440
|
+
name: "getWithdrawalStatus",
|
|
441
|
+
inputs: [
|
|
442
|
+
{ name: "redeemers", type: "address[]", internalType: "address[]" }
|
|
443
|
+
],
|
|
444
|
+
outputs: [
|
|
445
|
+
{ name: "", type: "uint8[]", internalType: "enum WithdrawalStatus[]" }
|
|
446
|
+
],
|
|
447
|
+
stateMutability: "view"
|
|
448
|
+
},
|
|
449
|
+
{
|
|
450
|
+
type: "function",
|
|
451
|
+
name: "getWithdrawalStatus",
|
|
452
|
+
inputs: [{ name: "redeemer", type: "address", internalType: "address" }],
|
|
453
|
+
outputs: [
|
|
454
|
+
{ name: "", type: "uint8", internalType: "enum WithdrawalStatus" }
|
|
455
|
+
],
|
|
456
|
+
stateMutability: "view"
|
|
457
|
+
},
|
|
286
458
|
{
|
|
287
459
|
type: "function",
|
|
288
460
|
name: "owner",
|
|
@@ -423,7 +423,7 @@ const midasWorkerAbi = [
|
|
|
423
423
|
name: "trimSpecialVertex",
|
|
424
424
|
inputs: [
|
|
425
425
|
{
|
|
426
|
-
name: "
|
|
426
|
+
name: "",
|
|
427
427
|
type: "tuple",
|
|
428
428
|
internalType: "struct Edge",
|
|
429
429
|
components: [
|
|
@@ -444,7 +444,7 @@ const midasWorkerAbi = [
|
|
|
444
444
|
]
|
|
445
445
|
},
|
|
446
446
|
{
|
|
447
|
-
name: "
|
|
447
|
+
name: "",
|
|
448
448
|
type: "tuple",
|
|
449
449
|
internalType: "struct Graph",
|
|
450
450
|
components: [
|
|
@@ -503,10 +503,10 @@ const midasWorkerAbi = [
|
|
|
503
503
|
}
|
|
504
504
|
]
|
|
505
505
|
},
|
|
506
|
-
{ name: "
|
|
506
|
+
{ name: "", type: "address", internalType: "address" }
|
|
507
507
|
],
|
|
508
508
|
outputs: [{ name: "", type: "bool", internalType: "bool" }],
|
|
509
|
-
stateMutability: "
|
|
509
|
+
stateMutability: "pure"
|
|
510
510
|
},
|
|
511
511
|
{
|
|
512
512
|
type: "function",
|
|
@@ -69,12 +69,6 @@ const adapterActionSignatures = {
|
|
|
69
69
|
[import_types.AdapterType.MIDAS_REDEMPTION_VAULT]: {
|
|
70
70
|
310: "function setTokenAllowedStatusBatch((address,address,bool)[])"
|
|
71
71
|
},
|
|
72
|
-
[import_types.AdapterType.MIDAS_GATEWAY]: {
|
|
73
|
-
311: [
|
|
74
|
-
"function setInputTokenAllowedStatusBatch(address[],bool[])",
|
|
75
|
-
"function setOutputTokenAllowedStatusBatch((address,address,bool)[])"
|
|
76
|
-
]
|
|
77
|
-
},
|
|
78
72
|
[import_types.AdapterType.PENDLE_ROUTER]: {
|
|
79
73
|
310: "function setPairStatusBatch((address,address,address,uint8)[])",
|
|
80
74
|
311: "function setPairStatusBatch((address,address,address,uint8,uint8)[])"
|
|
@@ -30,9 +30,9 @@ const protocolAbi = import_abi.iMidasGatewayAdapterAbi;
|
|
|
30
30
|
class MidasGatewayAdapterContract extends import_AbstractAdapter.AbstractAdapterContract {
|
|
31
31
|
#gateway;
|
|
32
32
|
#mToken;
|
|
33
|
+
#quoteToken;
|
|
34
|
+
#phantomToken;
|
|
33
35
|
#referralId;
|
|
34
|
-
#allowedInputTokens;
|
|
35
|
-
#allowedTokens;
|
|
36
36
|
constructor(options, args) {
|
|
37
37
|
super(options, { ...args, abi, protocolAbi });
|
|
38
38
|
if (args.baseParams.serializedParams) {
|
|
@@ -42,21 +42,17 @@ class MidasGatewayAdapterContract extends import_AbstractAdapter.AbstractAdapter
|
|
|
42
42
|
{ type: "address", name: "targetContract" },
|
|
43
43
|
{ type: "address", name: "gateway" },
|
|
44
44
|
{ type: "address", name: "mToken" },
|
|
45
|
-
{ type: "
|
|
46
|
-
{ type: "address
|
|
47
|
-
{ type: "
|
|
48
|
-
{ type: "address[]", name: "allowedPhantomTokens" }
|
|
45
|
+
{ type: "address", name: "quoteToken" },
|
|
46
|
+
{ type: "address", name: "phantomToken" },
|
|
47
|
+
{ type: "bytes32", name: "referralId" }
|
|
49
48
|
],
|
|
50
49
|
args.baseParams.serializedParams
|
|
51
50
|
);
|
|
52
51
|
this.#gateway = decoded[2];
|
|
53
52
|
this.#mToken = decoded[3];
|
|
54
|
-
this.#
|
|
55
|
-
this.#
|
|
56
|
-
this.#
|
|
57
|
-
token,
|
|
58
|
-
phantomToken: decoded[7][index]
|
|
59
|
-
}));
|
|
53
|
+
this.#quoteToken = decoded[4];
|
|
54
|
+
this.#phantomToken = decoded[5];
|
|
55
|
+
this.#referralId = decoded[6];
|
|
60
56
|
}
|
|
61
57
|
}
|
|
62
58
|
get gateway() {
|
|
@@ -67,33 +63,27 @@ class MidasGatewayAdapterContract extends import_AbstractAdapter.AbstractAdapter
|
|
|
67
63
|
if (!this.#mToken) throw new import_sdk.MissingSerializedParamsError("mToken");
|
|
68
64
|
return this.#mToken;
|
|
69
65
|
}
|
|
70
|
-
get
|
|
71
|
-
if (!this.#
|
|
72
|
-
|
|
73
|
-
|
|
66
|
+
get quoteToken() {
|
|
67
|
+
if (!this.#quoteToken) throw new import_sdk.MissingSerializedParamsError("quoteToken");
|
|
68
|
+
return this.#quoteToken;
|
|
69
|
+
}
|
|
70
|
+
get phantomToken() {
|
|
71
|
+
if (!this.#phantomToken)
|
|
72
|
+
throw new import_sdk.MissingSerializedParamsError("phantomToken");
|
|
73
|
+
return this.#phantomToken;
|
|
74
74
|
}
|
|
75
75
|
get referralId() {
|
|
76
76
|
if (!this.#referralId) throw new import_sdk.MissingSerializedParamsError("referralId");
|
|
77
77
|
return this.#referralId;
|
|
78
78
|
}
|
|
79
|
-
get allowedInputTokens() {
|
|
80
|
-
if (!this.#allowedInputTokens)
|
|
81
|
-
throw new import_sdk.MissingSerializedParamsError("allowedInputTokens");
|
|
82
|
-
return this.#allowedInputTokens;
|
|
83
|
-
}
|
|
84
79
|
stateHuman(raw) {
|
|
85
80
|
return {
|
|
86
81
|
...super.stateHuman(raw),
|
|
87
82
|
gateway: this.#gateway ? this.labelAddress(this.#gateway) : void 0,
|
|
88
83
|
mToken: this.#mToken ? this.labelAddress(this.#mToken) : void 0,
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
),
|
|
93
|
-
allowedTokens: this.#allowedTokens?.map((t) => ({
|
|
94
|
-
token: this.labelAddress(t.token),
|
|
95
|
-
phantomToken: this.labelAddress(t.phantomToken)
|
|
96
|
-
}))
|
|
84
|
+
quoteToken: this.#quoteToken ? this.labelAddress(this.#quoteToken) : void 0,
|
|
85
|
+
phantomToken: this.#phantomToken ? this.labelAddress(this.#phantomToken) : void 0,
|
|
86
|
+
referralId: this.#referralId
|
|
97
87
|
};
|
|
98
88
|
}
|
|
99
89
|
}
|