@gearbox-protocol/sdk 14.11.9 → 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/cjs/plugins/adapters/contracts/index.js +2 -0
- 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/esm/plugins/adapters/contracts/index.js +1 -0
- 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/dist/types/plugins/adapters/contracts/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -80,6 +80,80 @@ const mellowWithdrawalSubcompressorAbi = [
|
|
|
80
80
|
],
|
|
81
81
|
stateMutability: "view"
|
|
82
82
|
},
|
|
83
|
+
{
|
|
84
|
+
type: "function",
|
|
85
|
+
name: "getExternalAccountCurrentWithdrawals",
|
|
86
|
+
inputs: [
|
|
87
|
+
{ name: "", type: "address", internalType: "address" },
|
|
88
|
+
{ name: "", type: "address", internalType: "address" }
|
|
89
|
+
],
|
|
90
|
+
outputs: [
|
|
91
|
+
{
|
|
92
|
+
name: "claimableWithdrawals",
|
|
93
|
+
type: "tuple[]",
|
|
94
|
+
internalType: "struct ClaimableWithdrawal[]",
|
|
95
|
+
components: [
|
|
96
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
97
|
+
{
|
|
98
|
+
name: "withdrawalPhantomToken",
|
|
99
|
+
type: "address",
|
|
100
|
+
internalType: "address"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
name: "withdrawalTokenSpent",
|
|
104
|
+
type: "uint256",
|
|
105
|
+
internalType: "uint256"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
name: "outputs",
|
|
109
|
+
type: "tuple[]",
|
|
110
|
+
internalType: "struct WithdrawalOutput[]",
|
|
111
|
+
components: [
|
|
112
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
113
|
+
{ name: "isDelayed", type: "bool", internalType: "bool" },
|
|
114
|
+
{ name: "amount", type: "uint256", internalType: "uint256" }
|
|
115
|
+
]
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
name: "claimCalls",
|
|
119
|
+
type: "tuple[]",
|
|
120
|
+
internalType: "struct MultiCall[]",
|
|
121
|
+
components: [
|
|
122
|
+
{ name: "target", type: "address", internalType: "address" },
|
|
123
|
+
{ name: "callData", type: "bytes", internalType: "bytes" }
|
|
124
|
+
]
|
|
125
|
+
},
|
|
126
|
+
{ name: "extraData", type: "bytes", internalType: "bytes" }
|
|
127
|
+
]
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
name: "pendingWithdrawals",
|
|
131
|
+
type: "tuple[]",
|
|
132
|
+
internalType: "struct PendingWithdrawal[]",
|
|
133
|
+
components: [
|
|
134
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
135
|
+
{
|
|
136
|
+
name: "withdrawalPhantomToken",
|
|
137
|
+
type: "address",
|
|
138
|
+
internalType: "address"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
name: "expectedOutputs",
|
|
142
|
+
type: "tuple[]",
|
|
143
|
+
internalType: "struct WithdrawalOutput[]",
|
|
144
|
+
components: [
|
|
145
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
146
|
+
{ name: "isDelayed", type: "bool", internalType: "bool" },
|
|
147
|
+
{ name: "amount", type: "uint256", internalType: "uint256" }
|
|
148
|
+
]
|
|
149
|
+
},
|
|
150
|
+
{ name: "claimableAt", type: "uint256", internalType: "uint256" },
|
|
151
|
+
{ name: "extraData", type: "bytes", internalType: "bytes" }
|
|
152
|
+
]
|
|
153
|
+
}
|
|
154
|
+
],
|
|
155
|
+
stateMutability: "pure"
|
|
156
|
+
},
|
|
83
157
|
{
|
|
84
158
|
type: "function",
|
|
85
159
|
name: "getWithdrawableAssets",
|
|
@@ -196,6 +270,15 @@ const mellowWithdrawalSubcompressorAbi = [
|
|
|
196
270
|
],
|
|
197
271
|
stateMutability: "view"
|
|
198
272
|
},
|
|
273
|
+
{
|
|
274
|
+
type: "function",
|
|
275
|
+
name: "getWithdrawalStatus",
|
|
276
|
+
inputs: [{ name: "", type: "address", internalType: "address" }],
|
|
277
|
+
outputs: [
|
|
278
|
+
{ name: "", type: "uint8", internalType: "enum WithdrawalStatus" }
|
|
279
|
+
],
|
|
280
|
+
stateMutability: "pure"
|
|
281
|
+
},
|
|
199
282
|
{
|
|
200
283
|
type: "function",
|
|
201
284
|
name: "version",
|
|
@@ -80,6 +80,80 @@ const midasWithdrawalSubcompressorAbi = [
|
|
|
80
80
|
],
|
|
81
81
|
stateMutability: "view"
|
|
82
82
|
},
|
|
83
|
+
{
|
|
84
|
+
type: "function",
|
|
85
|
+
name: "getExternalAccountCurrentWithdrawals",
|
|
86
|
+
inputs: [
|
|
87
|
+
{ name: "account", type: "address", internalType: "address" },
|
|
88
|
+
{ name: "token", type: "address", internalType: "address" }
|
|
89
|
+
],
|
|
90
|
+
outputs: [
|
|
91
|
+
{
|
|
92
|
+
name: "",
|
|
93
|
+
type: "tuple[]",
|
|
94
|
+
internalType: "struct ClaimableWithdrawal[]",
|
|
95
|
+
components: [
|
|
96
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
97
|
+
{
|
|
98
|
+
name: "withdrawalPhantomToken",
|
|
99
|
+
type: "address",
|
|
100
|
+
internalType: "address"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
name: "withdrawalTokenSpent",
|
|
104
|
+
type: "uint256",
|
|
105
|
+
internalType: "uint256"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
name: "outputs",
|
|
109
|
+
type: "tuple[]",
|
|
110
|
+
internalType: "struct WithdrawalOutput[]",
|
|
111
|
+
components: [
|
|
112
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
113
|
+
{ name: "isDelayed", type: "bool", internalType: "bool" },
|
|
114
|
+
{ name: "amount", type: "uint256", internalType: "uint256" }
|
|
115
|
+
]
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
name: "claimCalls",
|
|
119
|
+
type: "tuple[]",
|
|
120
|
+
internalType: "struct MultiCall[]",
|
|
121
|
+
components: [
|
|
122
|
+
{ name: "target", type: "address", internalType: "address" },
|
|
123
|
+
{ name: "callData", type: "bytes", internalType: "bytes" }
|
|
124
|
+
]
|
|
125
|
+
},
|
|
126
|
+
{ name: "extraData", type: "bytes", internalType: "bytes" }
|
|
127
|
+
]
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
name: "",
|
|
131
|
+
type: "tuple[]",
|
|
132
|
+
internalType: "struct PendingWithdrawal[]",
|
|
133
|
+
components: [
|
|
134
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
135
|
+
{
|
|
136
|
+
name: "withdrawalPhantomToken",
|
|
137
|
+
type: "address",
|
|
138
|
+
internalType: "address"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
name: "expectedOutputs",
|
|
142
|
+
type: "tuple[]",
|
|
143
|
+
internalType: "struct WithdrawalOutput[]",
|
|
144
|
+
components: [
|
|
145
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
146
|
+
{ name: "isDelayed", type: "bool", internalType: "bool" },
|
|
147
|
+
{ name: "amount", type: "uint256", internalType: "uint256" }
|
|
148
|
+
]
|
|
149
|
+
},
|
|
150
|
+
{ name: "claimableAt", type: "uint256", internalType: "uint256" },
|
|
151
|
+
{ name: "extraData", type: "bytes", internalType: "bytes" }
|
|
152
|
+
]
|
|
153
|
+
}
|
|
154
|
+
],
|
|
155
|
+
stateMutability: "view"
|
|
156
|
+
},
|
|
83
157
|
{
|
|
84
158
|
type: "function",
|
|
85
159
|
name: "getWithdrawableAssets",
|
|
@@ -196,6 +270,15 @@ const midasWithdrawalSubcompressorAbi = [
|
|
|
196
270
|
],
|
|
197
271
|
stateMutability: "view"
|
|
198
272
|
},
|
|
273
|
+
{
|
|
274
|
+
type: "function",
|
|
275
|
+
name: "getWithdrawalStatus",
|
|
276
|
+
inputs: [{ name: "redeemer", type: "address", internalType: "address" }],
|
|
277
|
+
outputs: [
|
|
278
|
+
{ name: "", type: "uint8", internalType: "enum WithdrawalStatus" }
|
|
279
|
+
],
|
|
280
|
+
stateMutability: "view"
|
|
281
|
+
},
|
|
199
282
|
{
|
|
200
283
|
type: "function",
|
|
201
284
|
name: "version",
|
package/dist/esm/abi/compressors/subcompressors/withdrawal/securitizeRedemptionSubcompressor.js
CHANGED
|
@@ -80,6 +80,80 @@ const securitizeRedemptionSubcompressorAbi = [
|
|
|
80
80
|
],
|
|
81
81
|
stateMutability: "view"
|
|
82
82
|
},
|
|
83
|
+
{
|
|
84
|
+
type: "function",
|
|
85
|
+
name: "getExternalAccountCurrentWithdrawals",
|
|
86
|
+
inputs: [
|
|
87
|
+
{ name: "account", type: "address", internalType: "address" },
|
|
88
|
+
{ name: "token", type: "address", internalType: "address" }
|
|
89
|
+
],
|
|
90
|
+
outputs: [
|
|
91
|
+
{
|
|
92
|
+
name: "",
|
|
93
|
+
type: "tuple[]",
|
|
94
|
+
internalType: "struct ClaimableWithdrawal[]",
|
|
95
|
+
components: [
|
|
96
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
97
|
+
{
|
|
98
|
+
name: "withdrawalPhantomToken",
|
|
99
|
+
type: "address",
|
|
100
|
+
internalType: "address"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
name: "withdrawalTokenSpent",
|
|
104
|
+
type: "uint256",
|
|
105
|
+
internalType: "uint256"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
name: "outputs",
|
|
109
|
+
type: "tuple[]",
|
|
110
|
+
internalType: "struct WithdrawalOutput[]",
|
|
111
|
+
components: [
|
|
112
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
113
|
+
{ name: "isDelayed", type: "bool", internalType: "bool" },
|
|
114
|
+
{ name: "amount", type: "uint256", internalType: "uint256" }
|
|
115
|
+
]
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
name: "claimCalls",
|
|
119
|
+
type: "tuple[]",
|
|
120
|
+
internalType: "struct MultiCall[]",
|
|
121
|
+
components: [
|
|
122
|
+
{ name: "target", type: "address", internalType: "address" },
|
|
123
|
+
{ name: "callData", type: "bytes", internalType: "bytes" }
|
|
124
|
+
]
|
|
125
|
+
},
|
|
126
|
+
{ name: "extraData", type: "bytes", internalType: "bytes" }
|
|
127
|
+
]
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
name: "",
|
|
131
|
+
type: "tuple[]",
|
|
132
|
+
internalType: "struct PendingWithdrawal[]",
|
|
133
|
+
components: [
|
|
134
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
135
|
+
{
|
|
136
|
+
name: "withdrawalPhantomToken",
|
|
137
|
+
type: "address",
|
|
138
|
+
internalType: "address"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
name: "expectedOutputs",
|
|
142
|
+
type: "tuple[]",
|
|
143
|
+
internalType: "struct WithdrawalOutput[]",
|
|
144
|
+
components: [
|
|
145
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
146
|
+
{ name: "isDelayed", type: "bool", internalType: "bool" },
|
|
147
|
+
{ name: "amount", type: "uint256", internalType: "uint256" }
|
|
148
|
+
]
|
|
149
|
+
},
|
|
150
|
+
{ name: "claimableAt", type: "uint256", internalType: "uint256" },
|
|
151
|
+
{ name: "extraData", type: "bytes", internalType: "bytes" }
|
|
152
|
+
]
|
|
153
|
+
}
|
|
154
|
+
],
|
|
155
|
+
stateMutability: "view"
|
|
156
|
+
},
|
|
83
157
|
{
|
|
84
158
|
type: "function",
|
|
85
159
|
name: "getWithdrawableAssets",
|
|
@@ -196,6 +270,15 @@ const securitizeRedemptionSubcompressorAbi = [
|
|
|
196
270
|
],
|
|
197
271
|
stateMutability: "view"
|
|
198
272
|
},
|
|
273
|
+
{
|
|
274
|
+
type: "function",
|
|
275
|
+
name: "getWithdrawalStatus",
|
|
276
|
+
inputs: [{ name: "redeemer", type: "address", internalType: "address" }],
|
|
277
|
+
outputs: [
|
|
278
|
+
{ name: "", type: "uint8", internalType: "enum WithdrawalStatus" }
|
|
279
|
+
],
|
|
280
|
+
stateMutability: "view"
|
|
281
|
+
},
|
|
199
282
|
{
|
|
200
283
|
type: "function",
|
|
201
284
|
name: "version",
|
|
@@ -104,6 +104,158 @@ const withdrawalCompressorAbi = [
|
|
|
104
104
|
],
|
|
105
105
|
stateMutability: "view"
|
|
106
106
|
},
|
|
107
|
+
{
|
|
108
|
+
type: "function",
|
|
109
|
+
name: "getExternalAccountCurrentWithdrawals",
|
|
110
|
+
inputs: [
|
|
111
|
+
{
|
|
112
|
+
name: "withdrawalTokens",
|
|
113
|
+
type: "address[]",
|
|
114
|
+
internalType: "address[]"
|
|
115
|
+
},
|
|
116
|
+
{ name: "account", type: "address", internalType: "address" }
|
|
117
|
+
],
|
|
118
|
+
outputs: [
|
|
119
|
+
{
|
|
120
|
+
name: "",
|
|
121
|
+
type: "tuple[]",
|
|
122
|
+
internalType: "struct ClaimableWithdrawal[]",
|
|
123
|
+
components: [
|
|
124
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
125
|
+
{
|
|
126
|
+
name: "withdrawalPhantomToken",
|
|
127
|
+
type: "address",
|
|
128
|
+
internalType: "address"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
name: "withdrawalTokenSpent",
|
|
132
|
+
type: "uint256",
|
|
133
|
+
internalType: "uint256"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
name: "outputs",
|
|
137
|
+
type: "tuple[]",
|
|
138
|
+
internalType: "struct WithdrawalOutput[]",
|
|
139
|
+
components: [
|
|
140
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
141
|
+
{ name: "isDelayed", type: "bool", internalType: "bool" },
|
|
142
|
+
{ name: "amount", type: "uint256", internalType: "uint256" }
|
|
143
|
+
]
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
name: "claimCalls",
|
|
147
|
+
type: "tuple[]",
|
|
148
|
+
internalType: "struct MultiCall[]",
|
|
149
|
+
components: [
|
|
150
|
+
{ name: "target", type: "address", internalType: "address" },
|
|
151
|
+
{ name: "callData", type: "bytes", internalType: "bytes" }
|
|
152
|
+
]
|
|
153
|
+
},
|
|
154
|
+
{ name: "extraData", type: "bytes", internalType: "bytes" }
|
|
155
|
+
]
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
name: "",
|
|
159
|
+
type: "tuple[]",
|
|
160
|
+
internalType: "struct PendingWithdrawal[]",
|
|
161
|
+
components: [
|
|
162
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
163
|
+
{
|
|
164
|
+
name: "withdrawalPhantomToken",
|
|
165
|
+
type: "address",
|
|
166
|
+
internalType: "address"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
name: "expectedOutputs",
|
|
170
|
+
type: "tuple[]",
|
|
171
|
+
internalType: "struct WithdrawalOutput[]",
|
|
172
|
+
components: [
|
|
173
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
174
|
+
{ name: "isDelayed", type: "bool", internalType: "bool" },
|
|
175
|
+
{ name: "amount", type: "uint256", internalType: "uint256" }
|
|
176
|
+
]
|
|
177
|
+
},
|
|
178
|
+
{ name: "claimableAt", type: "uint256", internalType: "uint256" },
|
|
179
|
+
{ name: "extraData", type: "bytes", internalType: "bytes" }
|
|
180
|
+
]
|
|
181
|
+
}
|
|
182
|
+
],
|
|
183
|
+
stateMutability: "view"
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
type: "function",
|
|
187
|
+
name: "getExternalAccountCurrentWithdrawals",
|
|
188
|
+
inputs: [
|
|
189
|
+
{ name: "withdrawalToken", type: "address", internalType: "address" },
|
|
190
|
+
{ name: "account", type: "address", internalType: "address" }
|
|
191
|
+
],
|
|
192
|
+
outputs: [
|
|
193
|
+
{
|
|
194
|
+
name: "",
|
|
195
|
+
type: "tuple[]",
|
|
196
|
+
internalType: "struct ClaimableWithdrawal[]",
|
|
197
|
+
components: [
|
|
198
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
199
|
+
{
|
|
200
|
+
name: "withdrawalPhantomToken",
|
|
201
|
+
type: "address",
|
|
202
|
+
internalType: "address"
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
name: "withdrawalTokenSpent",
|
|
206
|
+
type: "uint256",
|
|
207
|
+
internalType: "uint256"
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
name: "outputs",
|
|
211
|
+
type: "tuple[]",
|
|
212
|
+
internalType: "struct WithdrawalOutput[]",
|
|
213
|
+
components: [
|
|
214
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
215
|
+
{ name: "isDelayed", type: "bool", internalType: "bool" },
|
|
216
|
+
{ name: "amount", type: "uint256", internalType: "uint256" }
|
|
217
|
+
]
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
name: "claimCalls",
|
|
221
|
+
type: "tuple[]",
|
|
222
|
+
internalType: "struct MultiCall[]",
|
|
223
|
+
components: [
|
|
224
|
+
{ name: "target", type: "address", internalType: "address" },
|
|
225
|
+
{ name: "callData", type: "bytes", internalType: "bytes" }
|
|
226
|
+
]
|
|
227
|
+
},
|
|
228
|
+
{ name: "extraData", type: "bytes", internalType: "bytes" }
|
|
229
|
+
]
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
name: "",
|
|
233
|
+
type: "tuple[]",
|
|
234
|
+
internalType: "struct PendingWithdrawal[]",
|
|
235
|
+
components: [
|
|
236
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
237
|
+
{
|
|
238
|
+
name: "withdrawalPhantomToken",
|
|
239
|
+
type: "address",
|
|
240
|
+
internalType: "address"
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
name: "expectedOutputs",
|
|
244
|
+
type: "tuple[]",
|
|
245
|
+
internalType: "struct WithdrawalOutput[]",
|
|
246
|
+
components: [
|
|
247
|
+
{ name: "token", type: "address", internalType: "address" },
|
|
248
|
+
{ name: "isDelayed", type: "bool", internalType: "bool" },
|
|
249
|
+
{ name: "amount", type: "uint256", internalType: "uint256" }
|
|
250
|
+
]
|
|
251
|
+
},
|
|
252
|
+
{ name: "claimableAt", type: "uint256", internalType: "uint256" },
|
|
253
|
+
{ name: "extraData", type: "bytes", internalType: "bytes" }
|
|
254
|
+
]
|
|
255
|
+
}
|
|
256
|
+
],
|
|
257
|
+
stateMutability: "view"
|
|
258
|
+
},
|
|
107
259
|
{
|
|
108
260
|
type: "function",
|
|
109
261
|
name: "getWithdrawableAssets",
|
|
@@ -260,6 +412,26 @@ const withdrawalCompressorAbi = [
|
|
|
260
412
|
],
|
|
261
413
|
stateMutability: "view"
|
|
262
414
|
},
|
|
415
|
+
{
|
|
416
|
+
type: "function",
|
|
417
|
+
name: "getWithdrawalStatus",
|
|
418
|
+
inputs: [
|
|
419
|
+
{ name: "redeemers", type: "address[]", internalType: "address[]" }
|
|
420
|
+
],
|
|
421
|
+
outputs: [
|
|
422
|
+
{ name: "", type: "uint8[]", internalType: "enum WithdrawalStatus[]" }
|
|
423
|
+
],
|
|
424
|
+
stateMutability: "view"
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
type: "function",
|
|
428
|
+
name: "getWithdrawalStatus",
|
|
429
|
+
inputs: [{ name: "redeemer", type: "address", internalType: "address" }],
|
|
430
|
+
outputs: [
|
|
431
|
+
{ name: "", type: "uint8", internalType: "enum WithdrawalStatus" }
|
|
432
|
+
],
|
|
433
|
+
stateMutability: "view"
|
|
434
|
+
},
|
|
263
435
|
{
|
|
264
436
|
type: "function",
|
|
265
437
|
name: "owner",
|
|
@@ -400,7 +400,7 @@ const midasWorkerAbi = [
|
|
|
400
400
|
name: "trimSpecialVertex",
|
|
401
401
|
inputs: [
|
|
402
402
|
{
|
|
403
|
-
name: "
|
|
403
|
+
name: "",
|
|
404
404
|
type: "tuple",
|
|
405
405
|
internalType: "struct Edge",
|
|
406
406
|
components: [
|
|
@@ -421,7 +421,7 @@ const midasWorkerAbi = [
|
|
|
421
421
|
]
|
|
422
422
|
},
|
|
423
423
|
{
|
|
424
|
-
name: "
|
|
424
|
+
name: "",
|
|
425
425
|
type: "tuple",
|
|
426
426
|
internalType: "struct Graph",
|
|
427
427
|
components: [
|
|
@@ -480,10 +480,10 @@ const midasWorkerAbi = [
|
|
|
480
480
|
}
|
|
481
481
|
]
|
|
482
482
|
},
|
|
483
|
-
{ name: "
|
|
483
|
+
{ name: "", type: "address", internalType: "address" }
|
|
484
484
|
],
|
|
485
485
|
outputs: [{ name: "", type: "bool", internalType: "bool" }],
|
|
486
|
-
stateMutability: "
|
|
486
|
+
stateMutability: "pure"
|
|
487
487
|
},
|
|
488
488
|
{
|
|
489
489
|
type: "function",
|
|
@@ -44,12 +44,6 @@ const adapterActionSignatures = {
|
|
|
44
44
|
[AdapterType.MIDAS_REDEMPTION_VAULT]: {
|
|
45
45
|
310: "function setTokenAllowedStatusBatch((address,address,bool)[])"
|
|
46
46
|
},
|
|
47
|
-
[AdapterType.MIDAS_GATEWAY]: {
|
|
48
|
-
311: [
|
|
49
|
-
"function setInputTokenAllowedStatusBatch(address[],bool[])",
|
|
50
|
-
"function setOutputTokenAllowedStatusBatch((address,address,bool)[])"
|
|
51
|
-
]
|
|
52
|
-
},
|
|
53
47
|
[AdapterType.PENDLE_ROUTER]: {
|
|
54
48
|
310: "function setPairStatusBatch((address,address,address,uint8)[])",
|
|
55
49
|
311: "function setPairStatusBatch((address,address,address,uint8,uint8)[])"
|
|
@@ -9,9 +9,9 @@ const protocolAbi = iMidasGatewayAdapterAbi;
|
|
|
9
9
|
class MidasGatewayAdapterContract extends AbstractAdapterContract {
|
|
10
10
|
#gateway;
|
|
11
11
|
#mToken;
|
|
12
|
+
#quoteToken;
|
|
13
|
+
#phantomToken;
|
|
12
14
|
#referralId;
|
|
13
|
-
#allowedInputTokens;
|
|
14
|
-
#allowedTokens;
|
|
15
15
|
constructor(options, args) {
|
|
16
16
|
super(options, { ...args, abi, protocolAbi });
|
|
17
17
|
if (args.baseParams.serializedParams) {
|
|
@@ -21,21 +21,17 @@ class MidasGatewayAdapterContract extends AbstractAdapterContract {
|
|
|
21
21
|
{ type: "address", name: "targetContract" },
|
|
22
22
|
{ type: "address", name: "gateway" },
|
|
23
23
|
{ type: "address", name: "mToken" },
|
|
24
|
-
{ type: "
|
|
25
|
-
{ type: "address
|
|
26
|
-
{ type: "
|
|
27
|
-
{ type: "address[]", name: "allowedPhantomTokens" }
|
|
24
|
+
{ type: "address", name: "quoteToken" },
|
|
25
|
+
{ type: "address", name: "phantomToken" },
|
|
26
|
+
{ type: "bytes32", name: "referralId" }
|
|
28
27
|
],
|
|
29
28
|
args.baseParams.serializedParams
|
|
30
29
|
);
|
|
31
30
|
this.#gateway = decoded[2];
|
|
32
31
|
this.#mToken = decoded[3];
|
|
33
|
-
this.#
|
|
34
|
-
this.#
|
|
35
|
-
this.#
|
|
36
|
-
token,
|
|
37
|
-
phantomToken: decoded[7][index]
|
|
38
|
-
}));
|
|
32
|
+
this.#quoteToken = decoded[4];
|
|
33
|
+
this.#phantomToken = decoded[5];
|
|
34
|
+
this.#referralId = decoded[6];
|
|
39
35
|
}
|
|
40
36
|
}
|
|
41
37
|
get gateway() {
|
|
@@ -46,33 +42,27 @@ class MidasGatewayAdapterContract extends AbstractAdapterContract {
|
|
|
46
42
|
if (!this.#mToken) throw new MissingSerializedParamsError("mToken");
|
|
47
43
|
return this.#mToken;
|
|
48
44
|
}
|
|
49
|
-
get
|
|
50
|
-
if (!this.#
|
|
51
|
-
|
|
52
|
-
|
|
45
|
+
get quoteToken() {
|
|
46
|
+
if (!this.#quoteToken) throw new MissingSerializedParamsError("quoteToken");
|
|
47
|
+
return this.#quoteToken;
|
|
48
|
+
}
|
|
49
|
+
get phantomToken() {
|
|
50
|
+
if (!this.#phantomToken)
|
|
51
|
+
throw new MissingSerializedParamsError("phantomToken");
|
|
52
|
+
return this.#phantomToken;
|
|
53
53
|
}
|
|
54
54
|
get referralId() {
|
|
55
55
|
if (!this.#referralId) throw new MissingSerializedParamsError("referralId");
|
|
56
56
|
return this.#referralId;
|
|
57
57
|
}
|
|
58
|
-
get allowedInputTokens() {
|
|
59
|
-
if (!this.#allowedInputTokens)
|
|
60
|
-
throw new MissingSerializedParamsError("allowedInputTokens");
|
|
61
|
-
return this.#allowedInputTokens;
|
|
62
|
-
}
|
|
63
58
|
stateHuman(raw) {
|
|
64
59
|
return {
|
|
65
60
|
...super.stateHuman(raw),
|
|
66
61
|
gateway: this.#gateway ? this.labelAddress(this.#gateway) : void 0,
|
|
67
62
|
mToken: this.#mToken ? this.labelAddress(this.#mToken) : void 0,
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
),
|
|
72
|
-
allowedTokens: this.#allowedTokens?.map((t) => ({
|
|
73
|
-
token: this.labelAddress(t.token),
|
|
74
|
-
phantomToken: this.labelAddress(t.phantomToken)
|
|
75
|
-
}))
|
|
63
|
+
quoteToken: this.#quoteToken ? this.labelAddress(this.#quoteToken) : void 0,
|
|
64
|
+
phantomToken: this.#phantomToken ? this.labelAddress(this.#phantomToken) : void 0,
|
|
65
|
+
referralId: this.#referralId
|
|
76
66
|
};
|
|
77
67
|
}
|
|
78
68
|
}
|
|
@@ -28,6 +28,7 @@ export * from "./MellowDVVAdapterContract.js";
|
|
|
28
28
|
export * from "./MellowERC4626VaultAdapterContract.js";
|
|
29
29
|
export * from "./MellowRedeemQueueAdapterContract.js";
|
|
30
30
|
export * from "./MellowWrapperAdapterContract.js";
|
|
31
|
+
export * from "./MidasGatewayAdapterContract.js";
|
|
31
32
|
export * from "./MidasIssuanceVaultAdapterContract.js";
|
|
32
33
|
export * from "./MidasRedemptionVaultAdapterContract.js";
|
|
33
34
|
export * from "./PendleRouterAdapterContract.js";
|