@obolnetwork/obol-sdk 2.0.1 → 2.1.1

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.
Files changed (49) hide show
  1. package/README.md +6 -0
  2. package/dist/cjs/package.json +1 -1
  3. package/dist/cjs/src/abi/Multicall.js +148 -0
  4. package/dist/cjs/src/abi/OWR.js +304 -0
  5. package/dist/cjs/src/abi/SplitMain.js +929 -0
  6. package/dist/cjs/src/ajv.js +17 -2
  7. package/dist/cjs/src/bytecodes.js +9 -0
  8. package/dist/cjs/src/constants.js +48 -1
  9. package/dist/cjs/src/index.js +166 -0
  10. package/dist/cjs/src/schema.js +52 -5
  11. package/dist/cjs/src/splitHelpers.js +187 -0
  12. package/dist/cjs/src/utils.js +22 -1
  13. package/dist/cjs/test/fixtures.js +1 -1
  14. package/dist/cjs/test/methods.test.js +215 -11
  15. package/dist/esm/package.json +1 -1
  16. package/dist/esm/src/abi/Multicall.js +145 -0
  17. package/dist/esm/src/abi/OWR.js +301 -0
  18. package/dist/esm/src/abi/SplitMain.js +926 -0
  19. package/dist/esm/src/ajv.js +17 -2
  20. package/dist/esm/src/bytecodes.js +6 -0
  21. package/dist/esm/src/constants.js +47 -0
  22. package/dist/esm/src/index.js +168 -2
  23. package/dist/esm/src/schema.js +51 -4
  24. package/dist/esm/src/splitHelpers.js +177 -0
  25. package/dist/esm/src/utils.js +19 -0
  26. package/dist/esm/test/fixtures.js +1 -1
  27. package/dist/esm/test/methods.test.js +193 -12
  28. package/dist/types/src/abi/Multicall.d.ts +35 -0
  29. package/dist/types/src/abi/OWR.d.ts +96 -0
  30. package/dist/types/src/abi/SplitMain.d.ts +1159 -0
  31. package/dist/types/src/bytecodes.d.ts +6 -0
  32. package/dist/types/src/constants.d.ts +25 -0
  33. package/dist/types/src/index.d.ts +41 -1
  34. package/dist/types/src/schema.d.ts +85 -4
  35. package/dist/types/src/splitHelpers.d.ts +66 -0
  36. package/dist/types/src/types.d.ts +50 -2
  37. package/dist/types/src/utils.d.ts +3 -0
  38. package/package.json +1 -1
  39. package/src/abi/Multicall.ts +145 -0
  40. package/src/abi/OWR.ts +302 -0
  41. package/src/abi/SplitMain.ts +927 -0
  42. package/src/ajv.ts +33 -2
  43. package/src/bytecodes.ts +12 -0
  44. package/src/constants.ts +59 -0
  45. package/src/index.ts +267 -2
  46. package/src/schema.ts +67 -4
  47. package/src/splitHelpers.ts +360 -0
  48. package/src/types.ts +63 -2
  49. package/src/utils.ts +21 -0
