@gearbox-protocol/sdk 11.0.0-next.3 → 11.0.0
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/310/iTreasurySplitter.js +465 -1
- package/dist/cjs/permissionless/bindings/instance-manager.js +38 -0
- package/dist/cjs/permissionless/bindings/market-configurator.js +12 -0
- package/dist/cjs/permissionless/bindings/treasury-splitter.js +71 -0
- package/dist/esm/abi/310/iTreasurySplitter.js +465 -1
- package/dist/esm/permissionless/bindings/instance-manager.js +38 -0
- package/dist/esm/permissionless/bindings/market-configurator.js +12 -0
- package/dist/esm/permissionless/bindings/treasury-splitter.js +71 -0
- package/dist/types/abi/310/iTreasurySplitter.d.ts +355 -0
- package/dist/types/permissionless/bindings/instance-manager.d.ts +1 -0
- package/dist/types/permissionless/bindings/market-configurator.d.ts +2 -0
- package/dist/types/permissionless/bindings/treasury-splitter.d.ts +373 -1
- package/dist/types/permissionless/utils/governance/types.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,8 +1,94 @@
|
|
|
1
|
-
import type { Address, DecodeFunctionDataReturnType, PublicClient } from "viem";
|
|
1
|
+
import type { Address, DecodeFunctionDataReturnType, Hex, PublicClient } from "viem";
|
|
2
2
|
import type { RawTx } from "../../sdk/types/index.js";
|
|
3
3
|
import type { ParsedCall } from "../core/index.js";
|
|
4
4
|
import { BaseContract } from "./base-contract.js";
|
|
5
5
|
declare const abi: readonly [{
|
|
6
|
+
readonly type: "function";
|
|
7
|
+
readonly name: "activeProposals";
|
|
8
|
+
readonly inputs: readonly [];
|
|
9
|
+
readonly outputs: readonly [{
|
|
10
|
+
readonly name: "";
|
|
11
|
+
readonly type: "tuple[]";
|
|
12
|
+
readonly internalType: "struct TwoAdminProposal[]";
|
|
13
|
+
readonly components: readonly [{
|
|
14
|
+
readonly name: "callData";
|
|
15
|
+
readonly type: "bytes";
|
|
16
|
+
readonly internalType: "bytes";
|
|
17
|
+
}, {
|
|
18
|
+
readonly name: "confirmedByAdmin";
|
|
19
|
+
readonly type: "bool";
|
|
20
|
+
readonly internalType: "bool";
|
|
21
|
+
}, {
|
|
22
|
+
readonly name: "confirmedByTreasuryProxy";
|
|
23
|
+
readonly type: "bool";
|
|
24
|
+
readonly internalType: "bool";
|
|
25
|
+
}];
|
|
26
|
+
}];
|
|
27
|
+
readonly stateMutability: "view";
|
|
28
|
+
}, {
|
|
29
|
+
readonly type: "function";
|
|
30
|
+
readonly name: "admin";
|
|
31
|
+
readonly inputs: readonly [];
|
|
32
|
+
readonly outputs: readonly [{
|
|
33
|
+
readonly name: "";
|
|
34
|
+
readonly type: "address";
|
|
35
|
+
readonly internalType: "address";
|
|
36
|
+
}];
|
|
37
|
+
readonly stateMutability: "view";
|
|
38
|
+
}, {
|
|
39
|
+
readonly type: "function";
|
|
40
|
+
readonly name: "cancelConfigure";
|
|
41
|
+
readonly inputs: readonly [{
|
|
42
|
+
readonly name: "callData";
|
|
43
|
+
readonly type: "bytes";
|
|
44
|
+
readonly internalType: "bytes";
|
|
45
|
+
}];
|
|
46
|
+
readonly outputs: readonly [];
|
|
47
|
+
readonly stateMutability: "nonpayable";
|
|
48
|
+
}, {
|
|
49
|
+
readonly type: "function";
|
|
50
|
+
readonly name: "configure";
|
|
51
|
+
readonly inputs: readonly [{
|
|
52
|
+
readonly name: "callData";
|
|
53
|
+
readonly type: "bytes";
|
|
54
|
+
readonly internalType: "bytes";
|
|
55
|
+
}];
|
|
56
|
+
readonly outputs: readonly [];
|
|
57
|
+
readonly stateMutability: "nonpayable";
|
|
58
|
+
}, {
|
|
59
|
+
readonly type: "function";
|
|
60
|
+
readonly name: "contractType";
|
|
61
|
+
readonly inputs: readonly [];
|
|
62
|
+
readonly outputs: readonly [{
|
|
63
|
+
readonly name: "";
|
|
64
|
+
readonly type: "bytes32";
|
|
65
|
+
readonly internalType: "bytes32";
|
|
66
|
+
}];
|
|
67
|
+
readonly stateMutability: "view";
|
|
68
|
+
}, {
|
|
69
|
+
readonly type: "function";
|
|
70
|
+
readonly name: "defaultSplit";
|
|
71
|
+
readonly inputs: readonly [];
|
|
72
|
+
readonly outputs: readonly [{
|
|
73
|
+
readonly name: "";
|
|
74
|
+
readonly type: "tuple";
|
|
75
|
+
readonly internalType: "struct Split";
|
|
76
|
+
readonly components: readonly [{
|
|
77
|
+
readonly name: "initialized";
|
|
78
|
+
readonly type: "bool";
|
|
79
|
+
readonly internalType: "bool";
|
|
80
|
+
}, {
|
|
81
|
+
readonly name: "receivers";
|
|
82
|
+
readonly type: "address[]";
|
|
83
|
+
readonly internalType: "address[]";
|
|
84
|
+
}, {
|
|
85
|
+
readonly name: "proportions";
|
|
86
|
+
readonly type: "uint16[]";
|
|
87
|
+
readonly internalType: "uint16[]";
|
|
88
|
+
}];
|
|
89
|
+
}];
|
|
90
|
+
readonly stateMutability: "view";
|
|
91
|
+
}, {
|
|
6
92
|
readonly type: "function";
|
|
7
93
|
readonly name: "distribute";
|
|
8
94
|
readonly inputs: readonly [{
|
|
@@ -12,10 +98,296 @@ declare const abi: readonly [{
|
|
|
12
98
|
}];
|
|
13
99
|
readonly outputs: readonly [];
|
|
14
100
|
readonly stateMutability: "nonpayable";
|
|
101
|
+
}, {
|
|
102
|
+
readonly type: "function";
|
|
103
|
+
readonly name: "getProposal";
|
|
104
|
+
readonly inputs: readonly [{
|
|
105
|
+
readonly name: "callDataHash";
|
|
106
|
+
readonly type: "bytes32";
|
|
107
|
+
readonly internalType: "bytes32";
|
|
108
|
+
}];
|
|
109
|
+
readonly outputs: readonly [{
|
|
110
|
+
readonly name: "";
|
|
111
|
+
readonly type: "tuple";
|
|
112
|
+
readonly internalType: "struct TwoAdminProposal";
|
|
113
|
+
readonly components: readonly [{
|
|
114
|
+
readonly name: "callData";
|
|
115
|
+
readonly type: "bytes";
|
|
116
|
+
readonly internalType: "bytes";
|
|
117
|
+
}, {
|
|
118
|
+
readonly name: "confirmedByAdmin";
|
|
119
|
+
readonly type: "bool";
|
|
120
|
+
readonly internalType: "bool";
|
|
121
|
+
}, {
|
|
122
|
+
readonly name: "confirmedByTreasuryProxy";
|
|
123
|
+
readonly type: "bool";
|
|
124
|
+
readonly internalType: "bool";
|
|
125
|
+
}];
|
|
126
|
+
}];
|
|
127
|
+
readonly stateMutability: "view";
|
|
128
|
+
}, {
|
|
129
|
+
readonly type: "function";
|
|
130
|
+
readonly name: "setDefaultSplit";
|
|
131
|
+
readonly inputs: readonly [{
|
|
132
|
+
readonly name: "receivers";
|
|
133
|
+
readonly type: "address[]";
|
|
134
|
+
readonly internalType: "address[]";
|
|
135
|
+
}, {
|
|
136
|
+
readonly name: "proportions";
|
|
137
|
+
readonly type: "uint16[]";
|
|
138
|
+
readonly internalType: "uint16[]";
|
|
139
|
+
}];
|
|
140
|
+
readonly outputs: readonly [];
|
|
141
|
+
readonly stateMutability: "nonpayable";
|
|
142
|
+
}, {
|
|
143
|
+
readonly type: "function";
|
|
144
|
+
readonly name: "setTokenInsuranceAmount";
|
|
145
|
+
readonly inputs: readonly [{
|
|
146
|
+
readonly name: "token";
|
|
147
|
+
readonly type: "address";
|
|
148
|
+
readonly internalType: "address";
|
|
149
|
+
}, {
|
|
150
|
+
readonly name: "amount";
|
|
151
|
+
readonly type: "uint256";
|
|
152
|
+
readonly internalType: "uint256";
|
|
153
|
+
}];
|
|
154
|
+
readonly outputs: readonly [];
|
|
155
|
+
readonly stateMutability: "nonpayable";
|
|
156
|
+
}, {
|
|
157
|
+
readonly type: "function";
|
|
158
|
+
readonly name: "setTokenSplit";
|
|
159
|
+
readonly inputs: readonly [{
|
|
160
|
+
readonly name: "token";
|
|
161
|
+
readonly type: "address";
|
|
162
|
+
readonly internalType: "address";
|
|
163
|
+
}, {
|
|
164
|
+
readonly name: "receivers";
|
|
165
|
+
readonly type: "address[]";
|
|
166
|
+
readonly internalType: "address[]";
|
|
167
|
+
}, {
|
|
168
|
+
readonly name: "proportions";
|
|
169
|
+
readonly type: "uint16[]";
|
|
170
|
+
readonly internalType: "uint16[]";
|
|
171
|
+
}, {
|
|
172
|
+
readonly name: "distribute";
|
|
173
|
+
readonly type: "bool";
|
|
174
|
+
readonly internalType: "bool";
|
|
175
|
+
}];
|
|
176
|
+
readonly outputs: readonly [];
|
|
177
|
+
readonly stateMutability: "nonpayable";
|
|
178
|
+
}, {
|
|
179
|
+
readonly type: "function";
|
|
180
|
+
readonly name: "tokenInsuranceAmount";
|
|
181
|
+
readonly inputs: readonly [{
|
|
182
|
+
readonly name: "token";
|
|
183
|
+
readonly type: "address";
|
|
184
|
+
readonly internalType: "address";
|
|
185
|
+
}];
|
|
186
|
+
readonly outputs: readonly [{
|
|
187
|
+
readonly name: "";
|
|
188
|
+
readonly type: "uint256";
|
|
189
|
+
readonly internalType: "uint256";
|
|
190
|
+
}];
|
|
191
|
+
readonly stateMutability: "view";
|
|
192
|
+
}, {
|
|
193
|
+
readonly type: "function";
|
|
194
|
+
readonly name: "tokenSplits";
|
|
195
|
+
readonly inputs: readonly [{
|
|
196
|
+
readonly name: "token";
|
|
197
|
+
readonly type: "address";
|
|
198
|
+
readonly internalType: "address";
|
|
199
|
+
}];
|
|
200
|
+
readonly outputs: readonly [{
|
|
201
|
+
readonly name: "";
|
|
202
|
+
readonly type: "tuple";
|
|
203
|
+
readonly internalType: "struct Split";
|
|
204
|
+
readonly components: readonly [{
|
|
205
|
+
readonly name: "initialized";
|
|
206
|
+
readonly type: "bool";
|
|
207
|
+
readonly internalType: "bool";
|
|
208
|
+
}, {
|
|
209
|
+
readonly name: "receivers";
|
|
210
|
+
readonly type: "address[]";
|
|
211
|
+
readonly internalType: "address[]";
|
|
212
|
+
}, {
|
|
213
|
+
readonly name: "proportions";
|
|
214
|
+
readonly type: "uint16[]";
|
|
215
|
+
readonly internalType: "uint16[]";
|
|
216
|
+
}];
|
|
217
|
+
}];
|
|
218
|
+
readonly stateMutability: "view";
|
|
219
|
+
}, {
|
|
220
|
+
readonly type: "function";
|
|
221
|
+
readonly name: "treasuryProxy";
|
|
222
|
+
readonly inputs: readonly [];
|
|
223
|
+
readonly outputs: readonly [{
|
|
224
|
+
readonly name: "";
|
|
225
|
+
readonly type: "address";
|
|
226
|
+
readonly internalType: "address";
|
|
227
|
+
}];
|
|
228
|
+
readonly stateMutability: "view";
|
|
229
|
+
}, {
|
|
230
|
+
readonly type: "function";
|
|
231
|
+
readonly name: "version";
|
|
232
|
+
readonly inputs: readonly [];
|
|
233
|
+
readonly outputs: readonly [{
|
|
234
|
+
readonly name: "";
|
|
235
|
+
readonly type: "uint256";
|
|
236
|
+
readonly internalType: "uint256";
|
|
237
|
+
}];
|
|
238
|
+
readonly stateMutability: "view";
|
|
239
|
+
}, {
|
|
240
|
+
readonly type: "function";
|
|
241
|
+
readonly name: "withdrawToken";
|
|
242
|
+
readonly inputs: readonly [{
|
|
243
|
+
readonly name: "token";
|
|
244
|
+
readonly type: "address";
|
|
245
|
+
readonly internalType: "address";
|
|
246
|
+
}, {
|
|
247
|
+
readonly name: "to";
|
|
248
|
+
readonly type: "address";
|
|
249
|
+
readonly internalType: "address";
|
|
250
|
+
}, {
|
|
251
|
+
readonly name: "amount";
|
|
252
|
+
readonly type: "uint256";
|
|
253
|
+
readonly internalType: "uint256";
|
|
254
|
+
}];
|
|
255
|
+
readonly outputs: readonly [];
|
|
256
|
+
readonly stateMutability: "nonpayable";
|
|
257
|
+
}, {
|
|
258
|
+
readonly type: "event";
|
|
259
|
+
readonly name: "DistributeToken";
|
|
260
|
+
readonly inputs: readonly [{
|
|
261
|
+
readonly name: "token";
|
|
262
|
+
readonly type: "address";
|
|
263
|
+
readonly indexed: true;
|
|
264
|
+
readonly internalType: "address";
|
|
265
|
+
}, {
|
|
266
|
+
readonly name: "distributedAmount";
|
|
267
|
+
readonly type: "uint256";
|
|
268
|
+
readonly indexed: false;
|
|
269
|
+
readonly internalType: "uint256";
|
|
270
|
+
}];
|
|
271
|
+
readonly anonymous: false;
|
|
272
|
+
}, {
|
|
273
|
+
readonly type: "event";
|
|
274
|
+
readonly name: "SetDefaultSplit";
|
|
275
|
+
readonly inputs: readonly [{
|
|
276
|
+
readonly name: "receivers";
|
|
277
|
+
readonly type: "address[]";
|
|
278
|
+
readonly indexed: false;
|
|
279
|
+
readonly internalType: "address[]";
|
|
280
|
+
}, {
|
|
281
|
+
readonly name: "proportions";
|
|
282
|
+
readonly type: "uint16[]";
|
|
283
|
+
readonly indexed: false;
|
|
284
|
+
readonly internalType: "uint16[]";
|
|
285
|
+
}];
|
|
286
|
+
readonly anonymous: false;
|
|
287
|
+
}, {
|
|
288
|
+
readonly type: "event";
|
|
289
|
+
readonly name: "SetTokenInsuranceAmount";
|
|
290
|
+
readonly inputs: readonly [{
|
|
291
|
+
readonly name: "token";
|
|
292
|
+
readonly type: "address";
|
|
293
|
+
readonly indexed: true;
|
|
294
|
+
readonly internalType: "address";
|
|
295
|
+
}, {
|
|
296
|
+
readonly name: "amount";
|
|
297
|
+
readonly type: "uint256";
|
|
298
|
+
readonly indexed: false;
|
|
299
|
+
readonly internalType: "uint256";
|
|
300
|
+
}];
|
|
301
|
+
readonly anonymous: false;
|
|
302
|
+
}, {
|
|
303
|
+
readonly type: "event";
|
|
304
|
+
readonly name: "SetTokenSplit";
|
|
305
|
+
readonly inputs: readonly [{
|
|
306
|
+
readonly name: "token";
|
|
307
|
+
readonly type: "address";
|
|
308
|
+
readonly indexed: true;
|
|
309
|
+
readonly internalType: "address";
|
|
310
|
+
}, {
|
|
311
|
+
readonly name: "receivers";
|
|
312
|
+
readonly type: "address[]";
|
|
313
|
+
readonly indexed: false;
|
|
314
|
+
readonly internalType: "address[]";
|
|
315
|
+
}, {
|
|
316
|
+
readonly name: "proportions";
|
|
317
|
+
readonly type: "uint16[]";
|
|
318
|
+
readonly indexed: false;
|
|
319
|
+
readonly internalType: "uint16[]";
|
|
320
|
+
}];
|
|
321
|
+
readonly anonymous: false;
|
|
322
|
+
}, {
|
|
323
|
+
readonly type: "event";
|
|
324
|
+
readonly name: "WithdrawToken";
|
|
325
|
+
readonly inputs: readonly [{
|
|
326
|
+
readonly name: "token";
|
|
327
|
+
readonly type: "address";
|
|
328
|
+
readonly indexed: true;
|
|
329
|
+
readonly internalType: "address";
|
|
330
|
+
}, {
|
|
331
|
+
readonly name: "to";
|
|
332
|
+
readonly type: "address";
|
|
333
|
+
readonly indexed: true;
|
|
334
|
+
readonly internalType: "address";
|
|
335
|
+
}, {
|
|
336
|
+
readonly name: "withdrawnAmount";
|
|
337
|
+
readonly type: "uint256";
|
|
338
|
+
readonly indexed: false;
|
|
339
|
+
readonly internalType: "uint256";
|
|
340
|
+
}];
|
|
341
|
+
readonly anonymous: false;
|
|
342
|
+
}, {
|
|
343
|
+
readonly type: "error";
|
|
344
|
+
readonly name: "IncorrectConfigureSelectorException";
|
|
345
|
+
readonly inputs: readonly [];
|
|
346
|
+
}, {
|
|
347
|
+
readonly type: "error";
|
|
348
|
+
readonly name: "OnlyAdminOrTreasuryProxyException";
|
|
349
|
+
readonly inputs: readonly [];
|
|
350
|
+
}, {
|
|
351
|
+
readonly type: "error";
|
|
352
|
+
readonly name: "OnlySelfException";
|
|
353
|
+
readonly inputs: readonly [];
|
|
354
|
+
}, {
|
|
355
|
+
readonly type: "error";
|
|
356
|
+
readonly name: "PropotionSumIncorrectException";
|
|
357
|
+
readonly inputs: readonly [];
|
|
358
|
+
}, {
|
|
359
|
+
readonly type: "error";
|
|
360
|
+
readonly name: "SplitArraysDifferentLengthException";
|
|
361
|
+
readonly inputs: readonly [];
|
|
362
|
+
}, {
|
|
363
|
+
readonly type: "error";
|
|
364
|
+
readonly name: "TreasurySplitterAsReceiverException";
|
|
365
|
+
readonly inputs: readonly [];
|
|
366
|
+
}, {
|
|
367
|
+
readonly type: "error";
|
|
368
|
+
readonly name: "UndefinedSplitException";
|
|
369
|
+
readonly inputs: readonly [];
|
|
15
370
|
}];
|
|
16
371
|
export declare class TreasurySplitterContract extends BaseContract<typeof abi> {
|
|
17
372
|
constructor(address: Address, client: PublicClient);
|
|
373
|
+
defaultSplit(): Promise<{
|
|
374
|
+
initialized: boolean;
|
|
375
|
+
receivers: readonly `0x${string}`[];
|
|
376
|
+
proportions: readonly number[];
|
|
377
|
+
}>;
|
|
378
|
+
activeProposals(): Promise<readonly {
|
|
379
|
+
callData: `0x${string}`;
|
|
380
|
+
confirmedByAdmin: boolean;
|
|
381
|
+
confirmedByTreasuryProxy: boolean;
|
|
382
|
+
}[]>;
|
|
18
383
|
distribute(token: Address): RawTx;
|
|
384
|
+
setDefaultSplitTx(receivers: Address[], proportions: number[]): RawTx;
|
|
385
|
+
setTokenSplitTx(token: Address, receivers: Address[], proportions: number[], distributeBefore: boolean): RawTx;
|
|
386
|
+
setTokenInsuranceAmountTx(token: Address, amount: bigint): RawTx;
|
|
387
|
+
withdrawTokenTx(token: Address, to: Address, amount: bigint): RawTx;
|
|
388
|
+
configureTx(callData: Hex): RawTx;
|
|
389
|
+
cancelConfigureTx(callData: Hex): RawTx;
|
|
390
|
+
private wrapConfigure;
|
|
19
391
|
parseFunctionParams(params: DecodeFunctionDataReturnType<typeof abi>): ParsedCall | undefined;
|
|
20
392
|
}
|
|
21
393
|
export {};
|