@@ -0,0 +1,301 @@
1
+ export const OWRFactoryContract = {
2
+ abi: [
3
+ {
4
+ inputs: [
5
+ {
6
+ internalType: 'string',
7
+ name: '_ensName',
8
+ type: 'string',
9
+ },
10
+ {
11
+ internalType: 'address',
12
+ name: '_ensReverseRegistrar',
13
+ type: 'address',
14
+ },
15
+ {
16
+ internalType: 'address',
17
+ name: '_ensOwner',
18
+ type: 'address',
19
+ },
20
+ ],
21
+ stateMutability: 'nonpayable',
22
+ type: 'constructor',
23
+ },
24
+ {
25
+ inputs: [],
26
+ name: 'Invalid__Recipients',
27
+ type: 'error',
28
+ },
29
+ {
30
+ inputs: [
31
+ {
32
+ internalType: 'uint256',
33
+ name: 'threshold',
34
+ type: 'uint256',
35
+ },
36
+ ],
37
+ name: 'Invalid__ThresholdTooLarge',
38
+ type: 'error',
39
+ },
40
+ {
41
+ inputs: [],
42
+ name: 'Invalid__ZeroThreshold',
43
+ type: 'error',
44
+ },
45
+ {
46
+ anonymous: false,
47
+ inputs: [
48
+ {
49
+ indexed: true,
50
+ internalType: 'address',
51
+ name: 'owr',
52
+ type: 'address',
53
+ },
54
+ {
55
+ indexed: false,
56
+ internalType: 'address',
57
+ name: 'recoveryAddress',
58
+ type: 'address',
59
+ },
60
+ {
61
+ indexed: false,
62
+ internalType: 'address',
63
+ name: 'principalRecipient',
64
+ type: 'address',
65
+ },
66
+ {
67
+ indexed: false,
68
+ internalType: 'address',
69
+ name: 'rewardRecipient',
70
+ type: 'address',
71
+ },
72
+ {
73
+ indexed: false,
74
+ internalType: 'uint256',
75
+ name: 'threshold',
76
+ type: 'uint256',
77
+ },
78
+ ],
79
+ name: 'CreateOWRecipient',
80
+ type: 'event',
81
+ },
82
+ {
83
+ inputs: [
84
+ {
85
+ internalType: 'address',
86
+ name: 'recoveryAddress',
87
+ type: 'address',
88
+ },
89
+ {
90
+ internalType: 'address',
91
+ name: 'principalRecipient',
92
+ type: 'address',
93
+ },
94
+ {
95
+ internalType: 'address',
96
+ name: 'rewardRecipient',
97
+ type: 'address',
98
+ },
99
+ {
100
+ internalType: 'uint256',
101
+ name: 'amountOfPrincipalStake',
102
+ type: 'uint256',
103
+ },
104
+ ],
105
+ name: 'createOWRecipient',
106
+ outputs: [
107
+ {
108
+ internalType: 'contract OptimisticWithdrawalRecipient',
109
+ name: 'owr',
110
+ type: 'address',
111
+ },
112
+ ],
113
+ stateMutability: 'nonpayable',
114
+ type: 'function',
115
+ },
116
+ {
117
+ inputs: [],
118
+ name: 'owrImpl',
119
+ outputs: [
120
+ {
121
+ internalType: 'contract OptimisticWithdrawalRecipient',
122
+ name: '',
123
+ type: 'address',
124
+ },
125
+ ],
126
+ stateMutability: 'view',
127
+ type: 'function',
128
+ },
129
+ ],
130
+ };
131
+ export const OWRContract = {
132
+ abi: [
133
+ { inputs: [], stateMutability: 'nonpayable', type: 'constructor' },
134
+ { inputs: [], name: 'InvalidDistribution_TooLarge', type: 'error' },
135
+ {
136
+ inputs: [],
137
+ name: 'InvalidTokenRecovery_InvalidRecipient',
138
+ type: 'error',
139
+ },
140
+ {
141
+ anonymous: false,
142
+ inputs: [
143
+ {
144
+ indexed: false,
145
+ internalType: 'uint256',
146
+ name: 'principalPayout',
147
+ type: 'uint256',
148
+ },
149
+ {
150
+ indexed: false,
151
+ internalType: 'uint256',
152
+ name: 'rewardPayout',
153
+ type: 'uint256',
154
+ },
155
+ {
156
+ indexed: false,
157
+ internalType: 'uint256',
158
+ name: 'pullFlowFlag',
159
+ type: 'uint256',
160
+ },
161
+ ],
162
+ name: 'DistributeFunds',
163
+ type: 'event',
164
+ },
165
+ {
166
+ anonymous: false,
167
+ inputs: [
168
+ {
169
+ indexed: false,
170
+ internalType: 'uint256',
171
+ name: 'amount',
172
+ type: 'uint256',
173
+ },
174
+ ],
175
+ name: 'ReceiveETH',
176
+ type: 'event',
177
+ },
178
+ {
179
+ anonymous: false,
180
+ inputs: [
181
+ {
182
+ indexed: false,
183
+ internalType: 'address',
184
+ name: 'recoveryAddressToken',
185
+ type: 'address',
186
+ },
187
+ {
188
+ indexed: false,
189
+ internalType: 'address',
190
+ name: 'recipient',
191
+ type: 'address',
192
+ },
193
+ {
194
+ indexed: false,
195
+ internalType: 'uint256',
196
+ name: 'amount',
197
+ type: 'uint256',
198
+ },
199
+ ],
200
+ name: 'RecoverNonOWRecipientFunds',
201
+ type: 'event',
202
+ },
203
+ {
204
+ anonymous: false,
205
+ inputs: [
206
+ {
207
+ indexed: false,
208
+ internalType: 'address',
209
+ name: 'account',
210
+ type: 'address',
211
+ },
212
+ {
213
+ indexed: false,
214
+ internalType: 'uint256',
215
+ name: 'amount',
216
+ type: 'uint256',
217
+ },
218
+ ],
219
+ name: 'Withdrawal',
220
+ type: 'event',
221
+ },
222
+ {
223
+ inputs: [],
224
+ name: 'claimedPrincipalFunds',
225
+ outputs: [{ internalType: 'uint128', name: '', type: 'uint128' }],
226
+ stateMutability: 'view',
227
+ type: 'function',
228
+ },
229
+ {
230
+ inputs: [],
231
+ name: 'distributeFunds',
232
+ outputs: [],
233
+ stateMutability: 'payable',
234
+ type: 'function',
235
+ },
236
+ {
237
+ inputs: [],
238
+ name: 'distributeFundsPull',
239
+ outputs: [],
240
+ stateMutability: 'payable',
241
+ type: 'function',
242
+ },
243
+ {
244
+ inputs: [],
245
+ name: 'fundsPendingWithdrawal',
246
+ outputs: [{ internalType: 'uint128', name: '', type: 'uint128' }],
247
+ stateMutability: 'view',
248
+ type: 'function',
249
+ },
250
+ {
251
+ inputs: [{ internalType: 'address', name: 'account', type: 'address' }],
252
+ name: 'getPullBalance',
253
+ outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
254
+ stateMutability: 'view',
255
+ type: 'function',
256
+ },
257
+ {
258
+ inputs: [],
259
+ name: 'getTranches',
260
+ outputs: [
261
+ {
262
+ internalType: 'address',
263
+ name: 'principalRecipient',
264
+ type: 'address',
265
+ },
266
+ { internalType: 'address', name: 'rewardRecipient', type: 'address' },
267
+ {
268
+ internalType: 'uint256',
269
+ name: 'amountOfPrincipalStake',
270
+ type: 'uint256',
271
+ },
272
+ ],
273
+ stateMutability: 'pure',
274
+ type: 'function',
275
+ },
276
+ {
277
+ inputs: [
278
+ { internalType: 'address', name: 'nonOWRToken', type: 'address' },
279
+ { internalType: 'address', name: 'recipient', type: 'address' },
280
+ ],
281
+ name: 'recoverFunds',
282
+ outputs: [],
283
+ stateMutability: 'payable',
284
+ type: 'function',
285
+ },
286
+ {
287
+ inputs: [],
288
+ name: 'recoveryAddress',
289
+ outputs: [{ internalType: 'address', name: '', type: 'address' }],
290
+ stateMutability: 'pure',
291
+ type: 'function',
292
+ },
293
+ {
294
+ inputs: [{ internalType: 'address', name: 'account', type: 'address' }],
295
+ name: 'withdraw',
296
+ outputs: [],
297
+ stateMutability: 'nonpayable',
298
+ type: 'function',
299
+ },
300
+ ],
301
+ };